diff options
author | Ashlee Young <ashlee@wildernessvoice.com> | 2015-11-05 14:00:42 -0800 |
---|---|---|
committer | Ashlee Young <ashlee@wildernessvoice.com> | 2015-11-05 14:00:42 -0800 |
commit | b34f82bf11934fc6b938ef997d536a7ccea76c36 (patch) | |
tree | 10559ebf65962abb741883ca9d23aec241ced504 /framework/src/onos/cli | |
parent | 2cdecb8c41956d7dd8ab5d59591ebc21f3c64a9e (diff) |
Updates ONOS tree to checkin id ca9cc8e28eba18da77f4fa021fb7c3a3f76e5d44
upstream.
Change-Id: I49f8e41733afea8101ec50c0102213c8d18949ae
Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/cli')
-rw-r--r-- | framework/src/onos/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java | 14 |
1 files changed, 12 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 62cf042a..a33af769 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 @@ -33,6 +33,7 @@ import org.onosproject.cli.AbstractShellCommand; import org.onosproject.core.ApplicationId; import org.onosproject.core.CoreService; import org.onosproject.net.Link; +import org.onosproject.net.PortNumber; import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.DefaultTrafficTreatment; import org.onosproject.net.flow.TrafficSelector; @@ -166,7 +167,8 @@ public abstract class ConnectivityIntentCommand extends AbstractShellCommand { required = false, multiValued = false) private String pushVlan = null; - @Option(name = "--setQueue", description = "Set Queue ID", + @Option(name = "--setQueue", description = "Set Queue ID (for OpenFlow 1.0, " + + "also the port has to be specified, i.e., <port>/<queue>", required = false, multiValued = false) private String setQueue = null; @@ -332,7 +334,15 @@ public abstract class ConnectivityIntentCommand extends AbstractShellCommand { emptyTreatment = false; } if (!isNullOrEmpty(setQueue)) { - treatmentBuilder.setQueue(Long.parseLong(setQueue)); + // OpenFlow 1.0 notation (for ENQUEUE): <port>/<queue> + if (setQueue.contains("/")) { + String[] queueConfig = setQueue.split("/"); + PortNumber port = PortNumber.portNumber(Long.parseLong(queueConfig[0])); + long queueId = Long.parseLong(queueConfig[1]); + treatmentBuilder.setQueue(queueId, port); + } else { + treatmentBuilder.setQueue(Long.parseLong(setQueue)); + } emptyTreatment = false; } |