use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesKey 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