use of org.opennms.netmgt.model.topology.BroadcastDomain in project opennms by OpenNMS.
the class BroadcastDomainTest method testTwoBridgeTwoCalculation.
@Test
public void testTwoBridgeTwoCalculation() {
TwoNodeTopology topology = new TwoNodeTopology();
BroadcastDomain domain = new BroadcastDomain();
domain.addBridge(new Bridge(topology.nodeBId));
domain.setBridgeElements(topology.elemlist);
NodeDiscoveryBridgeTopology ndbt = new NodeDiscoveryBridgeTopology(linkd, new Node(topology.nodeAId, null, null, null, location));
ndbt.setDomain(domain);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeBId), topology.bftB);
ndbt.calculate();
printBridgeTopology(ndbt.getDomain());
List<SharedSegment> shsegs = ndbt.getDomain().getTopology();
assertEquals(3, shsegs.size());
domain.addBridge(new Bridge(topology.nodeAId));
domain.setBridgeElements(topology.elemlist);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeAId), topology.bftA);
ndbt.calculate();
topology.check2nodeTopology(ndbt.getDomain(), true);
assertEquals(topology.nodeBId, domain.getRootBridgeId());
}
use of org.opennms.netmgt.model.topology.BroadcastDomain in project opennms by OpenNMS.
the class BroadcastDomainTest method testDF.
@Test
public void testDF() {
DEFGHILTopology topology = new DEFGHILTopology();
BroadcastDomain domain = new BroadcastDomain();
domain.addBridge(new Bridge(topology.nodeDId));
domain.addBridge(new Bridge(topology.nodeFId));
domain.setBridgeElements(topology.elemlist);
NodeDiscoveryBridgeTopology ndbt = new NodeDiscoveryBridgeTopology(linkd, new Node(topology.nodeDId, null, null, null, location));
ndbt.setDomain(domain);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeDId), topology.bftD);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeFId), topology.bftF);
ndbt.calculate();
topology.checkDF(ndbt.getDomain());
}
use of org.opennms.netmgt.model.topology.BroadcastDomain in project opennms by OpenNMS.
the class BroadcastDomainTest method testCB.
@Test
public void testCB() {
ABCTopology topology = new ABCTopology();
BroadcastDomain domain = new BroadcastDomain();
domain.addBridge(new Bridge(topology.nodeCId));
domain.addBridge(new Bridge(topology.nodeBId));
domain.setBridgeElements(topology.elemlist);
NodeDiscoveryBridgeTopology ndbt = new NodeDiscoveryBridgeTopology(linkd, new Node(topology.nodeAId, null, null, null, location));
ndbt.setDomain(domain);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeCId), topology.bftC);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeBId), topology.bftB);
ndbt.calculate();
topology.checkBC(ndbt.getDomain());
}
use of org.opennms.netmgt.model.topology.BroadcastDomain in project opennms by OpenNMS.
the class BroadcastDomainTest method testDEFG.
@Test
public void testDEFG() {
DEFGHILTopology topology = new DEFGHILTopology();
BroadcastDomain domain = new BroadcastDomain();
domain.addBridge(new Bridge(topology.nodeDId));
domain.addBridge(new Bridge(topology.nodeEId));
domain.addBridge(new Bridge(topology.nodeFId));
domain.addBridge(new Bridge(topology.nodeGId));
domain.setBridgeElements(topology.elemlist);
NodeDiscoveryBridgeTopology ndbt = new NodeDiscoveryBridgeTopology(linkd, new Node(topology.nodeDId, null, null, null, location));
ndbt.setDomain(domain);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeDId), topology.bftD);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeEId), topology.bftE);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeFId), topology.bftF);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeGId), topology.bftG);
ndbt.calculate();
topology.checkDEFG(ndbt.getDomain());
}
use of org.opennms.netmgt.model.topology.BroadcastDomain in project opennms by OpenNMS.
the class BroadcastDomainTest method testBA.
@Test
public void testBA() {
ABCTopology topology = new ABCTopology();
BroadcastDomain domain = new BroadcastDomain();
domain.addBridge(new Bridge(topology.nodeBId));
domain.addBridge(new Bridge(topology.nodeAId));
domain.setBridgeElements(topology.elemlist);
NodeDiscoveryBridgeTopology ndbt = new NodeDiscoveryBridgeTopology(linkd, new Node(topology.nodeAId, null, null, null, location));
ndbt.setDomain(domain);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeBId), topology.bftB);
ndbt.addUpdatedBFT(domain.getBridge(topology.nodeAId), topology.bftA);
ndbt.calculate();
topology.checkAB(ndbt.getDomain());
}
Aggregations