Support to build openstack related apps using Bazel
Change-Id: Ibc9f43a8fd92bb41b162a88a1eb3e8c8c5ad990a
diff --git a/apps/openstacktelemetry/BUILD b/apps/openstacktelemetry/BUILD
new file mode 100644
index 0000000..134dc51
--- /dev/null
+++ b/apps/openstacktelemetry/BUILD
@@ -0,0 +1,28 @@
+BUNDLES = [
+ "@kafka_clients//jar",
+ "@influxdb_java//jar",
+ "@commons_codec//jar",
+ "@retrofit//jar",
+ "@okhttp//jar",
+ "@logging_interceptor//jar",
+ "@gson//jar",
+ "@okio//jar",
+ "@moshi//jar",
+ "@converter_moshi//jar",
+ "@protobuf_java_3_2_0//jar",
+ "@google_instrumentation_0_3_0//jar",
+ "@grpc_core_1_3_1//jar",
+ "//apps/openstacktelemetry/api:onos-apps-openstacktelemetry-api",
+ "//apps/openstacktelemetry/app:onos-apps-openstacktelemetry-app",
+]
+
+onos_app(
+ category = "Integration",
+ description = "SONA Openstack Telemetry Application.",
+ included_bundles = BUNDLES,
+ required_apps = [
+ "org.onosproject.openstacknetworking",
+ ],
+ title = "OpenStack Telemetry Application",
+ url = "https://wiki.onosproject.org/display/ONOS/SONA%3A+DC+Network+Virtualization",
+)
diff --git a/apps/openstacktelemetry/api/BUILD b/apps/openstacktelemetry/api/BUILD
new file mode 100644
index 0000000..167d8ce
--- /dev/null
+++ b/apps/openstacktelemetry/api/BUILD
@@ -0,0 +1,16 @@
+COMPILE_DEPS = CORE_DEPS + [
+ "@kafka_clients//jar",
+ "@jersey_client//jar",
+ "@javax_ws_rs_api//jar",
+ "@influxdb_java//jar",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+ "//core/api:onos-api-tests",
+ "//core/common:onos-core-common-tests",
+]
+
+osgi_jar_with_tests(
+ test_deps = TEST_DEPS,
+ deps = COMPILE_DEPS,
+)
diff --git a/apps/openstacktelemetry/app/BUILD b/apps/openstacktelemetry/app/BUILD
new file mode 100644
index 0000000..434c13c
--- /dev/null
+++ b/apps/openstacktelemetry/app/BUILD
@@ -0,0 +1,27 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + REST + CLI + GRPC_1_3 + [
+ "@kafka_clients//jar",
+ "@jersey_client//jar",
+ "@influxdb_java//jar",
+ "@grpc_core_1_3_1//jar",
+ "//core/store/serializers:onos-core-serializers",
+ "//apps/openstacknode/api:onos-apps-openstacknode-api",
+ "//apps/openstacknetworking/api:onos-apps-openstacknetworking-api",
+ "//apps/openstacktelemetry/api:onos-apps-openstacktelemetry-api",
+ "@grpc_protobuf_lite_1_3_1//jar",
+]
+
+TEST_DEPS = TEST_ADAPTERS + TEST_REST + [
+ "//core/api:onos-api-tests",
+ "//core/common:onos-core-common-tests",
+ "//web/api:onos-rest-tests",
+]
+
+osgi_jar_with_tests(
+ api_description = "OpenStack Network Telemetry REST API",
+ api_package = "org.onosproject.openstacktelemetry.web",
+ api_title = "OpenStack Network Telemetry REST API",
+ api_version = "1.0",
+ test_deps = TEST_DEPS,
+ web_context = "/onos/openstacktelemetry",
+ deps = COMPILE_DEPS,
+)