aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/cli/src/main/java/org/onosproject/cli
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/cli/src/main/java/org/onosproject/cli')
-rw-r--r--framework/src/onos/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java24
-rw-r--r--framework/src/onos/cli/src/main/java/org/onosproject/cli/net/GetFlowStatistics.java18
-rw-r--r--framework/src/onos/cli/src/main/java/org/onosproject/cli/net/LinkResourceTestCommand.java17
3 files changed, 29 insertions, 30 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 a33af769..fbce9648 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
@@ -15,12 +15,6 @@
*/
package org.onosproject.cli.net;
-import static com.google.common.base.Strings.isNullOrEmpty;
-import static org.onosproject.net.flow.DefaultTrafficTreatment.builder;
-
-import java.util.LinkedList;
-import java.util.List;
-
import org.apache.karaf.shell.commands.Option;
import org.onlab.packet.Ip6Address;
import org.onlab.packet.IpAddress;
@@ -47,6 +41,12 @@ import org.onosproject.net.intent.constraint.LinkTypeConstraint;
import org.onosproject.net.intent.constraint.PartialFailureConstraint;
import org.onosproject.net.resource.link.BandwidthResource;
+import java.util.LinkedList;
+import java.util.List;
+
+import static com.google.common.base.Strings.isNullOrEmpty;
+import static org.onosproject.net.flow.DefaultTrafficTreatment.builder;
+
/**
* Base class for command line operations for connectivity based intents.
*/
@@ -99,11 +99,11 @@ public abstract class ConnectivityIntentCommand extends AbstractShellCommand {
@Option(name = "--ndSLL", description = "IPv6 Neighbor Discovery Source Link-Layer",
required = false, multiValued = false)
- private String ndSLLString = null;
+ private String ndSllString = null;
@Option(name = "--ndTLL", description = "IPv6 Neighbor Discovery Target Link-Layer",
required = false, multiValued = false)
- private String ndTLLString = null;
+ private String ndTllString = null;
@Option(name = "--tcpSrc", description = "Source TCP Port",
required = false, multiValued = false)
@@ -264,12 +264,12 @@ public abstract class ConnectivityIntentCommand extends AbstractShellCommand {
selectorBuilder.matchIPv6NDTargetAddress(Ip6Address.valueOf(ndTargetString));
}
- if (!isNullOrEmpty(ndSLLString)) {
- selectorBuilder.matchIPv6NDSourceLinkLayerAddress(MacAddress.valueOf(ndSLLString));
+ if (!isNullOrEmpty(ndSllString)) {
+ selectorBuilder.matchIPv6NDSourceLinkLayerAddress(MacAddress.valueOf(ndSllString));
}
- if (!isNullOrEmpty(ndTLLString)) {
- selectorBuilder.matchIPv6NDTargetLinkLayerAddress(MacAddress.valueOf(ndTLLString));
+ if (!isNullOrEmpty(ndTllString)) {
+ selectorBuilder.matchIPv6NDTargetLinkLayerAddress(MacAddress.valueOf(ndTllString));
}
if (!isNullOrEmpty(srcTcpString)) {
diff --git a/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/GetFlowStatistics.java b/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/GetFlowStatistics.java
index cafe87f9..4bbf4f10 100644
--- a/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/GetFlowStatistics.java
+++ b/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/GetFlowStatistics.java
@@ -82,15 +82,15 @@ public class GetFlowStatistics extends AbstractShellCommand {
DeviceService deviceService = get(DeviceService.class);
FlowStatisticService flowStatsService = get(FlowStatisticService.class);
- String deviceURI = getDeviceId(devicePort);
- String portURI = getPortNumber(devicePort);
+ String deviceUri = getDeviceId(devicePort);
+ String portUri = getPortNumber(devicePort);
- DeviceId ingressDeviceId = deviceId(deviceURI);
+ DeviceId ingressDeviceId = deviceId(deviceUri);
PortNumber ingressPortNumber;
- if (portURI.length() == 0) {
+ if (portUri.length() == 0) {
ingressPortNumber = null;
} else {
- ingressPortNumber = portNumber(portURI);
+ ingressPortNumber = portNumber(portUri);
}
Device device = deviceService.getDevice(ingressDeviceId);
@@ -102,7 +102,7 @@ public class GetFlowStatistics extends AbstractShellCommand {
if (ingressPortNumber != null) {
Port port = deviceService.getPort(ingressDeviceId, ingressPortNumber);
if (port == null) {
- error("No such port %s on device %s", portURI, ingressDeviceId.uri());
+ error("No such port %s on device %s", portUri, ingressDeviceId.uri());
return;
}
}
@@ -148,7 +148,7 @@ public class GetFlowStatistics extends AbstractShellCommand {
// print show topn head line with type
print("deviceId=%s, show TOPN=%s flows, live type=%s, instruction type=%s",
- deviceURI,
+ deviceUri,
Integer.toString(topn),
flowLiveType == null ? "ALL" : flowLiveType,
instructionType == null ? "ALL" : instructionType);
@@ -169,7 +169,7 @@ public class GetFlowStatistics extends AbstractShellCommand {
} else if (showAll) { // is true?
// print show all head line with type
print("deviceId=%s, show ALL flows, live type=%s, instruction type=%s",
- deviceURI,
+ deviceUri,
flowLiveType == null ? "ALL" : flowLiveType,
instructionType == null ? "ALL" : instructionType);
if (ingressPortNumber == null) {
@@ -188,7 +188,7 @@ public class GetFlowStatistics extends AbstractShellCommand {
}
} else { // if (showSummary == true) //always is true
// print show summary head line
- print("deviceId=%s, show SUMMARY flows", deviceURI);
+ print("deviceId=%s, show SUMMARY flows", deviceUri);
if (ingressPortNumber == null) {
Map<ConnectPoint, SummaryFlowEntryWithLoad> summaryFlowLoadMap =
flowStatsService.loadSummary(device);
diff --git a/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/LinkResourceTestCommand.java b/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/LinkResourceTestCommand.java
index 12e9ab5f..a1a76925 100644
--- a/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/LinkResourceTestCommand.java
+++ b/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/LinkResourceTestCommand.java
@@ -15,24 +15,23 @@
*/
package org.onosproject.cli.net;
-import java.util.Set;
-import java.util.List;
-
+import com.google.common.collect.Lists;
import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.apache.karaf.shell.commands.Option;
import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.Link;
+import org.onosproject.net.Path;
import org.onosproject.net.intent.IntentId;
import org.onosproject.net.resource.link.DefaultLinkResourceRequest;
import org.onosproject.net.resource.link.LinkResourceAllocations;
import org.onosproject.net.resource.link.LinkResourceRequest;
import org.onosproject.net.resource.link.LinkResourceService;
import org.onosproject.net.topology.PathService;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.Link;
-import org.onosproject.net.Path;
-import com.google.common.collect.Lists;
+import java.util.List;
+import java.util.Set;
/**
* Commands to test out LinkResourceManager directly.
@@ -44,7 +43,7 @@ public class LinkResourceTestCommand extends AbstractShellCommand {
// default is bandwidth.
@Option(name = "-m", aliases = "--mpls", description = "MPLS resource",
required = false, multiValued = false)
- private boolean isMPLS = false;
+ private boolean isMpls = false;
@Option(name = "-o", aliases = "--optical", description = "Optical resource",
required = false, multiValued = false)
@@ -96,7 +95,7 @@ public class LinkResourceTestCommand extends AbstractShellCommand {
for (Path p : paths) {
List<Link> links = p.links();
LinkResourceRequest.Builder request = null;
- if (isMPLS) {
+ if (isMpls) {
List<Link> nlinks = Lists.newArrayList();
try {
nlinks.addAll(links.subList(1, links.size() - 2));