当前位置: 首页>>代码示例>>Java>>正文


Java NodeId.getValue方法代码示例

本文整理汇总了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);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:22,代码来源:NodeConnectedHandlerTest.java

示例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);
    }
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:26,代码来源:VContainerNetNodeServiceProvider.java

示例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);
    }
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:26,代码来源:VContainerNetNodeServiceProvider.java

示例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();
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:13,代码来源:PhysicalSwitchHelper.java

示例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();
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:10,代码来源:FabricMgrProvider.java


注:本文中的org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId.getValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。