use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.locator.set.attributes.LocatorSet in project netvirt by opendaylight.
the class RemoteMcastCmd method areEqual.
@Override
public boolean areEqual(RemoteMcastMacs updated, RemoteMcastMacs orig) {
InstanceIdentifier<?> updatedMacRefIdentifier = updated.getLogicalSwitchRef().getValue();
HwvtepNodeName updatedMacNodeName = updatedMacRefIdentifier.firstKeyOf(LogicalSwitches.class).getHwvtepNodeName();
InstanceIdentifier<?> origMacRefIdentifier = orig.getLogicalSwitchRef().getValue();
HwvtepNodeName origMacNodeName = origMacRefIdentifier.firstKeyOf(LogicalSwitches.class).getHwvtepNodeName();
if (updated.getMacEntryKey().equals(orig.getMacEntryKey()) && updatedMacNodeName.equals(origMacNodeName)) {
List<LocatorSet> updatedLocatorSet = updated.getLocatorSet();
List<LocatorSet> origLocatorSet = orig.getLocatorSet();
if (!areSameSize(updatedLocatorSet, origLocatorSet)) {
return false;
}
List<LocatorSet> added = diffOf(updatedLocatorSet, origLocatorSet, locatorSetComparator);
if (!HwvtepHAUtil.isEmptyList(added)) {
return false;
}
List<LocatorSet> removed = diffOf(origLocatorSet, updatedLocatorSet, locatorSetComparator);
if (!HwvtepHAUtil.isEmptyList(removed)) {
return false;
}
return true;
}
return false;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.locator.set.attributes.LocatorSet in project netvirt by opendaylight.
the class NetworkL2gwDeviceInfoCli method printLocalMcastMacs.
@SuppressWarnings("checkstyle:HiddenField")
void printLocalMcastMacs(Node hwvtepNode, String elanName) {
session.getConsole().println("LocalMcast macs :");
session.getConsole().println(HEADINGMCAST);
if (hwvtepNode == null || hwvtepNode.getAugmentation(HwvtepGlobalAugmentation.class) == null) {
return;
}
List<LocalMcastMacs> localMcastMacs = hwvtepNode.getAugmentation(HwvtepGlobalAugmentation.class).getLocalMcastMacs();
if (localMcastMacs == null || localMcastMacs.isEmpty()) {
return;
}
for (LocalMcastMacs localMac : localMcastMacs) {
String lsFromLocalMac = getLogicalSwitchValue(localMac.getLogicalSwitchRef());
if (elanName.equals(lsFromLocalMac)) {
String mac = localMac.getMacEntryKey().getValue();
List<String> locatorsets = new ArrayList<>();
for (LocatorSet locatorSet : localMac.getLocatorSet()) {
locatorsets.add(getLocatorValue(locatorSet.getLocatorRef()));
}
session.getConsole().println(mac + GAP + locatorsets.toString());
}
}
}
Aggregations