Package org.onosproject.newoptical
Class OpticalPathProvisioner
- java.lang.Object
-
- org.onosproject.event.AbstractListenerManager<OpticalPathEvent,OpticalPathListener>
-
- org.onosproject.newoptical.OpticalPathProvisioner
-
- All Implemented Interfaces:
org.onosproject.event.ListenerService<OpticalPathEvent,OpticalPathListener>,OpticalPathService
@Beta public class OpticalPathProvisioner extends org.onosproject.event.AbstractListenerManager<OpticalPathEvent,OpticalPathListener> implements OpticalPathService
Main component to configure optical connectivity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classOpticalPathProvisioner.InternalIntentListener
-
Field Summary
Fields Modifier and Type Field Description protected org.onosproject.cluster.ClusterServiceclusterServiceprotected org.onosproject.core.CoreServicecoreServiceprotected org.onosproject.net.device.DeviceServicedeviceServiceprotected org.onosproject.net.intent.IntentServiceintentServiceprotected org.onosproject.net.link.LinkServicelinkServiceprotected org.onosproject.mastership.MastershipServicemastershipServiceprotected org.onosproject.net.config.NetworkConfigServicenetworkConfigServiceprotected org.onosproject.net.resource.ResourceServiceresourceServiceprotected org.onosproject.store.service.StorageServicestorageServiceprotected org.onosproject.net.topology.TopologyServicetopologyService
-
Constructor Summary
Constructors Constructor Description OpticalPathProvisioner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivate(org.osgi.service.component.ComponentContext context)protected voiddeactivate()java.util.Optional<java.util.List<org.onosproject.net.Link>>getPath(OpticalConnectivityId id)Returns path assigned to given ID.java.util.Collection<OpticalConnectivity>listConnectivity()Lists collection of known OpticalConnectivity.java.util.Set<org.onosproject.net.intent.Key>listIntents(OpticalConnectivityId id)Lists intents generated from specified OpticalConnectivity.voidmodified(org.osgi.service.component.ComponentContext context)booleanremoveConnectivity(OpticalConnectivityId id)Removes connectivity with given ID.OpticalConnectivityIdsetupConnectivity(org.onosproject.net.ConnectPoint ingress, org.onosproject.net.ConnectPoint egress, org.onlab.util.Bandwidth bandwidth, java.time.Duration latency)Calculates multi-layer path between connect points and sets up connectivity.OpticalConnectivityIdsetupPath(org.onosproject.net.Path path, org.onlab.util.Bandwidth bandwidth, java.time.Duration latency)Sets up connectivity along given multi-layer path including cross-connect links.-
Methods inherited from class org.onosproject.event.AbstractListenerManager
addListener, post, removeListener
-
-
-
-
Field Detail
-
intentService
protected org.onosproject.net.intent.IntentService intentService
-
topologyService
protected org.onosproject.net.topology.TopologyService topologyService
-
coreService
protected org.onosproject.core.CoreService coreService
-
linkService
protected org.onosproject.net.link.LinkService linkService
-
mastershipService
protected org.onosproject.mastership.MastershipService mastershipService
-
clusterService
protected org.onosproject.cluster.ClusterService clusterService
-
deviceService
protected org.onosproject.net.device.DeviceService deviceService
-
storageService
protected org.onosproject.store.service.StorageService storageService
-
networkConfigService
protected org.onosproject.net.config.NetworkConfigService networkConfigService
-
resourceService
protected org.onosproject.net.resource.ResourceService resourceService
-
-
Method Detail
-
activate
protected void activate(org.osgi.service.component.ComponentContext context)
-
deactivate
protected void deactivate()
-
modified
public void modified(org.osgi.service.component.ComponentContext context)
-
listConnectivity
public java.util.Collection<OpticalConnectivity> listConnectivity()
Description copied from interface:OpticalPathServiceLists collection of known OpticalConnectivity.- Specified by:
listConnectivityin interfaceOpticalPathService- Returns:
- collection of OpticalConnectivity
-
listIntents
public java.util.Set<org.onosproject.net.intent.Key> listIntents(OpticalConnectivityId id)
Description copied from interface:OpticalPathServiceLists intents generated from specified OpticalConnectivity.- Specified by:
listIntentsin interfaceOpticalPathService- Parameters:
id- OpticalConnectivity identifier- Returns:
- set of Intent Key
-
setupConnectivity
public OpticalConnectivityId setupConnectivity(org.onosproject.net.ConnectPoint ingress, org.onosproject.net.ConnectPoint egress, org.onlab.util.Bandwidth bandwidth, java.time.Duration latency)
Description copied from interface:OpticalPathServiceCalculates multi-layer path between connect points and sets up connectivity.- Specified by:
setupConnectivityin interfaceOpticalPathService- Parameters:
ingress- ingress portegress- egress portbandwidth- required bandwidth. No bandwidth is assured if null.latency- required latency. No latency is assured if null.- Returns:
- id of created connectivity if successful, null otherwise.
-
setupPath
public OpticalConnectivityId setupPath(org.onosproject.net.Path path, org.onlab.util.Bandwidth bandwidth, java.time.Duration latency)
Description copied from interface:OpticalPathServiceSets up connectivity along given multi-layer path including cross-connect links.- Specified by:
setupPathin interfaceOpticalPathService- Parameters:
path- multi-layer path along which connectivity will be set upbandwidth- required bandwidth. No bandwidth is assured if null.latency- required latency. No latency is assured if null.- Returns:
- id of created connectivity if successful, null otherwise.
-
removeConnectivity
public boolean removeConnectivity(OpticalConnectivityId id)
Description copied from interface:OpticalPathServiceRemoves connectivity with given ID.- Specified by:
removeConnectivityin interfaceOpticalPathService- Parameters:
id- ID of connectivity- Returns:
- true if succeed. false if failed.
-
getPath
public java.util.Optional<java.util.List<org.onosproject.net.Link>> getPath(OpticalConnectivityId id)
Description copied from interface:OpticalPathServiceReturns path assigned to given ID.- Specified by:
getPathin interfaceOpticalPathService- Parameters:
id- ID of connectivity- Returns:
- list of link that compose a path. empty if ID is invalid.
-
-