Package org.jclouds.openstack.neutron.v2_0.features

Examples of org.jclouds.openstack.neutron.v2_0.features.PortApi


      }

      @Override
      protected Function<Object, IterableWithMarker<ReferenceWithName>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.isPresent() ? arg0.get().toString() : null;
         final SubnetApi subnetApi = api.getSubnetApiForZone(zone);
         return new Function<Object, IterableWithMarker<ReferenceWithName>>() {

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<ReferenceWithName> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return IterableWithMarker.class.cast(subnetApi.list(paginationOptions));
            }

            @Override
            public String toString() {
               return "listSubnets()";
View Full Code Here


      }

      @Override
      protected Function<Object, IterableWithMarker<Subnet>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.isPresent() ? arg0.get().toString() : null;
         final SubnetApi subnetApi = api.getSubnetApiForZone(zone);
         return new Function<Object, IterableWithMarker<Subnet>>() {

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<Subnet> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return IterableWithMarker.class.cast(subnetApi.listInDetail(paginationOptions));
            }

            @Override
            public String toString() {
               return "listSubnetsInDetail()";
View Full Code Here

            } else if (network.getNetworkType() == NetworkType.GRE) {
               checkNotNull(network.getSegmentationId(), "segmentationId must be present when NetworkType=GRE");
            }
         }

         CreateNetworkRequest createNetworkRequest = new CreateNetworkRequest();
         if (network.getName() != null)
            createNetworkRequest.name = network.getName();
         if (network.getAdminStateUp() != null)
            createNetworkRequest.admin_state_up = network.getAdminStateUp();
         if (network.getExternal() != null)
View Full Code Here

            } else if (network.getNetworkType() == NetworkType.GRE) {
               checkNotNull(network.getSegmentationId(), "segmentationId must be present when NetworkType=GRE");
            }
         }

         CreateNetworkRequest createNetworkRequest = new CreateNetworkRequest();
         if (network.getName() != null)
            createNetworkRequest.name = network.getName();
         if (network.getAdminStateUp() != null)
            createNetworkRequest.admin_state_up = network.getAdminStateUp();
         if (network.getExternal() != null)
View Full Code Here

         authenticatedGET().endpoint(endpoint + "/networks/16dba3bc-f3fa-4775-afdc-237e12c72f6a").build(),
         HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType("/network.json", APPLICATION_JSON)).build())
         .getNetworkApiForZone(ZONE);

      Network net = api.get("16dba3bc-f3fa-4775-afdc-237e12c72f6a");
      assertEquals(net, new ParseNetworkTest().expected());
   }
View Full Code Here

         authenticatedGET().endpoint(endpoint + "/networks/16dba3bc-f3fa-4775-afdc-237e12c72f6a").build(),
         HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType("/network.json", APPLICATION_JSON)).build())
         .getNetworkApiForZone(ZONE);

      Network net = api.get("16dba3bc-f3fa-4775-afdc-237e12c72f6a");
      assertEquals(net, new ParseNetworkTest().expected());
   }
View Full Code Here

         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 + "/routers/16dba3bc-f3fa-4775-afdc-237e12c72f6a").build(),
         HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType("/router.json", APPLICATION_JSON)).build())
         .getRouterExtensionForZone(ZONE).get();

      Router router = api.get("16dba3bc-f3fa-4775-afdc-237e12c72f6a");
      assertEquals(router, new ParseRouterTest().expected());
   }
View Full Code Here

         authenticatedGET().endpoint(endpoint + "/routers/16dba3bc-f3fa-4775-afdc-237e12c72f6a").build(),
         HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType("/router.json", APPLICATION_JSON)).build())
         .getRouterExtensionForZone(ZONE).get();

      Router router = api.get("16dba3bc-f3fa-4775-afdc-237e12c72f6a");
      assertEquals(router, new ParseRouterTest().expected());
   }
View Full Code Here

         authenticatedGET().endpoint(endpoint + "/subnets/624312ff-d14b-4ba3-9834-1c78d23d574d").build(),
         HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType("/subnet.json", APPLICATION_JSON)).build())
         .getSubnetApiForZone(ZONE);

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

TOP

Related Classes of org.jclouds.openstack.neutron.v2_0.features.PortApi

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.