Package org.jclouds.aws.ec2.compute.domain

Examples of org.jclouds.aws.ec2.compute.domain.RegionAndName


      Location location = getLocationForAvailabilityZoneOrRegion(instance);
      builder.location(location);
      builder.imageId(instance.getRegion() + "/" + instance.getImageId());

      // extract the operating system from the image
      RegionAndName regionAndName = new RegionAndName(instance.getRegion(), instance.getImageId());
      try {
         Image image = imageMap.get().getUnchecked(regionAndName);
         if (image != null)
            builder.operatingSystem(image.getOperatingSystem());
      } catch (CacheLoader.InvalidCacheLoadException e) {
View Full Code Here


         @Override
         public RegionAndName apply(Image from) {
            checkState(from.getLocation() != null,
                     "in ec2, image locations cannot be null; typically, they are Region-scoped");
            return new RegionAndName(from.getLocation().getId(), from.getProviderId());
         }

      });
   }
View Full Code Here

               logger.debug("<< inUse keyPair(%s), by (%s)", keyPair.getKeyName(), instancesUsingKeyPair);
            } else {
               logger.debug(">> deleting keyPair(%s)", keyPair.getKeyName());
               client.getKeyPairApi().get().deleteKeyPairInRegion(region, keyPair.getKeyName());
               // TODO: test this clear happens
               credentialsMap.remove(new RegionAndName(region, keyPair.getKeyName()));
               credentialsMap.remove(new RegionAndName(region, group));
               logger.debug("<< deleted keyPair(%s)", keyPair.getKeyName());
            }
         }
      }
   }
View Full Code Here

            } catch (IllegalStateException e) {
               logger.debug("<< inUse incidentalResources(%s)", input);
               return false;
            }
         }
      }, SECONDS.toMillis(3), 50, 1000, MILLISECONDS).apply(new RegionAndName(region, group));
   }
View Full Code Here

      return credentials;
   }

   @VisibleForTesting
   String getPrivateKeyOrNull(RunningInstance instance) {
      KeyPair keyPair = credentialsMap.get(new RegionAndName(instance.getRegion(), instance.getKeyName()));
      return keyPair != null ? keyPair.getKeyMaterial() : null;
   }
View Full Code Here

   public NodeMetadata apply(NodeMetadata arg0) {
      String[] parts = AWSUtils.parseHandle(arg0.getId());
      String region = parts[0];
      String instanceId = parts[1];
      try {
         String publicIp = cache.get(new RegionAndName(region, instanceId));
         // Replace existing public addresses with elastic IP (see note above)
         return NodeMetadataBuilder.fromNodeMetadata(arg0)
                 .publicAddresses(ImmutableSet.<String> builder().add(publicIp).build()).build();
      } catch (CacheLoader.InvalidCacheLoadException e) {
         // no ip was found
View Full Code Here

                                                        new UserIdGroupPair(userId, groupName));
            }
         }
      }

      return getSecurityGroupById(new RegionAndName(region, group.getName()).slashEncode());
   }
View Full Code Here

                                                        new UserIdGroupPair(userId, groupName));
            }
         }
      }
     
      return getSecurityGroupById(new RegionAndName(region, group.getName()).slashEncode());
   }
View Full Code Here

                                                     new UserIdGroupPair(userId, groupName));
            }
         }
      }

      return getSecurityGroupById(new RegionAndName(region, group.getName()).slashEncode());
   }
View Full Code Here

                                                     new UserIdGroupPair(userId, groupName));
            }
         }
      }
     
      return getSecurityGroupById(new RegionAndName(region, group.getName()).slashEncode());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.aws.ec2.compute.domain.RegionAndName

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.