Package org.onosproject.net.intent
Enum IntentState
- java.lang.Object
-
- java.lang.Enum<IntentState>
-
- org.onosproject.net.intent.IntentState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<IntentState>
@Beta public enum IntentState extends java.lang.Enum<IntentState>
Representation of the phases an intent may attain during its lifecycle.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPILING
Signifies that the intent is being compiled into installable intents.CORRUPT
Signifies that an intent has failed either installation or withdrawal, and still hold some or all of its resources.FAILED
Signifies that the intent has failed to be installed and cannot be satisfied given current network conditions.INSTALL_REQ
Signifies that the intent has been submitted and will start compiling shortly.INSTALLED
The intent has been successfully installed.INSTALLING
Signifies that the resulting installable intents are being installed into the network environment.PURGE_REQ
Indicates that the intent should be purged from the database.REALLOCATING
Indicates that the intent is being reallocated in a non-disruptive wayNonDisruptiveConstraint
.RECOMPILING
Signifies that the intent is being recompiled into installable intents as an attempt to adapt to an anomaly in the network environment.WITHDRAW_REQ
Indicates that an application has requested that an intent be withdrawn.WITHDRAWING
Indicates that the intent is being withdrawn.WITHDRAWN
Indicates that the intent has been successfully withdrawn.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IntentState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static IntentState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTALL_REQ
public static final IntentState INSTALL_REQ
Signifies that the intent has been submitted and will start compiling shortly. However, this compilation may not necessarily occur on the local controller instance.All intent in the runtime take this state first.
Intents will also pass through this state when they are updated.
-
COMPILING
public static final IntentState COMPILING
Signifies that the intent is being compiled into installable intents. This is a transitional state after which the intent will enter eitherFAILED
state orINSTALLING
state.
-
INSTALLING
public static final IntentState INSTALLING
Signifies that the resulting installable intents are being installed into the network environment. This is a transitional state after which the intent will enter eitherINSTALLED
state orRECOMPILING
state.
-
INSTALLED
public static final IntentState INSTALLED
The intent has been successfully installed. This is a state where the intent may remain parked until it is withdrawn by the application or until the network environment changes in some way to make the original set of installable intents untenable.
-
RECOMPILING
public static final IntentState RECOMPILING
Signifies that the intent is being recompiled into installable intents as an attempt to adapt to an anomaly in the network environment. This is a transitional state after which the intent will enter eitherFAILED
state orINSTALLING
state.Exit to the
FAILED
state may be caused by failure to compile or by compiling into the same set of installable intents which have previously failed to be installed.
-
WITHDRAW_REQ
public static final IntentState WITHDRAW_REQ
Indicates that an application has requested that an intent be withdrawn. It will start withdrawing shortly, but not necessarily on this instance. Intents can also be parked here if it is impossible to withdraw them.
-
WITHDRAWING
public static final IntentState WITHDRAWING
Indicates that the intent is being withdrawn. This is a transitional state, triggered by invocation of theIntentService.withdraw(Intent)
but one with only one outcome, which is the the intent being placed in theWITHDRAWN
state.
-
WITHDRAWN
public static final IntentState WITHDRAWN
Indicates that the intent has been successfully withdrawn.
-
FAILED
public static final IntentState FAILED
Signifies that the intent has failed to be installed and cannot be satisfied given current network conditions. But, the framework will reattempt to install it when network conditions change until it is withdrawn by an application.
-
CORRUPT
public static final IntentState CORRUPT
Signifies that an intent has failed either installation or withdrawal, and still hold some or all of its resources. (e.g. link reservations, flow rules on the data plane, etc.)
-
PURGE_REQ
public static final IntentState PURGE_REQ
Indicates that the intent should be purged from the database.Note: This operation will only be performed if the intent is already in WITHDRAWN or FAILED.
-
REALLOCATING
public static final IntentState REALLOCATING
Indicates that the intent is being reallocated in a non-disruptive wayNonDisruptiveConstraint
. This state can be used to inform other applications that the intent is performing the reallocation. In particular type of networks this operation can require a long time. After all the reallocation stages are completed, the intent returns to theINSTALLED
state. If any of the reallocation stages fails, the intent is flagged asFAILED
.
-
-
Method Detail
-
values
public static IntentState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IntentState c : IntentState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IntentState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-