public void testCreateAndDeleteRouterInterfaceForPort() {
for (String zone : api.getConfiguredZones()) {
RouterApi routerApi = api.getRouterExtensionForZone(zone).get();
NetworkApi networkApi = api.getNetworkApiForZone(zone);
SubnetApi subnetApi = api.getSubnetApiForZone(zone);
PortApi portApi = api.getPortApiForZone(zone);
Network network = networkApi.create(CreateNetworkOptions.builder().name("jclouds-network-test").external(true).networkType(NetworkType.LOCAL).build());
assertNotNull(network);
Subnet subnet = subnetApi.create(network.getId(), 4, "192.168.0.0/16");
assertNotNull(subnet);
Network network2 = networkApi.create(CreateNetworkOptions.builder().name("jclouds-network-test2").external(true).networkType(NetworkType.LOCAL).build());
assertNotNull(network2);
Subnet subnet2 = subnetApi.create(network2.getId(), 4, "192.169.0.0/16");
assertNotNull(subnet2);
Port port = portApi.create(network.getId());
assertNotNull(port);
Port port2 = portApi.create(network2.getId());
assertNotNull(port2);
Router router = routerApi.create(CreateRouterOptions.builder().name("jclouds-router-test").build());
assertNotNull(router);