Support to build openstack related apps using Bazel
Change-Id: Ibc9f43a8fd92bb41b162a88a1eb3e8c8c5ad990a
diff --git a/apps/openstacknetworking/BUILD b/apps/openstacknetworking/BUILD
new file mode 100644
index 0000000..e9e995c
--- /dev/null
+++ b/apps/openstacknetworking/BUILD
@@ -0,0 +1,15 @@
+BUNDLES = [
+ "//apps/openstacknetworking/api:onos-apps-openstacknetworking-api",
+ "//apps/openstacknetworking/app:onos-apps-openstacknetworking-app",
+]
+
+onos_app(
+ category = "Integration",
+ description = "SONA Openstack Networking Application.",
+ included_bundles = BUNDLES,
+ required_apps = [
+ "org.onosproject.openstacknode",
+ ],
+ title = "OpenStack Networking Application",
+ url = "https://wiki.onosproject.org/display/ONOS/SONA%3A+DC+Network+Virtualization",
+)
diff --git a/apps/openstacknetworking/api/BUILD b/apps/openstacknetworking/api/BUILD
new file mode 100644
index 0000000..5348b60
--- /dev/null
+++ b/apps/openstacknetworking/api/BUILD
@@ -0,0 +1,15 @@
+load(
+ "//apps/openstacknode:openstack4j.bzl",
+ "ALL_PACKAGES",
+ "EXCLUDE_PACKAGES",
+ "INCLUDE_PACKAGES",
+)
+
+COMPILE_DEPS = CORE_DEPS + [
+ "@openstack4j_core//jar",
+]
+
+osgi_jar_with_tests(
+ import_packages = INCLUDE_PACKAGES + "," + EXCLUDE_PACKAGES + "," + ALL_PACKAGES,
+ deps = COMPILE_DEPS,
+)
diff --git a/apps/openstacknetworking/app/BUILD b/apps/openstacknetworking/app/BUILD
new file mode 100644
index 0000000..529c9c0
--- /dev/null
+++ b/apps/openstacknetworking/app/BUILD
@@ -0,0 +1,43 @@
+load(
+ "//apps/openstacknode:openstack4j.bzl",
+ "ALL_PACKAGES",
+ "EXCLUDE_PACKAGES",
+ "INCLUDE_PACKAGES",
+ "get_jackson_deps_path",
+ "get_openstack4j_deps_path",
+)
+
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + REST + [
+ "//core/store/serializers:onos-core-serializers",
+ "//protocols/ovsdb/api:onos-protocols-ovsdb-api",
+ "//protocols/ovsdb/rfc:onos-protocols-ovsdb-rfc",
+ "//apps/openstacknode/api:onos-apps-openstacknode-api",
+ "//apps/openstacknetworking/api:onos-apps-openstacknetworking-api",
+ "@openstack4j_core//jar",
+ "@openstack4j_http_connector//jar",
+ "@openstack4j_httpclient//jar",
+ "@json_patch//jar",
+ "@jackson_coreutils//jar",
+ "@btf//jar",
+ "@msg_simple//jar",
+ "@snakeyaml//jar",
+]
+
+TEST_DEPS = TEST_ADAPTERS + TEST_REST + [
+ "//core/api:onos-api-tests",
+ "//apps/openstacknode/api:onos-apps-openstacknode-api-tests",
+ "//core/common:onos-core-common-tests",
+ "//web/api:onos-rest-tests",
+]
+
+osgi_jar_with_tests(
+ api_description = "REST API for OpenStack Networking",
+ api_package = "org.onosproject.openstacknetworking.web",
+ api_title = "OpenStack Networking API",
+ api_version = "1.0",
+ bundle_classpath = get_openstack4j_deps_path() + get_jackson_deps_path(),
+ import_packages = INCLUDE_PACKAGES + "," + EXCLUDE_PACKAGES + "," + ALL_PACKAGES,
+ test_deps = TEST_DEPS,
+ web_context = "/onos/openstacknetworking",
+ deps = COMPILE_DEPS,
+)