use of org.onosproject.openstacknetworking.impl.TestRouterInterface in project onos by opennetworkinglab.
the class OpenstackNetworkingUtilTest method testAddRouterIface.
/**
* Tests addRouterIface method.
*/
@Test
public void testAddRouterIface() {
OpenstackRouterAdminService service = new TestOpenstackRouterAdminService();
addRouterIface(openstackPort, service);
RouterInterface initialRouterInterface = new TestRouterInterface(openstackPort.getDeviceId(), openstackPort.getFixedIps().stream().findAny().get().getSubnetId(), openstackPort.getId(), openstackPort.getTenantId());
assertTrue(routerInterfacesEquals(initialRouterInterface, service.routerInterface(openstackPort.getId())));
addRouterIface(openstackSriovPort1, service);
RouterInterface updatedInitialRouterInterface = new TestRouterInterface(openstackSriovPort1.getDeviceId(), openstackSriovPort1.getFixedIps().stream().findAny().get().getSubnetId(), openstackSriovPort1.getId(), openstackSriovPort1.getTenantId());
assertTrue(routerInterfacesEquals(updatedInitialRouterInterface, service.routerInterface(openstackSriovPort1.getId())));
}
Aggregations