Package org.jclouds.openstack.neutron.v2_0.domain

Examples of org.jclouds.openstack.neutron.v2_0.domain.RouterInterface


         for (Port port : ports) {
            assertNotNull(port.getName());
            assertTrue(references.contains(ReferenceWithName.builder().id(port.getId()).tenantId(port.getTenantId()).name(port.getName()).build()));

            Port retrievedPort = api.getPortApiForZone(zone).get(port.getId());
            assertEquals(port, retrievedPort);
         }
      }
   }
View Full Code Here


         String ipv6PortId = portApi.create(networkId, CreatePortOptions.builder().name("JClouds-Live-IPv6-Port").fixedIps(getFixedAddresses(ipv6SubnetId)).build()).getId();

         assertNotNull(ipv4PortId);
         assertNotNull(ipv6PortId);

         Port ipv4Port = portApi.get(ipv4PortId);
         assertNotNull(ipv4Port);
         assertEquals(ipv4Port.getId(), ipv4PortId);
         assertEquals(ipv4Port.getName(), "JClouds-Live-IPv4-Port");

         Port ipv6Port = portApi.get(ipv6PortId);
         assertNotNull(ipv6Port);
         assertEquals(ipv6Port.getId(), ipv6PortId);
         assertEquals(ipv6Port.getName(), "JClouds-Live-IPv6-Port");

         assertTrue(portApi.update(ipv4PortId, UpdatePortOptions.builder().name("Updated").build()));
         Port updatedIpv4Port = portApi.get(ipv4PortId);
         assertEquals(updatedIpv4Port.getName(), "Updated");

         assertTrue(portApi.delete(ipv4PortId));
         assertTrue(portApi.delete(ipv6PortId));
         assertTrue(subnetApi.delete(ipv4SubnetId));
         assertTrue(subnetApi.delete(ipv6SubnetId));
View Full Code Here

         for (Port port : ports) {
            assertNotNull(port.getName());
            assertTrue(references.contains(ReferenceWithName.builder().id(port.getId()).tenantId(port.getTenantId()).name(port.getName()).build()));

            Port retrievedPort = api.getPortApiForZone(zone).get(port.getId());
            assertEquals(port, retrievedPort);
         }
      }
   }
View Full Code Here

         String ipv6PortId = portApi.create(networkId, CreatePortOptions.builder().name("JClouds-Live-IPv6-Port").fixedIps(getFixedAddresses(ipv6SubnetId)).build()).getId();

         assertNotNull(ipv4PortId);
         assertNotNull(ipv6PortId);

         Port ipv4Port = portApi.get(ipv4PortId);
         assertNotNull(ipv4Port);
         assertEquals(ipv4Port.getId(), ipv4PortId);
         assertEquals(ipv4Port.getName(), "JClouds-Live-IPv4-Port");

         Port ipv6Port = portApi.get(ipv6PortId);
         assertNotNull(ipv6Port);
         assertEquals(ipv6Port.getId(), ipv6PortId);
         assertEquals(ipv6Port.getName(), "JClouds-Live-IPv6-Port");

         assertTrue(portApi.update(ipv4PortId, UpdatePortOptions.builder().name("Updated").build()));
         Port updatedIpv4Port = portApi.get(ipv4PortId);
         assertEquals(updatedIpv4Port.getName(), "Updated");

         assertTrue(portApi.delete(ipv4PortId));
         assertTrue(portApi.delete(ipv6PortId));
         assertTrue(subnetApi.delete(ipv4SubnetId));
         assertTrue(subnetApi.delete(ipv6SubnetId));
View Full Code Here

         for (Port port : ports) {
            assertNotNull(port.getName());
            assertTrue(references.contains(ReferenceWithName.builder().id(port.getId()).tenantId(port.getTenantId()).name(port.getName()).build()));

            Port retrievedPort = api.getPortApiForZone(zone).get(port.getId());
            assertEquals(port, retrievedPort);
         }
      }
   }
