Interface ProtectionConfigBehaviour
-
- All Superinterfaces:
Behaviour,HandlerBehaviour
@Beta public interface ProtectionConfigBehaviour extends HandlerBehaviour
Behaviour for configuring Device triggered protection mechanism.Protected transport entity model
- ProtectedTransportEndpoint +- TransportEndpoint - working transport entity/path | +- TransportEndpoint - standby transport entity/path ⋮ProtectedTransportEndpoint is the entity representing the transport entity endpoint. Traffic flowing into the protected transport endpoint will flow through one of it's underlying TransportEndpoint, (=active transport entity). After successful creation of ProtectedPathEndpoint, implementation is expected to advertise virtual Port corresponding to the ProtectedPathEndpoint created.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFINGERPRINTAnnotation key for virtual Port.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<ConnectPoint>createProtectionEndpoint(ProtectedTransportEndpointDescription configuration)Creates protected path endpoint.java.util.concurrent.CompletableFuture<java.lang.Boolean>deleteProtectionEndpoint(ConnectPoint identifier)Deletes protected path endpoint.default java.util.concurrent.CompletableFuture<java.util.Map.Entry<ConnectPoint,ProtectedTransportEndpointState>>getProtectionEndpoint(java.lang.String fingerprint)Retrieves ProtectedTansportEndpoint information (=virtual PortConnectPointandProtectedTransportEndpointStatepair) on the Device.default java.util.concurrent.CompletableFuture<ProtectedTransportEndpointDescription>getProtectionEndpointConfig(ConnectPoint identifier)RetrievesProtectedTransportEndpointDescriptionwith specified ID.java.util.concurrent.CompletableFuture<java.util.Map<ConnectPoint,ProtectedTransportEndpointDescription>>getProtectionEndpointConfigs()RetrievesProtectedTransportEndpointDescriptions on the Device.default java.util.concurrent.CompletableFuture<ProtectedTransportEndpointState>getProtectionEndpointState(ConnectPoint identifier)RetrievesProtectedTransportEndpointStateon the Device.java.util.concurrent.CompletableFuture<java.util.Map<ConnectPoint,ProtectedTransportEndpointState>>getProtectionEndpointStates()RetrievesProtectedTransportEndpointStates on the Device.default java.util.concurrent.CompletableFuture<java.lang.Void>switchToAutomatic(ConnectPoint identifier)Attempts to set the device to automatic protection mode.default java.util.concurrent.CompletableFuture<java.lang.Void>switchToForce(ConnectPoint identifier, int index)Attempts to forcibly switch to the one specified path byindex.java.util.concurrent.CompletableFuture<java.lang.Void>switchToManual(ConnectPoint identifier, int index)Attempts to manually switch to the one specified path byindex.java.util.concurrent.CompletableFuture<ConnectPoint>updateProtectionEndpoint(ConnectPoint identifier, ProtectedTransportEndpointDescription configuration)Updates protected path endpoint configuration.-
Methods inherited from interface org.onosproject.net.driver.HandlerBehaviour
handler, setHandler
-
-
-
-
Field Detail
-
FINGERPRINT
static final java.lang.String FINGERPRINT
Annotation key for virtual Port.- See Also:
- Constant Field Values
-
-
Method Detail
-
createProtectionEndpoint
java.util.concurrent.CompletableFuture<ConnectPoint> createProtectionEndpoint(ProtectedTransportEndpointDescription configuration)
Creates protected path endpoint.- Parameters:
configuration-ProtectedTransportEndpointDescription- Returns:
ConnectPointfor the virtual Port added on success, or exceptionally returnProtectionExceptionas cause on error.
-
updateProtectionEndpoint
java.util.concurrent.CompletableFuture<ConnectPoint> updateProtectionEndpoint(ConnectPoint identifier, ProtectedTransportEndpointDescription configuration)
Updates protected path endpoint configuration.- Parameters:
identifier-ConnectPointfor the virtual Port representing protected path endpointconfiguration-ProtectedTransportEndpointDescription- Returns:
identifieron success, or exceptionally returnProtectionExceptionas cause on error.
-
deleteProtectionEndpoint
java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteProtectionEndpoint(ConnectPoint identifier)
Deletes protected path endpoint.- Parameters:
identifier-ConnectPointfor the virtual Port representing protected path endpoint- Returns:
- true if successfully removed, false otherwise.
-
getProtectionEndpointConfigs
java.util.concurrent.CompletableFuture<java.util.Map<ConnectPoint,ProtectedTransportEndpointDescription>> getProtectionEndpointConfigs()
RetrievesProtectedTransportEndpointDescriptions on the Device.- Returns:
ProtectedTransportEndpointDescriptions on the Device
-
getProtectionEndpointConfig
default java.util.concurrent.CompletableFuture<ProtectedTransportEndpointDescription> getProtectionEndpointConfig(ConnectPoint identifier)
RetrievesProtectedTransportEndpointDescriptionwith specified ID.- Parameters:
identifier-ConnectPointfor the virtual Port representing protected path endpoint to retrieve- Returns:
ProtectedTransportEndpointDescriptionfound or null
-
getProtectionEndpointStates
java.util.concurrent.CompletableFuture<java.util.Map<ConnectPoint,ProtectedTransportEndpointState>> getProtectionEndpointStates()
RetrievesProtectedTransportEndpointStates on the Device.- Returns:
ProtectedTransportEndpointStates on the Device
-
getProtectionEndpointState
default java.util.concurrent.CompletableFuture<ProtectedTransportEndpointState> getProtectionEndpointState(ConnectPoint identifier)
RetrievesProtectedTransportEndpointStateon the Device.- Parameters:
identifier-ConnectPointfor the virtual Port representing protected path endpoint to retrieve- Returns:
ProtectedTransportEndpointStatefound or null
-
getProtectionEndpoint
default java.util.concurrent.CompletableFuture<java.util.Map.Entry<ConnectPoint,ProtectedTransportEndpointState>> getProtectionEndpoint(java.lang.String fingerprint)
Retrieves ProtectedTansportEndpoint information (=virtual PortConnectPointandProtectedTransportEndpointStatepair) on the Device.- Parameters:
fingerprint- of the protected path endpoint to retrieve- Returns:
- ProtectedTansportEndpoint information found or null
-
switchToForce
default java.util.concurrent.CompletableFuture<java.lang.Void> switchToForce(ConnectPoint identifier, int index)
Attempts to forcibly switch to the one specified path byindex.- Parameters:
identifier-ConnectPointfor the virtual Port representing protected path endpointindex- path index to switch to- Returns:
- Completes if request was accepted, fails exceptionally on error. Note: completion does not always assure working path has switched.
-
switchToManual
java.util.concurrent.CompletableFuture<java.lang.Void> switchToManual(ConnectPoint identifier, int index)
Attempts to manually switch to the one specified path byindex. This operation would be rejected if the specified path is a fault path.- Parameters:
identifier-ConnectPointfor the virtual Port representing protected path endpointindex- path index to switch to- Returns:
- Completes if request was accepted, fails exceptionally on error. Note: completion does not always assure working path has switched.
-
switchToAutomatic
default java.util.concurrent.CompletableFuture<java.lang.Void> switchToAutomatic(ConnectPoint identifier)
Attempts to set the device to automatic protection mode.- Parameters:
identifier-ConnectPointfor the virtual Port representing protected path endpoint- Returns:
- Completes if request was accepted, fails exceptionally on error.
-
-