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.String
FINGERPRINT
Annotation 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 PortConnectPoint
andProtectedTransportEndpointState
pair) on the Device.default java.util.concurrent.CompletableFuture<ProtectedTransportEndpointDescription>
getProtectionEndpointConfig(ConnectPoint identifier)
RetrievesProtectedTransportEndpointDescription
with specified ID.java.util.concurrent.CompletableFuture<java.util.Map<ConnectPoint,ProtectedTransportEndpointDescription>>
getProtectionEndpointConfigs()
RetrievesProtectedTransportEndpointDescription
s on the Device.default java.util.concurrent.CompletableFuture<ProtectedTransportEndpointState>
getProtectionEndpointState(ConnectPoint identifier)
RetrievesProtectedTransportEndpointState
on the Device.java.util.concurrent.CompletableFuture<java.util.Map<ConnectPoint,ProtectedTransportEndpointState>>
getProtectionEndpointStates()
RetrievesProtectedTransportEndpointState
s 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:
ConnectPoint
for the virtual Port added on success, or exceptionally returnProtectionException
as cause on error.
-
updateProtectionEndpoint
java.util.concurrent.CompletableFuture<ConnectPoint> updateProtectionEndpoint(ConnectPoint identifier, ProtectedTransportEndpointDescription configuration)
Updates protected path endpoint configuration.- Parameters:
identifier
-ConnectPoint
for the virtual Port representing protected path endpointconfiguration
-ProtectedTransportEndpointDescription
- Returns:
identifier
on success, or exceptionally returnProtectionException
as cause on error.
-
deleteProtectionEndpoint
java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteProtectionEndpoint(ConnectPoint identifier)
Deletes protected path endpoint.- Parameters:
identifier
-ConnectPoint
for 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()
RetrievesProtectedTransportEndpointDescription
s on the Device.- Returns:
ProtectedTransportEndpointDescription
s on the Device
-
getProtectionEndpointConfig
default java.util.concurrent.CompletableFuture<ProtectedTransportEndpointDescription> getProtectionEndpointConfig(ConnectPoint identifier)
RetrievesProtectedTransportEndpointDescription
with specified ID.- Parameters:
identifier
-ConnectPoint
for the virtual Port representing protected path endpoint to retrieve- Returns:
ProtectedTransportEndpointDescription
found or null
-
getProtectionEndpointStates
java.util.concurrent.CompletableFuture<java.util.Map<ConnectPoint,ProtectedTransportEndpointState>> getProtectionEndpointStates()
RetrievesProtectedTransportEndpointState
s on the Device.- Returns:
ProtectedTransportEndpointState
s on the Device
-
getProtectionEndpointState
default java.util.concurrent.CompletableFuture<ProtectedTransportEndpointState> getProtectionEndpointState(ConnectPoint identifier)
RetrievesProtectedTransportEndpointState
on the Device.- Parameters:
identifier
-ConnectPoint
for the virtual Port representing protected path endpoint to retrieve- Returns:
ProtectedTransportEndpointState
found or null
-
getProtectionEndpoint
default java.util.concurrent.CompletableFuture<java.util.Map.Entry<ConnectPoint,ProtectedTransportEndpointState>> getProtectionEndpoint(java.lang.String fingerprint)
Retrieves ProtectedTansportEndpoint information (=virtual PortConnectPoint
andProtectedTransportEndpointState
pair) 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
-ConnectPoint
for 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
-ConnectPoint
for 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
-ConnectPoint
for the virtual Port representing protected path endpoint- Returns:
- Completes if request was accepted, fails exceptionally on error.
-
-