本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java NodeId.getValue方法的具体用法?Java NodeId.getValue怎么用?Java NodeId.getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId
的用法示例。
在下文中一共展示了NodeId.getValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupForHANode
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; //导入方法依赖的package包/类
@Before
public void setupForHANode() {
dataBroker = getDataBroker();
d1UUID = java.util.UUID.nameUUIDFromBytes("d1uuid".getBytes()).toString();
d2UUID = java.util.UUID.nameUUIDFromBytes("d2uuid".getBytes()).toString();
d1NodePath = getInstanceIdentifier(d1UUID);
d2NodePath = getInstanceIdentifier(d2UUID);
haNodePath = getInstanceIdentifier(managerHAId);
haNodeId = getNodeId(managerHAId);
NodeId d1NodeId = d1NodePath.firstKeyOf(Node.class).getNodeId();
String d1PsNodeIdVal = d1NodeId.getValue() + "/physicalswitch/" + switchName;
d1PsNodePath = createInstanceIdentifier(d1PsNodeIdVal);
NodeId d2NodeId = d2NodePath.firstKeyOf(Node.class).getNodeId();
String d2PsNodeIdVal = d2NodeId.getValue() + "/physicalswitch/" + switchName;
d2PsNodePath = createInstanceIdentifier(d2PsNodeIdVal);
haPsNodePath = createInstanceIdentifier(haNodeId.getValue() + "/physicalswitch/" + switchName);
}
示例2: createAcl
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; //导入方法依赖的package包/类
public void createAcl(String vfabricId, NodeId nodeId, String aclName) {
AddAclInputBuilder inputBuilder = new AddAclInputBuilder();
FabricId fabricId = new FabricId(vfabricId);
inputBuilder.setFabricId(fabricId);
inputBuilder.setAclName(aclName);
/*
* NOTE: The NodeId must be new'd before passing to RPC. Otherwise,
* addAcl() PRC return failure, because Fabric cannot find the logic
* device in its Cache map using the nodeId as search key.
*/
NodeId deviceId = new NodeId(nodeId.getValue());
inputBuilder.setLogicalDevice(deviceId);
LOG.debug("FABMGR: createAcl: fabricId={}, deviceId={}, aclName={}", fabricId.getValue(), deviceId.getValue(),
aclName);
Future<RpcResult<Void>> result = this.fabServiceService.addAcl(inputBuilder.build());
try {
RpcResult<Void> output = result.get();
if (output.isSuccessful()) {
LOG.debug("FABMGR: createAcl: addAcl RPC success");
}
} catch (Exception e) {
LOG.error("FABMGR: ERROR: createAcl: addAcl RPC failed.", e);
}
}
示例3: removeAcl
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; //导入方法依赖的package包/类
public void removeAcl(String vfabricId, NodeId nodeId, String aclName) {
DelAclInputBuilder inputBuilder = new DelAclInputBuilder();
FabricId fabricId = new FabricId(vfabricId);
inputBuilder.setFabricId(fabricId);
inputBuilder.setAclName(aclName);
/*
* NOTE: The NodeId must be new'd before passing to RPC. Otherwise,
* addAcl() PRC return failure, because Fabric cannot find the logic
* device in its Cache map using the nodeId as search key.
*/
NodeId deviceId = new NodeId(nodeId.getValue());
inputBuilder.setLogicalDevice(deviceId);
LOG.debug("FABMGR: removeAcl: fabricId={}, deviceId={}, aclName={}", fabricId.getValue(), deviceId.getValue(),
aclName);
Future<RpcResult<Void>> result = this.fabServiceService.delAcl(inputBuilder.build());
try {
RpcResult<Void> output = result.get();
if (output.isSuccessful()) {
LOG.debug("FABMGR: removeAcl: delAcl RPC success");
}
} catch (Exception e) {
LOG.error("FABMGR: ERROR: removeAcl: delAcl RPC failed.", e);
}
}
示例4: getPhysicalSwitchInstanceIdentifier
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; //导入方法依赖的package包/类
public static InstanceIdentifier<Node> getPhysicalSwitchInstanceIdentifier(InstanceIdentifier<Node> iid,
String switchName) {
NodeId id = iid.firstKeyOf(Node.class).getNodeId();
String nodeString = id.getValue() + "/physicalswitch/" + switchName;
NodeId nodeId = new NodeId(new Uri(nodeString));
NodeKey nodeKey = new NodeKey(nodeId);
TopologyKey topoKey = new TopologyKey(HwvtepSouthboundConstants.HWVTEP_TOPOLOGY_ID);
return InstanceIdentifier.builder(NetworkTopology.class)
.child(Topology.class, topoKey)
.child(Node.class, nodeKey)
.build();
}
示例5: getGatewayIP
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; //导入方法依赖的package包/类
private IpAddress getGatewayIP(org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.Uuid tid, NodeId lswId)
{
org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.Uuid lswUuid = new
org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.Uuid(lswId.getValue());
LogicalSwitchMappingInfo lmap = ulnStore.get(tid).getLswStore().get(lswUuid);
SubnetMappingInfo snm = ulnStore.get(tid).findSubnetFromLsw(lmap);
ExternalGateways exg = snm.getSubnet().getExternalGateways().get(0);
return exg.getExternalGateway();
}