use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentationBuilder 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));
String srcTorNodeId = ((InstanceIdentifier<LogicalSwitches>) src.getLogicalSwitchRef().getValue()).firstKeyOf(Node.class).getNodeId().getValue();
SrcnodeAugmentation srcnodeAugmentation = new SrcnodeAugmentationBuilder().setSrcTorNodeid(srcTorNodeId).build();
ucmlBuilder.addAugmentation(srcnodeAugmentation);
ucmlBuilder.setMacEntryUuid(HwvtepHAUtil.getUUid(src.getMacEntryKey().getValue()));
LocalUcastMacsKey key = new LocalUcastMacsKey(ucmlBuilder.getLogicalSwitchRef(), ucmlBuilder.getMacEntryKey());
ucmlBuilder.withKey(key);
return ucmlBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentationBuilder in project netvirt by opendaylight.
the class LocalUcastMacListener method buildPrevLocalUcast.
public LocalUcastMacs buildPrevLocalUcast(LocalUcastMacs newLocalUcastMac, MacEntry prevElanMac) {
LocalUcastMacsBuilder builder = new LocalUcastMacsBuilder(newLocalUcastMac);
InstanceIdentifier<Node> nodePath = torNodeIdFromElanMac(prevElanMac);
builder.setLocatorRef(convertLocatorRef(nodePath));
builder.setLogicalSwitchRef(HwvtepHAUtil.convertLogicalSwitchRef(newLocalUcastMac.getLogicalSwitchRef(), nodePath));
SrcnodeAugmentation srcnodeAugmentation = new SrcnodeAugmentationBuilder().setSrcTorNodeid(prevElanMac.getSrcTorNodeid()).build();
builder.addAugmentation(srcnodeAugmentation);
builder.setMacEntryUuid(HwvtepHAUtil.getUUid(newLocalUcastMac.getMacEntryKey().getValue()));
LocalUcastMacsKey key = new LocalUcastMacsKey(builder.getLogicalSwitchRef(), builder.getMacEntryKey());
builder.withKey(key);
return builder.build();
}
Aggregations