Fixed deps and bundles for BMv2 drivers, P4Runtime and gRPC protocols
Change-Id: I96ad0e1e1021897544e41d02304a9f8240c1eb15
diff --git a/protocols/p4runtime/ctl/BUCK b/protocols/p4runtime/ctl/BUCK
index 7fb3b4c..27e102a 100644
--- a/protocols/p4runtime/ctl/BUCK
+++ b/protocols/p4runtime/ctl/BUCK
@@ -1,12 +1,15 @@
+GRPC_VER = '1.3.0'
+PROTOBUF_VER = '3.0.2'
+
GRPC_DEPS = [
- '//incubator/grpc-dependencies:grpc-core-repkg-1.3.0',
- '//lib:grpc-protobuf-1.3.0',
- '//lib:grpc-protobuf-lite-1.3.0',
- '//lib:grpc-stub-1.3.0',
- '//lib:grpc-netty-1.3.0',
- '//lib:grpc-auth-1.3.0',
+ '//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER,
+ '//lib:grpc-protobuf-' + GRPC_VER,
+ '//lib:grpc-protobuf-lite-' + GRPC_VER,
+ '//lib:grpc-stub-' + GRPC_VER,
+ '//lib:grpc-netty-' + GRPC_VER,
+ '//lib:grpc-auth-' + GRPC_VER,
'//lib:google-instrumentation-0.3.0',
- '//lib:protobuf-java-3.0.2',
+ '//lib:protobuf-java-' + PROTOBUF_VER,
# Lazily adding all netty-related packages.
# Some of them might not be necessary.
'//lib:netty',
@@ -34,13 +37,6 @@
'//incubator/bmv2/model:onos-incubator-bmv2-model',
]
-BUNDLES = [
- '//protocols/grpc/api:onos-protocols-grpc-api',
- '//protocols/p4runtime/api:onos-protocols-p4runtime-api',
- '//protocols/p4runtime/proto:onos-protocols-p4runtime-proto'
-] + GRPC_DEPS
-
-
osgi_jar_with_tests(
deps = COMPILE_DEPS,
test_deps = TEST_DEPS,
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4InfoBrowser.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4InfoBrowser.java
index 3c27468..b24bc70 100644
--- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4InfoBrowser.java
+++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4InfoBrowser.java
@@ -31,7 +31,6 @@
import p4.config.P4InfoOuterClass.Preamble;
import p4.config.P4InfoOuterClass.Table;
-import javax.annotation.Nullable;
import java.util.Map;
import static com.google.common.base.Preconditions.checkArgument;
@@ -239,14 +238,14 @@
}
/**
- * Adds the given entity identified by the given name, alias and id.
+ * Adds the given entity identified by the given name, alias (nullable) and id.
*
* @param name entity name
- * @param alias entity alias
+ * @param alias entity alias or null
* @param id entity id
* @param entity entity message
*/
- void add(String name, @Nullable String alias, int id, T entity) {
+ void add(String name, String alias, int id, T entity) {
checkNotNull(name);
checkArgument(!name.isEmpty(), "Name cannot be empty");
checkNotNull(entity);