use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesBuilder 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.LogicalSwitchesBuilder 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.LogicalSwitchesBuilder 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();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesBuilder in project genius by opendaylight.
the class HwvtepSouthboundUtils method createLogicalSwitch.
/**
* Create logical switch.
*
* @param name
* the name
* @param desc
* the desc
* @param tunnelKey
* the tunnel key
* @return the logical switches
*/
public static LogicalSwitches createLogicalSwitch(String name, String desc, String tunnelKey, String replicationMode) {
HwvtepNodeName hwvtepName = new HwvtepNodeName(name);
LogicalSwitchesBuilder lsBuilder = new LogicalSwitchesBuilder().setHwvtepNodeDescription(desc).setHwvtepNodeName(hwvtepName).setKey(new LogicalSwitchesKey(hwvtepName)).setTunnelKey(tunnelKey);
if (replicationMode != null && !replicationMode.isEmpty()) {
lsBuilder.setReplicationMode(replicationMode);
}
return lsBuilder.build();
}
Aggregations