protected Iterable<? extends RunningInstance> pollRunningInstances() { Iterable<? extends Set<? extends Reservation<? extends RunningInstance>>> reservations = transform(regions.get(), allInstancesInRegion()); return concat(concat(reservations)); }
protected Iterable<? extends RunningInstance> pollRunningInstancesByRegionsAndIds(final Multimap<String,String> idsByRegions) { Iterable<? extends Set<? extends Reservation<? extends RunningInstance>>> reservations = transform(idsByRegions.keySet(), instancesByIdInRegion(idsByRegions)); return concat(concat(reservations)); }
@Override public Set<? extends ComputeMetadata> listNodes() { return listDetailsOnNodesMatching(NodePredicates.all()); }
private Set<RunningInstance> createKeyPairAndSecurityGroupsAsNeededThenRunInstances(String group, int count, Template template) { String region = AWSUtils.getRegionFromLocationOrNull(template.getLocation()); String zone = getZoneFromLocationOrNull(template.getLocation()); RunInstancesOptions instanceOptions = createKeyPairAndSecurityGroupsAsNeededAndReturncustomize.execute(region, group, template); return createNodesInRegionAndZone(region, zone, group, count, template, instanceOptions); }
@Override public NodeMetadata destroyNode(String id) { String[] parts = AWSUtils.parseHandle(id); String region = parts[0]; String instanceId = parts[1]; // TODO: can there be multiple? releaseAnyPublicIpForInstanceInRegion(instanceId, region); destroyInstanceInRegion(instanceId, region); return getNode.getNode(id); }
@Test public void testZoneAsALocation() { assertRegionAndZoneForLocation(ZONE_AP_SOUTHEAST_1A, "ap-southeast-1", "ap-southeast-1a"); }
private Set<RunningInstance> createKeyPairAndSecurityGroupsAsNeededThenRunInstances(String group, int count, Template template) { String region = AWSUtils.getRegionFromLocationOrNull(template.getLocation()); String zone = getZoneFromLocationOrNull(template.getLocation()); RunInstancesOptions instanceOptions = createKeyPairAndSecurityGroupsAsNeededAndReturncustomize.execute(region, group, template); return createNodesInRegionAndZone(region, zone, group, count, template, instanceOptions); }
@Override public NodeMetadata destroyNode(String id) { String[] parts = AWSUtils.parseHandle(id); String region = parts[0]; String instanceId = parts[1]; // TODO: can there be multiple? releaseAnyPublicIpForInstanceInRegion(instanceId, region); destroyInstanceInRegion(instanceId, region); return getNode.getNode(id); }
@Override public Set<? extends ComputeMetadata> listNodes() { return listDetailsOnNodesMatching(NodePredicates.all()); }
@Test public void testRegionAsALocation() { assertRegionAndZoneForLocation(REGION_AP_SOUTHEAST_1, "ap-southeast-1", null); }
private Set<RunningInstance> createKeyPairAndSecurityGroupsAsNeededThenRunInstances(String group, int count, Template template) { String region = AWSUtils.getRegionFromLocationOrNull(template.getLocation()); String zone = getZoneFromLocationOrNull(template.getLocation()); RunInstancesOptions instanceOptions = createKeyPairAndSecurityGroupsAsNeededAndReturncustomize.execute(region, group, template); return createNodesInRegionAndZone(region, zone, group, count, template, instanceOptions); }
@Override public NodeMetadata destroyNode(String id) { String[] parts = AWSUtils.parseHandle(id); String region = parts[0]; String instanceId = parts[1]; // TODO: can there be multiple? releaseAnyPublicIpForInstanceInRegion(instanceId, region); destroyInstanceInRegion(instanceId, region); return getNode.getNode(id); }
@Override public Set<? extends ComputeMetadata> listNodes() { return listDetailsOnNodesMatching(NodePredicates.all()); }
@Test public void testZoneAsALocation() { assertRegionAndZoneForLocation(ZONE_AP_SOUTHEAST_1A, "ap-southeast-1", "ap-southeast-1a"); }
private Set<RunningInstance> createKeyPairAndSecurityGroupsAsNeededThenRunInstances(String group, int count, Template template) { String region = AWSUtils.getRegionFromLocationOrNull(template.getLocation()); String zone = getZoneFromLocationOrNull(template.getLocation()); RunInstancesOptions instanceOptions = createKeyPairAndSecurityGroupsAsNeededAndReturncustomize.execute(region, group, template); return createNodesInRegionAndZone(region, zone, group, count, template, instanceOptions); }
@Override public NodeMetadata destroyNode(String id) { String[] parts = AWSUtils.parseHandle(id); String region = parts[0]; String instanceId = parts[1]; // TODO: can there be multiple? releaseAnyPublicIpForInstanceInRegion(instanceId, region); destroyInstanceInRegion(instanceId, region); return getNode.getNode(id); }
@Override public Set<? extends ComputeMetadata> listNodes() { return listDetailsOnNodesMatching(NodePredicates.all()); }
@Test public void testRegionAsALocation() { assertRegionAndZoneForLocation(REGION_AP_SOUTHEAST_1, "ap-southeast-1", null); }
private Set<RunningInstance> createKeyPairAndSecurityGroupsAsNeededThenRunInstances(String group, int count, Template template) { String region = AWSUtils.getRegionFromLocationOrNull(template.getLocation()); String zone = getZoneFromLocationOrNull(template.getLocation()); RunInstancesOptions instanceOptions = createKeyPairAndSecurityGroupsAsNeededAndReturncustomize.execute(region, group, template); return createNodesInRegionAndZone(region, zone, group, count, template, instanceOptions); }
@Override public Set<? extends ComputeMetadata> listNodes() { return listDetailsOnNodesMatching(NodePredicates.all()); }