Adding Bazel build for the remaining YANG models.

Change-Id: I9fdd681e572a0d04547dd957a340580ad9fa4a43
diff --git a/lib/BUCK b/lib/BUCK
index d0b8a42..e4c0b6c 100644
--- a/lib/BUCK
+++ b/lib/BUCK
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Wed, 11 Jul 2018 21:35:49 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Fri, 13 Jul 2018 17:38:31 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 pass_thru_pom(
@@ -1196,6 +1196,15 @@
 )
 
 remote_jar (
+  name = 'slf4j-nop',
+  out = 'slf4j-nop-1.7.25.jar',
+  url = 'mvn:org.slf4j:slf4j-nop:jar:1.7.25',
+  sha1 = '8c7708c79afec923de8957b7d4f90177628b9fcd',
+  maven_coords = 'org.slf4j:slf4j-nop:1.7.25',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
   name = 'typesafe-config',
   out = 'config-1.2.1.jar',
   url = 'mvn:com.typesafe:config:jar:1.2.1',
diff --git a/lib/deps.json b/lib/deps.json
index ce36d64..3b4fc96 100644
--- a/lib/deps.json
+++ b/lib/deps.json
@@ -232,6 +232,7 @@
     "servlet-api": "mvn:javax.servlet:servlet-api:2.5",
     "slf4j-api": "mvn:org.slf4j:slf4j-api:1.7.25",
     "slf4j-jdk14": "mvn:org.slf4j:slf4j-jdk14:1.7.25",
+    "slf4j-nop": "mvn:org.slf4j:slf4j-nop:1.7.25",
     "typesafe-config": "mvn:com.typesafe:config:1.2.1",
     "validation-api": "mvn:javax.validation:validation-api:1.1.0.Final",
     "checkstyle": "mvn:com.puppycrawl.tools:checkstyle:8.10",
diff --git a/models/ciena/waveserverai/BUILD b/models/ciena/waveserverai/BUILD
new file mode 100644
index 0000000..e41a676
--- /dev/null
+++ b/models/ciena/waveserverai/BUILD
@@ -0,0 +1,17 @@
+load("//tools/build/bazel:yang.bzl", "yang_model")
+
+COMPILE_DEPS = [
+    "//models/common:onos-models-common",
+]
+
+APPS = [
+    "org.onosproject.models.common",
+]
+
+yang_model(
+    app_name = "org.onosproject.models.ciena.waveserverai",
+    title = "Ciena Waveserver Ai YANG Models",
+    custom_registrator = True,
+    deps = COMPILE_DEPS,
+    required_apps = APPS,
+)
diff --git a/models/l3vpn/BUILD b/models/l3vpn/BUILD
new file mode 100644
index 0000000..463f95b
--- /dev/null
+++ b/models/l3vpn/BUILD
@@ -0,0 +1,17 @@
+load("//tools/build/bazel:yang.bzl", "yang_model")
+
+COMPILE_DEPS = [
+    "//models/common:onos-models-common",
+]
+
+APPS = [
+    "org.onosproject.models.common",
+]
+
+yang_model(
+    app_name = "org.onosproject.models.l3vpn",
+    title = "L3VPN YANG Models",
+    custom_registrator = True,
+    deps = COMPILE_DEPS,
+    required_apps = APPS,
+)
diff --git a/models/microsemi/BUILD b/models/microsemi/BUILD
new file mode 100644
index 0000000..a091a5c
--- /dev/null
+++ b/models/microsemi/BUILD
@@ -0,0 +1,17 @@
+load("//tools/build/bazel:yang.bzl", "yang_model")
+
+COMPILE_DEPS = [
+    "//models/common:onos-models-common",
+]
+
+APPS = [
+    "org.onosproject.models.common",
+]
+
+yang_model(
+    app_name = "org.onosproject.models.microsemi",
+    title = "Microsemi YANG Models",
+    custom_registrator = True,
+    deps = COMPILE_DEPS,
+    required_apps = APPS,
+)
diff --git a/models/openconfig-infinera/BUILD b/models/openconfig-infinera/BUILD
new file mode 100644
index 0000000..14ccc86
--- /dev/null
+++ b/models/openconfig-infinera/BUILD
@@ -0,0 +1,17 @@
+load("//tools/build/bazel:yang.bzl", "yang_model")
+
+COMPILE_DEPS = [
+    "//models/ietf:onos-models-ietf",
+]
+
+APPS = [
+    "org.onosproject.models.ietf",
+]
+
+yang_model(
+  app_name = "org.onosproject.models.openconfig-infinera",
+  title = "OpenConfig Infinera XT3300 YANG Models",
+  custom_registrator = False,
+  deps = COMPILE_DEPS,
+  required_apps = APPS,
+)
diff --git a/models/polatis/BUILD b/models/polatis/BUILD
new file mode 100644
index 0000000..1ec001b
--- /dev/null
+++ b/models/polatis/BUILD
@@ -0,0 +1,16 @@
+load("//tools/build/bazel:yang.bzl", "yang_model")
+
+COMPILE_DEPS = [
+    "//models/common:onos-models-common",
+]
+
+APPS = [
+    "org.onosproject.models.common",
+]
+
+yang_model (
+  app_name = "org.onosproject.models.polatis",
+  title = "Polatis YANG Model",
+  deps = COMPILE_DEPS,
+  required_apps = APPS,
+)
diff --git a/modules.bzl b/modules.bzl
index f97284a..3fdd110 100644
--- a/modules.bzl
+++ b/modules.bzl
@@ -259,16 +259,16 @@
 
 MODELS = [
     "//models/ietf:onos-models-ietf-oar",
-    #"//models/common:onos-models-common-oar",
+    "//models/common:onos-models-common-oar",
     "//models/huawei:onos-models-huawei-oar",
-    #"//models/openconfig:onos-models-openconfig-oar",
-    #"//models/openconfig-infinera:onos-models-openconfig-infinera-oar",
+    "//models/openconfig:onos-models-openconfig-oar",
+    "//models/openconfig-infinera:onos-models-openconfig-infinera-oar",
     "//models/openroadm:onos-models-openroadm-oar",
     "//models/tapi:onos-models-tapi-oar",
-    #"//models/l3vpn:onos-models-l3vpn-oar",
-    #"//models/microsemi:onos-models-microsemi-oar",
-    #"//models/polatis:onos-models-polatis-oar",
-    #"//models/ciena/waveserverai:onos-models-ciena-waveserverai-oar",
+    "//models/l3vpn:onos-models-l3vpn-oar",
+    "//models/microsemi:onos-models-microsemi-oar",
+    "//models/polatis:onos-models-polatis-oar",
+    "//models/ciena/waveserverai:onos-models-ciena-waveserverai-oar",
 ]
 
 PIPELINES = [
diff --git a/tools/build/bazel/BUILD b/tools/build/bazel/BUILD
index 62534a0..c4c1f2d 100644
--- a/tools/build/bazel/BUILD
+++ b/tools/build/bazel/BUILD
@@ -23,5 +23,8 @@
     name = "onos_yang_compiler",
     main_class = "org.onosproject.yang.compiler.main.YangCompilerMain",
     visibility = ["//visibility:public"],
-    runtime_deps = ["@onos_yang_compiler_main//jar"],
+    runtime_deps = [
+        "@onos_yang_compiler_main//jar",
+        "@slf4j_nop//jar", # TODO: Change to jdk14 after fixing verbosity
+    ],
 )
\ No newline at end of file
diff --git a/tools/build/bazel/generate_workspace.bzl b/tools/build/bazel/generate_workspace.bzl
index 93a5182..6bd9ccb 100644
--- a/tools/build/bazel/generate_workspace.bzl
+++ b/tools/build/bazel/generate_workspace.bzl
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Wed, 11 Jul 2018 21:35:55 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Fri, 13 Jul 2018 17:38:35 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 load("//tools/build/bazel:variables.bzl", "ONOS_GROUP_ID", "ONOS_VERSION")
@@ -787,6 +787,12 @@
     )
 
     native.maven_jar(
+        name = "slf4j_nop",
+        artifact = "org.slf4j:slf4j-nop:1.7.25",
+        sha1 = "8c7708c79afec923de8957b7d4f90177628b9fcd",
+    )
+
+    native.maven_jar(
         name = "typesafe_config",
         artifact = "com.typesafe:config:1.2.1",
         sha1 = "f771f71fdae3df231bcd54d5ca2d57f0bf93f467",
@@ -1797,6 +1803,12 @@
     )
 
     native.java_library(
+        name = "slf4j_nop",
+        visibility = ["//visibility:public"],
+        exports = ["@slf4j_nop//jar"],
+    )
+
+    native.java_library(
         name = "typesafe_config",
         visibility = ["//visibility:public"],
         exports = ["@typesafe_config//jar"],
@@ -2238,6 +2250,7 @@
 artifact_map[str(Label("@servlet_api//jar"))] = "mvn:javax.servlet:servlet-api:jar:NON-OSGI:2.5"
 artifact_map[str(Label("@slf4j_api//jar"))] = "mvn:org.slf4j:slf4j-api:jar:1.7.25"
 artifact_map[str(Label("@slf4j_jdk14//jar"))] = "mvn:org.slf4j:slf4j-jdk14:jar:1.7.25"
+artifact_map[str(Label("@slf4j_nop//jar"))] = "mvn:org.slf4j:slf4j-nop:jar:1.7.25"
 artifact_map[str(Label("@typesafe_config//jar"))] = "mvn:com.typesafe:config:jar:1.2.1"
 artifact_map[str(Label("@validation_api//jar"))] = "mvn:javax.validation:validation-api:jar:1.1.0.Final"
 artifact_map[str(Label("@checkstyle//jar"))] = "mvn:com.puppycrawl.tools:checkstyle:jar:NON-OSGI:8.10"
diff --git a/tools/build/bazel/osgi_java_library.bzl b/tools/build/bazel/osgi_java_library.bzl
index becc270..98680bd 100644
--- a/tools/build/bazel/osgi_java_library.bzl
+++ b/tools/build/bazel/osgi_java_library.bzl
@@ -372,6 +372,7 @@
         test_resources = None,
         visibility = ["//visibility:public"],
         version = ONOS_VERSION,
+        suppress_errorprone = False,
         web_context = None,
         api_title = "",
         api_version = "",
@@ -436,13 +437,15 @@
         native_srcs = srcs + [name + "_swagger_java"]
         native_resources.append(name + "_swagger_json")
 
+    javacopts = [ "-XepDisableAllChecks" ] if suppress_errorprone else []
+
     # compile the Java code
     if len(resource_jars) > 0:
         native.java_library(name = name + "-native", srcs = native_srcs, resource_jars = resource_jars,
-                            deps = deps, visibility = visibility)
+                            deps = deps, visibility = visibility, javacopts = javacopts)
     else:
         native.java_library(name = name + "-native", srcs = native_srcs, resources = native_resources,
-                            deps = deps, visibility = visibility)
+                            deps = deps, visibility = visibility, javacopts = javacopts)
 
     _bnd(
         name = name,
@@ -510,6 +513,7 @@
         include_resources = {},
         visibility = ["//visibility:public"],
         version = ONOS_VERSION,
+        suppress_errorprone = False,
         web_context = None,
         api_title = "",
         api_version = "",
@@ -533,6 +537,7 @@
         exclude_tests = [],
         test_resources = [],
         visibility = visibility,
+        suppress_errorprone = suppress_errorprone,
         version = version,
         import_packages = import_packages,
         api_title = api_title,
diff --git a/tools/build/bazel/yang.bzl b/tools/build/bazel/yang.bzl
index c0d77fd..548e3b2 100644
--- a/tools/build/bazel/yang.bzl
+++ b/tools/build/bazel/yang.bzl
@@ -160,7 +160,8 @@
     # Produce a Java library from the generated Java sources
     osgi_jar(name = name, srcs = srcs,
              resource_jars = [name + "-generate"], deps = deps,
-             visibility = ["//visibility:public"])
+             visibility = ["//visibility:public"],
+             suppress_errorprone = True)
 
 def yang_model(
     name = None,