Search in sources :

Example 1 with LocalMcastCmd

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

Aggregations

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