Package org.jclouds.abiquo.domain.network

Examples of org.jclouds.abiquo.domain.network.PublicIp


      // Once the virtual machine is created, override the default network
      // settings if needed
      // If no public ip is available in the virtual datacenter, the virtual
      // machine will be assigned by default an ip address in the default
      // private VLAN for the virtual datacenter
      PublicIp publicIp = vdc.findPurchasedPublicIp(IpPredicates.<PublicIp> notUsed());
      if (publicIp != null) {
         List<PublicIp> ips = Lists.newArrayList();
         ips.add(publicIp);
         vm.setNics(ips);
      }
View Full Code Here


      virtualDatacenter.delete();
   }

   public void testPurchaseIp() {
      final PublicIp publicIp = get(env.virtualDatacenter.listAvailablePublicIps(), 0);
      assertNotNull(publicIp);
      env.virtualDatacenter.purchasePublicIp(publicIp);

      PublicIp apiIp = find(env.virtualDatacenter.listPurchasedPublicIps(), new Predicate<PublicIp>() {
         @Override
         public boolean apply(PublicIp input) {
            return input.getIp().equals(publicIp.getIp());
         }
      });
View Full Code Here

      virtualDatacenter.delete();
   }

   public void testPurchaseIp() {
      final PublicIp publicIp = get(env.virtualDatacenter.listAvailablePublicIps(), 0);
      assertNotNull(publicIp);
      env.virtualDatacenter.purchasePublicIp(publicIp);

      PublicIp apiIp = find(env.virtualDatacenter.listPurchasedPublicIps(), new Predicate<PublicIp>() {
         @Override
         public boolean apply(PublicIp input) {
            return input.getIp().equals(publicIp.getIp());
         }
      });
View Full Code Here

      virtualDatacenter.delete();
   }

   public void testPurchaseIp() {
      PublicIp publicIp = env.virtualDatacenter.listAvailablePublicIps().get(0);
      assertNotNull(publicIp);
      env.virtualDatacenter.purchasePublicIp(publicIp);

      PublicIp apiIp = env.virtualDatacenter.findPurchasedPublicIp(IpPredicates.<PublicIp> address(publicIp.getIp()));
      assertNotNull(apiIp);

      env.virtualDatacenter.releasePublicIp(apiIp);
      apiIp = env.virtualDatacenter.findPurchasedPublicIp(IpPredicates.<PublicIp> address(publicIp.getIp()));
      assertNull(apiIp);
View Full Code Here

      // Once the virtual machine is created, override the default network
      // settings if needed
      // If no public ip is available in the virtual datacenter, the virtual
      // machine will be assigned by default an ip address in the default
      // private VLAN for the virtual datacenter
      PublicIp publicIp = vdc.findPurchasedPublicIp(IpPredicates.<PublicIp> notUsed());
      if (publicIp != null) {
         List<PublicIp> ips = Lists.newArrayList();
         ips.add(publicIp);
         vm.setNics(ips);
      }
View Full Code Here

TOP

Related Classes of org.jclouds.abiquo.domain.network.PublicIp

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.