diff options
Diffstat (limited to 'framework/src/onos/cli')
3 files changed, 14 insertions, 2 deletions
diff --git a/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java b/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java index 6c33f45c..62cf042a 100644 --- a/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java +++ b/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java @@ -166,6 +166,10 @@ public abstract class ConnectivityIntentCommand extends AbstractShellCommand { required = false, multiValued = false) private String pushVlan = null; + @Option(name = "--setQueue", description = "Set Queue ID", + required = false, multiValued = false) + private String setQueue = null; + // Priorities @Option(name = "-p", aliases = "--priority", description = "Priority", required = false, multiValued = false) @@ -327,6 +331,10 @@ public abstract class ConnectivityIntentCommand extends AbstractShellCommand { treatmentBuilder.setVlanId(VlanId.vlanId(Short.parseShort(pushVlan))); emptyTreatment = false; } + if (!isNullOrEmpty(setQueue)) { + treatmentBuilder.setQueue(Long.parseLong(setQueue)); + emptyTreatment = false; + } if (emptyTreatment) { return DefaultTrafficTreatment.emptyTreatment(); diff --git a/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/InterfaceAddCommand.java b/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/InterfaceAddCommand.java index eefb711a..4fd9b0df 100644 --- a/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/InterfaceAddCommand.java +++ b/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/InterfaceAddCommand.java @@ -43,7 +43,7 @@ public class InterfaceAddCommand extends AbstractShellCommand { @Option(name = "-m", aliases = "--mac", description = "MAC address of the interface", - required = true, multiValued = false) + required = false, multiValued = false) private String mac = null; @Option(name = "-i", aliases = "--ip", @@ -68,10 +68,12 @@ public class InterfaceAddCommand extends AbstractShellCommand { } } + MacAddress macAddr = mac == null ? null : MacAddress.valueOf(mac); + VlanId vlanId = vlan == null ? VlanId.NONE : VlanId.vlanId(Short.parseShort(vlan)); Interface intf = new Interface(ConnectPoint.deviceConnectPoint(connectPoint), - ipAddresses, MacAddress.valueOf(mac), vlanId); + ipAddresses, macAddr, vlanId); interfaceService.add(intf); } diff --git a/framework/src/onos/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/framework/src/onos/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml index 28461e27..cf76febe 100644 --- a/framework/src/onos/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml +++ b/framework/src/onos/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml @@ -146,6 +146,8 @@ <action class="org.onosproject.cli.net.AnnotateDeviceCommand"/> <completers> <ref component-id="deviceIdCompleter"/> + <null/> + <null/> </completers> </command> |