Package org.onosproject.net.intent
Class FlowRuleIntent
- java.lang.Object
-
- org.onosproject.net.intent.Intent
-
- org.onosproject.net.intent.FlowRuleIntent
-
@Beta public class FlowRuleIntent extends Intent
An intent that enables to tell flow level operation. This instance holds a collection of flow rules that may be executed in parallel.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.onosproject.net.intent.Intent
Intent.Builder
-
-
Field Summary
-
Fields inherited from class org.onosproject.net.intent.Intent
DEFAULT_INTENT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FlowRuleIntent()
Constructor for serializer.FlowRuleIntent(ApplicationId appId, Key key, Collection<FlowRule> flowRules, Collection<NetworkResource> resources, PathIntent.ProtectionType primary, ResourceGroup resourceGroup)
Creates a flow rule intent with the specified key, flow rules to be set, and required network resources.FlowRuleIntent(FlowRuleIntent intent, PathIntent.ProtectionType type)
Creates a flow rule intent with all the same characteristics as the given one except for the flow rule type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<FlowRule>
flowRules()
Returns a collection of flow rules to be set.boolean
isInstallable()
Indicates whether or not the intent is installable.String
toString()
PathIntent.ProtectionType
type()
-
Methods inherited from class org.onosproject.net.intent.Intent
appId, bindIdGenerator, equals, hashCode, id, key, priority, resourceGroup, resources, unbindIdGenerator
-
-
-
-
Constructor Detail
-
FlowRuleIntent
public FlowRuleIntent(ApplicationId appId, Key key, Collection<FlowRule> flowRules, Collection<NetworkResource> resources, PathIntent.ProtectionType primary, ResourceGroup resourceGroup)
Creates a flow rule intent with the specified key, flow rules to be set, and required network resources.- Parameters:
appId
- application idkey
- keyflowRules
- flow rulesresources
- network resourcesprimary
- primary protection typeresourceGroup
- resource group for this intent
-
FlowRuleIntent
public FlowRuleIntent(FlowRuleIntent intent, PathIntent.ProtectionType type)
Creates a flow rule intent with all the same characteristics as the given one except for the flow rule type.- Parameters:
intent
- original flow rule intenttype
- new protection type
-
FlowRuleIntent
protected FlowRuleIntent()
Constructor for serializer.
-
-
Method Detail
-
flowRules
public Collection<FlowRule> flowRules()
Returns a collection of flow rules to be set.- Returns:
- a collection of flow rules
-
isInstallable
public boolean isInstallable()
Description copied from class:Intent
Indicates whether or not the intent is installable.- Overrides:
isInstallable
in classIntent
- Returns:
- true if installable
-
type
public PathIntent.ProtectionType type()
-
-