• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java TpId类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId的典型用法代码示例。如果您正苦于以下问题:Java TpId类的具体用法?Java TpId怎么用?Java TpId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TpId类属于org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021包,在下文中一共展示了TpId类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: buildTerminationPointForPhysicalSwitch

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
public static TerminationPoint buildTerminationPointForPhysicalSwitch(InstanceIdentifier<Node> switchIid,
                                                                      String portName, WriteTransaction transaction,
                                                                      Map<Long, String> vlanBindingData) {
    TerminationPointKey tpKey = new TerminationPointKey(new TpId(portName));
    TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
    tpBuilder.setKey(tpKey);
    tpBuilder.setTpId(tpKey.getTpId());
    switchIid.firstKeyOf(Node.class);
    InstanceIdentifier<TerminationPoint> tpPath = switchIid.child(TerminationPoint.class,
            new TerminationPointKey(new TpId(portName)));
    HwvtepPhysicalPortAugmentationBuilder tpAugmentationBuilder =
            new HwvtepPhysicalPortAugmentationBuilder();
    buildTerminationPoint(tpAugmentationBuilder, portName, vlanBindingData);
    tpBuilder.addAugmentation(HwvtepPhysicalPortAugmentation.class, tpAugmentationBuilder.build());
    return tpBuilder.build();
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:17,代码来源:PhysicalSwitchHelper.java


示例2: buildTerminationPoint

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
public static TerminationPoint buildTerminationPoint(InstanceIdentifier<Node> nodeIid, String ip) {
    TerminationPointKey tpKey = new TerminationPointKey(new TpId("vxlan_over_ipv4:" + ip));
    TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
    if (nodeIid != null && tpKey != null) {
        tpBuilder.setKey(tpKey);
        tpBuilder.setTpId(tpKey.getTpId());
        InstanceIdentifier<TerminationPoint> tpPath =
                buildTpId(nodeIid, ip);
        HwvtepPhysicalLocatorAugmentationBuilder tpAugmentationBuilder =
                new HwvtepPhysicalLocatorAugmentationBuilder();
        tpAugmentationBuilder.setPhysicalLocatorUuid(getUUid(ip));
        tpAugmentationBuilder.setEncapsulationType(createEncapsulationType("vxlan_over_ipv4"));
        tpAugmentationBuilder.setDstIp(new IpAddress(ip.toCharArray()));
        tpBuilder.addAugmentation(HwvtepPhysicalLocatorAugmentation.class, tpAugmentationBuilder.build());
    }
    return tpBuilder.build();
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:18,代码来源:TestBuilders.java


示例3: findGWLink

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
private Link findGWLink(ReadWriteTransaction trans, FabricId fabricid, TpId tpid, NodeId routerid) {

        InstanceIdentifier<Link> linkIId = InstanceIdentifier.create(NetworkTopology.class)
                .child(Topology.class, new TopologyKey(new TopologyId(fabricid)))
                .child(Link.class, new LinkKey(this.createGatewayLink(routerid, tpid)));

        CheckedFuture<Optional<Link>,ReadFailedException> readFuture =  trans.read(LogicalDatastoreType.OPERATIONAL,
                linkIId);

        try {
            Optional<Link> optional = readFuture.get();
            Link link = optional.get();

            return link;

        } catch (InterruptedException | ExecutionException e) {
            LOG.error("", e);
        }
        return null;
    }
 
开发者ID:opendaylight,项目名称:faas,代码行数:21,代码来源:FabricServiceAPIProvider.java


示例4: createLogicLink

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
private void createLogicLink(FabricId fabricid, NodeId routeId, NodeId swId, WriteTransaction trans, TpId tpid1,
        TpId tpid2, LinkId lid) {
    final LinkId linkid = lid == null ? new LinkId(UUID.randomUUID().toString()) : lid;
    LinkBuilder linkBuilder = new LinkBuilder();
    linkBuilder.setLinkId(linkid);
    linkBuilder.setKey(new LinkKey(linkid));

    SourceBuilder srcBuilder = new SourceBuilder();
    srcBuilder.setSourceNode(routeId);
    srcBuilder.setSourceTp(tpid1);
    linkBuilder.setSource(srcBuilder.build());

    DestinationBuilder destBuilder = new DestinationBuilder();
    destBuilder.setDestNode(swId);
    destBuilder.setDestTp(tpid2);
    linkBuilder.setDestination(destBuilder.build());

    InstanceIdentifier<Link> linkIId = MdSalUtils.createLinkIId(fabricid, linkid);
    trans.put(LogicalDatastoreType.OPERATIONAL,linkIId, linkBuilder.build());
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:21,代码来源:FabricServiceAPIProvider.java


示例5: createGWPortOnSwitch

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
private TpId createGWPortOnSwitch(FabricId fabricid, NodeId swId, WriteTransaction trans) {
    final TpId tpid = new TpId(UUID.randomUUID().toString());
    final InstanceIdentifier<TerminationPoint> tpIId = MdSalUtils.createLogicPortIId(fabricid, swId, tpid);

    TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
    tpBuilder.setTpId(tpid);
    tpBuilder.setKey(new TerminationPointKey(tpid));

    LogicalPortAugmentBuilder lpCtx = new LogicalPortAugmentBuilder();
    LportAttributeBuilder lpAttr = new LportAttributeBuilder();
    lpCtx.setLportAttribute(lpAttr.build());
    tpBuilder.addAugmentation(LogicalPortAugment.class, lpCtx.build());

    trans.put(LogicalDatastoreType.OPERATIONAL,tpIId, tpBuilder.build(), true);

    return tpid;
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:18,代码来源:FabricServiceAPIProvider.java


示例6: addPortFunction

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
@Override
public Future<RpcResult<Void>> addPortFunction(AddPortFunctionInput input) {
    final PortFunction function = input.getPortFunction();
    FabricId fabricId = input.getFabricId();
    TpId tpid = input.getLogicalPort();
    NodeId ldev = input.getLogicalDevice();

    final FabricInstance fabricObj = FabricInstanceCache.INSTANCE.retrieveFabric(fabricId);
    if (fabricObj == null) {
        return Futures.immediateFailedFuture(
                new IllegalArgumentException(String.format("fabric %s does not exist", fabricId)));
    }

    final InstanceIdentifier<PortFunction> fncIId = MdSalUtils.createLogicPortIId(fabricId, ldev, tpid)
            .augmentation(LogicalPortAugment.class)
            .child(LportAttribute.class)
            .child(PortFunction.class);

    WriteTransaction trans = dataBroker.newWriteOnlyTransaction();
    trans.merge(LogicalDatastoreType.OPERATIONAL,fncIId, function, false);

    return Futures.transformAsync(trans.submit(), submitResult -> {
        fabricObj.notifyPortFuncUpdated(fncIId, function, false);
        return Futures.immediateFuture(RpcResultBuilder.<Void>success().build());
    }, executor);
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:27,代码来源:FabricServiceAPIProvider.java


示例7: convFabricPort2DevicePort

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static InstanceIdentifier<TerminationPoint> convFabricPort2DevicePort(
        DataBroker broker, FabricId fabricid, TpId tpid) {
    InstanceIdentifier<TerminationPoint> iidFPort = MdSalUtils.createFabricPortIId(fabricid, tpid);

    ReadTransaction rt = broker.newReadOnlyTransaction();
    Optional<TerminationPoint> opt = MdSalUtils.syncReadOper(rt, iidFPort);
    if (opt.isPresent()) {
        TerminationPoint tp = opt.get();
        return (InstanceIdentifier<TerminationPoint>) tp.getAugmentation(FabricPortAugment.class)
                .getFportAttribute()
                .getDevicePort()
                .getValue();
    }
    return null;
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:17,代码来源:InterfaceManager.java


示例8: createBdPort

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
/**
 * Create a new Bridge Domain Port.
 * @param vni vni
 * @param tpid physical termination point
 * @param accessType access type
 * @param seg access segment
 * @return String name of Bridge Domain Port
 */
public String createBdPort(long vni, TpId tpid, AccessType accessType, long seg) {
    String bdPortId = createBdPortId(tpid,  seg);

    BdPortBuilder builder = new BdPortBuilder();
    builder.setBdPortId(bdPortId);
    builder.setAccessType(accessType);
    builder.setAccessTag(seg);
    builder.setRefTpId(tpid);
    builder.setBdid(this.createBdId(vni));

    WriteTransaction trans = databroker.newWriteOnlyTransaction();
    InstanceIdentifier<BdPort> bdIId = deviceIId.augmentation(FabricCapableDevice.class)
            .child(Config.class).child(BdPort.class, new BdPortKey(bdPortId));
    trans.put(LogicalDatastoreType.OPERATIONAL, bdIId, builder.build(), true);
    MdSalUtils.wrapperSubmit(trans, executor);

    return bdPortId;
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:27,代码来源:DeviceContext.java


示例9: renderRoute

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
private void renderRoute(RouteBuilder builder, NodeId routerId) {

        NextHopOptions nexthop = builder.getNextHopOptions();
        if (nexthop instanceof SimpleNextHop) {
            SimpleNextHop simpleNh  = (SimpleNextHop) nexthop;

            TpId tpid = simpleNh.getOutgoingInterface();

            if (tpid != null) {
                IpAddress gwIp = new IpAddress(tpid.getValue().toCharArray());
                GatewayPort gwport = fabricCtx.getLogicRouterCtx(routerId).getGatewayPort(gwIp);
                long vni = gwport.getVni();
                builder.addAugmentation(VxlanRouteAug.class, new VxlanRouteAugBuilder().setOutgoingVni(vni).build());
            }
        } else {
            LOG.warn("nexthop is not simple. {}", nexthop.getClass().getName());
        }
    }
 
开发者ID:opendaylight,项目名称:faas,代码行数:19,代码来源:DistributedFabricListener.java


示例10: addIPMapping

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
/**
 * Set up IP mapping between external IP and internal IP address.
 * @param fabricId - fabric identifier.
 * @param ld - logical switch Id
 * @param tpid - logical port id
 * @param ext - external IP address
 * @param internal - private IP address.
 */
public void addIPMapping(FabricId fabricId, NodeId ld, TpId tpid, Ipv4Address ext, Ipv4Address internal)
{
    AddPortFunctionInputBuilder inputb = new AddPortFunctionInputBuilder();
    inputb.setFabricId(fabricId);
    inputb.setLogicalDevice(ld);
    inputb.setLogicalPort(tpid);

    PortFunctionBuilder pfb = new PortFunctionBuilder();
    IpMappingBuilder ipmb = new IpMappingBuilder();
    ipmb.setIpMappingEntry(
            Lists.newArrayList(new IpMappingEntryBuilder()
                    .setExternalIp(ext)
                    .setInternalIp(internal)
                    .build()));

    pfb.setFunctionType(ipmb.build());

    inputb.setPortFunction(pfb.build());

    this.fabServiceService.addPortFunction(inputb.build());
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:30,代码来源:VContainerNetNodeServiceProvider.java


示例11: createBasicVcLink

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
public static Link createBasicVcLink(Node ldNode, Node netNode) {
    LinkId linkId = new LinkId(VC_LINK_NAME);
    LinkKey linkKey = new LinkKey(linkId);
    LinkBuilder linkBuilder = new LinkBuilder();

    linkBuilder.setLinkId(linkId);
    linkBuilder.setKey(linkKey);

    DestinationBuilder destBuilder = new DestinationBuilder();
    NodeId ldNodeId = ldNode.getNodeId();
    destBuilder.setDestNode(ldNodeId);
    TpId sourceTpId = new TpId(VC_NODE_TP_WEST);
    destBuilder.setDestTp(sourceTpId);
    linkBuilder.setDestination(destBuilder.build());

    SourceBuilder sourceBuilder = new SourceBuilder();
    NodeId netNodeId = netNode.getNodeId();
    sourceBuilder.setSourceNode(netNodeId);
    TpId destTpId = new TpId(VC_NODE_TP_EAST);
    sourceBuilder.setSourceTp(destTpId);
    linkBuilder.setSource(sourceBuilder.build());

    return linkBuilder.build();
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:25,代码来源:FabMgrYangDataUtil.java


示例12: getPhyLocation

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
public static Location getPhyLocation(TopologyId fabricId, String inventoryNodeIdStr,
        String inventoryNodeConnectorIdStr) {
    LocationBuilder locBuilder = new LocationBuilder();

    /*
     * TODO: For now inventory nodeId and node connector id are directly mapped
     * to topology. This is a kludge. A formal approach would involve an
     * inventory-to-topology lookup.
     */
    NodeId nodeId = new NodeId(inventoryNodeIdStr);
    TpId tpId = new TpId(inventoryNodeConnectorIdStr);
    locBuilder.setNodeRef(new NodeRef(createNodePath(fabricId, nodeId)));
    locBuilder.setTpRef(new TpRef(createTpPath(fabricId, nodeId, tpId)));

    return locBuilder.build();
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:17,代码来源:FabMgrYangDataUtil.java


示例13: getBorderInfo

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
/**
 * To get the border Fabric and its port connects to the External network
 * for now we only only return the first one.
 * @return
 */
private Entry<FabricId, TpId> getBorderInfo()
{
    Topology fabricTopo = this.getFabricTopology();
    if (fabricTopo == null) {
        LOG.error("Fabric Topology is NULL!");
        return null;
    }
    for (Link l : fabricTopo.getLink()) {
        if ("external".equalsIgnoreCase(l.getSource().getSourceNode().getValue())) {
            return new AbstractMap.SimpleEntry(l.getDestination().getDestNode(), l.getDestination().getDestTp());
        }
        if ("external".equalsIgnoreCase(l.getDestination().getDestNode().getValue())) {
            return new AbstractMap.SimpleEntry(l.getSource().getSourceNode(), l.getSource().getSourceTp());
        }
    }

    LOG.error("No Fabric Topology found!");
    return null;
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:25,代码来源:FabricMgrProvider.java


示例14: getLogicalPortIPAddress

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
private IpAddress getLogicalPortIPAddress(TenantId tenantId, TpId tpID)
{
    List<IpAddress> pips = new ArrayList<>();
    PortMappingInfo pmi = ulnStore.get(toUuid(tenantId)).getPortStore().get(tpID);
    for (PrivateIps ip : pmi.getPort().getPrivateIps())
    {
        pips.add(ip.getIpAddress());
    }

    if (!pips.isEmpty()) {
        //TODO, using the first one for now.
        return pips.get(0);
    }

    return null;
}
 
开发者ID:opendaylight,项目名称:faas,代码行数:17,代码来源:FabricMgrProvider.java


示例15: createTP

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
private InstanceIdentifier<TerminationPoint> createTP(final IpAddress addr, final InstanceIdentifier<Node> sni,
        final Boolean inControl, final ReadWriteTransaction trans) {
    final String url = "ip://" + addr.toString();
    final TerminationPointKey tpk = new TerminationPointKey(new TpId(url));
    final TerminationPointBuilder tpb = new TerminationPointBuilder();
    tpb.setKey(tpk).setTpId(tpk.getTpId());
    tpb.addAugmentation(TerminationPoint1.class, new TerminationPoint1Builder().setIgpTerminationPointAttributes(
            new IgpTerminationPointAttributesBuilder().setTerminationPointType(
                    new IpBuilder().setIpAddress(Lists.newArrayList(addr)).build()).build()).build());

    final NodeKey nk = new NodeKey(new NodeId(url));
    final NodeBuilder nb = new NodeBuilder();
    nb.setKey(nk).setNodeId(nk.getNodeId());
    nb.setTerminationPoint(Lists.newArrayList(tpb.build()));
    if (sni != null) {
        nb.setSupportingNode(Lists.newArrayList(createSupportingNode(InstanceIdentifier.keyOf(sni).getNodeId(),
                inControl)));
    }
    final InstanceIdentifier<Node> nid = this.target.child(Node.class, nb.getKey());
    trans.put(LogicalDatastoreType.OPERATIONAL, nid, nb.build());
    return nid.child(TerminationPoint.class, tpb.getKey());
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:23,代码来源:NodeChangedListener.java


示例16: createNode

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
private static Node createNode(final NodeId nodeId, final TpId tpId, final String ipv4Address) {
    final TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
    tpBuilder.setTpId(tpId);
    tpBuilder.setKey(new TerminationPointKey(tpId));
    tpBuilder.addAugmentation(TerminationPoint1.class, new TerminationPoint1Builder()
            .setIgpTerminationPointAttributes(new IgpTerminationPointAttributesBuilder()
                    .setTerminationPointType(new IpBuilder()
                            .setIpAddress(Collections.singletonList(new IpAddress(new Ipv4Address(ipv4Address))))
                            .build()).build()).build());
    final NodeBuilder nodeBuilder = new NodeBuilder();
    nodeBuilder.setNodeId(nodeId);
    nodeBuilder.setKey(new NodeKey(nodeId));
    nodeBuilder.setTerminationPoint(Lists.newArrayList(tpBuilder.build()));
    final SupportingNode supportingNode = new SupportingNodeBuilder()
            .setKey(new SupportingNodeKey(nodeId, new TopologyId("dummy")))
            .addAugmentation(SupportingNode1.class, new SupportingNode1Builder()
                    .setPathComputationClient(new PathComputationClientBuilder()
                            .setControlling(true).build()).build()).build();
    nodeBuilder.setSupportingNode(Lists.newArrayList(supportingNode));
    return nodeBuilder.build();
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:22,代码来源:TunnelProgrammingTest.java


示例17: buildTpId

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
private static TpId buildTpId(final UriBuilder base, final TopologyIdentifier topologyIdentifier,
        final Ipv4InterfaceIdentifier ipv4InterfaceIdentifier,
        final Ipv6InterfaceIdentifier ipv6InterfaceIdentifier, final Long id) {
    final UriBuilder b = new UriBuilder(base, "tp");
    if (topologyIdentifier != null) {
        b.add("mt", topologyIdentifier.getValue());
    }
    if (ipv4InterfaceIdentifier != null) {
        b.add("ipv4", ipv4InterfaceIdentifier.getValue());
    }
    if (ipv6InterfaceIdentifier != null) {
        b.add("ipv6", ipv6InterfaceIdentifier.getValue());
    }

    return new TpId(b.add("id", id).toString());
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:17,代码来源:LinkstateTopologyBuilder.java


示例18: getTerminationPointBridge

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private Optional<InstanceIdentifier<Node>> getTerminationPointBridge(
        final ReadWriteTransaction transaction, Node node, String tpName) {
    OvsdbNodeAugmentation ovsdbNode = node.getAugmentation(OvsdbNodeAugmentation.class);
    List<ManagedNodeEntry> managedNodes = ovsdbNode.getManagedNodeEntry();
    TpId tpId = new TpId(tpName);
    for (ManagedNodeEntry managedNodeEntry : managedNodes) {
        Node managedNode = readNode(transaction,
                (InstanceIdentifier<Node>)managedNodeEntry.getBridgeRef().getValue()).get();
        for (TerminationPoint tpEntry : managedNode.getTerminationPoint()) {
            if (tpId.equals(tpEntry.getTpId())) {
                return Optional.of((InstanceIdentifier<Node>)managedNodeEntry.getBridgeRef().getValue());
            }
        }
    }
    return Optional.absent();
}
 
开发者ID:opendaylight,项目名称:ovsdb,代码行数:18,代码来源:OvsdbPortUpdateCommand.java


示例19: addTerminationPoint

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
private boolean addTerminationPoint(final NodeId bridgeNodeId, final String portName,
                                    final OvsdbTerminationPointAugmentationBuilder
                                            ovsdbTerminationPointAugmentationBuilder)
        throws InterruptedException {

    InstanceIdentifier<Node> portIid = SouthboundMapper.createInstanceIdentifier(bridgeNodeId);
    NodeBuilder portNodeBuilder = new NodeBuilder();
    NodeId portNodeId = SouthboundMapper.createManagedNodeId(portIid);
    portNodeBuilder.setNodeId(portNodeId);
    TerminationPointBuilder entry = new TerminationPointBuilder();
    entry.setKey(new TerminationPointKey(new TpId(portName)));
    entry.addAugmentation(
            OvsdbTerminationPointAugmentation.class,
            ovsdbTerminationPointAugmentationBuilder.build());
    portNodeBuilder.setTerminationPoint(Collections.singletonList(entry.build()));
    boolean result = mdsalUtils.merge(LogicalDatastoreType.CONFIGURATION,
            portIid, portNodeBuilder.build());
    Thread.sleep(OVSDB_UPDATE_TIMEOUT);
    return result;
}
 
开发者ID:opendaylight,项目名称:ovsdb,代码行数:21,代码来源:SouthboundIT.java


示例20: getTerminationPointSwitch

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; //导入依赖的package包/类
private Optional<InstanceIdentifier<Node>> getTerminationPointSwitch(final ReadWriteTransaction transaction,
        Node node, String tpName) {
    HwvtepGlobalAugmentation hwvtepNode = node.getAugmentation(HwvtepGlobalAugmentation.class);
    List<Switches> switchNodes = hwvtepNode.getSwitches();
    for (Switches managedNodeEntry : switchNodes) {
        @SuppressWarnings("unchecked")
        Node switchNode = HwvtepSouthboundUtil
                .readNode(transaction, (InstanceIdentifier<Node>) managedNodeEntry.getSwitchRef().getValue()).get();
        TerminationPointKey tpKey = new TerminationPointKey(new TpId(tpName));
        if (switchNode.getTerminationPoint() != null) {
            for (TerminationPoint terminationPoint : switchNode.getTerminationPoint()) {
                if (terminationPoint.getKey().equals(tpKey)) {
                    return Optional.of((InstanceIdentifier<Node>) managedNodeEntry.getSwitchRef().getValue());
                }
            }
        }
    }
    return Optional.absent();
}
 
开发者ID:opendaylight,项目名称:ovsdb,代码行数:20,代码来源:HwvtepPhysicalPortUpdateCommand.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JsonUtils类代码示例发布时间:2022-05-22
下一篇:
Java Weibo类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap