Search in sources :

Example 6 with ProtectedTransportEndpointState

use of org.onosproject.net.behaviour.protection.ProtectedTransportEndpointState in project onos by opennetworkinglab.

the class OplinkSwitchProtection method getProtectionEndpointStates.

@Override
public CompletableFuture<Map<ConnectPoint, ProtectedTransportEndpointState>> getProtectionEndpointStates() {
    ConnectPoint cp = new ConnectPoint(data().deviceId(), PortNumber.portNumber(VIRTUAL_PORT));
    Map<ConnectPoint, ProtectedTransportEndpointState> protectedGroups = new HashMap<>();
    CompletableFuture result = new CompletableFuture<Map<ConnectPoint, ProtectedTransportEndpointState>>();
    protectedGroups.put(cp, getProtectedTransportEndpointState());
    result.complete(protectedGroups);
    return result;
}
Also used : CompletableFuture(java.util.concurrent.CompletableFuture) ProtectedTransportEndpointState(org.onosproject.net.behaviour.protection.ProtectedTransportEndpointState) HashMap(java.util.HashMap) ConnectPoint(org.onosproject.net.ConnectPoint) FilteredConnectPoint(org.onosproject.net.FilteredConnectPoint)

Aggregations

ProtectedTransportEndpointState (org.onosproject.net.behaviour.protection.ProtectedTransportEndpointState)6 ConnectPoint (org.onosproject.net.ConnectPoint)5 FilteredConnectPoint (org.onosproject.net.FilteredConnectPoint)3 TransportEndpointState (org.onosproject.net.behaviour.protection.TransportEndpointState)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 PortNumber (org.onosproject.net.PortNumber)2 ProtectionConfigBehaviour (org.onosproject.net.behaviour.protection.ProtectionConfigBehaviour)2 CompletableFuture (java.util.concurrent.CompletableFuture)1 ProtectedTransportEndpointDescription (org.onosproject.net.behaviour.protection.ProtectedTransportEndpointDescription)1 TransportEndpointDescription (org.onosproject.net.behaviour.protection.TransportEndpointDescription)1