Appify buck build for openstack and VTN apps
Change-Id: I6cc23cd567954daaee59271123a07040853e695b
diff --git a/apps/cordvtn/BUCK b/apps/cordvtn/BUCK
index b06ce4c..d898be9 100644
--- a/apps/cordvtn/BUCK
+++ b/apps/cordvtn/BUCK
@@ -9,14 +9,14 @@
'//utils/rest:onlab-rest',
'//cli:onos-cli',
'//core/store/serializers:onos-core-serializers',
- '//apps/openstackinterface:onos-apps-openstackinterface-api',
+ '//apps/openstackinterface/api:onos-apps-openstackinterface-api',
'//apps/dhcp/api:onos-apps-dhcp-api',
'//protocols/ovsdb/api:onos-ovsdb-api',
'//protocols/ovsdb/rfc:onos-ovsdb-rfc',
]
BUNDLES = [
- '//apps/openstackinterface:onos-apps-openstackinterface-api',
+ '//apps/openstackinterface/api:onos-apps-openstackinterface-api',
'//apps/cordvtn:onos-apps-cordvtn',
]
diff --git a/apps/faultmanagement/BUCK b/apps/faultmanagement/BUCK
index a7b0ae8..224343f 100644
--- a/apps/faultmanagement/BUCK
+++ b/apps/faultmanagement/BUCK
@@ -10,6 +10,7 @@
'//lib:javax.ws.rs-api',
'//core/store/serializers:onos-core-serializers',
'//utils/osgi:onlab-osgi',
+ '//core/store/serializers:onos-core-serializers',
]
TEST_DEPS = [
diff --git a/apps/openstackinterface/BUCK b/apps/openstackinterface/BUCK
index 05f3ee3..a7ccbd3 100644
--- a/apps/openstackinterface/BUCK
+++ b/apps/openstackinterface/BUCK
@@ -1,32 +1,12 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-COMPILE_DEPS = [
- '//lib:CORE_DEPS',
- '//lib:jersey-client',
- '//lib:javax.ws.rs-api',
-]
-
BUNDLES = [
- '//apps/openstackinterface:onos-apps-openstackinterface-api',
- # TODO - this doesn't actually work now, have to refactor the BUCK files into each sub directory
+ '//apps/openstackinterface/api:onos-apps-openstackinterface-api',
+ '//apps/openstackinterface/app:onos-apps-openstackinterface-app',
]
-osgi_jar_with_tests (
- name = 'onos-apps-openstackinterface-api',
- srcs = glob(['api/' + SRC + '*.java']),
- deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
-)
-
-osgi_jar_with_tests (
- deps = COMPILE_DEPS,
-)
-
onos_app (
- title = 'Authentication App',
- category = 'Security',
+ title = 'OpenStack Interface App',
+ category = 'Utility',
url = 'http://onosproject.org',
- description = 'ONOS authentication application.',
+ description = 'Openstack Interface Application.',
included_bundles = BUNDLES,
)
diff --git a/apps/openstackinterface/api/BUCK b/apps/openstackinterface/api/BUCK
new file mode 100644
index 0000000..d5a67ec
--- /dev/null
+++ b/apps/openstackinterface/api/BUCK
@@ -0,0 +1,9 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:jersey-client',
+ '//lib:javax.ws.rs-api',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
diff --git a/apps/openstackinterface/app/BUCK b/apps/openstackinterface/app/BUCK
new file mode 100644
index 0000000..edc037d
--- /dev/null
+++ b/apps/openstackinterface/app/BUCK
@@ -0,0 +1,11 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:jersey-client',
+ '//lib:javax.ws.rs-api',
+ '//apps/openstackinterface/api:onos-apps-openstackinterface-api',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
+
diff --git a/apps/openstacknetworking/BUCK b/apps/openstacknetworking/BUCK
index ef92536..03639d1 100644
--- a/apps/openstacknetworking/BUCK
+++ b/apps/openstacknetworking/BUCK
@@ -1,102 +1,12 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-COMPILE_DEPS = [
- '//lib:CORE_DEPS',
- '//lib:jersey-client',
- '//lib:javax.ws.rs-api',
- '//apps/openstackinterface:onos-apps-openstackinterface-api',
- '//core/store/serializers:onos-core-serializers',
+BUNDLES = [
+ '//apps/openstacknetworking/api:onos-apps-openstacknetworking-api',
+ '//apps/openstacknetworking/web:onos-apps-openstacknetworking-web',
]
-java_library(
- name = 'onos-app-openstacknetworking',
- visibility = ['PUBLIC'],
- deps = [
- ':onos-app-openstacknetworking-api',
- ':onos-app-openstacknetworking-app',
- ':onos-app-openstackrouting',
- ':onos-app-openstackswitching',
- ':onos-app-openstacknetworking-web',
- ]
-)
-
-TEST_DEPS = [
- '//lib:TEST',
- ':onos-app-openstacknetworking',
-]
-
-java_library(
- name = 'onos-app-openstacknetworking-api',
- srcs = glob(['api/' + SRC + '*.java']),
- deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-openstacknetworking-api-tests',
- srcs = glob([TEST + 'api/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS,
- source_under_test = [':onos-app-openstacknetworking-api'],
-)
-
-java_library(
- name = 'onos-app-openstacknetworking-app',
- srcs = glob(['app/' + SRC + '*.java']),
- deps = COMPILE_DEPS + [':onos-app-openstacknetworking-api'],
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-openstacknetworking-app-tests',
- srcs = glob([TEST + 'app/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS,
- source_under_test = [':onos-app-openstacknetworking-app'],
-)
-
-java_library(
- name = 'onos-app-openstackrouting',
- srcs = glob(['openstackrouting/' + SRC + '*.java']),
- deps = COMPILE_DEPS + [':onos-app-openstacknetworking-api'],
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-openstackrouting-tests',
- srcs = glob([TEST + 'openstackrouting/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS,
- source_under_test = [':onos-app-openstackrouting'],
-)
-
-java_library(
- name = 'onos-app-openstackswitching',
- srcs = glob(['openstgackswitching/' + SRC + '*.java']),
- deps = COMPILE_DEPS + [':onos-app-openstacknetworking-api'],
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-openstackswitching-tests',
- srcs = glob([TEST + 'openstackswitching/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS,
- source_under_test = [':onos-app-openstackswitching'],
-)
-
-java_library(
- name = 'onos-app-openstacknetworking-web',
- srcs = glob(['openstgacknetworking/' + SRC + '*.java']),
- deps = COMPILE_DEPS + [':onos-app-openstacknetworking-api'],
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-openstacknetworking-web-tests',
- srcs = glob([TEST + 'openstackswitching/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS,
- source_under_test = [':onos-app-openstacknetworking-web'],
+onos_app (
+ title = 'OpenStack Networking App',
+ category = 'Utility',
+ url = 'http://onosproject.org',
+ included_bundles = BUNDLES,
+ required_apps = [ 'org.onosproject.openstackinterface' ],
)
diff --git a/apps/openstacknetworking/api/BUCK b/apps/openstacknetworking/api/BUCK
new file mode 100644
index 0000000..1b4424e
--- /dev/null
+++ b/apps/openstacknetworking/api/BUCK
@@ -0,0 +1,10 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:jersey-client',
+ '//lib:javax.ws.rs-api',
+ '//apps/openstackinterface/api:onos-apps-openstackinterface-api',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
diff --git a/apps/openstacknetworking/openstackrouting/BUCK b/apps/openstacknetworking/openstackrouting/BUCK
new file mode 100644
index 0000000..ccb668b
--- /dev/null
+++ b/apps/openstacknetworking/openstackrouting/BUCK
@@ -0,0 +1,24 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//core/store/serializers:onos-core-serializers',
+ '//apps/openstackinterface/api:onos-apps-openstackinterface-api',
+ '//apps/openstacknetworking/api:onos-apps-openstacknetworking-api',
+]
+
+BUNDLES = [
+ '//apps/openstackinterface/api:onos-apps-openstackinterface-api',
+ '//apps/openstacknetworking/api:onos-apps-openstacknetworking-api',
+ '//apps/openstacknetworking/openstackrouting:onos-apps-openstacknetworking-openstackrouting',
+ #'//apps/dhcp/api:onos-apps-dhcp-api',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
+
+onos_app (
+ title = 'OpenStack Routing App',
+ category = 'Utility',
+ url = 'http://onosproject.org',
+ description = 'OpenStack routing application.',
+)
diff --git a/apps/openstacknetworking/openstackswitching/BUCK b/apps/openstacknetworking/openstackswitching/BUCK
new file mode 100644
index 0000000..42d7c07
--- /dev/null
+++ b/apps/openstacknetworking/openstackswitching/BUCK
@@ -0,0 +1,26 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//core/store/serializers:onos-core-serializers',
+ '//apps/openstackinterface/api:onos-apps-openstackinterface-api',
+ '//apps/openstacknetworking/api:onos-apps-openstacknetworking-api',
+ '//apps/dhcp/api:onos-apps-dhcp-api',
+]
+
+BUNDLES = [
+ '//apps/openstackinterface/api:onos-apps-openstackinterface-api',
+ '//apps/openstacknetworking/api:onos-apps-openstacknetworking-api',
+ '//apps/openstacknetworking/openstackswitching:onos-apps-openstacknetworking-openstackswitching',
+ '//apps/dhcp/api:onos-apps-dhcp-api',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
+
+onos_app (
+ title = 'OpenStack Switching App',
+ category = 'Utility',
+ url = 'http://onosproject.org',
+ description = 'OpenStack Switching application.',
+ included_bundles = BUNDLES,
+)
diff --git a/apps/openstacknetworking/web/BUCK b/apps/openstacknetworking/web/BUCK
new file mode 100644
index 0000000..ac7ba09
--- /dev/null
+++ b/apps/openstacknetworking/web/BUCK
@@ -0,0 +1,13 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:jersey-client',
+ '//lib:javax.ws.rs-api',
+ '//utils/rest:onlab-rest',
+ '//apps/openstackinterface/api:onos-apps-openstackinterface-api',
+ '//apps/openstackinterface/app:onos-apps-openstackinterface-app',
+ '//apps/openstacknetworking/api:onos-apps-openstacknetworking-api',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
diff --git a/apps/vtn/BUCK b/apps/vtn/BUCK
index c12f5d9..7e5a886 100644
--- a/apps/vtn/BUCK
+++ b/apps/vtn/BUCK
@@ -1,106 +1,13 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-COMPILE_DEPS = [
- '//lib:CORE_DEPS',
- '//lib:org.apache.karaf.shell.console',
- '//cli:onos-cli',
- '//utils/rest:onlab-rest',
- '//lib:javax.ws.rs-api',
- '//core/store/serializers:onos-core-serializers',
- '//incubator/api:onos-incubator-api',
+BUNDLES = [
+ '//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc',
+ '//apps/vtn/sfcmgr:onos-apps-vtn-sfcmgr',
+ '//apps/vtn/vtnmgr:onos-apps-vtn-vtnmgr',
+ '//apps/vtn/vtnweb:onos-apps-vtn-vtnweb',
]
-TEST_DEPS = [
- '//lib:TEST_REST',
- '//utils/osgi:onlab-osgi-tests',
- '//web/api:onos-rest-tests',
-]
-
-java_library(
- name = 'onos-app-vtn',
- visibility = ['PUBLIC'],
- deps = [':onos-app-sfc-mgr',
- ':onos-app-vtn-mgr',
- ':onos-app-vtn-rsc',
- ':onos-app-vtn-web',
- ],
-)
-
-# sfcmgr
-
-java_library(
- name = 'onos-app-sfc-mgr',
- srcs = glob(['sfcmgr/' + SRC + '*.java']),
- deps = COMPILE_DEPS + [':onos-app-vtn-rsc'],
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-sfc-mgr-tests',
- srcs = glob(['sfcmgr/' + TEST + '*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [':onos-app-sfc-mgr', ':onos-app-vtn-rsc'],
- source_under_test = [':onos-app-sfc-mgr'],
-)
-
-# vtnmgr
-
-java_library(
- name = 'onos-app-vtn-mgr',
- srcs = glob(['vtnmgr/' + SRC + '*.java']),
- deps = COMPILE_DEPS + [':onos-app-vtn-rsc'],
- visibility = ['PUBLIC'],
- resources_root = 'vtnmgr/src/main/resources',
- resources = glob(['vtnmgr/src/main/resources/**']),
-)
-
-java_test(
- name = 'onos-app-vtn-mgr-tests',
- srcs = glob(['vtnmgr/' + TEST + '*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [':onos-app-vtn-mgr', ':onos-app-vtn-rsc'],
- source_under_test = [':onos-app-vtn-mgr'],
-)
-
-# vtnrsc
-
-java_library(
- name = 'onos-app-vtn-rsc',
- srcs = glob(['vtnrsc/' + SRC + '*.java']),
- deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
- resources_root = 'vtnrsc/src/main/resources',
- resources = glob(['vtnrsc/src/main/resources/**']),
-)
-
-java_test(
- name = 'onos-app-vtn-rsc-tests',
- srcs = glob(['vtnrsc/' + TEST + '*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [':onos-app-vtn-rsc'],
- source_under_test = [':onos-app-vtn-rsc'],
-)
-
-# vtnweb
-
-java_library(
- name = 'onos-app-vtn-web',
- srcs = glob(['vtnweb/' + SRC + '*.java']),
- deps = COMPILE_DEPS + [':onos-app-vtn-rsc'],
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-vtn-web-tests',
- srcs = glob(['vtnweb/' + TEST + '*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [':onos-app-vtn-web', ':onos-app-vtn-rsc'],
- source_under_test = [':onos-app-vtn-web'],
- resources_root = 'vtnweb/src/test/resources',
- resources = glob(['vtnweb/src/test/resources/**']),
+onos_app (
+ title = 'OPNFV App',
+ url = 'http://onosproject.org',
+ included_bundles = BUNDLES,
+ description = 'ONOS framework applications',
)
diff --git a/apps/vtn/sfcmgr/BUCK b/apps/vtn/sfcmgr/BUCK
new file mode 100644
index 0000000..c2b7555
--- /dev/null
+++ b/apps/vtn/sfcmgr/BUCK
@@ -0,0 +1,14 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//core/store/serializers:onos-core-serializers',
+ '//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc',
+]
+
+TEST_DEPS = [
+ '//lib:TEST_ADAPTERS',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+ test_deps = TEST_DEPS,
+)
diff --git a/apps/vtn/vtnmgr/BUCK b/apps/vtn/vtnmgr/BUCK
new file mode 100644
index 0000000..b54f6d9a
--- /dev/null
+++ b/apps/vtn/vtnmgr/BUCK
@@ -0,0 +1,13 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:org.apache.karaf.shell.console',
+ '//core/store/serializers:onos-core-serializers',
+ '//cli:onos-cli',
+ '//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+ resources_root = 'src/main/resources',
+ resources = glob(['src/main/resources/**']),
+)
diff --git a/apps/vtn/vtnrsc/BUCK b/apps/vtn/vtnrsc/BUCK
new file mode 100644
index 0000000..846fc16
--- /dev/null
+++ b/apps/vtn/vtnrsc/BUCK
@@ -0,0 +1,15 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:org.apache.karaf.shell.console',
+ '//cli:onos-cli',
+ '//core/store/serializers:onos-core-serializers',
+]
+
+TEST_DEPS = [
+ '//lib:TEST_REST',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+ test_deps = TEST_DEPS,
+)
diff --git a/apps/vtn/vtnweb/BUCK b/apps/vtn/vtnweb/BUCK
new file mode 100644
index 0000000..f9052b9
--- /dev/null
+++ b/apps/vtn/vtnweb/BUCK
@@ -0,0 +1,17 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:javax.ws.rs-api',
+ '//utils/rest:onlab-rest',
+ '//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc',
+]
+
+TEST_DEPS = [
+ '//lib:TEST_REST',
+ '//utils/osgi:onlab-osgi-tests',
+ '//web/api:onos-rest-tests',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+ test_deps = TEST_DEPS,
+)