use of org.opendaylight.yang.gen.v1.urn.tech.pantheon.netconfdevice.network.topology.rpcs.rev180320.node.data.NodeKey in project netvirt by opendaylight.
the class ElanUtils method getFlowIid.
public static InstanceIdentifier<Flow> getFlowIid(Flow flow, BigInteger dpnId) {
FlowKey flowKey = new FlowKey(new FlowId(flow.getId()));
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId nodeId = new org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId("openflow:" + dpnId);
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node nodeDpn = new NodeBuilder().setId(nodeId).setKey(new NodeKey(nodeId)).build();
return InstanceIdentifier.builder(Nodes.class).child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class).child(Table.class, new TableKey(flow.getTableId())).child(Flow.class, flowKey).build();
}
use of org.opendaylight.yang.gen.v1.urn.tech.pantheon.netconfdevice.network.topology.rpcs.rev180320.node.data.NodeKey in project netvirt by opendaylight.
the class ElanServiceTestBase method getFlowIid.
protected InstanceIdentifier<Flow> getFlowIid(short tableId, FlowId flowid, BigInteger dpnId) {
FlowKey flowKey = new FlowKey(new FlowId(flowid));
NodeId nodeId = new NodeId("openflow:" + dpnId);
Node nodeDpn = new NodeBuilder().setId(nodeId).setKey(new NodeKey(nodeId)).build();
return InstanceIdentifier.builder(Nodes.class).child(Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class).child(Table.class, new TableKey(tableId)).child(Flow.class, flowKey).build();
}
use of org.opendaylight.yang.gen.v1.urn.tech.pantheon.netconfdevice.network.topology.rpcs.rev180320.node.data.NodeKey in project netvirt by opendaylight.
the class IfMgr method transmitRouterAdvertisement.
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);
}
}
}
}
use of org.opendaylight.yang.gen.v1.urn.tech.pantheon.netconfdevice.network.topology.rpcs.rev180320.node.data.NodeKey in project netvirt by opendaylight.
the class Ipv6NeighborSolicitation method transmitNeighborSolicitation.
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;
}
use of org.opendaylight.yang.gen.v1.urn.tech.pantheon.netconfdevice.network.topology.rpcs.rev180320.node.data.NodeKey in project netvirt by opendaylight.
the class OpenFlow13Provider method appendFlowForDelete.
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);
}
Aggregations