public final class NodeUtils extends Object
NodeUtils class is a collection of utility class methods related to
node-id and node-connector-id, aka switch and switch port identifier.| Modifier and Type | Method and Description |
|---|---|
static SalPort |
checkPortLocation(SalNode snode,
String portId,
String portName)
Check whether the given parameters specifies a physical switch port
or not.
|
static void |
checkVtnPortDesc(VtnPortDesc vdesc)
Check whether the given
VtnPortDesc instance is valid or not. |
static VtnPortDesc |
createPortDesc(SalNode snode,
String id,
String name)
Create a
VtnPortDesc instance. |
static VtnPortDesc[] |
createPortDescArray(SalPort sport,
VtnPort vport)
Create an array of
VtnPortDesc instances that represents the
search condition for physical switch port. |
static boolean |
equalsNodeConnectorId(SalNode snode,
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId id1,
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId id2)
Determine whether the given two URIs are identical or not.
|
static RpcException |
getNullPortDescException()
Return a new
RpcException that indicates the port descriptor
is null. |
public static RpcException getNullPortDescException()
RpcException that indicates the port descriptor
is null.RpcException.public static SalPort checkPortLocation(SalNode snode, String portId, String portName) throws RpcException
snode - A SalNode instance which specifies a physical
switch.portId - A string representation of a switch port ID.portName - The name of the switch port.portId,
A SalPort instance converted from snode and
portId is returned. null otherwise.RpcException - The specified instance is invalid.public static void checkVtnPortDesc(VtnPortDesc vdesc) throws RpcException
VtnPortDesc instance is valid or not.vdesc - A VtnPortDesc instance to be tested.RpcException - The specified instance is invalid.public static VtnPortDesc[] createPortDescArray(SalPort sport, VtnPort vport)
VtnPortDesc instances that represents the
search condition for physical switch port.sport - A SalPort instance.vport - A VtnPort instance.VtnPortDesc instances.public static VtnPortDesc createPortDesc(SalNode snode, String id, String name)
VtnPortDesc instance.snode - A SalNode instance.id - A string implementation of the port identifier.name - The name of the switch port.VtnPortDesc instance.public static boolean equalsNodeConnectorId(SalNode snode, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId id1, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId id2)
snode - A SalNode instance that specifies the node.
This is used to parse node-connector-id that contains
port number only.id1 - The first node-connector-id to be compared.id2 - The second node-connector-id to be compared.true only if id1 and id2 are identical.Copyright © 2018 OpenDaylight. All rights reserved.