try {
NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
RouterApi api = neutronApi.getRouterExtensionApi("RegionOne").get();
RouterInterface routerInterface = api.addInterfaceForPort("12345", "portid");
/*
* Check request
*/
assertAuthentication(server);
assertRequest(server.takeRequest(), "PUT", "/v2.0/routers/12345/add_router_interface", "/router_add_interface_port_request.json");
/*
* Check response
*/
assertNotNull(routerInterface);
assertEquals(routerInterface.getSubnetId(), "a2f1f29d-571b-4533-907f-5803ab96ead1");
assertEquals(routerInterface.getPortId(), "3a44f4e5-1694-493a-a1fb-393881c673a4");
} finally {
server.shutdown();
}
}