public final class VTNMacMapStatus extends Object
VTNMacMapStatus describes the runtime information about
a MAC mapping configured in a vBridge.| Constructor and Description |
|---|
VTNMacMapStatus()
Construct an empty instance.
|
VTNMacMapStatus(MacMapStatus mms)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.lang3.tuple.Triple<Boolean,SalPort,PortVlan> |
activate(MacMapIdentifier mapId,
MacVlan mvlan,
SalPort sport)
Activate MAC mapping for the specified MAC address.
|
MacVlan |
getDuplicate(MacVlan mvlan)
Determine whether the MAC address same as the specified host is already
mapped by the MAC mapping or not.
|
Set<PortVlan> |
getNetworks()
Return an unmodifiable set of
PortVlan instances corresponding
to VLAN where MAC mapping is activated. |
SalPort |
getPort(MacVlan mvlan)
Determine the switch port where the specified host was detected.
|
PortVlan |
getPortVlan(long mac)
Determine the VLAN associated with the specified MAC address in the
MAC mapping.
|
boolean |
hasMapping()
Determine whether at least one host is actually mapped by this
MAC mapping or not.
|
boolean |
hasMapping(PortVlan pvlan)
Determine whether at least one host is mapped on the specified VLAN
network or not.
|
Map<MacVlan,SalPort> |
inactivate(MacMapIdentifier mapId,
Set<MacVlan> allowed,
Set<Integer> unmapped,
Set<PortVlan> rels)
Inactivate all MAC mappings which are no longer mapped.
|
SalPort |
inactivate(MacVlan mvlan,
Set<PortVlan> rels)
Inactivate the MAC mapping for the specified MAC address.
|
Map<MacVlan,SalPort> |
inactivate(PortFilter filter,
Set<PortVlan> rels)
Inactivate all MAC mappings detected on switch port accepted by the
specified port filter.
|
Set<MacVlan> |
inactivate(PortVlan pvlan)
Inactivate all the MAC mappings detected on the specified VLAN.
|
boolean |
isDirty()
Determine whether this instance is modified or not.
|
void |
submit(org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction tx,
MacMapIdentifier ident)
Put the MAC mapping status only if this instance is modified.
|
MacMapStatus |
toMacMapStatus()
Convert this instance into a
MacMapStatus instance. |
public VTNMacMapStatus()
public VTNMacMapStatus(MacMapStatus mms)
mms - A MacMapStatus instance.
Specifying null results in undefined behavior.public MacMapStatus toMacMapStatus()
MacMapStatus instance.MacMapStatus instance.public boolean isDirty()
Note that this method always clears the dirty flag in this instance.
true if this instance is modified.
false if not modified.public void submit(org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction tx,
MacMapIdentifier ident)
tx - A transaction for the MD-SAL datastore.ident - A MacMapIdentifier instance that specifies the
target MAC mapping.public org.apache.commons.lang3.tuple.Triple<Boolean,SalPort,PortVlan> activate(MacMapIdentifier mapId, MacVlan mvlan, SalPort sport) throws MacMapDuplicateException
mapId - The identifier for the target MAC mapping.mvlan - A MacVlan instance corresponding to a host to be
activated.sport - A SalPort instance corresponding to a switch port
where the MAC address is detected.
A Triple instance is returned if the MAC mapping was
successfully activated.
true means that the target MAC mapping has been activated.
false means that the target MAC mapping is already
activated.
SalPort instance that specifies the physical switch port
previously associated with the L2 host in the MAC mapping is set
to the middle.
PortVlan instance that specifies the VLAN to be released
is set to the right.
null is returned if the MAC mapping for the specified
host is already activated.
MacMapDuplicateException - The specified MAC address is already mapped by this MAC mapping.public SalPort inactivate(MacVlan mvlan, Set<PortVlan> rels)
public Set<MacVlan> inactivate(PortVlan pvlan)
public Map<MacVlan,SalPort> inactivate(PortFilter filter, Set<PortVlan> rels) throws VTNException
filter - A PortFilter instance which selects switch ports.rels - A set of PortVlan to store VLAN networks to be
released.VTNException - An error occurred.public Map<MacVlan,SalPort> inactivate(MacMapIdentifier mapId, Set<MacVlan> allowed, Set<Integer> unmapped, Set<PortVlan> rels)
This method is used to inactivate MAC mappings which was mapped by an allowed host entry with a wildcard MAC address.
mapId - The identifier for the target MAC mapping.allowed - A set of hosts to be mapped by MAC mapping explicitly.unmapped - A set of VLAN IDs which was unmmaped.rels - A set of PortVlan to store VLAN networks to be
released.public SalPort getPort(MacVlan mvlan)
public PortVlan getPortVlan(long mac)
mac - A long integer which represents MAC address of the host.PortVlan instance which represents VLAN associated
with the specified MAC address.
null if the specified MAC address is not mapped by the
MAC mapping.public boolean hasMapping(PortVlan pvlan)
pvlan - A PortVlan instance which specifies a pair of
physical switch port and VLAN ID.true is returned only if at least one host is mapped
to the specified VLAN.public boolean hasMapping()
true if at least one host is actually mapped by
this MAC mapping. Otherwise false.public Set<PortVlan> getNetworks()
PortVlan instances corresponding
to VLAN where MAC mapping is activated.PortVlan instances.
null is returned if no MAC mapping is activated.Copyright © 2018 OpenDaylight. All rights reserved.