public final class VBridge extends VirtualBridge<Vbridge>
VBridge
describes a configuration and runtime status for a vBridge.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_AGE_INTERVAL
The default value for age-interval.
|
Constructor and Description |
---|
VBridge(BridgeIdentifier<Vbridge> vbrId)
Construct a new instance.
|
VBridge(BridgeIdentifier<Vbridge> vbrId,
Vbridge vbr)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy(TxContext ctx,
boolean retain)
Destroy the vBridge.
|
protected PacketContext |
evaluateOutputFilter(PacketContext pctx,
int vid)
Evaluate flow filters configured in this vBridge against the given
outgoing packet.
|
protected VnodeState |
eventReceived(TxContext ctx,
VtnNodeEvent ev)
Notify virtual mappings in this bridge of node event.
|
protected VnodeState |
eventReceived(TxContext ctx,
VtnPortEvent ev)
Notify virtual mappings in this bridge of port event.
|
protected void |
forward(PacketContext pctx,
VirtualMapNode vnode)
Forward the specified packet to the virtual mapping configured in this
virtual bridge.
|
protected org.slf4j.Logger |
getLogger()
Return a logger instance.
|
protected VnodeState |
getMapState(TxContext ctx)
Return the state of the virtual mapping configured to this bridge.
|
Vbridge |
getVbridge()
Return the vbridge container associated with this instance.
|
boolean |
isFilterEmpty()
Determine whether this vBridge contains no flow filter or not.
|
protected VirtualMapNode |
match(PacketContext pctx,
TenantNodeIdentifier<?,?> ref,
EtherAddress eaddr,
SalPort sport,
int vid,
boolean pktin)
Return the virtual network node in this vBridge which maps the specified
host.
|
VBridgeInterface |
newInterface(VInterfaceIdentifier<Vbridge> ifId,
Vinterface vif)
Construct a new virtual interface instance associated with the interface
inside this vBridge.
|
VBridgeInterface |
newInterface(VInterfaceIdentifier<Vbridge> ifId,
VtnVinterfaceConfig vifc,
VTNPortMapConfig pmap)
Construct a new virtual interface instance associated with the interface
inside this vBridge.
|
Vbridge |
resume(TxContext ctx,
XmlLogger xlogger,
XmlVBridge xvbr)
Resume this vBridge.
|
broadcastInterfaces, create, destroyInterfaces, forward, getBridgeStatus, getState, hasPathFault, match, newBridgeStatus, newBridgeStatus, notifyNode, notifyPort, putState, putState, putState, receive, redirect, resume, routingUpdated, setInterfaceEnabled, submit, traceState, updateState, updateState, updateState
getFlowFilterList
getIdentifier, getInitialValue
public static final int DEFAULT_AGE_INTERVAL
public VBridge(BridgeIdentifier<Vbridge> vbrId)
This constructor is used to resume runtime status of the virtual bridge on bootstrap.
vbrId
- The identifier for the vBridge.public VBridge(BridgeIdentifier<Vbridge> vbrId, Vbridge vbr)
vbrId
- The identifier for the vBridge.vbr
- A Vbridge
instance read from the MD-SAL datastore.public Vbridge getVbridge()
Vbridge
instance.public Vbridge resume(TxContext ctx, XmlLogger xlogger, XmlVBridge xvbr) throws VTNException
ctx
- MD-SAL datastore transaction context.xlogger
- A XmlLogger
instance.xvbr
- A XmlVBridge
instance that contains vBridge
configuration.Vbridge
instance that contains vBridge configuration
and runtime status.VTNException
- An error occurred.public boolean isFilterEmpty()
isFilterEmpty
in class VirtualBridge<Vbridge>
true
if this virtual bridge contains no flow filter.
false
otherwise.protected VirtualMapNode match(PacketContext pctx, TenantNodeIdentifier<?,?> ref, EtherAddress eaddr, SalPort sport, int vid, boolean pktin) throws VTNException
match
in class VirtualBridge<Vbridge>
pctx
- A runtime context for a received packet.ref
- Reference to the virtual network mapping that maps the
host. Note that the specified virtual mapping must be
present in this virtual bridge.eaddr
- The MAC address of the host.sport
- A SalPort
instance that specifies the switch port
where the host was detected.vid
- The VLAN ID associated with the specified host.pktin
- true
indicates the caller is the PACKET_IN
handler.VirtualMapNode
if the specified host is mapped to
this virtual bridge. null
otherwise.VTNException
- An error occurred.public VBridgeInterface newInterface(VInterfaceIdentifier<Vbridge> ifId, Vinterface vif)
newInterface
in class VirtualBridge<Vbridge>
ifId
- The identifier for a new virtual interface.vif
- A Vinterface
instance read from the MD-SAL
datastore.VBridgeInterface
instance.public VBridgeInterface newInterface(VInterfaceIdentifier<Vbridge> ifId, VtnVinterfaceConfig vifc, VTNPortMapConfig pmap)
This method is used to resume runtime status of the virtual interface on bootstrap.
newInterface
in class VirtualBridge<Vbridge>
ifId
- The identifier for a new virtual interface.vifc
- Configuration of the virtual interface.pmap
- Port mapping configuration.VBridgeInterface
instance.public void destroy(TxContext ctx, boolean retain) throws VTNException
destroy
in class VirtualBridge<Vbridge>
ctx
- MD-SAL datastore transaction context.retain
- true
means that the parent virtual node will be
retained. false
means that the parent virtual
node is being destroyed.VTNException
- An error occurred.protected VnodeState getMapState(TxContext ctx)
getMapState
in class VirtualBridge<Vbridge>
ctx
- A runtime context for transaction task.protected VnodeState eventReceived(TxContext ctx, VtnNodeEvent ev)
eventReceived
in class VirtualBridge<Vbridge>
ctx
- MD-SAL datastore transaction context.ev
- A VtnNodeEvent
instance.protected VnodeState eventReceived(TxContext ctx, VtnPortEvent ev)
eventReceived
in class VirtualBridge<Vbridge>
ctx
- MD-SAL datastore transaction context.ev
- A VtnPortEvent
instance.protected PacketContext evaluateOutputFilter(PacketContext pctx, int vid) throws DropFlowException, RedirectFlowException
evaluateOutputFilter
in class VirtualBridge<Vbridge>
pctx
- 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.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.protected void forward(PacketContext pctx, VirtualMapNode vnode) throws DropFlowException, RedirectFlowException, VTNException
forward
in class VirtualBridge<Vbridge>
pctx
- A runtime context for a received packet.vnode
- A VirtualMapNode
instance that maps the given
packet.DropFlowException
- The given packet was discarded by a flow filter.RedirectFlowException
- The given packet was redirected by a flow filter.VTNException
- An error occurred.protected org.slf4j.Logger getLogger()
getLogger
in class VirtualElement<Vbridge,BridgeIdentifier<Vbridge>>
Logger
instance.Copyright © 2018 OpenDaylight. All rights reserved.