use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsBuilder in project netvirt by opendaylight.
the class LocalUcastCmd method transform.
@Override
public LocalUcastMacs transform(InstanceIdentifier<Node> nodePath, LocalUcastMacs src) {
LocalUcastMacsBuilder ucmlBuilder = new LocalUcastMacsBuilder(src);
ucmlBuilder.setLocatorRef(HwvtepHAUtil.convertLocatorRef(src.getLocatorRef(), nodePath));
ucmlBuilder.setLogicalSwitchRef(HwvtepHAUtil.convertLogicalSwitchRef(src.getLogicalSwitchRef(), nodePath));
ucmlBuilder.setMacEntryUuid(HwvtepHAUtil.getUUid(src.getMacEntryKey().getValue()));
LocalUcastMacsKey key = new LocalUcastMacsKey(ucmlBuilder.getLogicalSwitchRef(), ucmlBuilder.getMacEntryKey());
ucmlBuilder.setKey(key);
return ucmlBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsBuilder in project netvirt by opendaylight.
the class TestBuilders method buildLocalUcastMacs.
public static LocalUcastMacs buildLocalUcastMacs(InstanceIdentifier<Node> nodeIid, String vmMac, String vmip, String tepIp, String logicalSwitchName) {
LocalUcastMacsBuilder ucmlBuilder = new LocalUcastMacsBuilder();
ucmlBuilder.setIpaddr(new IpAddress(vmip.toCharArray()));
ucmlBuilder.setMacEntryKey(new MacAddress(vmMac));
ucmlBuilder.setMacEntryUuid(getUUid(vmMac));
ucmlBuilder.setLocatorRef(buildLocatorRef(nodeIid, tepIp));
ucmlBuilder.setLogicalSwitchRef(buildLogicalSwitchesRef(nodeIid, logicalSwitchName));
return ucmlBuilder.build();
}
Aggregations