Examples of ZoneAndId


Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId

      return ImmutableSet.of();
   }

   @Override
   public ServerInZone getNode(String id) {
      ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
      Server server = novaApi.getServerApiForZone(zoneAndId.getZone()).get(zoneAndId.getId());
      return server == null ? null : new ServerInZone(server, zoneAndId.getZone());
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId

      return server == null ? null : new ServerInZone(server, zoneAndId.getZone());
   }

   @Override
   public ImageInZone getImage(String id) {
      ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
      Image image = novaApi.getImageApiForZone(zoneAndId.getZone()).get(zoneAndId.getId());
      return image == null ? null : new ImageInZone(image, zoneAndId.getZone());
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId

      return image == null ? null : new ImageInZone(image, zoneAndId.getZone());
   }

   @Override
   public void destroyNode(String id) {
      ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
      if (novaApi.getFloatingIPExtensionForZone(zoneAndId.getZone()).isPresent()) {
         try {
            removeFloatingIpFromNodeAndDeallocate.apply(zoneAndId);
         } catch (RuntimeException e) {
            logger.warn(e, "<< error removing and deallocating ip from node(%s): %s", id, e.getMessage());
         }
      }
      novaApi.getServerApiForZone(zoneAndId.getZone()).delete(zoneAndId.getId());
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId

      novaApi.getServerApiForZone(zoneAndId.getZone()).delete(zoneAndId.getId());
   }

   @Override
   public void rebootNode(String id) {
      ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
      novaApi.getServerApiForZone(zoneAndId.getZone()).reboot(zoneAndId.getId(), RebootType.HARD);
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId

      novaApi.getServerApiForZone(zoneAndId.getZone()).reboot(zoneAndId.getId(), RebootType.HARD);
   }

   @Override
   public void resumeNode(String id) {
      ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
      if (novaApi.getServerAdminExtensionForZone(zoneAndId.getZone()).isPresent()) {
         novaApi.getServerAdminExtensionForZone(zoneAndId.getZone()).get().resume(zoneAndId.getId());
      }
      throw new UnsupportedOperationException("resume requires installation of the Admin Actions extension");
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId

      throw new UnsupportedOperationException("resume requires installation of the Admin Actions extension");
   }

   @Override
   public void suspendNode(String id) {
      ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
      if (novaApi.getServerAdminExtensionForZone(zoneAndId.getZone()).isPresent()) {
         novaApi.getServerAdminExtensionForZone(zoneAndId.getZone()).get().suspend(zoneAndId.getId());
      }
      throw new UnsupportedOperationException("suspend requires installation of the Admin Actions extension");
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId

      return ImmutableSet.of();
   }

   @Override
   public ServerInZone getNode(String id) {
      ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
      Server server = novaApi.getServerApiForZone(zoneAndId.getZone()).get(zoneAndId.getId());
      return server == null ? null : new ServerInZone(server, zoneAndId.getZone());
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId

      return server == null ? null : new ServerInZone(server, zoneAndId.getZone());
   }

   @Override
   public ImageInZone getImage(String id) {
      ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
      Image image = novaApi.getImageApiForZone(zoneAndId.getZone()).get(zoneAndId.getId());
      return image == null ? null : new ImageInZone(image, zoneAndId.getZone());
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId

      return image == null ? null : new ImageInZone(image, zoneAndId.getZone());
   }

   @Override
   public void destroyNode(String id) {
      ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
      if (novaApi.getFloatingIPExtensionForZone(zoneAndId.getZone()).isPresent()) {
         try {
            removeFloatingIpFromNodeAndDeallocate.apply(zoneAndId);
         } catch (RuntimeException e) {
            logger.warn(e, "<< error removing and deallocating ip from node(%s): %s", id, e.getMessage());
         }
      }
      novaApi.getServerApiForZone(zoneAndId.getZone()).delete(zoneAndId.getId());
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId

      novaApi.getServerApiForZone(zoneAndId.getZone()).delete(zoneAndId.getId());
   }

   @Override
   public void rebootNode(String id) {
      ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
      novaApi.getServerApiForZone(zoneAndId.getZone()).reboot(zoneAndId.getId(), RebootType.HARD);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.