public final class VTNFlowBuilder extends Object implements VTNDataFlow
VTNFlowBuilder describes a request for adding a new VTN data flow.| Constructor and Description |
|---|
VTNFlowBuilder(String tname,
VTNMatch vmatch,
int pri,
int idle,
int hard)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
VTNFlowBuilder |
addDropFlow(SalPort ingress)
Add a flow entry that discards packets.
|
VTNFlowBuilder |
addEgressFlow(SalPort ingress,
SalPort egress,
int inVid,
int outVid,
Collection<? extends FlowFilterAction> filters)
Add the egress flow entry.
|
VTNFlowBuilder |
addInternalFlow(SalPort src,
SalPort dst)
Add an intermediate flow entry which forwards packets via the given
link edge.
|
VTNFlowBuilder |
addVirtualRoute(Collection<VNodeHop> c)
Add the specified sequence of
VNodeHop to the tail of the
virtual packet routing path. |
VTNFlowBuilder |
addVirtualRoute(VNodeHop vhop)
Add the specified
VNodeHop to the tail of the virtual packet
routing path. |
VtnDataFlow |
createVtnDataFlow(VtnFlowId fid)
Create a VTN data flow instance.
|
VtnDataFlow |
getDataFlow()
Return a VTN data flow instance created by the last call of
createVtnDataFlow(VtnFlowId). |
Set<SalNode> |
getFlowNodes()
Return a set of switches related to this data flow.
|
Set<SalPort> |
getFlowPorts()
Return a set of switch ports related to this data flow.
|
String |
getIngressMatchKey()
Return a string which represents the condition configured in the ingress
flow entry.
|
VtnDataFlowKey |
getKey()
Return the key assocaited with the VTN data flow in the MD-SAL
datastore.
|
SourceHostFlowsKey |
getSourceHostFlowsKey()
Return the source L2 host of this data flow.
|
String |
getTenantName()
Return the name of the VTN.
|
VTNFlowBuilder |
setEgressVNodeHop(VNodeHop vhop)
Set the virtual node hop to the egress virtual node of this flow.
|
VTNFlowBuilder |
setPathPolicyId(int id)
Set the identifier of the path policy which routed this flow.
|
public String getTenantName()
public VTNFlowBuilder addInternalFlow(SalPort src, SalPort dst)
src - The source port of the link edge.dst - The destination port of the link edge.public VTNFlowBuilder addEgressFlow(SalPort ingress, SalPort egress, int inVid, int outVid, Collection<? extends FlowFilterAction> filters)
ingress - A SalPort instance corresponding to the ingress
switch port.egress - A SalPort instance corresponding to the egress
switch port.inVid - A VLAN ID configured in the origial packet.outVid - A VLAN ID to be set.filters - A collection of actions configured to be applied.public VTNFlowBuilder addDropFlow(SalPort ingress)
ingress - A SalPort instance corresponding to the ingress
switch port.public VTNFlowBuilder setPathPolicyId(int id)
id - The identifier of the path policy.public VTNFlowBuilder addVirtualRoute(VNodeHop vhop)
VNodeHop to the tail of the virtual packet
routing path.vhop - A VNodeHop instance.public VTNFlowBuilder addVirtualRoute(Collection<VNodeHop> c)
VNodeHop to the tail of the
virtual packet routing path.c - A collection of VNodeHop instances.public VTNFlowBuilder setEgressVNodeHop(VNodeHop vhop)
vhop - A VNodeHop instance which represents the hop to
the egress virtual node.
Specifying null or an empty route means that
this VTN flow always discards packets.public VtnDataFlow createVtnDataFlow(VtnFlowId fid)
fid - The identifier for this data flow.VtnDataFlow instance.public VtnDataFlow getDataFlow()
createVtnDataFlow(VtnFlowId).VtnDataFlow or null.public VtnDataFlowKey getKey()
Note that this method must be called after the data flow is created
by createVtnDataFlow(VtnFlowId).
getKey in interface VTNDataFlowVtnDataFlowKey instance.public String getIngressMatchKey()
Note that this method needs to be called after all flow entries are configured.
getIngressMatchKey in interface VTNDataFlowpublic Set<SalNode> getFlowNodes()
getFlowNodes in interface VTNDataFlowSalNode instances.public Set<SalPort> getFlowPorts()
getFlowPorts in interface VTNDataFlowSalPort instances.public SourceHostFlowsKey getSourceHostFlowsKey()
Note that this method needs to be called after all flow entries are configured.
getSourceHostFlowsKey in interface VTNDataFlowSourceHostFlowsKey instance which specifies the
source L2 host. null if the source L2 host could not
be determined.Copyright © 2018 OpenDaylight. All rights reserved.