nacx commented on this pull request.
> + vSwitchId = setIfTestSystemPropertyPresent(properties, provider +
> ".vSwitchId");
+ return properties;
+ }
+
+ @Override
+ protected TemplateBuilder templateBuilder() {
+ return super.templateBuilder()
+
nacx commented on this pull request.
> + this.instanceSuspendedPredicate = instanceSuspendedPredicate;
+ this.regionIds = regionIds;
+ this.cleanupResources = cleanupResources;
+ }
+
+ @Override
+ public NodeAndInitialCredentials
createNodeWithGroupEncodedIntoName(String
andreaturli commented on this pull request.
> + vSwitchId = setIfTestSystemPropertyPresent(properties, provider +
> ".vSwitchId");
+ return properties;
+ }
+
+ @Override
+ protected TemplateBuilder templateBuilder() {
+ return super.templateBuilder()
+
andreaturli commented on this pull request.
> @@ -92,4 +94,14 @@ public boolean apply(@Nullable String input) {
}), "Cannot starts with " + Iterables.toString(FORBIDDEN_PREFIX));
}
+ /**
+* This is strictly not needed but apparently tags with `-` can create a
problem when
andreaturli commented on this pull request.
> +
+ String securityGroupId = null;
+ if (!options.getGroups().isEmpty()) {
+ Iterable securityGroupNames =
api.securityGroupApi().list(location.getId()).concat().transform(new
Function() {
+@Override
+
andreaturli commented on this pull request.
> + } else {
+logger.warn(">> security group: (%s) has not been deleted.",
securityGroupId);
+ }
+ }
+
+ return instanceDeleted;
+ }
+
+ private List getSecurityGroupIdsUsedByNode(RegionAndId regionAndId)
{
andreaturli commented on this pull request.
> + if (hardware.isPresent()) {
+ builder.hardware(hardware.get());
+ } else {
+ logger.info(">> hardware with id %s for instance %s was not found. "
+ + "This might be because the image that was used
andreaturli commented on this pull request.
> +
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Objects;
+import org.jclouds.compute.options.TemplateOptions;
+
+import static com.google.common.base.Objects.equal;
+
+/**
+ * Custom options for the Alibaba Elastic
andreaturli commented on this pull request.
> + private final Supplier> hardwares;
+ private final Supplier> locations;
+ private final Function
toPortableStatus;
+ private final GroupNamingConvention groupNamingConvention;
+ @Resource @Named(ComputeServiceConstants.COMPUTE_LOGGER)
andreaturli commented on this pull request.
> + @Override
+ public boolean apply(@Nullable InstanceType input) {
+return contains(instanceTypeIds.build(),
input.instanceTypeId());
+ }
+ }).toList();
+
+
andreaturli commented on this pull request.
> + transform(listLocations(), new Function() {
+ @Override
+ public String apply(Region location) {
+return location.id();
+ }
+ }));
+
+ for (String
andreaturli commented on this pull request.
> + for (String regionId : availableLocationNames) {
+ instanceTypeIds.addAll(getInstanceTypeId(regionId));
+ }
+
+ List instanceTypes =
FluentIterable.from(api.instanceApi().listTypes())
+ .filter(new Predicate()
andreaturli commented on this pull request.
> +
+ for (String regionId : availableLocationNames) {
+ images.addAll(api.imageApi().list(regionId).concat());
+ }
+ return images.build();
+ }
+
+ @Override
+ public Image getImage(final String id) {
+ Optional
andreaturli commented on this pull request.
> + transform(listLocations(), new Function() {
+ @Override
+ public String apply(Region location) {
+return location.id();
+ }
+ }));
+
+ for (String
andreaturli commented on this pull request.
> +}
+ }
+ }
+ return instanceTypeIds;
+ }
+
+ @Override
+ public Iterable listImages() {
+ final ImmutableList.Builder images = ImmutableList.builder();
+ final List availableLocationNames = newArrayList(
andreaturli commented on this pull request.
> +
+ InstanceRequest instanceRequest = api.instanceApi().create(regionId,
imageId, securityGroupId, name, instanceType,
+ CreateInstanceOptions.Builder
+ .vSwitchId(vSwitchId)
+
andreaturli commented on this pull request.
> + this.instanceSuspendedPredicate = instanceSuspendedPredicate;
+ this.regionIds = regionIds;
+ this.cleanupResources = cleanupResources;
+ }
+
+ @Override
+ public NodeAndInitialCredentials
17 matches
Mail list logo