Package org.jclouds.openstack.neutron.v2.features

Examples of org.jclouds.openstack.neutron.v2.features.SubnetApi


      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(404)));

      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);
View Full Code Here


      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(201)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         RouterApi api = neutronApi.getRouterExtensionApi("RegionOne").get();

         boolean result = api.removeInterfaceForSubnet("12345", "a2f1f29d-571b-4533-907f-5803ab96ead1");

         /*
          * Check request
          */
         assertAuthentication(server);
View Full Code Here

      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         RouterApi api = neutronApi.getRouterExtensionApi("RegionOne").get();

         boolean result = api.removeInterfaceForSubnet("12345", "a2f1f29d-571b-4533-907f-5803ab96ead1");

         /*
          * Check request
          */
         assertAuthentication(server);
View Full Code Here

      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(201)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         RouterApi api = neutronApi.getRouterExtensionApi("RegionOne").get();

         boolean result = api.removeInterfaceForPort("12345", "portid");

         /*
          * Check request
          */
         assertAuthentication(server);
View Full Code Here

      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         RouterApi api = neutronApi.getRouterExtensionApi("RegionOne").get();

         boolean result = api.removeInterfaceForPort("12345", "portid");

         /*
          * Check request
          */
         assertAuthentication(server);
View Full Code Here

   }

   @Override
   protected Function<Object, IterableWithMarker<Network>> markerToNextForArg0(Optional<Object> arg0) {
      String region = arg0.isPresent() ? arg0.get().toString() : null;
      final NetworkApi networkApi = api.getNetworkApi(region);
      return new Function<Object, IterableWithMarker<Network>>() {

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

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

   }

   @Override
   protected Function<Object, IterableWithMarker<Port>> markerToNextForArg0(Optional<Object> arg0) {
      String region = arg0.isPresent() ? arg0.get().toString() : null;
      final PortApi portApi = api.getPortApi(region);
      return new Function<Object, IterableWithMarker<Port>>() {

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

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

   }

   @Override
   protected Function<Object, IterableWithMarker<Subnet>> markerToNextForArg0(Optional<Object> arg0) {
      String region = arg0.isPresent() ? arg0.get().toString() : null;
      final SubnetApi subnetApi = api.getSubnetApi(region);
      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.list(paginationOptions));
         }

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

      }

      @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 "list()";
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 "list()";
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.neutron.v2.features.SubnetApi

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.