Add support for enabling/disabling ports for gNMI devices
This change also includes:
- Refactoring of gNMI protocol+driver to take advantage of the recent
changes to the gRPC protocol subsystem (e.g. no more locking, start RPC
with timeouts, etc.).
- Fixed Stratum driver to work after GeneralDeviceProvider refactoring
- Updated bmv2.py to generate ChassisConfig for stratum_bmv2
- Fixed portstate command to use the same port name as in the store
Change-Id: I0dad3bc73e4b6d907b5cf6b7b9a2852943226be7
diff --git a/cli/src/main/java/org/onosproject/cli/net/DevicePortStateCommand.java b/cli/src/main/java/org/onosproject/cli/net/DevicePortStateCommand.java
index 543bffb..bdf1c65 100644
--- a/cli/src/main/java/org/onosproject/cli/net/DevicePortStateCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/DevicePortStateCommand.java
@@ -66,9 +66,9 @@
return;
}
if ("enable".equals(portState)) {
- deviceAdminService.changePortState(dev.id(), pnum, true);
+ deviceAdminService.changePortState(dev.id(), p.number(), true);
} else if ("disable".equals(portState)) {
- deviceAdminService.changePortState(dev.id(), pnum, false);
+ deviceAdminService.changePortState(dev.id(), p.number(), false);
} else {
print(" %s", "State must be enable or disable");
}