Package org.onosproject.cli.net
Class ConnectivityIntentCommand
- java.lang.Object
-
- org.onosproject.cli.AbstractShellCommand
-
- org.onosproject.cli.net.ConnectivityIntentCommand
-
- All Implemented Interfaces:
org.apache.karaf.shell.api.action.Action
,CodecContext
- Direct Known Subclasses:
AddHostToHostIntentCommand
,AddMultiPointToSinglePointIntentCommand
,AddPointToPointIntentCommand
,AddSinglePointToMultiPointIntentCommand
public abstract class ConnectivityIntentCommand extends AbstractShellCommand
Base class for command line operations for connectivity based intents.
-
-
Field Summary
-
Fields inherited from class org.onosproject.cli.AbstractShellCommand
log
-
-
Constructor Summary
Constructors Constructor Description ConnectivityIntentCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ApplicationId
appId()
Returns application ID for the CLI.protected java.util.List<Constraint>
buildConstraints()
Builds the constraint list for this command based on the command line parameters.protected TrafficSelector
buildTrafficSelector()
Constructs a traffic selector based on the command line arguments presented to the command.protected TrafficTreatment
buildTrafficTreatment()
Generates a traffic treatment for this intent based on command line arguments presented to the command.protected Key
key()
Creates a key for an intent based on command line arguments.protected int
priority()
Gets the priority to use for the intent.protected ResourceGroup
resourceGroup()
-
Methods inherited from class org.onosproject.cli.AbstractShellCommand
annotations, annotations, annotations, codec, doExecute, 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
-
buildTrafficSelector
protected TrafficSelector buildTrafficSelector()
Constructs a traffic selector based on the command line arguments presented to the command.- Returns:
- traffic selector
-
buildTrafficTreatment
protected TrafficTreatment buildTrafficTreatment()
Generates a traffic treatment for this intent based on command line arguments presented to the command.- Returns:
- traffic treatment
-
buildConstraints
protected java.util.List<Constraint> buildConstraints()
Builds the constraint list for this command based on the command line parameters.- Returns:
- List of constraint objects describing the constraints requested
-
appId
protected ApplicationId appId()
Description copied from class:AbstractShellCommand
Returns application ID for the CLI.- Overrides:
appId
in classAbstractShellCommand
- Returns:
- command-line application identifier
-
resourceGroup
protected ResourceGroup resourceGroup()
-
key
protected Key key()
Creates a key for an intent based on command line arguments. If a key has been specified, it is returned. If no key is specified, null is returned.- Returns:
- intent key if specified, null otherwise
-
priority
protected int priority()
Gets the priority to use for the intent.- Returns:
- priority
-
-