Package org.onosproject.cli.net
Class PathListCommand
- java.lang.Object
-
- org.onosproject.cli.AbstractShellCommand
-
- org.onosproject.cli.net.TopologyCommand
-
- org.onosproject.cli.net.PathListCommand
-
- All Implemented Interfaces:
org.apache.karaf.shell.api.action.Action
,CodecContext
public class PathListCommand extends TopologyCommand
Lists all shortest-paths paths between the specified source and destination devices.
-
-
Field Summary
-
Fields inherited from class org.onosproject.cli.net.TopologyCommand
service, topology
-
Fields inherited from class org.onosproject.cli.AbstractShellCommand
log
-
-
Constructor Summary
Constructors Constructor Description PathListCommand()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doExecute()
Body of the shell command.static com.fasterxml.jackson.databind.JsonNode
json(AbstractShellCommand context, java.lang.Iterable<? extends Path> paths)
Produces a JSON array containing the specified paths.protected java.lang.String
pathString(Path path)
Produces a formatted string representing the specified path.-
Methods inherited from class org.onosproject.cli.net.TopologyCommand
init
-
Methods inherited from class org.onosproject.cli.AbstractShellCommand
annotations, annotations, annotations, appId, codec, error, execute, get, getService, jsonForEntity, mapper, outputJson, print
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.onosproject.codec.CodecContext
decode, encode
-
-
-
-
Method Detail
-
doExecute
protected void doExecute()
Description copied from class:AbstractShellCommand
Body of the shell command.- Overrides:
doExecute
in classTopologyCommand
-
json
public static com.fasterxml.jackson.databind.JsonNode json(AbstractShellCommand context, java.lang.Iterable<? extends Path> paths)
Produces a JSON array containing the specified paths.- Parameters:
context
- context to use for looking up codecspaths
- collection of paths- Returns:
- JSON array
-
pathString
protected java.lang.String pathString(Path path)
Produces a formatted string representing the specified path.- Parameters:
path
- network path- Returns:
- formatted path string
-
-