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