[WIP] Attempt at building grpc and p4runtime protocols with Bazel
STILL NOT WORKING AT RUNTIME
Change-Id: I1f9e60b12a12e09edad2a714ec2921a4f71c6d35
diff --git a/protocols/bgp/api/BUCK b/protocols/bgp/api/BUCK
index e4aaf3e..37d94b0 100644
--- a/protocols/bgp/api/BUCK
+++ b/protocols/bgp/api/BUCK
@@ -2,7 +2,7 @@
'//lib:CORE_DEPS',
'//protocols/bgp/bgpio:onos-protocols-bgp-bgpio',
'//core/api:onos-api',
- '//lib:netty',
+ '//lib:io_netty_netty',
]
osgi_jar_with_tests (
diff --git a/protocols/bgp/api/BUILD b/protocols/bgp/api/BUILD
index 7568aba..dac6528 100644
--- a/protocols/bgp/api/BUILD
+++ b/protocols/bgp/api/BUILD
@@ -1,5 +1,5 @@
COMPILE_DEPS = CORE_DEPS + [
- "@netty//jar",
+ "@io_netty_netty//jar",
"//protocols/bgp/bgpio:onos-protocols-bgp-bgpio",
]
diff --git a/protocols/bgp/bgpio/BUCK b/protocols/bgp/bgpio/BUCK
index 0656504..32d5f4d 100644
--- a/protocols/bgp/bgpio/BUCK
+++ b/protocols/bgp/bgpio/BUCK
@@ -3,7 +3,7 @@
'//lib:COMPILE',
'//lib:NETTY',
'//core/api:onos-api',
- '//lib:netty',
+ '//lib:io_netty_netty',
]
osgi_jar_with_tests (
diff --git a/protocols/bgp/bgpio/BUILD b/protocols/bgp/bgpio/BUILD
index a375113..db96180 100644
--- a/protocols/bgp/bgpio/BUILD
+++ b/protocols/bgp/bgpio/BUILD
@@ -1,5 +1,5 @@
COMPILE_DEPS = CORE_DEPS + NETTY + [
- "@netty//jar",
+ "@io_netty_netty//jar",
]
osgi_jar_with_tests(
diff --git a/protocols/bgp/ctl/BUCK b/protocols/bgp/ctl/BUCK
index 5d4ac76..3568c2e 100644
--- a/protocols/bgp/ctl/BUCK
+++ b/protocols/bgp/ctl/BUCK
@@ -6,8 +6,8 @@
'//lib:javax.ws.rs-api',
'//protocols/bgp/api:onos-protocols-bgp-api',
'//protocols/bgp/bgpio:onos-protocols-bgp-bgpio',
- '//lib:netty-common',
- '//lib:netty',
+ '//lib:io_netty_netty_common',
+ '//lib:io_netty_netty',
'//lib:org.osgi.compendium',
'//lib:org.apache.felix.scr.annotations',
]
diff --git a/protocols/bgp/ctl/BUILD b/protocols/bgp/ctl/BUILD
index 41ab47e..a7cf7ad 100644
--- a/protocols/bgp/ctl/BUILD
+++ b/protocols/bgp/ctl/BUILD
@@ -3,8 +3,8 @@
"@httpclient_osgi//jar",
"@httpcore_osgi//jar",
"@javax_ws_rs_api//jar",
- "@netty_common//jar",
- "@netty//jar",
+ "@io_netty_netty_common//jar",
+ "@io_netty_netty//jar",
"//protocols/bgp/api:onos-protocols-bgp-api",
"//protocols/bgp/bgpio:onos-protocols-bgp-bgpio",
]
diff --git a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/Controller.java b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/Controller.java
index acd1c7b..04c1c1d 100644
--- a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/Controller.java
+++ b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/Controller.java
@@ -221,7 +221,7 @@
*/
public void start() {
log.info("Started");
- if (!PlatformDependent.isWindows() && !PlatformDependent.isRoot()) {
+ if (!PlatformDependent.isWindows() && !PlatformDependent.maybeSuperUser()) {
portNumber = BGP_PRIVILEGED_PORT;
} else {
portNumber = BGP_PORT_NUM;