use of org.onosproject.net.topology.Topology in project onos by opennetworkinglab.
the class VirtualNetworkTopologyManagerTest method testGetDisjointPathsUsingNullRiskProfile.
/**
* Test getDisjointPaths() methods using a null risk profile.
*/
@Test(expected = NullPointerException.class)
public void testGetDisjointPathsUsingNullRiskProfile() {
VirtualNetwork virtualNetwork = setupVirtualNetworkTopology();
TopologyService topologyService = manager.get(virtualNetwork.id(), TopologyService.class);
Topology topology = topologyService.currentTopology();
VirtualDevice srcVirtualDevice = getVirtualDevice(virtualNetwork.id(), DID1);
VirtualDevice dstVirtualDevice = getVirtualDevice(virtualNetwork.id(), DID2);
// test the getDisjointPaths() method using a null risk profile.
Set<DisjointPath> paths = topologyService.getDisjointPaths(topology, srcVirtualDevice.id(), dstVirtualDevice.id(), (Map<Link, Object>) null);
}
use of org.onosproject.net.topology.Topology in project onos by opennetworkinglab.
the class VirtualNetworkTopologyManagerTest method testIsBroadcastPoint.
/**
* Test isBroadcastPoint() method.
*/
@Test
public void testIsBroadcastPoint() {
VirtualNetwork virtualNetwork = setupVirtualNetworkTopology();
TopologyService topologyService = manager.get(virtualNetwork.id(), TopologyService.class);
Topology topology = topologyService.currentTopology();
VirtualDevice srcVirtualDevice = getVirtualDevice(virtualNetwork.id(), DID1);
ConnectPoint cp = new ConnectPoint(srcVirtualDevice.id(), PortNumber.portNumber(1));
// test the isBroadcastPoint() method.
Boolean isBroadcastPoint = topologyService.isBroadcastPoint(topology, cp);
assertTrue("The connect point should be a broadcast point.", isBroadcastPoint);
}
use of org.onosproject.net.topology.Topology in project onos by opennetworkinglab.
the class VirtualNetworkTopologyManagerTest method testGetDisjointPathsUsingNullWeight.
/**
* Test getDisjointPaths() methods using a null weight.
*/
@Test(expected = NullPointerException.class)
public void testGetDisjointPathsUsingNullWeight() {
VirtualNetwork virtualNetwork = setupVirtualNetworkTopology();
TopologyService topologyService = manager.get(virtualNetwork.id(), TopologyService.class);
Topology topology = topologyService.currentTopology();
VirtualDevice srcVirtualDevice = getVirtualDevice(virtualNetwork.id(), DID1);
VirtualDevice dstVirtualDevice = getVirtualDevice(virtualNetwork.id(), DID2);
// test the getDisjointPaths() method using a null weight.
Set<DisjointPath> paths = topologyService.getDisjointPaths(topology, srcVirtualDevice.id(), dstVirtualDevice.id(), (LinkWeigher) null);
}
use of org.onosproject.net.topology.Topology in project onos by opennetworkinglab.
the class VirtualNetworkTopologyManagerTest method testIsInfrastructureUsingNullConnectPoint.
/**
* Test isInfrastructure() method using a null connect point.
*/
@Test(expected = NullPointerException.class)
public void testIsInfrastructureUsingNullConnectPoint() {
VirtualNetwork virtualNetwork = setupVirtualNetworkTopology();
TopologyService topologyService = manager.get(virtualNetwork.id(), TopologyService.class);
Topology topology = topologyService.currentTopology();
// test the isInfrastructure() method using a null connect point.
Boolean isInfrastructure = topologyService.isInfrastructure(topology, null);
}
use of org.onosproject.net.topology.Topology in project onos by opennetworkinglab.
the class VirtualNetworkTopologyManagerTest method testGetDisjointPathsUsingNullSrcDeviceId.
/**
* Test getDisjointPaths() methods using a null src device identifier.
*/
@Test(expected = NullPointerException.class)
public void testGetDisjointPathsUsingNullSrcDeviceId() {
VirtualNetwork virtualNetwork = setupVirtualNetworkTopology();
TopologyService topologyService = manager.get(virtualNetwork.id(), TopologyService.class);
Topology topology = topologyService.currentTopology();
VirtualDevice srcVirtualDevice = getVirtualDevice(virtualNetwork.id(), DID1);
VirtualDevice dstVirtualDevice = getVirtualDevice(virtualNetwork.id(), DID2);
// test the getDisjointPaths() method using a null src device identifier.
Set<DisjointPath> paths = topologyService.getDisjointPaths(topology, null, dstVirtualDevice.id());
}
Aggregations