public final class VTNVlanMap extends VirtualElement<VlanMap,VlanMapIdentifier> implements VirtualMapNode
VTNVlanMap describes a configuration and runtime status for a
VLAN mapping.| Constructor and Description |
|---|
VTNVlanMap(BridgeIdentifier<Vbridge> vbrId,
VlanMap vlmap)
Construct a new instance.
|
VTNVlanMap(BridgeIdentifier<Vbridge> vbrId,
VTNVlanMapConfig vmc)
Construct a new instance.
|
VTNVlanMap(VlanMapIdentifier vmapId,
VlanMap vlmap)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkNode(TxContext ctx,
SalNode snode)
Determine whether the given node is suitable for the VLAN mapping or
not.
|
void |
destroy(TxContext ctx,
boolean retain)
Destroy the VLAN mapping.
|
void |
disableInput(PacketContext pctx)
This method does nothing.
|
void |
filterPacket(PacketContext pctx,
int vid)
This method does nothing.
|
PacketContext |
filterPacket(PacketContext pctx,
int vid,
VirtualBridge<?> bridge)
Evaluate flow filters for outgoing packet to be transmitted by this
VLAN mapping.
|
VlanMapIdentifier |
getIdentifier(EtherAddress eaddr,
int vid)
Return the identifier for the virtual mapping which maps the given host.
|
VNodeHop |
getIngressHop(EtherAddress eaddr,
int vid)
Return a
VNodeHop instance that indicates the packet was mapped
by the VLAN mapping. |
protected org.slf4j.Logger |
getLogger()
Return a logger instance.
|
String |
getMapId()
Return the mapping identifier assigned to this VLAN mapping.
|
VnodeState |
getState()
Return the state of this VLAN mapping.
|
VlanMap |
getVlanMap()
Return the VLAN mapping container.
|
VlanMapStatus |
getVlanMapStatus()
Return the runtime status information of the VLAN mapping.
|
boolean |
isEnabled()
Determine whether this VLAN mapping is administravely enabled or not.
|
VnodeState |
notifyNode(TxContext ctx,
VtnNodeEvent ev)
Invoked when a physical switch is added, removed, or changed.
|
VnodeState |
notifyPort(TxContext ctx,
VtnPortEvent ev)
Invoked when a physical switch port is added, removed, or changed.
|
VnodeState |
register(TxContext ctx,
boolean purge)
Register the VLAN mapping.
|
VnodeState |
resume(TxContext ctx,
List<VlanMap> list)
Resume the VLAN mapping.
|
void |
submit(TxContext ctx)
Submit runtime status changes to the MD-SAL datastore.
|
void |
transmit(PacketContext pctx,
VBridge vbr,
Set<PortVlan> sent)
Transmit the given packet to the physical network mapped by this
VLAN mapping.
|
getIdentifier, getInitialValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIdentifierpublic VTNVlanMap(BridgeIdentifier<Vbridge> vbrId, VTNVlanMapConfig vmc)
vbrId - The identifier for a vBridge that contains this VLAN
mapping.vmc - VLAN mapping configuration.public VTNVlanMap(BridgeIdentifier<Vbridge> vbrId, VlanMap vlmap)
vbrId - The identifier for a vBridge that contains this VLAN
mapping.vlmap - A VlanMap instance read from the MD-SAL datastore.public VTNVlanMap(VlanMapIdentifier vmapId, VlanMap vlmap)
vmapId - The identifier for the VLAN mapping.vlmap - A VlanMap instance.public static boolean checkNode(TxContext ctx, SalNode snode) throws VTNException
ctx - A runtime context for MD-SAL datastore transaction task.snode - A SalNode instance which specifies the node
to be tested. null means that all the switches
are targeted.true is returned only if the given node is valid.VTNException - An error occurred.public String getMapId()
public VnodeState getState()
VnodeState.UP if this VLAN mapping is active.
VnodeState.DOWN otherwise.public VlanMap getVlanMap()
VlanMap instance.public VlanMapStatus getVlanMapStatus()
VlanMapStatus instance.public VnodeState register(TxContext ctx, boolean purge) throws VTNException
ctx - MD-SAL datastore transaction context.purge - If true, this method purges obsolete network
caches as appropriate.VnodeState.UP if this VLAN mapping has been activated.
VnodeState#DOWN otherwise.VTNException - An error occurred.public VnodeState resume(TxContext ctx, List<VlanMap> list)
ctx - MD-SAL datastore transaction context.list - A list of VlanMap instances to store resumed
VLAN mapping.VnodeState instance on success.
null on failure.public void submit(TxContext ctx)
ctx - MD-SAL datastore transaction context.public void destroy(TxContext ctx, boolean retain)
ctx - MD-SAL datastore transaction context.retain - true means that the parent vBridge will be
retained. false means that the parent vBridge
is being destroyed.public VnodeState notifyNode(TxContext ctx, VtnNodeEvent ev)
ctx - MD-SAL datastore transaction context.ev - A VtnNodeEvent instance.public VnodeState notifyPort(TxContext ctx, VtnPortEvent ev)
ctx - MD-SAL datastore transaction context.ev - A VtnPortEvent instance.public void transmit(PacketContext pctx, VBridge vbr, Set<PortVlan> sent) throws RedirectFlowException, VTNException
pctx - A runtime context for a received packet.vbr - A VBridge instance that contains this VLAN mapping.sent - A set of PortVlan which indicates the network
already processed.RedirectFlowException - The given packet was redirected by a flow filter.VTNException - An error occurred.protected org.slf4j.Logger getLogger()
getLogger in class VirtualElement<VlanMap,VlanMapIdentifier>Logger instance.public VlanMapIdentifier getIdentifier(EtherAddress eaddr, int vid)
This method always returns the identifier for this VLAN mapping because VLAN mapping does not specifies the host to be mapped.
getIdentifier in interface VirtualMapNodeeaddr - Unused.vid - Unused.public boolean isEnabled()
isEnabled in interface VirtualMapNodetrue because the VLAN mapping cannot be
disabled administratively.public VNodeHop getIngressHop(EtherAddress eaddr, int vid)
VNodeHop instance that indicates the packet was mapped
by the VLAN mapping.getIngressHop in interface VirtualMapNodeeaddr - Unused.vid - Unused.VNodeHop instance.public void disableInput(PacketContext pctx)
disableInput in interface VirtualMapNodepctx - Unused.public void filterPacket(PacketContext pctx, int vid)
The input filters configured in the vBridge should be evaluated
by VBridge.
filterPacket in interface VirtualMapNodepctx - Unused.vid - Unused.public PacketContext filterPacket(PacketContext pctx, int vid, VirtualBridge<?> bridge) throws DropFlowException, RedirectFlowException
filterPacket in interface VirtualMapNodepctx - A runtime context for a received packet.vid - A VLAN ID to be used for packet matching.
A VLAN ID configured in the given packet is used if a
negative value is specified.bridge - A VirtualBridge instance associated with this
virtual mapping.PacketContext to be used for transmitting packet.DropFlowException - The given packet was discarded by a flow filter.RedirectFlowException - The given packet was redirected by a flow filter.Copyright © 2018 OpenDaylight. All rights reserved.