Package com.abiquo.server.core.infrastructure.network

Examples of com.abiquo.server.core.infrastructure.network.PrivateIpsDto


   public void tearDownNetwork() {
      privateNetwork.delete();
   }

   public void testListIps() {
      PrivateIpsDto ipsDto = env.context.getApiContext().getApi().getCloudApi()
            .listPrivateNetworkIps(privateNetwork.unwrap(), IpOptions.builder().limit(1).build());
      int totalIps = ipsDto.getTotalSize();

      List<PrivateIp> ips = privateNetwork.listIps();

      assertEquals(ips.size(), totalIps);
   }
View Full Code Here


      List<PrivateIp> ips = privateNetwork.listIps(IpOptions.builder().limit(5).build());
      assertEquals(ips.size(), 5);
   }

   public void testListUnusedIps() {
      PrivateIpsDto ipsDto = env.context.getApiContext().getApi().getCloudApi()
            .listPrivateNetworkIps(privateNetwork.unwrap(), IpOptions.builder().limit(1).build());
      int totalIps = ipsDto.getTotalSize();

      List<PrivateIp> ips = privateNetwork.listUnusedIps();
      assertEquals(ips.size(), totalIps);
   }
View Full Code Here

    *      > http://community.abiquo.com/display/ABI20/Private+Network+Resource#
    *      PrivateNetworkResource -RetrievethelistofIPSofthePrivateNetwork</a>
    */
   @Override
   public List<PrivateIp> listIps(final IpOptions options) {
      PrivateIpsDto ips = context.getApi().getCloudApi().listPrivateNetworkIps(target, options);
      return wrap(context, PrivateIp.class, ips.getCollection());
   }
View Full Code Here

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

TOP

Related Classes of com.abiquo.server.core.infrastructure.network.PrivateIpsDto

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.