public interface Mappable
Modifier and Type | Method and Description |
---|---|
void |
addIP(PhysicalIPAddress physicalIP,
OVXIPAddress virtualIP)
This function creates the map between the PhysicalIP and VirtualIP in
both directions.
|
void |
addLinks(List<PhysicalLink> physicalLinks,
OVXLink virtualLink)
Create the mapping between PhysicalLinks and a VirtualLink.
|
void |
addMAC(MACAddress mac,
Integer tenantId)
Creates the maping between the MAC address and tenant ID.
|
void |
addNetwork(OVXNetwork virtualNetwork)
Maintains a list of all the virtualNetworks in the system indexed by the
tenant id mapping to VirtualNetworks.
|
void |
addRoute(SwitchRoute route,
List<PhysicalLink> physicalLinks)
Adds a mapping between a SwitchRoute and the PhysicalLinks making it up.
|
void |
addSwitches(List<PhysicalSwitch> physicalSwitches,
OVXSwitch virtualSwitch)
Create the mapping between PhysicalSwithes and a VirtualSwitch.
|
Integer |
getMAC(MACAddress mac)
Gets the tenant ID associated with the given MAC address.
|
PhysicalIPAddress |
getPhysicalIP(OVXIPAddress ip,
Integer tenantId) |
List<PhysicalLink> |
getPhysicalLinks(OVXLink virtualLink)
Get the physicalLinks that all make up a specified virtualLink.
|
List<PhysicalSwitch> |
getPhysicalSwitches(OVXSwitch virtualSwitch)
Get the physicalSwitches that are contained in the virtualSwitch.
|
List<PhysicalLink> |
getRoute(SwitchRoute route)
Gets the current path as a list of physical links for the given route.
|
Set<SwitchRoute> |
getSwitchRoutes(PhysicalLink physicalLink,
Integer tenantId)
Gets the switch routes that use the given physical link in
the specified virtual network.
|
OVXIPAddress |
getVirtualIP(PhysicalIPAddress ip) |
List<OVXLink> |
getVirtualLinks(PhysicalLink physicalLink,
Integer tenantId)
Gets the list of OVXLinks that are part of virtual network identified by
tenantId and which include the specified physicalLink.
|
OVXNetwork |
getVirtualNetwork(Integer tenantId)
Gets the virtual network instance associated with the given tenant ID.
|
OVXSwitch |
getVirtualSwitch(PhysicalSwitch physicalSwitch,
Integer tenantId)
Get the virtualSwitch which has been specified by the physicalSwitch and
tenantId.
|
boolean |
hasMAC(MACAddress mac)
Checks if the MAC address exists in the map.
|
boolean |
hasOVXLinks(PhysicalLink physicalLink,
Integer tenantId) |
boolean |
hasPhysicalIP(OVXIPAddress vip,
Integer tenantId) |
boolean |
hasSwitchRoutes(PhysicalLink physicalLink,
Integer tenantId) |
boolean |
hasVirtualIP(PhysicalIPAddress ip) |
boolean |
hasVirtualSwitch(PhysicalSwitch psw,
int tid) |
void |
knownLink(PhysicalLink link)
Sets the linkid back to the original linkid for a physical link that
previously existed and has gone away and come back.
|
Map<Integer,OVXNetwork> |
listVirtualNetworks()
Obtains an immutable copy of the list of virtual networks.
|
void |
removeMAC(MACAddress mac)
Removes the MAC address from the map.
|
void |
removeNetwork(OVXNetwork network)
Deletes the OVXNetwork object.
|
void |
removePhysicalLink(PhysicalLink physicalLink)
Removes a PhysicalLink from a Mappable, including mappings to OVXLinks
and SwitchRoutes.
|
void |
removePhysicalSwitch(PhysicalSwitch physicalSwitch)
Removes a PhysicalSwitch from Mappable mappings.
|
void |
removeRoute(SwitchRoute route)
Removes a SwitchRoute from the map.
|
void |
removeVirtualIPs(int tenantId)
Delete all the IPs associated to a single virtual network.
|
void |
removeVirtualLink(OVXLink virtualLink)
Delete the OVXLink object.
|
void |
removeVirtualSwitch(OVXSwitch virtualSwitch)
Delete the OVXSwitch object.
|
void addIP(PhysicalIPAddress physicalIP, OVXIPAddress virtualIP)
physicalIP
- Refers to the PhysicalIPAddress which is created using the
tenant id and virtualIPvirtualIP
- The IP address used within the VirtualNetworkvoid addSwitches(List<PhysicalSwitch> physicalSwitches, OVXSwitch virtualSwitch)
physicalSwitches
- virtualSwitch
- void addLinks(List<PhysicalLink> physicalLinks, OVXLink virtualLink)
physicalLinks
- virtualLink
- void addNetwork(OVXNetwork virtualNetwork)
virtualNetwork
- An OVXNetwork object which keeps track of all the elements in
the Virtual networkvoid addMAC(MACAddress mac, Integer tenantId)
mac
- the MAC addresstenantId
- the tenant ID.void addRoute(SwitchRoute route, List<PhysicalLink> physicalLinks)
route
- the switch routephysicalLinks
- the physical pathPhysicalIPAddress getPhysicalIP(OVXIPAddress ip, Integer tenantId) throws AddressMappingException
ip
- tenantId
- AddressMappingException
OVXIPAddress getVirtualIP(PhysicalIPAddress ip) throws AddressMappingException
ip
- AddressMappingException
OVXSwitch getVirtualSwitch(PhysicalSwitch physicalSwitch, Integer tenantId) throws SwitchMappingException
physicalSwitch
- A PhysicalSwitch object is a single switch in the
PhysicalNetworkSwitchMappingException
List<OVXLink> getVirtualLinks(PhysicalLink physicalLink, Integer tenantId) throws LinkMappingException
physicalLink
- A PhysicalLink object which represent a single source and
destination PhysicalPort and PhysicalSwitchLinkMappingException
List<PhysicalLink> getPhysicalLinks(OVXLink virtualLink) throws LinkMappingException
virtualLink
- An OVXLink object which represents a single link in the
OVXNetworkLinkMappingException
List<PhysicalSwitch> getPhysicalSwitches(OVXSwitch virtualSwitch) throws SwitchMappingException
virtualSwitch
- A OVXSwitch object representing a single switch in the virtual
networkSwitchMappingException
OVXNetwork getVirtualNetwork(Integer tenantId) throws NetworkMappingException
tenantId
- the tenant IDNetworkMappingException
Integer getMAC(MACAddress mac) throws AddressMappingException
mac
- the MAC addressAddressMappingException
Map<Integer,OVXNetwork> listVirtualNetworks()
void removeNetwork(OVXNetwork network)
OVXNetwork
- network This is object representing the virtual networkvoid removeVirtualLink(OVXLink virtualLink)
OVXLink
- virtualLink This is object representing the virtual linkvoid removeVirtualSwitch(OVXSwitch virtualSwitch)
OVXSwitch
- virtualSwitch This is object representing the virtual switchvoid removeVirtualIPs(int tenantId)
tenantId
- This is an Integer that represents a unique number for each
virtualNetworkvoid removeMAC(MACAddress mac)
mac
- the MAC addresstenantId
- the tenant IDList<PhysicalLink> getRoute(SwitchRoute route) throws LinkMappingException
route
- the switch routeLinkMappingException
Set<SwitchRoute> getSwitchRoutes(PhysicalLink physicalLink, Integer tenantId) throws LinkMappingException
physicalLink
- the physical linktenantId
- the tenant IDLinkMappingException
void removeRoute(SwitchRoute route)
route
- the switch routevoid removePhysicalLink(PhysicalLink physicalLink)
physicalLink
- the physical linkvoid removePhysicalSwitch(PhysicalSwitch physicalSwitch)
physicalSwitch
- the physical switchboolean hasPhysicalIP(OVXIPAddress vip, Integer tenantId)
vip
- Virtual IP addresstenantId
- the ID representing a virtual network.boolean hasVirtualIP(PhysicalIPAddress ip)
ip
- The physical IP addressboolean hasMAC(MACAddress mac)
mac
- the MAC addressboolean hasSwitchRoutes(PhysicalLink physicalLink, Integer tenantId)
physicalLink
- the PhysicalLinktenantId
- the ID representing a virtual network.boolean hasOVXLinks(PhysicalLink physicalLink, Integer tenantId)
physicalLink
- the PhysicalLinktenantId
- the ID representing a virtual network.boolean hasVirtualSwitch(PhysicalSwitch psw, int tid)
psw
- the PhysicalSwitch mapped to the OVXSwitch we want to check
fortid
- TenantID of OVXSwitchvoid knownLink(PhysicalLink link)
link
- - the new link that has just been detected,Copyright © 2015. All rights reserved.