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

Java NodeKey类代码示例

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

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



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

示例1: remove

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
@Override
protected void remove(InstanceIdentifier<FlowCapableNode> key, FlowCapableNode dataObjectModification) {
    NodeKey nodeKey = key.firstKeyOf(Node.class);
    BigInteger dpnId = MDSALUtil.getDpnIdFromNodeName(nodeKey.getId());
    if (!aclDataUtil.doesDpnHaveAclInterface(dpnId)) {
        // serialize ACL pool deletion per switch
        jobCoordinator.enqueueJob(String.valueOf(dpnId), () -> {
            this.aclServiceUtils.deleteAclIdPools(dpnId);
            return Collections.emptyList();
        });
        LOG.debug("On FlowCapableNode remove event, ACL pools for dpid: {} are deleted.", dpnId);
    } else {
        LOG.info("On FlowCapableNode remove event, ACL pools for dpid: {} are not deleted "
            + "because ACL ports are associated.", dpnId);
    }
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:17,代码来源:AclNodeListener.java


示例2: getNodeResult

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
private boolean getNodeResult(List<CounterResult> counters, BigInteger dpId) {
    InstanceIdentifier<Node> nodeInstanceIdentifier = InstanceIdentifier.builder(Nodes.class)
            .child(Node.class, new NodeKey(new NodeId(CountersUtils.getNodeId(dpId)))).build();
    Optional<Node> nodeOptional = MDSALUtil.read(db, LogicalDatastoreType.OPERATIONAL, nodeInstanceIdentifier);
    if (!nodeOptional.isPresent()) {
        return false;
    }

    Node node = nodeOptional.get();
    CounterResultDataStructure counterResultDS = counterRetriever.getNodeCountersDirect(node);
    if (counterResultDS == null) {
        return false;
    }

    createCounterResults(counters, counterResultDS);

    return !counters.isEmpty();
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:19,代码来源:StatisticsImpl.java


示例3: getNodeAggregatedResult

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
private boolean getNodeAggregatedResult(List<CounterResult> aggregatedCounters, BigInteger dpId) {
    InstanceIdentifier<Node> nodeInstanceIdentifier = InstanceIdentifier.builder(Nodes.class)
            .child(Node.class, new NodeKey(new NodeId(CountersUtils.getNodeId(dpId)))).build();
    Optional<Node> nodeOptional = MDSALUtil.read(db, LogicalDatastoreType.OPERATIONAL, nodeInstanceIdentifier);
    if (!nodeOptional.isPresent()) {
        return false;
    }

    Node node = nodeOptional.get();
    CounterResultDataStructure counters = counterRetriever.getNodeCountersDirect(node);
    if (counters == null || counters.isEmpty()) {
        return false;
    }

    CounterResultDataStructure aggregatedResultsDS =
            CountersUtils.aggregateCounters(counters, CountersUtils.getNodeId(dpId));
    createCounterResults(aggregatedCounters, aggregatedResultsDS);
    return !aggregatedCounters.isEmpty();

}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:21,代码来源:StatisticsImpl.java


示例4: deleteFibEntry

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
/**
 * Delete fib entry.
 *
 * @param withdraws
 *            the withdraws
 */
private synchronized void deleteFibEntry(Collection<AtriumFibUpdate> withdraws) {

	for (AtriumFibUpdate update : withdraws) {
		AtriumFibEntry entry = update.entry();
		NodeRef nodeRef = new NodeRef(
				InstanceIdentifier.builder(Nodes.class).child(Node.class, new NodeKey(deviceId)).build());

		ForwardingObjectiveBuilder forwardingObjBuilder = generateRibForwardingObj(entry.prefix(), null);
		if (forwardingObjBuilder != null) {
			ForwardInputBuilder inputBuilder = new ForwardInputBuilder();
			forwardingObjBuilder.setOperation(Operation.Remove);
			inputBuilder.setNode(nodeRef);
			inputBuilder.setForwardingObjective(forwardingObjBuilder.build());
			LOG.info("Invoking forward objective in DIDM for fibEntry delete");
			LOG.info("FIB Entry: " + forwardingObjBuilder.build());
			flowObjectivesService.forward(inputBuilder.build());
			FibDataModelWriter.deleteFib(update, dataBroker);

		} else {
			continue;
		}
	}

}
 
开发者ID:onfsdn,项目名称:atrium-odl,代码行数:31,代码来源:Bgprouter.java


示例5: addArpFlowToController

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
public void addArpFlowToController(NodeId dpnId) {

		NodeRef nodeRef = new NodeRef(
				InstanceIdentifier.builder(Nodes.class).child(Node.class, new NodeKey(dpnId)).build());

		ForwardingObjectiveBuilder fwdObjBuilder = new ForwardingObjectiveBuilder();
		fwdObjBuilder.setOperation(Operation.Add);
		fwdObjBuilder.setFlag(Flag.Versatile);
		MatchBuilder matchBuilder = new MatchBuilder();
		EthernetMatch etherMatch = AtriumUtils.getEtherMatch(Bgprouter.ARP_ETH_TYPE);
		matchBuilder.setEthernetMatch(etherMatch);

		ActionData puntAction = new ActionData(ActionUtils.punt_to_controller, new String[] { null });

		fwdObjBuilder.setMatch(matchBuilder.build());
		List<Action> actions = new ArrayList<>();
		actions.add(puntAction.buildAction());
		fwdObjBuilder.setAction(actions);

		ForwardInputBuilder forwardInputBuilderSrc = new ForwardInputBuilder();
		forwardInputBuilderSrc.setNode(nodeRef);
		forwardInputBuilderSrc.setForwardingObjective(fwdObjBuilder.build());
		flowObjectivesService.forward(forwardInputBuilderSrc.build());

	}
 
开发者ID:onfsdn,项目名称:atrium-odl,代码行数:26,代码来源:Bgprouter.java


示例6: getNodeConnRef

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
/**
 * Gets the node conn ref.
 *
 * @param nodeId
 *            the node id
 * @param port
 *            the port
 * @return the node conn ref
 */
public static NodeConnectorRef getNodeConnRef(final NodeId nodeId, final Long port) {
	StringBuilder _stringBuilder = new StringBuilder(nodeId.getValue());
	StringBuilder _append = _stringBuilder.append(":");
	StringBuilder sBuild = _append.append(port);
	String _string = sBuild.toString();
	NodeConnectorId _nodeConnectorId = new NodeConnectorId(_string);
	NodeConnectorKey _nodeConnectorKey = new NodeConnectorKey(_nodeConnectorId);
	NodeConnectorKey nConKey = _nodeConnectorKey;
	InstanceIdentifierBuilder<Nodes> _builder = InstanceIdentifier.<Nodes> builder(Nodes.class);
	NodeId _nodeId = new NodeId(nodeId);
	NodeKey _nodeKey = new NodeKey(_nodeId);
	InstanceIdentifierBuilder<Node> _child = _builder.<Node, NodeKey> child(Node.class, _nodeKey);
	InstanceIdentifierBuilder<NodeConnector> _child_1 = _child
			.<NodeConnector, NodeConnectorKey> child(NodeConnector.class, nConKey);
	NodeConnectorRef _nodeConnectorRef = new NodeConnectorRef(_child_1.build());
	return _nodeConnectorRef;
}
 
开发者ID:onfsdn,项目名称:atrium-odl,代码行数:27,代码来源:AtriumUtils.java


示例7: testFloodArp

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
@Test
public void testFloodArp() {
	Ipv4Address srcIpv4Address = Ipv4Address.getDefaultInstance("192.168.10.1");
	Ipv4Address dstIpv4Address = Ipv4Address.getDefaultInstance("192.168.20.1");
	MacAddress macAddress = new MacAddress("aa:bb:cc:dd:ee:ff");
	ArpMessageAddress senderAddress = new ArpMessageAddress(macAddress, srcIpv4Address);
	InstanceIdentifier<Node> instanceId = InstanceIdentifier.builder(Nodes.class)
			.child(Node.class, new NodeKey(new NodeId("node_001"))).toInstance();

	Future<RpcResult<Void>> futureTransmitPacketResult = mock(Future.class);

	when(packetProcessingService.transmitPacket(any(TransmitPacketInput.class)))
			.thenReturn(futureTransmitPacketResult);

	arpSender.floodArp(senderAddress, dstIpv4Address, instanceId);

	verify(packetProcessingService, times(1)).transmitPacket(any(TransmitPacketInput.class));
}
 
开发者ID:onfsdn,项目名称:atrium-odl,代码行数:19,代码来源:ArpSenderTest.java


示例8: testSendArpResponse

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
@Test
public void testSendArpResponse() {
	Ipv4Address srcIpv4Address = Ipv4Address.getDefaultInstance("192.168.20.1");
	Ipv4Address dstIpv4Address = Ipv4Address.getDefaultInstance("192.168.10.1");
	MacAddress srcMacAddress = new MacAddress("aa:bb:cc:dd:ee:00");
	MacAddress dstMacAddress = new MacAddress("aa:bb:cc:dd:ee:ff");

	ArpMessageAddress senderAddress = new ArpMessageAddress(srcMacAddress, srcIpv4Address);
	ArpMessageAddress receiverAddress = new ArpMessageAddress(dstMacAddress, dstIpv4Address);

	InstanceIdentifier<Node> instanceId = InstanceIdentifier.builder(Nodes.class)
			.child(Node.class, new NodeKey(new NodeId("node_001"))).toInstance();
	NodeConnectorKey nodeConnectorKey = new NodeConnectorKey(new NodeConnectorId("node_001:0xfffffffc"));
	InstanceIdentifier<NodeConnector> egressNc = instanceId.child(NodeConnector.class, nodeConnectorKey);

	Future<RpcResult<Void>> futureTransmitPacketResult = mock(Future.class);

	when(packetProcessingService.transmitPacket(any(TransmitPacketInput.class)))
			.thenReturn(futureTransmitPacketResult);

	arpSender.sendArpResponse(senderAddress, receiverAddress, egressNc, null);

	verify(packetProcessingService, times(1)).transmitPacket(any(TransmitPacketInput.class));
}
 
开发者ID:onfsdn,项目名称:atrium-odl,代码行数:25,代码来源:ArpSenderTest.java


示例9: removeTap

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
private void removeTap(Tap tap) {
    NodeId nodeId = tap.getNode();
    String tapId = tap.getId();
    String flowIdStr = "Tap_" + tapId + "SrcPort_"; // TODO: Concat srcNodeConnector to each flow;
    FlowId flowId = new FlowId(flowIdStr);
    FlowBuilder flowBuilder = new FlowBuilder()
            .setKey(new FlowKey(flowId))
            .setId(flowId)
            .setTableId((short)0);
    InstanceIdentifier<Flow> flowIID = InstanceIdentifier.builder(Nodes.class)
            .child(Node.class, new NodeKey(nodeId))
            .augmentation(FlowCapableNode.class)
            .child(Table.class, new TableKey(flowBuilder.getTableId()))
            .child(Flow.class, flowBuilder.getKey())
            .build();
    GenericTransactionUtils.writeData(dataBroker, LogicalDatastoreType.CONFIGURATION, flowIID, flowBuilder.build(), false);
}
 
开发者ID:sdnhub,项目名称:SDNHub_Opendaylight_Tutorial,代码行数:18,代码来源:TutorialTapProvider.java


示例10: add

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
@Override
protected void add(InstanceIdentifier<FlowCapableNode> key, FlowCapableNode dataObjectModification) {
    LOG.trace("FlowCapableNode Added: key: {}", key);
    NodeKey nodeKey = key.firstKeyOf(Node.class);
    BigInteger dpnId = MDSALUtil.getDpnIdFromNodeName(nodeKey.getId());
    createTableDefaultEntries(dpnId);
    // serialize ACL pool creation per switch
    jobCoordinator.enqueueJob(String.valueOf(dpnId), () -> {
        this.aclServiceUtils.createAclIdPools(dpnId);
        return Collections.emptyList();
    });
    LOG.trace("FlowCapableNode (dpid: {}) add event is processed.", dpnId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:14,代码来源:AclNodeListener.java


示例11: pollDirectStatisticsForAllNodes

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
private void pollDirectStatisticsForAllNodes() {
    LOG.trace("Polling direct statistics from nodes");

    for (Entry<BigInteger, ConcurrentMap<String, QosAlertPortData>> entry : qosAlertDpnPortNumberMap.entrySet()) {
        BigInteger dpn = entry.getKey();
        LOG.trace("Polling DPN ID {}", dpn);
        GetNodeConnectorStatisticsInputBuilder input = new GetNodeConnectorStatisticsInputBuilder()
                .setNode(new NodeRef(InstanceIdentifier.builder(Nodes.class)
                        .child(Node.class, new NodeKey(new NodeId(IfmConstants.OF_URI_PREFIX + dpn))).build()))
                .setStoreStats(false);
        Future<RpcResult<GetNodeConnectorStatisticsOutput>> rpcResultFuture =
                odlDirectStatisticsService.getNodeConnectorStatistics(input.build());

        RpcResult<GetNodeConnectorStatisticsOutput> rpcResult = null;
        try {
            rpcResult = rpcResultFuture.get();
        } catch (InterruptedException | ExecutionException e) {
            LOG.error("Exception {} occurred with node {} Direct-Statistics get", e, dpn);
        }
        if (rpcResult != null && rpcResult.isSuccessful() && rpcResult.getResult() != null) {

            GetNodeConnectorStatisticsOutput nodeConnectorStatisticsOutput = rpcResult.getResult();

            List<NodeConnectorStatisticsAndPortNumberMap> nodeConnectorStatisticsAndPortNumberMapList =
                    nodeConnectorStatisticsOutput.getNodeConnectorStatisticsAndPortNumberMap();

            ConcurrentMap<String, QosAlertPortData> portDataMap = entry.getValue();
            for (NodeConnectorStatisticsAndPortNumberMap stats : nodeConnectorStatisticsAndPortNumberMapList) {
                QosAlertPortData portData = portDataMap.get(stats.getNodeConnectorId().getValue());
                if (portData != null) {
                    portData.updatePortStatistics(stats);
                }
            }
        } else {
            LOG.error("Direct-Statistics not available for node {}", dpn);
        }

    }
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:40,代码来源:QosAlertManager.java


示例12: remove

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
@Override
public void remove(Node dataObjectModification) {
    NodeKey nodeKey = dataObjectModification.getKey();
    BigInteger dpnId = MDSALUtil.getDpnIdFromNodeName(nodeKey.getId());
    LOG.info("Dpn removed {}", dpnId);
    centralizedSwitchScheduler.removeSwitch(dpnId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:8,代码来源:SnatNodeEventListener.java


示例13: add

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
@Override
public void add(Node dataObjectModification) {
    NodeKey nodeKey = dataObjectModification.getKey();
    BigInteger dpnId = MDSALUtil.getDpnIdFromNodeName(nodeKey.getId());
    LOG.info("Dpn added {}", dpnId);
    centralizedSwitchScheduler.addSwitch(dpnId);

}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:9,代码来源:SnatNodeEventListener.java


示例14: getSwitchStatus

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
public boolean getSwitchStatus(BigInteger switchId) {
    NodeId nodeId = new NodeId("openflow:" + switchId);
    LOG.debug("getSwitchStatus : Querying switch with dpnId {} is up/down", nodeId);
    InstanceIdentifier<Node> nodeInstanceId = InstanceIdentifier.builder(Nodes.class)
        .child(Node.class, new NodeKey(nodeId)).build();
    Optional<Node> nodeOptional =
            SingleTransactionDataBroker.syncReadOptionalAndTreatReadFailedExceptionAsAbsentOptional(dataBroker,
                    LogicalDatastoreType.OPERATIONAL, nodeInstanceId);
    if (nodeOptional.isPresent()) {
        LOG.debug("getSwitchStatus : Switch {} is up", nodeId);
        return true;
    }
    LOG.debug("getSwitchStatus : Switch {} is down", nodeId);
    return false;
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:16,代码来源:NaptSwitchHA.java


示例15: appendFlowForCreate

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
public void appendFlowForCreate(NodeId node, Flow flow, WriteTransaction tx) {
    NodeKey nodeKey = new NodeKey(node);
    InstanceIdentifier<Flow> iidFlow = InstanceIdentifier.builder(Nodes.class)
        .child(Node.class, nodeKey)
        .augmentation(FlowCapableNode.class)
        .child(Table.class, new TableKey(flow.getTableId()))
        .child(Flow.class, flow.getKey())
        .build();

    tx.put(LogicalDatastoreType.CONFIGURATION, iidFlow, flow, WriteTransaction.CREATE_MISSING_PARENTS);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:12,代码来源:OpenFlow13Provider.java


示例16: appendFlowForDelete

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
public void appendFlowForDelete(NodeId node, Flow flow, WriteTransaction tx) {
    NodeKey nodeKey = new NodeKey(node);
    InstanceIdentifier<Flow> iidFlow = InstanceIdentifier.builder(Nodes.class)
        .child(Node.class, nodeKey)
        .augmentation(FlowCapableNode.class)
        .child(Table.class, new TableKey(flow.getTableId()))
        .child(Flow.class, flow.getKey())
        .build();

    tx.delete(LogicalDatastoreType.CONFIGURATION, iidFlow);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:12,代码来源:OpenFlow13Provider.java


示例17: stubNwUtilsGetOperativeDpns

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
private void stubNwUtilsGetOperativeDpns(int maxNbrOfOperativeDpns) throws Exception {
    WriteTransaction writeTx1 = dataBroker.newWriteOnlyTransaction();
    for (int i = 1; i <= maxNbrOfOperativeDpns; i++) {
        NodeId nodeId = new NodeId("openflow:" + i);
        Node node = new NodeBuilder().setId(nodeId).build();
        writeTx1.merge(LogicalDatastoreType.OPERATIONAL,
                      InstanceIdentifier.builder(Nodes.class).child(Node.class, new NodeKey(nodeId)).build(), node);
    }
    writeTx1.submit().checkedGet();
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:11,代码来源:InterVpnLinkLocatorTest.java


示例18: add

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
@Override
protected void add(InstanceIdentifier<FlowCapableNode> key, FlowCapableNode dataObjectModification) {
    LOG.trace("FlowCapableNode Added: key: {}", key);

    NodeKey nodeKey = key.firstKeyOf(Node.class);
    BigInteger dpnId = MDSALUtil.getDpnIdFromNodeName(nodeKey.getId());
    createTableMissEntry(dpnId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:9,代码来源:Ipv6NodeListener.java


示例19: transmitNeighborSolicitation

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
public boolean transmitNeighborSolicitation(BigInteger dpnId, NodeConnectorRef nodeRef,
                                            MacAddress srcMacAddress, Ipv6Address srcIpv6Address,
                                            Ipv6Address targetIpv6Address) {
    byte[] txPayload = frameNeighborSolicitationRequest(srcMacAddress, srcIpv6Address, targetIpv6Address);
    NodeConnectorRef nodeConnectorRef = MDSALUtil.getNodeConnRef(dpnId, "0xfffffffd");
    TransmitPacketInput input = new TransmitPacketInputBuilder().setPayload(txPayload)
            .setNode(new NodeRef(InstanceIdentifier.builder(Nodes.class)
                    .child(Node.class, new NodeKey(new NodeId("openflow:" + dpnId))).toInstance()))
            .setEgress(nodeRef).setIngress(nodeConnectorRef).build();

    // Tx the packet out of the controller.
    LOG.debug("Transmitting the Neighbor Solicitation packet out on {}", dpnId);
    JdkFutures.addErrorLogging(packetService.transmitPacket(input), LOG, "transmitPacket");
    return true;
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:16,代码来源:Ipv6NeighborSolicitation.java


示例20: transmitRouterAdvertisement

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; //导入依赖的package包/类
private void transmitRouterAdvertisement(VirtualPort intf, Ipv6RtrAdvertType advType) {
    Ipv6RouterAdvt ipv6RouterAdvert = new Ipv6RouterAdvt(packetService);

    LOG.debug("in transmitRouterAdvertisement for {}", advType);
    VirtualNetwork vnet = getNetwork(intf.getNetworkID());
    if (vnet != null) {
        String nodeName;
        String outPort;
        Collection<VirtualNetwork.DpnInterfaceInfo> dpnIfaceList = vnet.getDpnIfaceList();
        for (VirtualNetwork.DpnInterfaceInfo dpnIfaceInfo : dpnIfaceList) {
            nodeName = Ipv6Constants.OPENFLOW_NODE_PREFIX + dpnIfaceInfo.getDpId();
            List<NodeConnectorRef> ncRefList = new ArrayList<>();
            for (Long ofPort: dpnIfaceInfo.ofPortList) {
                outPort = nodeName + ":" + ofPort;
                LOG.debug("Transmitting RA {} for node {}, port {}", advType, nodeName, outPort);
                InstanceIdentifier<NodeConnector> outPortId = InstanceIdentifier.builder(Nodes.class)
                        .child(Node.class, new NodeKey(new NodeId(nodeName)))
                        .child(NodeConnector.class, new NodeConnectorKey(new NodeConnectorId(outPort)))
                        .build();
                ncRefList.add(new NodeConnectorRef(outPortId));
            }
            if (!ncRefList.isEmpty()) {
                ipv6RouterAdvert.transmitRtrAdvertisement(advType, intf, ncRefList, null);
            }
        }
    }
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:28,代码来源:IfMgr.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java HConnectionImplementation类代码示例发布时间:2022-05-22
下一篇:
Java IconTextView类代码示例发布时间: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