@Service public class VirtualPortManager extends org.onosproject.event.AbstractListenerManager<VirtualPortEvent,VirtualPortListener> implements VirtualPortService
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.core.ApplicationId |
appId |
protected org.onosproject.core.CoreService |
coreService |
protected TenantNetworkService |
networkService |
protected org.onosproject.store.service.StorageService |
storageService |
protected org.onosproject.store.service.EventuallyConsistentMap<VirtualPortId,VirtualPort> |
vPortStore |
| Constructor and Description |
|---|
VirtualPortManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
boolean |
createPorts(Iterable<VirtualPort> vPorts)
Creates virtualPorts by virtualPorts.
|
void |
deactivate() |
boolean |
exists(VirtualPortId vPortId)
Returns if the virtualPort is existed.
|
VirtualPort |
getPort(FixedIp fixedIP)
Returns the virtualPort associated with the fixedIP.
|
VirtualPort |
getPort(org.onlab.packet.MacAddress mac)
Returns the virtualPort associated with the mac address.
|
VirtualPort |
getPort(TenantNetworkId networkId,
org.onlab.packet.IpAddress ip)
Returns the virtualPort associated with the networkId and ip.
|
VirtualPort |
getPort(VirtualPortId vPortId)
Returns the virtualPort with the identifier.
|
Collection<VirtualPort> |
getPorts()
Returns the collection of the currently known virtualPort.
|
Collection<VirtualPort> |
getPorts(org.onosproject.net.DeviceId deviceId)
Returns the collection of the virtualPorts associated with the deviceId.
|
Collection<VirtualPort> |
getPorts(TenantId tenantId)
Returns the collection of the virtualPorts associated with the tenantId.
|
Collection<VirtualPort> |
getPorts(TenantNetworkId networkId)
Returns the collection of the virtualPorts associated with the networkId.
|
boolean |
removePorts(Iterable<VirtualPortId> vPortIds)
Deletes virtualPortIds by virtualPortIds.
|
boolean |
updatePorts(Iterable<VirtualPort> vPorts)
Updates virtualPorts by virtualPorts.
|
addListener, bindEventDispatcher, post, removeListener, unbindEventDispatcherprotected org.onosproject.store.service.EventuallyConsistentMap<VirtualPortId,VirtualPort> vPortStore
protected org.onosproject.core.ApplicationId appId
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.service.StorageService storageService
@Reference(cardinality=MANDATORY_UNARY) protected TenantNetworkService networkService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.core.CoreService coreService
@Activate public void activate()
@Deactivate public void deactivate()
public boolean exists(VirtualPortId vPortId)
VirtualPortServiceexists in interface VirtualPortServicevPortId - virtualPort identifierpublic VirtualPort getPort(VirtualPortId vPortId)
VirtualPortServicegetPort in interface VirtualPortServicevPortId - virtualPort IDpublic VirtualPort getPort(FixedIp fixedIP)
VirtualPortServicegetPort in interface VirtualPortServicefixedIP - the fixedIP identifierpublic VirtualPort getPort(org.onlab.packet.MacAddress mac)
VirtualPortServicegetPort in interface VirtualPortServicemac - the mac addresspublic VirtualPort getPort(TenantNetworkId networkId, org.onlab.packet.IpAddress ip)
VirtualPortServicegetPort in interface VirtualPortServicenetworkId - the TenantNetworkId identifierip - the ip identifierpublic Collection<VirtualPort> getPorts()
VirtualPortServicegetPorts in interface VirtualPortServicepublic Collection<VirtualPort> getPorts(TenantNetworkId networkId)
VirtualPortServicegetPorts in interface VirtualPortServicenetworkId - the network identiferpublic Collection<VirtualPort> getPorts(TenantId tenantId)
VirtualPortServicegetPorts in interface VirtualPortServicetenantId - the tenant identifierpublic Collection<VirtualPort> getPorts(org.onosproject.net.DeviceId deviceId)
VirtualPortServicegetPorts in interface VirtualPortServicedeviceId - the device identifierpublic boolean createPorts(Iterable<VirtualPort> vPorts)
VirtualPortServicecreatePorts in interface VirtualPortServicevPorts - the iterable collection of virtualPortspublic boolean updatePorts(Iterable<VirtualPort> vPorts)
VirtualPortServiceupdatePorts in interface VirtualPortServicevPorts - the iterable collection of virtualPortspublic boolean removePorts(Iterable<VirtualPortId> vPortIds)
VirtualPortServiceremovePorts in interface VirtualPortServicevPortIds - the iterable collection of virtualPort identifiers