View Full Code Here

         String ipv6PortId = portApi.create(networkId, CreatePortOptions.builder().name("JClouds-Live-IPv6-Port").fixedIps(getFixedAddresses(ipv6SubnetId)).build()).getId();

         assertNotNull(ipv4PortId);
         assertNotNull(ipv6PortId);

         Port ipv4Port = portApi.get(ipv4PortId);
         assertNotNull(ipv4Port);
         assertEquals(ipv4Port.getId(), ipv4PortId);
         assertEquals(ipv4Port.getName(), "JClouds-Live-IPv4-Port");

         Port ipv6Port = portApi.get(ipv6PortId);
         assertNotNull(ipv6Port);
         assertEquals(ipv6Port.getId(), ipv6PortId);
         assertEquals(ipv6Port.getName(), "JClouds-Live-IPv6-Port");

         assertTrue(portApi.update(ipv4PortId, UpdatePortOptions.builder().name("Updated").build()));
         Port updatedIpv4Port = portApi.get(ipv4PortId);
         assertEquals(updatedIpv4Port.getName(), "Updated");

         assertTrue(portApi.delete(ipv4PortId));
         assertTrue(portApi.delete(ipv6PortId));
         assertTrue(subnetApi.delete(ipv4SubnetId));
         assertTrue(subnetApi.delete(ipv6SubnetId));
View Full Code Here

         keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess,
         authenticatedGET().endpoint(endpoint + "/ports/624312ff-d14b-4ba3-9834-1c78d23d574d").build(),
         HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType("/port.json", APPLICATION_JSON)).build())
         .getPortApiForZone(ZONE);

      Port port = api.get("624312ff-d14b-4ba3-9834-1c78d23d574d");
      assertEquals(port, new ParsePortTest().expected());
   }
View Full Code Here

         authenticatedGET().endpoint(endpoint + "/ports").method("POST")
            .payload(payloadFromStringWithContentType("{\"port\":{\"network_id\":\"1\",\"name\":\"test-port\"}}", APPLICATION_JSON)).build(),
         HttpResponse.builder().statusCode(200).payload(payloadFromStringWithContentType("{\"port\":{\"id\":\"1\",\"tenant_id\":\"1\",\"network_id\":\"1\",\"name\":\"test-port\"}}", APPLICATION_JSON)).build())
         .getPortApiForZone(ZONE);

      Port port = api.create("1", CreatePortOptions.builder().name("test-port").build());
      assertEquals(port, Port.builder().id("1").tenantId("1").name("test-port").networkId("1").build());
   }
View Full Code Here

         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);

         RouterInterface routerInterface = routerApi.addInterfaceForPort(router.getId(), port.getId());
         assertNotNull(routerInterface);

         RouterInterface routerInterface2 = routerApi.addInterfaceForPort(router.getId(), port2.getId());
         assertNotNull(routerInterface2);

         assertTrue(routerApi.removeInterfaceForPort(router.getId(), port.getId()));
         assertTrue(routerApi.removeInterfaceForPort(router.getId(), port2.getId()));
         assertTrue(routerApi.delete(router.getId()));
         assertTrue(subnetApi.delete(subnet.getId()));
         assertTrue(networkApi.delete(network.getId()));
         assertTrue(subnetApi.delete(subnet2.getId()));
         assertTrue(networkApi.delete(network2.getId()));
View Full Code Here

         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);

         RouterInterface routerInterface = routerApi.addInterfaceForPort(router.getId(), port.getId());
         assertNotNull(routerInterface);

         RouterInterface routerInterface2 = routerApi.addInterfaceForPort(router.getId(), port2.getId());
         assertNotNull(routerInterface2);

         assertTrue(routerApi.removeInterfaceForPort(router.getId(), port.getId()));
         assertTrue(routerApi.removeInterfaceForPort(router.getId(), port2.getId()));
         assertTrue(routerApi.delete(router.getId()));
         assertTrue(subnetApi.delete(subnet.getId()));
         assertTrue(networkApi.delete(network.getId()));
         assertTrue(subnetApi.delete(subnet2.getId()));
         assertTrue(networkApi.delete(network2.getId()));
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.neutron.v2_0.domain.RouterInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.