use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.Managers in project netvirt by opendaylight.
the class TestComparators method comparePhysicalSwitches.
public static void comparePhysicalSwitches(Node d1ps, Node haps, InstanceIdentifier<Node> d1psnodePath, InstanceIdentifier<Node> haPsnodePath, ReadWriteTransaction readWriteTransaction, String switchName, Node d1, Node ha) throws ReadFailedException {
// Compare Physical Augmentation data
PhysicalSwitchAugmentation d1PsAug = d1ps.getAugmentation(PhysicalSwitchAugmentation.class);
PhysicalSwitchAugmentation haPsAug = haps.getAugmentation(PhysicalSwitchAugmentation.class);
HwvtepGlobalRef managerd1Ps = d1PsAug.getManagedBy();
assertEquals("Hwvtep node name should be same", d1PsAug.getHwvtepNodeName().getValue(), haPsAug.getHwvtepNodeName().getValue());
assertEquals("Managers should be equal for d1 ", d1ps.getNodeId().getValue(), managerd1Ps.getValue().firstKeyOf(Node.class).getNodeId().getValue() + "/physicalswitch/" + switchName);
HwvtepGlobalRef managerhaPs = haPsAug.getManagedBy();
assertEquals("Managers should be equal for ha ", haps.getNodeId().getValue(), managerhaPs.getValue().firstKeyOf(Node.class).getNodeId().getValue() + "/physicalswitch/" + switchName);
assertEquals("Should have equal number TunnelIps", d1PsAug.getTunnelIps().size(), haPsAug.getTunnelIps().size());
if (d1PsAug.getTunnelIps().size() == haPsAug.getTunnelIps().size()) {
assertTrue(d1PsAug.getTunnelIps().containsAll(haPsAug.getTunnelIps()));
}
// Compare Termination point
assertTerminationPoint(DataProvider.getPortNameListD1(), d1psnodePath, haPsnodePath, readWriteTransaction, d1, ha);
}
Aggregations