Fix up buck build for OVSDB apps
Change-Id: I57b69574ad7989795ba81fbeecb7e084c3165203
diff --git a/BUCK b/BUCK
index 4862933..7354d04 100644
--- a/BUCK
+++ b/BUCK
@@ -61,8 +61,8 @@
'//providers/openflow/flow:onos-providers-openflow-flow',
'//providers/openflow/group:onos-providers-openflow-group',
'//providers/openflow/meter:onos-providers-openflow-meter',
- '//providers/ovsdb/device:onos-ovsdb-provider-device',
- '//providers/ovsdb/tunnel:onos-ovsdb-provider-tunnel',
+ '//providers/ovsdb/device:onos-providers-ovsdb-device',
+ '//providers/ovsdb/tunnel:onos-providers-ovsdb-tunnel',
'//providers/rest/device:onos-providers-rest-device',
'//providers/snmp/device:onos-providers-snmp-device',
'//providers/isis/cfg:onos-providers-isis-cfg',
@@ -85,6 +85,8 @@
'//providers/netconf:onos-providers-netconf-oar',
'//providers/openflow/message:onos-providers-openflow-message-oar',
'//providers/ovsdb:onos-providers-ovsdb-oar',
+ '//providers/ovsdb/host:onos-providers-ovsdb-host-oar',
+ '//providers/ovsdb/base:onos-providers-ovsdb-base-oar',
'//providers/pcep:onos-providers-pcep-oar',
'//providers/null:onos-providers-null-oar',
'//providers/openflow/base:onos-providers-openflow-base-oar',
diff --git a/providers/ovsdb/BUCK b/providers/ovsdb/BUCK
index ac9fa05..da5b05c 100644
--- a/providers/ovsdb/BUCK
+++ b/providers/ovsdb/BUCK
@@ -1,7 +1,6 @@
BUNDLES = [
- '//providers/ovsdb/device:onos-ovsdb-provider-device',
- '//providers/ovsdb/host:onos-ovsdb-provider-host',
- '//providers/ovsdb/tunnel:onos-ovsdb-provider-tunnel',
+ '//providers/ovsdb/device:onos-providers-ovsdb-device',
+ '//providers/ovsdb/tunnel:onos-providers-ovsdb-tunnel',
]
APPS = [
@@ -11,9 +10,8 @@
onos_app (
title = 'OVSDB Southbound Meta App',
- description = 'ONOS fault management application',
+ description = 'ONOS OVSDB southbound meta application',
category = 'Provider',
- url = 'https://wiki.onosproject.org/display/ONOS/Fault+Management',
included_bundles = BUNDLES,
required_apps = APPS,
)
diff --git a/providers/ovsdb/base/BUCK b/providers/ovsdb/base/BUCK
new file mode 100644
index 0000000..9261e9a
--- /dev/null
+++ b/providers/ovsdb/base/BUCK
@@ -0,0 +1,17 @@
+BUNDLES = [
+ '//protocols/ovsdb/rfc:onos-protocols-ovsdb-rfc',
+ '//protocols/ovsdb/api:onos-protocols-ovsdb-api',
+ '//protocols/ovsdb/ctl:onos-protocols-ovsdb-ctl',
+
+ '//providers/ovsdb/tunnel:onos-providers-ovsdb-tunnel',
+ '//providers/ovsdb/device:onos-providers-ovsdb-device',
+]
+
+onos_app (
+ app_name = 'org.onosproject.ovsdb-base',
+ title = 'OVSDB Provider',
+ category = 'Provider',
+ url = 'http://onosproject.org',
+ description = 'ONOS OVSDB provider.',
+ included_bundles = BUNDLES,
+)
diff --git a/providers/ovsdb/device/BUCK b/providers/ovsdb/device/BUCK
index 58f5c86..19f1833 100644
--- a/providers/ovsdb/device/BUCK
+++ b/providers/ovsdb/device/BUCK
@@ -1,31 +1,10 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-CURRENT_NAME = 'onos-ovsdb-provider-device'
-CURRENT_TARGET = ':' + CURRENT_NAME
-
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/ovsdb/api:onos-protocols-ovsdb-api',
'//protocols/ovsdb/rfc:onos-protocols-ovsdb-rfc',
]
-TEST_DEPS = [
- '//lib:TEST',
-]
-
-osgi_jar(
- name = CURRENT_NAME,
- srcs = glob([SRC + '/*.java']),
+osgi_jar_with_tests (
deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
)
-java_test(
- name = 'tests',
- srcs = glob([TEST + '/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [CURRENT_TARGET],
- source_under_test = [CURRENT_TARGET],
-)
diff --git a/providers/ovsdb/host/BUCK b/providers/ovsdb/host/BUCK
index 82aaf13..bdb2b28 100644
--- a/providers/ovsdb/host/BUCK
+++ b/providers/ovsdb/host/BUCK
@@ -1,31 +1,17 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-CURRENT_NAME = 'onos-ovsdb-provider-host'
-CURRENT_TARGET = ':' + CURRENT_NAME
-
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/ovsdb/api:onos-protocols-ovsdb-api',
'//protocols/ovsdb/rfc:onos-protocols-ovsdb-rfc',
]
-TEST_DEPS = [
- '//lib:TEST',
-]
-
-osgi_jar(
- name = CURRENT_NAME,
- srcs = glob([SRC + '/*.java']),
+osgi_jar_with_tests (
deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
)
-java_test(
- name = 'tests',
- srcs = glob([TEST + '/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [CURRENT_TARGET],
- source_under_test = [CURRENT_TARGET],
+onos_app (
+ app_name = 'org.onosproject.ovsdbhostprovider',
+ title = 'OVSDB host Provider',
+ category = 'Provider',
+ url = 'http://onosproject.org',
+ description = 'OVSDB Host provider.',
)
diff --git a/providers/ovsdb/tunnel/BUCK b/providers/ovsdb/tunnel/BUCK
index a6087d0..571e5ed 100644
--- a/providers/ovsdb/tunnel/BUCK
+++ b/providers/ovsdb/tunnel/BUCK
@@ -1,9 +1,3 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-CURRENT_NAME = 'onos-ovsdb-provider-tunnel'
-CURRENT_TARGET = ':' + CURRENT_NAME
-
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/ovsdb/api:onos-protocols-ovsdb-api',
@@ -11,22 +5,6 @@
'//incubator/api:onos-incubator-api',
]
-TEST_DEPS = [
- '//lib:TEST',
-]
-
-osgi_jar(
- name = CURRENT_NAME,
- srcs = glob([SRC + '/*.java']),
+osgi_jar_with_tests (
deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'tests',
- srcs = glob([TEST + '/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [CURRENT_TARGET],
- source_under_test = [CURRENT_TARGET],
)
diff --git a/tools/package/BUCK b/tools/package/BUCK
index f6a00ba..a3f132f 100644
--- a/tools/package/BUCK
+++ b/tools/package/BUCK
@@ -33,6 +33,8 @@
'//providers/openflow/app:onos-providers-openflow-app-oar',
'//providers/rest:onos-providers-rest-oar',
'//providers/isis:onos-providers-isis-oar',
+ '//providers/ovsdb/host:onos-providers-ovsdb-host-oar',
+ '//providers/ovsdb/base:onos-providers-ovsdb-base-oar',
# Apps
'//apps/dhcp:onos-apps-dhcp-oar',
@@ -103,4 +105,4 @@
out = 'onos.tar.gz',
bash = '$(exe //buck-tools:onos-stage) $OUT $(location :onos-karaf) ' + ' '.join(sources),
visibility = [ 'PUBLIC' ],
-)
\ No newline at end of file
+)