use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri 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.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri in project netvirt by opendaylight.
the class NodeConnectedHandlerTest method getNodeId.
public static NodeId getNodeId(String haId) {
String nodeString = "hwvtep://uuid/" + UUID.nameUUIDFromBytes(haId.getBytes()).toString();
NodeId nodeId = new NodeId(new Uri(nodeString));
return nodeId;
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri 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.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri in project netvirt by opendaylight.
the class TestBuilders method buildManagers.
public static List<Managers> buildManagers() {
ManagersBuilder builder1 = new ManagersBuilder();
builder1.setKey(new ManagersKey(new Uri("test")));
List<ManagerOtherConfigs> otherConfigses = new ArrayList<>();
otherConfigses.add(buildOtherConfig("ha_enabled", "true"));
otherConfigses.add(buildOtherConfig("ha_id", "switchxyz"));
builder1.setManagerOtherConfigs(otherConfigses);
List<Managers> managers = new ArrayList<>();
managers.add(builder1.build());
return managers;
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri 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