aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/cli
diff options
context:
space:
mode:
authorAshlee Young <ashlee@onosfw.com>2015-10-23 08:31:31 -0700
committerAshlee Young <ashlee@onosfw.com>2015-10-23 08:31:31 -0700
commite52e67767076b29cb01939aa7bdd8fee9d205cc1 (patch)
treeb8c2d28231bccc2a280fea429a9af7297c62f58f /framework/src/onos/cli
parenta912c5ce9968da5936a695064f22083898e7b93d (diff)
Update ONOS src to commit id 69b36d5d11e81e28e56b46ba44e4b8cd701c5867
Change-Id: I9c13045711dbf9c0181106b66a6bf22c72bcf330 Signed-off-by: Ashlee Young <ashlee@onosfw.com>
Diffstat (limited to 'framework/src/onos/cli')
-rw-r--r--framework/src/onos/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java8
-rw-r--r--framework/src/onos/cli/src/main/java/org/onosproject/cli/net/InterfaceAddCommand.java6
-rw-r--r--framework/src/onos/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml2
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>