use of org.opendaylight.netvirt.elan.l2gw.ha.commands.RemoteMcastCmd in project netvirt by opendaylight.
the class TestComparators method compareRemoteMcastMacs.
public static void compareRemoteMcastMacs(Node src, Node dst, InstanceIdentifier<Node> nodePath) {
RemoteMcastCmd cmd = new RemoteMcastCmd();
HwvtepGlobalAugmentation d1Aug = src.getAugmentation(HwvtepGlobalAugmentation.class);
HwvtepGlobalAugmentation haAug = dst.getAugmentation(HwvtepGlobalAugmentation.class);
List<RemoteMcastMacs> d1Values = d1Aug.getRemoteMcastMacs() != null ? d1Aug.getRemoteMcastMacs() : new ArrayList<>();
List<RemoteMcastMacs> result1 = cmd.transform(nodePath, d1Values);
List<RemoteMcastMacs> result2 = cmd.transform(nodePath, haAug.getRemoteMcastMacs());
Set<RemoteMcastMacs> set1 = Sets.newHashSet(result1);
Set<RemoteMcastMacs> set2 = Sets.newHashSet(result2);
assertEquals("should have equal remote ucast macs ", 0, Sets.symmetricDifference(set1, set2).size());
}
Aggregations