Package org.jclouds.abiquo.domain.network.options

Examples of org.jclouds.abiquo.domain.network.options.IpOptions


   }

   // Override to apply the filter in the server side
   @Override
   public Iterable<PrivateIp> listUnusedIps() {
      IpOptions options = IpOptions.builder().free(true).build();
      PaginatedCollection<PrivateIpDto, PrivateIpsDto> ips = context.getApi().getCloudApi()
            .listPrivateNetworkIps(target, options);
      return wrap(context, PrivateIp.class, ips.toPagedIterable().concat());
   }
View Full Code Here


                  .build());

      VLANNetworkDto vlan = new VLANNetworkDto();
      vlan.addLink(new RESTLink("ips", "http://localhost/api/admin/datacenters/1/network/1/ips"));

      IpOptions options = IpOptions.builder().startWith(3).build();
      PaginatedCollection<PublicIpDto, PublicIpsDto> ips = api.listPublicIps(vlan, options);

      assertEquals(ips.size(), 2);
      assertEquals(ips.getTotalSize().intValue(), 4);
      assertEquals(ips.get(0).getId().intValue(), 3);
View Full Code Here

                  .build());

      VLANNetworkDto vlan = new VLANNetworkDto();
      vlan.addLink(new RESTLink("ips", "http://localhost/api/admin/enterprises/2/limits/2/externalnetworks/2/ips"));

      IpOptions options = IpOptions.builder().startWith(3).build();
      PaginatedCollection<ExternalIpDto, ExternalIpsDto> ips = api.listExternalIps(vlan, options);

      assertEquals(ips.size(), 2);
      assertEquals(ips.getTotalSize().intValue(), 4);
      assertEquals(ips.get(0).getId().intValue(), 3);
View Full Code Here

                  .build());

      VLANNetworkDto vlan = new VLANNetworkDto();
      vlan.addLink(new RESTLink("ips", "http://localhost/api/admin/enterprises/2/limits/2/externalnetworks/2/ips"));

      IpOptions options = IpOptions.builder().startWith(3).build();
      PaginatedCollection<UnmanagedIpDto, UnmanagedIpsDto> ips = api.listUnmanagedIps(vlan, options);

      assertEquals(ips.size(), 2);
      assertEquals(ips.getTotalSize().intValue(), 4);
      assertEquals(ips.get(0).getId().intValue(), 3);
View Full Code Here

    *      Resource#
    *      VirtualDatacenterResource-ListofPublicIPstopurchasebyVirtualDatacenter
    *      </a>
    */
   public List<PublicIp> listAvailablePublicIps() {
      IpOptions options = IpOptions.builder().build();

      PublicIpsDto ips = context.getApi().getCloudApi().listAvailablePublicIps(target, options);

      return wrap(context, PublicIp.class, ips.getCollection());
   }
View Full Code Here

    *      Resource#
    *      VirtualDatacenterResource-ListofpurchasedPublicIPsbyVirtualDatacenter
    *      </a>
    */
   public List<PublicIp> listPurchasedPublicIps() {
      IpOptions options = IpOptions.builder().build();

      PublicIpsDto ips = context.getApi().getCloudApi().listPurchasedPublicIps(target, options);

      return wrap(context, PublicIp.class, ips.getCollection());
   }
View Full Code Here

   }

   /*********************** Ips ***********************/

   public void testListAvailablePublicIpsWithOptions() throws SecurityException, NoSuchMethodException, IOException {
      IpOptions options = IpOptions.builder().limit(5).build();
      Invokable<?, ?> method = method(CloudApi.class, "listAvailablePublicIps", VirtualDatacenterDto.class,
            IpOptions.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(CloudResources.virtualDatacenterPut(), options)));

View Full Code Here

      checkFilters(request);
   }

   public void testListPurchasedPublicIpsWithOptions() throws SecurityException, NoSuchMethodException, IOException {
      IpOptions options = IpOptions.builder().limit(5).build();
      Invokable<?, ?> method = method(CloudApi.class, "listPurchasedPublicIps", VirtualDatacenterDto.class,
            IpOptions.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(CloudResources.virtualDatacenterPut(), options)));
View Full Code Here

      checkFilters(request);
   }

   public void testListPrivateNetworkIpsWithOptions() throws SecurityException, NoSuchMethodException, IOException {
      IpOptions options = IpOptions.builder().startWith(10).build();
      Invokable<?, ?> method = method(CloudApi.class, "listPrivateNetworkIps", VLANNetworkDto.class, IpOptions.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(NetworkResources.privateNetworkPut(), options)));

      assertRequestLineEquals(request,
View Full Code Here

      checkFilters(request);
   }

   public void testListPublicIpsWithOptions() throws SecurityException, NoSuchMethodException, IOException {
      IpOptions options = IpOptions.builder().startWith(10).build();
      Invokable<?, ?> method = method(InfrastructureApi.class, "listPublicIps", VLANNetworkDto.class, IpOptions.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(NetworkResources.publicNetworkPut(), options)));

      assertRequestLineEquals(request,
View Full Code Here

TOP

Related Classes of org.jclouds.abiquo.domain.network.options.IpOptions

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.