use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey in project netvirt by opendaylight.
the class NodeConnectedHandlerTest method getInstanceIdentifier.
public static InstanceIdentifier<Node> getInstanceIdentifier(String haUUidVal) {
String nodeString = "hwvtep://uuid/" + UUID.nameUUIDFromBytes(haUUidVal.getBytes()).toString();
NodeId nodeId = new NodeId(new Uri(nodeString));
NodeKey nodeKey = new NodeKey(nodeId);
TopologyKey topoKey = new TopologyKey(new TopologyId(new Uri("hwvtep:1")));
return InstanceIdentifier.builder(NetworkTopology.class).child(Topology.class, topoKey).child(Node.class, nodeKey).build();
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey in project netvirt by opendaylight.
the class NodeConnectedHandlerTest method createInstanceIdentifier.
public static InstanceIdentifier<Node> createInstanceIdentifier(String nodeIdString) {
NodeId nodeId = new NodeId(new Uri(nodeIdString));
NodeKey nodeKey = new NodeKey(nodeId);
TopologyKey topoKey = new TopologyKey(new TopologyId(new Uri("hwvtep:1")));
return InstanceIdentifier.builder(NetworkTopology.class).child(Topology.class, topoKey).child(Node.class, nodeKey).build();
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey in project netvirt by opendaylight.
the class PhysicalSwitchHelper method createInstanceIdentifier.
public static InstanceIdentifier<LogicalSwitches> createInstanceIdentifier(String logicalSwitch) {
NodeId id = dId.firstKeyOf(Node.class).getNodeId();
NodeKey nodeKey = new NodeKey(id);
InstanceIdentifier<LogicalSwitches> iid = null;
iid = InstanceIdentifier.builder(NetworkTopology.class).child(Topology.class, new TopologyKey(HwvtepSouthboundConstants.HWVTEP_TOPOLOGY_ID)).child(Node.class, nodeKey).augmentation(HwvtepGlobalAugmentation.class).child(LogicalSwitches.class, new LogicalSwitchesKey(new HwvtepNodeName(logicalSwitch))).build();
return iid;
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey in project netvirt by opendaylight.
the class PhysicalSwitchHelper method getPhysicalSwitchInstanceIdentifier.
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();
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey in project netvirt by opendaylight.
the class HwvtepHAUtil method createInstanceIdentifierFromHAId.
public static InstanceIdentifier<Node> createInstanceIdentifierFromHAId(String haUUidVal) {
String nodeString = HWVTEP_URI_PREFIX + "://" + UUID + "/" + java.util.UUID.nameUUIDFromBytes(haUUidVal.getBytes(StandardCharsets.UTF_8)).toString();
NodeId nodeId = new NodeId(new Uri(nodeString));
NodeKey nodeKey = new NodeKey(nodeId);
TopologyKey topoKey = new TopologyKey(HWVTEP_TOPOLOGY_ID);
return InstanceIdentifier.builder(NetworkTopology.class).child(Topology.class, topoKey).child(Node.class, nodeKey).build();
}
Aggregations