public final class FlowCondUtils extends Object
FlowCondUtils class is a collection of utility class methods
for flow condition.| Modifier and Type | Method and Description |
|---|---|
static VnodeName |
checkName(String name)
Verify the name of the flow condition.
|
static String |
checkName(VnodeName vname)
Verify the name of the flow condition.
|
static void |
checkPresent(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx,
VnodeName vname)
Determine whether the specified flow condition is present or not.
|
static void |
checkPresent(VnodeName vname)
Ensure the given vnode-name is not null.
|
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnFlowCondition> |
getIdentifier(String name)
Create the instance identifier for the flow condition specified by the
given name.
|
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnFlowMatch> |
getIdentifier(String name,
Integer index)
Create the instance identifier for the flow match specified by the
given flow condition name and match index.
|
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnFlowCondition> |
getIdentifier(VnodeName vname)
Create the instance identifier for the flow condition specified by the
given name.
|
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnFlowMatch> |
getIdentifier(VnodeName vname,
Integer index)
Create the instance identifier for the flow match specified by the
given flow condition name and match index.
|
static RpcException |
getMatchIndexMissingException()
Return a new
RpcException that indicates the flow match index
is missing. |
static String |
getName(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
Return the name of the flow condition configured in the given
instance identifier.
|
static RpcException |
getNotFoundException(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
Return a new
RpcException that indicates the specified flow
condition is not present. |
static RpcException |
getNotFoundException(String name)
Return a new
RpcException that indicates the specified flow
condition is not present. |
static RpcException |
getNotFoundException(String name,
Throwable cause)
Return a new
RpcException that indicates the specified flow
condition is not present. |
static VnodeName |
getVnodeName(String name)
Return a
VnodeName instance that contains the given flow
condition name. |
static boolean |
isEmpty(VtnFlowConditions root)
Determine whether the given flow condition container is empty or not.
|
static VTNFlowCondition |
readFlowCondition(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx,
String name)
Read the flow condition specified by the given name from the MD-SAL
datastore.
|
static List<VTNFlowCondition> |
readFlowConditions(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx)
Read all the flow conditions from the MD-SAL datastore.
|
static VTNFlowMatch |
readFlowMatch(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx,
String name,
int idx)
Read the flow match specified by the given index in the given flow
condition from the MD-SAL datastore.
|
static void |
verifyMatchIndex(Integer index)
Verify the given index number for a flow match in a flow condition.
|
static void |
verifyMatchIndex(Set<Integer> set,
Integer index)
Ensure that there is no duplicate match index in the match list.
|
public static RpcException getNotFoundException(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
RpcException that indicates the specified flow
condition is not present.path - An InstanceIdentifier instance that specifies the
flow condition.RpcException.public static RpcException getNotFoundException(String name)
RpcException that indicates the specified flow
condition is not present.name - The name of the flow condition.RpcException.public static RpcException getNotFoundException(String name, Throwable cause)
RpcException that indicates the specified flow
condition is not present.name - The name of the flow condition.cause - A Throwable which indicates the cause of error.RpcException.public static RpcException getMatchIndexMissingException()
RpcException that indicates the flow match index
is missing.RpcException.public static VnodeName checkName(String name) throws RpcException
name - The name of the flow condition.VnodeName instance that contains the given name.RpcException - The specified name is invalid.public static String checkName(VnodeName vname) throws RpcException
vname - A VnodeName instance.vname.RpcException - The specified name is invalid.public static void checkPresent(VnodeName vname) throws RpcException
vname - A VnodeName instance.RpcException - vname is null.public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnFlowCondition> getIdentifier(String name) throws RpcException
This method is used to retrieve existing flow condition.
name - The name of the flow condition.InstanceIdentifier instance.RpcException - The given flow condition name is invalid.public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnFlowCondition> getIdentifier(VnodeName vname)
vname - A VnodeName instance that contains the name of
the flow condition.InstanceIdentifier instance.public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnFlowMatch> getIdentifier(String name, Integer index) throws RpcException
This method is used to retrieve flow match in existing flow condition.
name - The name of the flow condition.index - The index assigned to the flow match in a flow condition.InstanceIdentifier instance.RpcException - The given flow condition name or match index is invalid.public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnFlowMatch> getIdentifier(VnodeName vname, Integer index) throws RpcException
This method is used to retrieve flow match in existing flow condition.
vname - A VnodeName instance that contains the name of
the flow condition.index - The index assigned to the flow match in a flow condition.InstanceIdentifier instance.RpcException - The given flow condition name or match index is invalid.public static VnodeName getVnodeName(String name) throws RpcException
VnodeName instance that contains the given flow
condition name.
This method is used to retrieve existing flow condition.
name - The name of the flow condition.VnodeName instance that contains the given name.RpcException - The specified name is invalid.public static String getName(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
path - An InstanceIdentifier instance.null if not found.public static void verifyMatchIndex(Set<Integer> set, Integer index) throws RpcException
set - A set of match indices.index - An index to be tested.RpcException - An error occurred.public static void verifyMatchIndex(Integer index) throws RpcException
index - A match index to be verified.RpcException - The given match index is invalid.public static boolean isEmpty(VtnFlowConditions root)
root - A VtnFlowConditions instance.true only if the given flow condition container is
empty.public static void checkPresent(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx,
VnodeName vname)
throws VTNException
rtx - A ReadTransaction instance associated with the
read transaction for the MD-SAL datastore.vname - A VnodeName instance that contains the name of the
target flow condition.RpcException - The specified flow condition is not present.VTNException - Failed to read the MD-SAL datastore.public static List<VTNFlowCondition> readFlowConditions(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx) throws VTNException
rtx - A ReadTransaction instance.VTNFlowCondition instances.VTNException - An error occurred.public static VTNFlowCondition readFlowCondition(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx, String name) throws VTNException
rtx - A ReadTransaction instance.name - The name of the flow condition.VTNFlowCondition instance.VTNException - An error occurred.public static VTNFlowMatch readFlowMatch(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx, String name, int idx) throws VTNException
rtx - A ReadTransaction instance.name - The name of the flow condition.idx - The match index that specifies the flow match in the
flow condition.VTNFlowMatch instance.
null is returned if no flow match is associated
with the given match index in the flow condition.VTNException - An error occurred.Copyright © 2018 OpenDaylight. All rights reserved.