Bazel builds for additional drivers
Change-Id: I8c3f36bd7c56127480ab9419ad52dac626b9f3cb
diff --git a/apps/cfm/BUILD b/apps/cfm/BUILD
new file mode 100644
index 0000000..07008a5
--- /dev/null
+++ b/apps/cfm/BUILD
@@ -0,0 +1,13 @@
+BUNDLES = [
+ "//apps/cfm/api:onos-apps-cfm-api",
+ "//apps/cfm/app:onos-apps-cfm-app",
+ "//apps/cfm/nbi:onos-apps-cfm-nbi",
+]
+
+onos_app(
+ category = "Monitoring",
+ description = "Layer 2 Monitoring Connectivity Fault Management App",
+ included_bundles = BUNDLES,
+ title = "Layer 2 Monitoring CFM Application",
+ url = "http://onosproject.org",
+)
diff --git a/apps/cfm/api/BUILD b/apps/cfm/api/BUILD
new file mode 100644
index 0000000..8d87120
--- /dev/null
+++ b/apps/cfm/api/BUILD
@@ -0,0 +1,4 @@
+osgi_jar_with_tests(
+ test_deps = TEST_ADAPTERS,
+ deps = CORE_DEPS,
+)
diff --git a/apps/cfm/app/BUILD b/apps/cfm/app/BUILD
new file mode 100644
index 0000000..300086d
--- /dev/null
+++ b/apps/cfm/app/BUILD
@@ -0,0 +1,13 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + [
+ "//core/store/serializers:onos-core-serializers",
+ "//apps/cfm/api:onos-apps-cfm-api",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+ "//utils/osgi:onlab-osgi-tests",
+]
+
+osgi_jar_with_tests(
+ test_deps = TEST_DEPS,
+ deps = COMPILE_DEPS,
+)
diff --git a/apps/cfm/nbi/BUILD b/apps/cfm/nbi/BUILD
new file mode 100644
index 0000000..c28e664
--- /dev/null
+++ b/apps/cfm/nbi/BUILD
@@ -0,0 +1,19 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + REST + [
+ "//apps/cfm/api:onos-apps-cfm-api",
+]
+
+TEST_DEPS = TEST_REST + [
+ "//utils/osgi:onlab-osgi-tests",
+ "//web/api:onos-rest-tests",
+]
+
+osgi_jar_with_tests(
+ api_description = "REST API for L2 Monitoring CFM",
+ api_package = "org.onosproject.soam.rest",
+ api_title = "L2 Monitoring CFM",
+ api_version = "1.0",
+ exclude_tests = ["org/onosproject/cfm/impl/CfmResourceTest"],
+ test_deps = TEST_DEPS,
+ web_context = "/onos/cfm",
+ deps = COMPILE_DEPS,
+)
diff --git a/apps/l3vpn/BUILD b/apps/l3vpn/BUILD
new file mode 100644
index 0000000..8064faa
--- /dev/null
+++ b/apps/l3vpn/BUILD
@@ -0,0 +1,40 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + ONOS_YANG + [
+ "//models/l3vpn:onos-models-l3vpn",
+ "//apps/config:onos-apps-config",
+ "//core/store/serializers:onos-core-serializers",
+ "//apps/yang:onos-apps-yang",
+ "//apps/pce/app:onos-apps-pce-app",
+ "//incubator/api:onos-incubator-api",
+ "//models/common:onos-models-common",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+ "//utils/osgi:onlab-osgi-tests",
+]
+
+APPS = [
+ "org.onosproject.yang",
+ "org.onosproject.yang-gui",
+ "org.onosproject.config",
+ "org.onosproject.restconf",
+ "org.onosproject.protocols.restconfserver",
+ "org.onosproject.netconf",
+ "org.onosproject.netconfsb",
+ "org.onosproject.models.common",
+ "org.onosproject.models.l3vpn",
+ "org.onosproject.bgpcep",
+]
+
+osgi_jar_with_tests(
+ test_deps = TEST_DEPS,
+ deps = COMPILE_DEPS,
+)
+
+onos_app(
+ app_name = "org.onosproject.l3vpn",
+ category = "Traffic Engineering",
+ description = "L3VPN YANG Application",
+ required_apps = APPS,
+ title = "YANG L3VPN",
+ url = "http://onosproject.org",
+)
diff --git a/apps/odtn/api/BUILD b/apps/odtn/api/BUILD
new file mode 100644
index 0000000..4df56b5
--- /dev/null
+++ b/apps/odtn/api/BUILD
@@ -0,0 +1,28 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + ONOS_YANG + [
+ "@onos_yang_runtime//jar",
+ "//models/tapi:onos-models-tapi",
+ "//models/openconfig:onos-models-openconfig",
+ "//apps/yang:onos-apps-yang",
+ "//apps/config:onos-apps-config",
+]
+
+osgi_jar_with_tests(
+ test_deps = TEST_ADAPTERS,
+ deps = COMPILE_DEPS,
+)
+
+APPS = [
+ "org.onosproject.yang",
+ "org.onosproject.models.tapi",
+ "org.onosproject.models.openconfig",
+]
+
+# TODO probably bucklet, etc. should escape title & description
+onos_app(
+ app_name = "org.onosproject.odtn-api",
+ category = "Traffic Engineering",
+ description = "ODTN API & Utilities Application",
+ required_apps = APPS,
+ title = "ODTN API & Utilities Application",
+ url = "http://onosproject.org",
+)
diff --git a/drivers/ciena/waveserverai/BUILD b/drivers/ciena/waveserverai/BUILD
new file mode 100644
index 0000000..4cd70dc
--- /dev/null
+++ b/drivers/ciena/waveserverai/BUILD
@@ -0,0 +1,50 @@
+COMPILE_DEPS = CORE_DEPS + ONOS_YANG + [
+ "//drivers/utilities:onos-drivers-utilities",
+ "//drivers/netconf:onos-drivers-netconf",
+ "//protocols/netconf/api:onos-protocols-netconf-api",
+ "//protocols/netconf/ctl:onos-protocols-netconf-ctl",
+ "//models/common:onos-models-common",
+ "//models/ciena/waveserverai:onos-models-ciena-waveserverai",
+ "//apps/optical-model:onos-apps-optical-model",
+ "//drivers/optical:onos-drivers-optical",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+ "//core/api:onos-api-tests",
+ "//drivers/netconf:onos-drivers-netconf-tests",
+ "//utils/osgi:onlab-osgi-tests",
+]
+
+BUNDLES = [
+ ":onos-drivers-ciena-waveserverai",
+ "//drivers/utilities:onos-drivers-utilities",
+ "//drivers/netconf:onos-drivers-netconf",
+]
+
+REQUIRED_APPS = [
+ "org.onosproject.yang",
+ "org.onosproject.optical-model",
+ "org.onosproject.drivers.optical",
+ "org.onosproject.models.ciena.waveserverai",
+ "org.onosproject.netconf",
+ "org.onosproject.netconfsb",
+ "org.onosproject.drivers.netconf",
+ "org.onosproject.linkdiscovery",
+]
+
+osgi_jar_with_tests(
+ resources = glob(["src/main/resources/**"]),
+ resources_root = "src/main/resources",
+ test_deps = TEST_DEPS,
+ deps = COMPILE_DEPS,
+)
+
+onos_app(
+ app_name = "org.onosproject.drivers.ciena.waveserverai",
+ category = "Drivers",
+ description = "Adds support for Ciena Waveserver Ai devices.",
+ included_bundles = BUNDLES,
+ required_apps = REQUIRED_APPS,
+ title = "Ciena Waveserver Ai Drivers",
+ url = "http://onosproject.org",
+)
diff --git a/drivers/huawei/BUILD b/drivers/huawei/BUILD
new file mode 100644
index 0000000..bb473bc
--- /dev/null
+++ b/drivers/huawei/BUILD
@@ -0,0 +1,45 @@
+COMPILE_DEPS = CORE_DEPS + ONOS_YANG + [
+ "@onos_yang_runtime//jar",
+ "//models/l3vpn:onos-models-l3vpn",
+ "//models/huawei:onos-models-huawei",
+ "//drivers/utilities:onos-drivers-utilities",
+ "//protocols/netconf/api:onos-protocols-netconf-api",
+ "//apps/l3vpn:onos-apps-l3vpn",
+ "//apps/config:onos-apps-config",
+ "//apps/yang:onos-apps-yang",
+ "//models/common:onos-models-common",
+]
+
+APPS = [
+ "org.onosproject.yang",
+ "org.onosproject.yang-gui",
+ "org.onosproject.config",
+ "org.onosproject.restconf",
+ "org.onosproject.protocols.restconfserver",
+ "org.onosproject.netconf",
+ "org.onosproject.netconfsb",
+ "org.onosproject.models.common",
+ "org.onosproject.models.l3vpn",
+ "org.onosproject.l3vpn",
+ "org.onosproject.models.huawei",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+ "//utils/osgi:onlab-osgi-tests",
+]
+
+osgi_jar_with_tests(
+ resources = glob(["src/main/resources/**"]),
+ resources_root = "src/main/resources",
+ test_deps = TEST_DEPS,
+ deps = COMPILE_DEPS,
+)
+
+onos_app(
+ app_name = "org.onosproject.drivers.huawei",
+ category = "Drivers",
+ description = "Adds support for Huawei devices.",
+ required_apps = APPS,
+ title = "Huawei Drivers",
+ url = "http://onosproject.org",
+)
diff --git a/drivers/microsemi/ea1000/BUILD b/drivers/microsemi/ea1000/BUILD
new file mode 100644
index 0000000..cdde14e
--- /dev/null
+++ b/drivers/microsemi/ea1000/BUILD
@@ -0,0 +1,55 @@
+COMPILE_DEPS = CORE_DEPS + ONOS_YANG + CLI + [
+ "@onos_yang_runtime//jar",
+ "//drivers/utilities:onos-drivers-utilities",
+ "//protocols/netconf/api:onos-protocols-netconf-api",
+ "//protocols/netconf/ctl:onos-protocols-netconf-ctl",
+ "//models/common:onos-models-common",
+ "//models/microsemi:onos-models-microsemi",
+ "//apps/cfm/api:onos-apps-cfm-api",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+ "//core/api:onos-api-tests",
+ "//drivers/netconf:onos-drivers-netconf-tests",
+ "//utils/osgi:onlab-osgi-tests",
+ "//apps/cfm/app:onos-apps-cfm-app",
+ "//apps/cfm/app:onos-apps-cfm-app-tests",
+]
+
+APPS = [
+ "org.onosproject.yang",
+ "org.onosproject.config",
+ "org.onosproject.netconf",
+ "org.onosproject.netconfsb",
+ "org.onosproject.drivers.netconf",
+ "org.onosproject.models.common",
+ "org.onosproject.models.microsemi",
+ "org.onosproject.cfm",
+]
+
+osgi_jar_with_tests(
+ exclude_tests = [
+ "org.onosproject.drivers.microsemi.EA1000CfmMepProgrammableTest",
+ "org.onosproject.drivers.microsemi.EA1000FlowRuleProgrammableTest",
+ "org.onosproject.drivers.microsemi.EA1000MeterProviderTest",
+ "org.onosproject.drivers.microsemi.EA1000SoamDmProgrammableTest",
+ "org.onosproject.drivers.microsemi.yang.IetfSystemManagerTest",
+ "org.onosproject.drivers.microsemi.yang.MseaCfmManagerTest",
+ "org.onosproject.drivers.microsemi.yang.MseaSaFilteringManagerTest",
+ "org.onosproject.drivers.microsemi.yang.MseaSaFilteringManagerTest",
+ "org.onosproject.drivers.microsemi.yang.MseaUniEvcServiceManagerTest",
+ ],
+ resources = glob(["src/main/resources/**"]),
+ resources_root = "src/main/resources",
+ test_deps = TEST_DEPS,
+ deps = COMPILE_DEPS,
+)
+
+onos_app(
+ app_name = "org.onosproject.drivers.microsemi.ea1000",
+ category = "Drivers",
+ description = "Adds support for Microsemi EA1000 devices.",
+ required_apps = APPS,
+ title = "Microsemi Drivers EA1000",
+ url = "http://onosproject.org",
+)
diff --git a/drivers/odtn-driver/BUILD b/drivers/odtn-driver/BUILD
new file mode 100644
index 0000000..7f13b94
--- /dev/null
+++ b/drivers/odtn-driver/BUILD
@@ -0,0 +1,38 @@
+COMPILE_DEPS = CORE_DEPS + [
+ "@commons_jxpath//jar",
+ "//drivers/utilities:onos-drivers-utilities",
+ "//protocols/netconf/api:onos-protocols-netconf-api",
+ "//apps/odtn/api:onos-apps-odtn-api",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+ "@slf4j_jdk14//jar",
+ "//core/api:onos-api-tests",
+]
+
+BUNDLES = [
+ ":onos-drivers-odtn-driver",
+ # '//lib:commons-jxpath',
+ # '//lib:commons-beanutils', # jxpath dependency
+ # '//lib:jdom', # jxpath dependency
+]
+
+osgi_jar_with_tests(
+ resources = glob(["src/main/resources/**"]),
+ resources_root = "src/main/resources",
+ test_deps = TEST_DEPS,
+ deps = COMPILE_DEPS,
+)
+
+onos_app(
+ app_name = "org.onosproject.drivers.odtn-driver",
+ category = "Drivers",
+ description = "Drivers related to ODTN",
+ included_bundles = BUNDLES,
+ required_apps = [
+ "org.onosproject.netconf",
+ "org.onosproject.odtn-api",
+ ],
+ title = "ODTN Driver",
+ url = "https://wiki.onosproject.org/display/ODTN/ODTN",
+)
diff --git a/drivers/polatis/netconf/BUILD b/drivers/polatis/netconf/BUILD
new file mode 100644
index 0000000..ec548fe
--- /dev/null
+++ b/drivers/polatis/netconf/BUILD
@@ -0,0 +1,41 @@
+COMPILE_DEPS = CORE_DEPS + ONOS_YANG + [
+ "//models/polatis:onos-models-polatis",
+ "//drivers/utilities:onos-drivers-utilities",
+ "//protocols/netconf/api:onos-protocols-netconf-api",
+ "//apps/optical-model:onos-apps-optical-model",
+ "//incubator/api:onos-incubator-api",
+]
+
+APPS = [
+ "org.onosproject.netconf",
+ "org.onosproject.models.common",
+ "org.onosproject.models.polatis",
+ "org.onosproject.optical-model",
+ "org.onosproject.faultmanagement",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+ "//utils/osgi:onlab-osgi-tests",
+]
+
+BUNDLES = [
+ ":onos-drivers-polatis-netconf",
+ "//drivers/utilities:onos-drivers-utilities",
+]
+
+osgi_jar_with_tests(
+ resources = glob(["src/main/resources/**"]),
+ resources_root = "src/main/resources",
+ test_deps = TEST_DEPS,
+ deps = COMPILE_DEPS,
+)
+
+onos_app(
+ app_name = "org.onosproject.drivers.polatis.netconf",
+ category = "Drivers",
+ description = "ONOS Polatis Device Drivers application.",
+ included_bundles = BUNDLES,
+ required_apps = APPS,
+ title = "Polatis Device Drivers",
+ url = "http://www.polatis.com",
+)
diff --git a/drivers/polatis/snmp/BUILD b/drivers/polatis/snmp/BUILD
new file mode 100644
index 0000000..fc12811
--- /dev/null
+++ b/drivers/polatis/snmp/BUILD
@@ -0,0 +1,33 @@
+COMPILE_DEPS = CORE_DEPS + [
+ "@org_apache_servicemix_bundles_snmp4j//jar",
+ "//drivers/utilities:onos-drivers-utilities",
+ "//protocols/snmp/api:onos-protocols-snmp-api",
+ "//apps/optical-model:onos-apps-optical-model",
+ "//incubator/api:onos-incubator-api",
+]
+
+APPS = [
+ "org.onosproject.snmp",
+ "org.onosproject.optical-model",
+ "org.onosproject.faultmanagement",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+ "//core/api:onos-api-tests",
+]
+
+osgi_jar_with_tests(
+ resources = glob(["src/main/resources/**"]),
+ resources_root = "src/main/resources",
+ test_deps = TEST_DEPS,
+ deps = COMPILE_DEPS,
+)
+
+onos_app(
+ app_name = "org.onosproject.drivers.polatis.snmp",
+ category = "Drivers",
+ description = "ONOS Polatis SNMP Device Drivers application.",
+ required_apps = APPS,
+ title = "Polatis SNMP Device Drivers",
+ url = "http://www.polatis.com",
+)
diff --git a/modules.bzl b/modules.bzl
index 1d74543..bee196c 100644
--- a/modules.bzl
+++ b/modules.bzl
@@ -88,7 +88,7 @@
"//drivers/ciena/waveserver:onos-drivers-ciena-waveserver-oar",
"//drivers/ciena/c5162:onos-drivers-ciena-c5162-oar",
"//drivers/ciena/c5170:onos-drivers-ciena-c5170-oar",
- #"//drivers/ciena/waveserverai:onos-drivers-ciena-waveserverai-oar",
+ "//drivers/ciena/waveserverai:onos-drivers-ciena-waveserverai-oar",
"//drivers/cisco/netconf:onos-drivers-cisco-netconf-oar",
"//drivers/cisco/rest:onos-drivers-cisco-rest-oar",
"//drivers/corsa:onos-drivers-corsa-oar",
@@ -101,8 +101,8 @@
"//drivers/juniper:onos-drivers-juniper-oar",
"//drivers/lisp:onos-drivers-lisp-oar",
"//drivers/flowspec:onos-drivers-flowspec-oar",
- #"//drivers/huawei:onos-drivers-huawei-oar",
- #"//drivers/microsemi/ea1000:onos-drivers-microsemi-ea1000-oar",
+ "//drivers/huawei:onos-drivers-huawei-oar",
+ "//drivers/microsemi/ea1000:onos-drivers-microsemi-ea1000-oar",
"//drivers/oplink:onos-drivers-oplink-oar",
#"//drivers/bmv2:onos-drivers-bmv2-oar",
#"//drivers/barefoot:onos-drivers-barefoot-oar",
@@ -110,9 +110,9 @@
"//drivers/hp:onos-drivers-hp-oar",
#"//drivers/p4runtime:onos-drivers-p4runtime-oar",
#"//drivers/gnmi:onos-drivers-gnmi-oar",
- #"//drivers/polatis/netconf:onos-drivers-polatis-netconf-oar",
+ "//drivers/polatis/netconf:onos-drivers-polatis-netconf-oar",
"//drivers/polatis/openflow:onos-drivers-polatis-openflow-oar",
- #"//drivers/odtn-driver:onos-drivers-odtn-driver-oar",
+ "//drivers/odtn-driver:onos-drivers-odtn-driver-oar",
]
ONOS_PROVIDERS = [
@@ -219,7 +219,7 @@
"//apps/yang-gui:onos-apps-yang-gui-oar",
#"//apps/cord-support:onos-apps-cord-support-oar",
#"//apps/network-troubleshoot:onos-apps-network-troubleshoot-oar",
- #"//apps/l3vpn:onos-apps-l3vpn-oar",
+ "//apps/l3vpn:onos-apps-l3vpn-oar",
#"//apps/openroadm:onos-apps-openroadm-oar",
#"//apps/artemis:onos-apps-artemis-oar",
#"//apps/pi-demo/ecmp:onos-apps-pi-demo-ecmp-oar",
@@ -233,7 +233,7 @@
#"//apps/openstacktelemetry:onos-apps-openstacktelemetry-oar",
#"//apps/p4-tutorial/pipeconf:onos-apps-p4-tutorial-pipeconf-oar",
#"//apps/p4-tutorial/mytunnel:onos-apps-p4-tutorial-mytunnel-oar",
- #"//apps/cfm:onos-apps-cfm-oar",
+ "//apps/cfm:onos-apps-cfm-oar",
"//apps/routeradvertisement:onos-apps-routeradvertisement-oar",
#"//apps/powermanagement:onos-apps-powermanagement-oar",
#"//apps/t3:onos-apps-t3-oar",