@Service public class VirtualNetworkManager extends org.onosproject.net.provider.AbstractListenerProviderRegistry<VirtualNetworkEvent,VirtualNetworkListener,VirtualNetworkProvider,VirtualNetworkProviderService> implements VirtualNetworkService, VirtualNetworkAdminService, VirtualNetworkProviderRegistry
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.core.CoreService |
coreService |
protected org.onosproject.net.intent.IntentService |
intentService |
protected VirtualNetworkStore |
store |
eventDispatcher, listenerRegistryVIRTUAL_NETWORK_TOPIC| Constructor and Description |
|---|
VirtualNetworkManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
bindVirtualPort(NetworkId networkId,
org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber,
org.onosproject.net.ConnectPoint realizedBy)
Binds an existing virtual port on the specified device.
|
protected VirtualNetworkProviderService |
createProviderService(VirtualNetworkProvider provider) |
VirtualDevice |
createVirtualDevice(NetworkId networkId,
org.onosproject.net.DeviceId deviceId)
Creates a new virtual device within the specified network.
|
VirtualHost |
createVirtualHost(NetworkId networkId,
org.onosproject.net.HostId hostId,
org.onlab.packet.MacAddress mac,
org.onlab.packet.VlanId vlan,
org.onosproject.net.HostLocation location,
Set<org.onlab.packet.IpAddress> ips)
Creates a new virtual host within the specified network.
|
VirtualLink |
createVirtualLink(NetworkId networkId,
org.onosproject.net.ConnectPoint src,
org.onosproject.net.ConnectPoint dst)
Creates a new virtual link within the specified network.
|
VirtualNetwork |
createVirtualNetwork(TenantId tenantId)
Creates a new virtual network for the specified tenant.
|
VirtualPort |
createVirtualPort(NetworkId networkId,
org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber,
org.onosproject.net.ConnectPoint realizedBy)
Creates a new virtual port on the specified device.
|
void |
deactivate() |
<T> T |
get(NetworkId networkId,
Class<T> serviceClass)
Returns implementation of the specified service class for operating
in the context of the given network.
|
Set<org.onosproject.net.DeviceId> |
getPhysicalDevices(NetworkId networkId,
VirtualDevice virtualDevice)
Returns list of physical device identifier mapping with the virtual
device in the specified network.
|
org.onlab.osgi.ServiceDirectory |
getServiceDirectory()
Returns service directory.
|
Set<TenantId> |
getTenantIds()
Returns the set of tenant identifiers known to the system.
|
Set<VirtualDevice> |
getVirtualDevices(NetworkId networkId)
Returns a collection of all virtual devices in the specified network.
|
Set<VirtualHost> |
getVirtualHosts(NetworkId networkId)
Returns a collection of all virtual hosts in the specified network.
|
Set<VirtualLink> |
getVirtualLinks(NetworkId networkId)
Returns collection of all virtual links in the specified network.
|
org.onosproject.core.ApplicationId |
getVirtualNetworkApplicationId(NetworkId networkId)
Returns the application identifier for a virtual network.
|
Set<VirtualNetwork> |
getVirtualNetworks(TenantId tenantId)
Returns a collection of all virtual networks created on behalf of the
specified tenant.
|
Set<VirtualPort> |
getVirtualPorts(NetworkId networkId,
org.onosproject.net.DeviceId deviceId)
Returns list of all virtual ports of the specified device.
|
void |
registerTenantId(TenantId tenantId)
Registers the specified, externally generated tenant identifier.
|
void |
removeVirtualDevice(NetworkId networkId,
org.onosproject.net.DeviceId deviceId)
Removes the specified virtual device and all its ports and affiliated links.
|
void |
removeVirtualHost(NetworkId networkId,
org.onosproject.net.HostId hostId)
Removes the specified virtual host.
|
void |
removeVirtualLink(NetworkId networkId,
org.onosproject.net.ConnectPoint src,
org.onosproject.net.ConnectPoint dst)
Removes the specified virtual link.
|
void |
removeVirtualNetwork(NetworkId networkId)
Removes the specified virtual network and all its devices and links.
|
void |
removeVirtualPort(NetworkId networkId,
org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber)
Removes the specified virtual port.
|
void |
setIntentService(org.onosproject.net.intent.IntentService intentService)
Only used for Junit test methods outside of this package.
|
void |
setStore(VirtualNetworkStore store)
Only used for Junit test methods outside of this package.
|
void |
unregisterTenantId(TenantId tenantId)
Unregisters the specified, externally generated tenant identifier.
|
addListener, bindEventDispatcher, post, removeListener, unbindEventDispatcherdefaultProvider, getProvider, getProvider, getProvider, getProviders, register, unregister@Reference(cardinality=MANDATORY_UNARY) protected VirtualNetworkStore store
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.net.intent.IntentService intentService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.core.CoreService coreService
public void setStore(VirtualNetworkStore store)
store - virtual network storepublic void setIntentService(org.onosproject.net.intent.IntentService intentService)
intentService - intent service@Activate public void activate()
@Deactivate public void deactivate()
public void registerTenantId(TenantId tenantId)
VirtualNetworkAdminServiceregisterTenantId in interface VirtualNetworkAdminServicetenantId - tenant identifierpublic void unregisterTenantId(TenantId tenantId)
VirtualNetworkAdminServiceunregisterTenantId in interface VirtualNetworkAdminServicetenantId - tenant identifierpublic Set<TenantId> getTenantIds()
VirtualNetworkAdminServicegetTenantIds in interface VirtualNetworkAdminServicepublic VirtualNetwork createVirtualNetwork(TenantId tenantId)
VirtualNetworkAdminServicecreateVirtualNetwork in interface VirtualNetworkAdminServicetenantId - tenant identifierpublic void removeVirtualNetwork(NetworkId networkId)
VirtualNetworkAdminServiceremoveVirtualNetwork in interface VirtualNetworkAdminServicenetworkId - network identifierpublic VirtualDevice createVirtualDevice(NetworkId networkId, org.onosproject.net.DeviceId deviceId)
VirtualNetworkAdminServicecreateVirtualDevice in interface VirtualNetworkAdminServicenetworkId - network identifierdeviceId - device identifierpublic void removeVirtualDevice(NetworkId networkId, org.onosproject.net.DeviceId deviceId)
VirtualNetworkAdminServiceremoveVirtualDevice in interface VirtualNetworkAdminServicenetworkId - network identifierdeviceId - device identifierpublic VirtualHost createVirtualHost(NetworkId networkId, org.onosproject.net.HostId hostId, org.onlab.packet.MacAddress mac, org.onlab.packet.VlanId vlan, org.onosproject.net.HostLocation location, Set<org.onlab.packet.IpAddress> ips)
VirtualNetworkAdminServicecreateVirtualHost in interface VirtualNetworkAdminServicenetworkId - network identifierhostId - host identifiermac - mac addressvlan - vlan identifierlocation - host locationips - set of ip addressespublic void removeVirtualHost(NetworkId networkId, org.onosproject.net.HostId hostId)
VirtualNetworkAdminServiceremoveVirtualHost in interface VirtualNetworkAdminServicenetworkId - network identifierhostId - host identifierpublic VirtualLink createVirtualLink(NetworkId networkId, org.onosproject.net.ConnectPoint src, org.onosproject.net.ConnectPoint dst)
VirtualNetworkAdminServicecreateVirtualLink in interface VirtualNetworkAdminServicenetworkId - network identifiersrc - source connection pointdst - destination connection pointpublic void removeVirtualLink(NetworkId networkId, org.onosproject.net.ConnectPoint src, org.onosproject.net.ConnectPoint dst)
VirtualNetworkAdminServiceremoveVirtualLink in interface VirtualNetworkAdminServicenetworkId - network identifiersrc - source connection pointdst - destination connection pointpublic VirtualPort createVirtualPort(NetworkId networkId, org.onosproject.net.DeviceId deviceId, org.onosproject.net.PortNumber portNumber, org.onosproject.net.ConnectPoint realizedBy)
VirtualNetworkAdminServicecreateVirtualPort in interface VirtualNetworkAdminServicenetworkId - network identifierdeviceId - virtual device identifierportNumber - virtual port numberrealizedBy - underlying physical port using which this virtual port is realizedpublic void bindVirtualPort(NetworkId networkId, org.onosproject.net.DeviceId deviceId, org.onosproject.net.PortNumber portNumber, org.onosproject.net.ConnectPoint realizedBy)
VirtualNetworkAdminServicebindVirtualPort in interface VirtualNetworkAdminServicenetworkId - network identifierdeviceId - virtual device identifierportNumber - virtual port numberrealizedBy - underlying physical port using which this virtual port is realizedpublic void removeVirtualPort(NetworkId networkId, org.onosproject.net.DeviceId deviceId, org.onosproject.net.PortNumber portNumber)
VirtualNetworkAdminServiceremoveVirtualPort in interface VirtualNetworkAdminServicenetworkId - network identifierdeviceId - device identifierportNumber - port numberpublic org.onlab.osgi.ServiceDirectory getServiceDirectory()
VirtualNetworkServicegetServiceDirectory in interface VirtualNetworkServicepublic Set<VirtualNetwork> getVirtualNetworks(TenantId tenantId)
VirtualNetworkServicegetVirtualNetworks in interface VirtualNetworkServicetenantId - tenant identifierpublic Set<VirtualDevice> getVirtualDevices(NetworkId networkId)
VirtualNetworkServicegetVirtualDevices in interface VirtualNetworkServicenetworkId - network identifierpublic Set<VirtualHost> getVirtualHosts(NetworkId networkId)
VirtualNetworkServicegetVirtualHosts in interface VirtualNetworkServicenetworkId - network identifierpublic Set<VirtualLink> getVirtualLinks(NetworkId networkId)
VirtualNetworkServicegetVirtualLinks in interface VirtualNetworkServicenetworkId - network identifierpublic Set<VirtualPort> getVirtualPorts(NetworkId networkId, org.onosproject.net.DeviceId deviceId)
VirtualNetworkServicegetVirtualPorts in interface VirtualNetworkServicenetworkId - network identifierdeviceId - device identifierpublic Set<org.onosproject.net.DeviceId> getPhysicalDevices(NetworkId networkId, VirtualDevice virtualDevice)
VirtualNetworkServicegetPhysicalDevices in interface VirtualNetworkServicenetworkId - network identifiervirtualDevice - the virtual devicepublic <T> T get(NetworkId networkId, Class<T> serviceClass)
VirtualNetworkServiceThe following services will be available:
DeviceServiceLinkServiceHostServiceTopologyServicePathServicePacketServiceFlowRuleServiceFlowObjectiveServiceIntentServiceget in interface VirtualNetworkServiceT - type of servicenetworkId - network identifierserviceClass - service classpublic org.onosproject.core.ApplicationId getVirtualNetworkApplicationId(NetworkId networkId)
VirtualNetworkServicegetVirtualNetworkApplicationId in interface VirtualNetworkServicenetworkId - network identifierprotected VirtualNetworkProviderService createProviderService(VirtualNetworkProvider provider)
createProviderService in class org.onosproject.net.provider.AbstractProviderRegistry<VirtualNetworkProvider,VirtualNetworkProviderService>