use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches in project netvirt by opendaylight.
the class ElanL2GatewayUtils method getElanInstanceForUcastLocalMac.
public ElanInstance getElanInstanceForUcastLocalMac(LocalUcastMacs localUcastMac) {
Optional<LogicalSwitches> lsOpc = ElanUtils.read(broker, LogicalDatastoreType.OPERATIONAL, (InstanceIdentifier<LogicalSwitches>) localUcastMac.getLogicalSwitchRef().getValue());
if (lsOpc.isPresent()) {
LogicalSwitches ls = lsOpc.get();
// Logical switch name is Elan name
String elanName = getElanFromLogicalSwitch(ls.getHwvtepNodeName().getValue());
return elanInstanceCache.get(elanName).orNull();
}
return null;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches in project netvirt by opendaylight.
the class LogicalSwitchesCmdTest method buildData.
LogicalSwitches buildData(String name, String tunnelKey) {
LogicalSwitchesBuilder logicalSwitchesBuilder = new LogicalSwitchesBuilder();
logicalSwitchesBuilder.setKey(new LogicalSwitchesKey(new HwvtepNodeName(name)));
logicalSwitchesBuilder.setTunnelKey(tunnelKey);
logicalSwitchesBuilder.setHwvtepNodeName(new HwvtepNodeName(name));
return logicalSwitchesBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches 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.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches in project netvirt by opendaylight.
the class TestBuilders method buildLogicalSwitch.
public static LogicalSwitches buildLogicalSwitch(String logicalSwitch, String tunnelKey) {
LogicalSwitchesBuilder logicalSwitchesBuilder = new LogicalSwitchesBuilder();
logicalSwitchesBuilder.setKey(new LogicalSwitchesKey(new HwvtepNodeName(logicalSwitch)));
logicalSwitchesBuilder.setHwvtepNodeName(new HwvtepNodeName(logicalSwitch));
logicalSwitchesBuilder.setTunnelKey(tunnelKey);
Uuid lgoicalSwitchUuid = getUUid(logicalSwitch);
logicalSwitchesBuilder.setLogicalSwitchUuid(lgoicalSwitchUuid);
return logicalSwitchesBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches in project netvirt by opendaylight.
the class LogicalSwitchesCmd method transform.
@Override
public LogicalSwitches transform(InstanceIdentifier<Node> nodePath, LogicalSwitches src) {
LogicalSwitchesBuilder logicalSwitchesBuilder = new LogicalSwitchesBuilder(src);
logicalSwitchesBuilder.setLogicalSwitchUuid(HwvtepHAUtil.getUUid(src.getHwvtepNodeName().getValue()));
return logicalSwitchesBuilder.build();
}
Aggregations