use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.Src in project netvirt by opendaylight.
the class LocalMcastCmd method transform.
@Override
public LocalMcastMacs transform(InstanceIdentifier<Node> nodePath, LocalMcastMacs src) {
LocalMcastMacsBuilder ucmlBuilder = new LocalMcastMacsBuilder(src);
List<LocatorSet> locatorSet = new ArrayList<>();
for (LocatorSet locator : src.getLocatorSet()) {
locatorSet.add(new LocatorSetBuilder().setLocatorRef(HwvtepHAUtil.buildLocatorRef(nodePath, HwvtepHAUtil.getTepIpVal(locator.getLocatorRef()))).build());
}
ucmlBuilder.setLocatorSet(locatorSet);
ucmlBuilder.setLogicalSwitchRef(HwvtepHAUtil.convertLogicalSwitchRef(src.getLogicalSwitchRef(), nodePath));
ucmlBuilder.setMacEntryUuid(HwvtepHAUtil.getUUid(src.getMacEntryKey().getValue()));
LocalMcastMacsKey key = new LocalMcastMacsKey(ucmlBuilder.getLogicalSwitchRef(), ucmlBuilder.getMacEntryKey());
ucmlBuilder.setKey(key);
return ucmlBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.Src 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.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.Src in project netvirt by opendaylight.
the class RemoteMcastCmd method transform.
@Override
public RemoteMcastMacs transform(InstanceIdentifier<Node> nodePath, RemoteMcastMacs src) {
RemoteMcastMacsBuilder ucmlBuilder = new RemoteMcastMacsBuilder(src);
List<LocatorSet> locatorSet = new ArrayList<>();
for (LocatorSet locator : src.getLocatorSet()) {
locatorSet.add(new LocatorSetBuilder().setLocatorRef(HwvtepHAUtil.buildLocatorRef(nodePath, HwvtepHAUtil.getTepIpVal(locator.getLocatorRef()))).build());
}
ucmlBuilder.setLocatorSet(locatorSet);
ucmlBuilder.setLogicalSwitchRef(HwvtepHAUtil.convertLogicalSwitchRef(src.getLogicalSwitchRef(), nodePath));
ucmlBuilder.setMacEntryUuid(HwvtepHAUtil.getUUid(src.getMacEntryKey().getValue()));
RemoteMcastMacsKey key = new RemoteMcastMacsKey(ucmlBuilder.getLogicalSwitchRef(), ucmlBuilder.getMacEntryKey());
ucmlBuilder.setKey(key);
return ucmlBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.Src in project netvirt by opendaylight.
the class RemoteUcastCmd method transform.
@Override
public RemoteUcastMacs transform(InstanceIdentifier<Node> nodePath, RemoteUcastMacs src) {
RemoteUcastMacsBuilder ucmlBuilder = new RemoteUcastMacsBuilder(src);
ucmlBuilder.setLocatorRef(HwvtepHAUtil.convertLocatorRef(src.getLocatorRef(), nodePath));
ucmlBuilder.setLogicalSwitchRef(HwvtepHAUtil.convertLogicalSwitchRef(src.getLogicalSwitchRef(), nodePath));
ucmlBuilder.setMacEntryUuid(HwvtepHAUtil.getUUid(src.getMacEntryKey().getValue()));
RemoteUcastMacsKey key = new RemoteUcastMacsKey(ucmlBuilder.getLogicalSwitchRef(), ucmlBuilder.getMacEntryKey());
ucmlBuilder.setKey(key);
return ucmlBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.Src in project netvirt by opendaylight.
the class TerminationPointCmd method transform.
@Override
public TerminationPoint transform(InstanceIdentifier<Node> nodePath, TerminationPoint src) {
HwvtepPhysicalPortAugmentation augmentation = src.getAugmentation(HwvtepPhysicalPortAugmentation.class);
if (augmentation == null) {
return new TerminationPointBuilder(src).build();
}
String nodeIdVal = nodePath.firstKeyOf(Node.class).getNodeId().getValue();
int idx = nodeIdVal.indexOf("/physicalswitch");
if (idx > 0) {
nodeIdVal = nodeIdVal.substring(0, idx);
nodePath = HwvtepHAUtil.convertToInstanceIdentifier(nodeIdVal);
}
final InstanceIdentifier<Node> path = nodePath;
TerminationPointBuilder tpBuilder = new TerminationPointBuilder(src);
tpBuilder.removeAugmentation(HwvtepPhysicalPortAugmentation.class);
HwvtepPhysicalPortAugmentationBuilder tpAugmentationBuilder = new HwvtepPhysicalPortAugmentationBuilder(augmentation);
if (augmentation.getVlanBindings() != null && augmentation.getVlanBindings().size() > 0) {
tpAugmentationBuilder.setVlanBindings(augmentation.getVlanBindings().stream().map(vlanBindings -> {
VlanBindingsBuilder vlanBindingsBuilder = new VlanBindingsBuilder(vlanBindings);
vlanBindingsBuilder.setLogicalSwitchRef(HwvtepHAUtil.convertLogicalSwitchRef(vlanBindings.getLogicalSwitchRef(), path));
return vlanBindingsBuilder.build();
}).collect(Collectors.toList()));
}
tpBuilder.addAugmentation(HwvtepPhysicalPortAugmentation.class, tpAugmentationBuilder.build());
return tpBuilder.build();
}
Aggregations