Search in sources :

Example 1 with RemoteMcastCmd

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());
}
Also used : RemoteMcastMacs(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs) RemoteMcastCmd(org.opendaylight.netvirt.elan.l2gw.ha.commands.RemoteMcastCmd) HwvtepGlobalAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation)

Aggregations

RemoteMcastCmd (org.opendaylight.netvirt.elan.l2gw.ha.commands.RemoteMcastCmd)1 HwvtepGlobalAugmentation (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation)1 RemoteMcastMacs (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs)1