Search in sources :

Example 1 with LogicalSwitchesBuilder

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();
}
Also used : LogicalSwitchesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesBuilder) HwvtepNodeName(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName) LogicalSwitchesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesKey)

Example 2 with LogicalSwitchesBuilder

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();
}
Also used : Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) LogicalSwitchesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesBuilder) HwvtepNodeName(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName) LogicalSwitchesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesKey)

Example 3 with LogicalSwitchesBuilder

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();
}
Also used : LogicalSwitchesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesBuilder)

Example 4 with LogicalSwitchesBuilder

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();
}
Also used : LogicalSwitchesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesBuilder) HwvtepNodeName(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName) LogicalSwitchesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesKey)

Aggregations

LogicalSwitchesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesBuilder)4 HwvtepNodeName (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName)3 LogicalSwitchesKey (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesKey)3 Uuid (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid)1