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
,org.onosproject.codec.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 org.onosproject.core.ApplicationId
appId()
Returns application ID for the CLI.protected java.util.List<org.onosproject.net.intent.Constraint>
buildConstraints()
Builds the constraint list for this command based on the command line parameters.protected org.onosproject.net.flow.TrafficSelector
buildTrafficSelector()
Constructs a traffic selector based on the command line arguments presented to the command.protected org.onosproject.net.flow.TrafficTreatment
buildTrafficTreatment()
Generates a traffic treatment for this intent based on command line arguments presented to the command.protected org.onosproject.net.intent.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 org.onosproject.net.ResourceGroup
resourceGroup()
-
Methods inherited from class org.onosproject.cli.AbstractShellCommand
annotations, annotations, annotations, codec, doExecute, error, execute, get, getService, jsonForEntity, mapper, outputJson, print
-
-
-
-
Method Detail
-
buildTrafficSelector
protected org.onosproject.net.flow.TrafficSelector buildTrafficSelector()
Constructs a traffic selector based on the command line arguments presented to the command.- Returns:
- traffic selector
-
buildTrafficTreatment
protected org.onosproject.net.flow.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<org.onosproject.net.intent.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 org.onosproject.core.ApplicationId appId()
Description copied from class:AbstractShellCommand
Returns application ID for the CLI.- Overrides:
appId
in classAbstractShellCommand
- Returns:
- command-line application identifier
-
resourceGroup
protected org.onosproject.net.ResourceGroup resourceGroup()
-
key
protected org.onosproject.net.intent.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
-
-