use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.port.attributes.VlanBindingsKey in project netvirt by opendaylight.
the class PhysicalSwitchHelper method createVlanBinding.
public static VlanBindings createVlanBinding(Long key, String logicalSwitch) {
VlanBindingsBuilder vbBuilder = new VlanBindingsBuilder();
VlanBindingsKey vbKey = new VlanBindingsKey(new VlanId(key.intValue()));
vbBuilder.setKey(vbKey);
vbBuilder.setVlanIdKey(vbKey.getVlanIdKey());
HwvtepLogicalSwitchRef hwvtepLogicalSwitchRef = new HwvtepLogicalSwitchRef(createInstanceIdentifier(logicalSwitch));
vbBuilder.setLogicalSwitchRef(hwvtepLogicalSwitchRef);
return vbBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.port.attributes.VlanBindingsKey in project genius by opendaylight.
the class HwvtepSouthboundUtils method createVlanBinding.
/**
* Create vlan binding.
*
* @param nodeId
* the node id
* @param vlanId
* the vlan id
* @param logicalSwitchName
* the logical switch name
* @return the vlan bindings
*/
public static VlanBindings createVlanBinding(NodeId nodeId, int vlanId, String logicalSwitchName) {
VlanBindingsBuilder vbBuilder = new VlanBindingsBuilder();
VlanBindingsKey vbKey = new VlanBindingsKey(new VlanId(vlanId));
vbBuilder.setKey(vbKey);
vbBuilder.setVlanIdKey(vbKey.getVlanIdKey());
final InstanceIdentifier<LogicalSwitches> lSwitchIid = createLogicalSwitchesInstanceIdentifier(nodeId, new HwvtepNodeName(logicalSwitchName));
HwvtepLogicalSwitchRef lsRef = new HwvtepLogicalSwitchRef(lSwitchIid);
vbBuilder.setLogicalSwitchRef(lsRef);
return vbBuilder.build();
}
Aggregations