Fix up buck build for OVSDB apps
Change-Id: I57b69574ad7989795ba81fbeecb7e084c3165203
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],
)