Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-09-11 Thread Andrea Turli
Closed #443. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/443#event-1840127835

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-09-11 Thread Andrea Turli
merger at [master](https://git1-us-west.apache.org/repos/asf?p=jclouds-labs.git;a=commit;h=a5dbf0065d8fa8cabcaf020b7c10fe2f7ccf8d6a) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-09-11 Thread Andrea Turli
thanks @nacx, merging it now -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/443#issuecomment-420501158

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-09-10 Thread Ignasi Barrera
Thanks, @andreaturli! I think we should merge this now and keep iterating on it. Thanks for all the effort! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-09-10 Thread Ignasi Barrera
nacx approved this pull request. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/443#pullrequestreview-153710254

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-31 Thread Andrea Turli
@andreaturli pushed 1 commit. 0673eb8 fix NPE in InstanceToNodeMetadata -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-27 Thread Andrea Turli
Re-run the live tests, slightly better Tests run: 55, Failures: 9, Errors: 0, Skipped: 6 `SshKeyPairApiLiveTest.testImport` - I'm afraid the API is broken `ECSComputeServiceLiveTest.testCorrectAuthException` returns `ResourceNotFoundException` instead of `AuthorizationException` not entirely

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-22 Thread Andrea Turli
here's the live tests result ``` Results : Failed tests: SshKeyPairApiLiveTest.testImport:58 » IllegalArgument {"RequestId":"4084B85E-D... ECSComputeServiceLiveTest.testCorrectAuthException » Test Method BaseComputeS...

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-22 Thread Andrea Turli
sorry again as this PR is becoming huge. @nacx I think I've addressed all of your comments now and I've also simplified the RetryHandler for 4xx errors I'm running the live tests to see the result, some of them are expected to fail though - particularly from `ECSComputeServiceLiveTest`. I'll

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-22 Thread Andrea Turli
andreaturli commented on this pull request. > +import org.jclouds.http.HttpRetryHandler; +import org.jclouds.http.HttpUtils; +import org.jclouds.http.annotation.ClientError; +import org.jclouds.http.handlers.BackoffLimitedRetryHandler; +import org.jclouds.json.Json; + +import

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-22 Thread Andrea Turli
andreaturli commented on this pull request. > + this.instanceSuspendedPredicate = instanceSuspendedPredicate; + this.regionIds = regionIds; + this.cleanupResources = cleanupResources; + } + + @Override + public NodeAndInitialCredentials

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-22 Thread Andrea Turli
andreaturli commented on this pull request. > + + public void testList() { + final AtomicInteger found = new AtomicInteger(0); + assertTrue(Iterables.all(api().list(Regions.EU_CENTRAL_1.getName()).concat(), new Predicate() { + @Override + public boolean

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-22 Thread Andrea Turli
andreaturli commented on this pull request. > + + public void testList() { + final AtomicInteger found = new AtomicInteger(0); + assertTrue(Iterables.all(api().list(Regions.EU_CENTRAL_1.getName()).concat(), new Predicate() { + @Override + public boolean apply(VPC

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-22 Thread Andrea Turli
andreaturli commented on this pull request. > + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-22 Thread Andrea Turli
andreaturli commented on this pull request. > + + final Image image = imageInRegionToImage.apply(ImageInRegion.create(Regions.EU_CENTRAL_1.getName(), ecsImage)); + assertEquals(ecsImage.id(), image.getProviderId()); + assertEquals(ecsImage.name(), image.getName()); +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-21 Thread Andrea Turli
@nacx it is a wip, so please don't bother to review it yet. I'll ping when I think it's ready for your review, ok? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-21 Thread Andrea Turli
@andreaturli pushed 2 commits. 2d991e1 wip 88d83f3 more comments addressed -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-21 Thread Andrea Turli
andreaturli commented on this pull request. > +// public String apply(Map.Entry input) { +//return String.format(PORT_RANGE_FORMAT, input.getKey(), input.getValue()); +// } +// })); +// +// for (SecurityGroup securityGroup :

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-19 Thread Andrea Turli
andreaturli commented on this pull request. > public class BaseECSComputeServiceApiLiveTest extends > BaseApiLiveTest { + protected static final String TEST_REGION = Regions.EU_CENTRAL_1.getName(); ok done -- You are receiving this because you are subscribed to this thread. Reply to

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-19 Thread Andrea Turli
andreaturli commented on this pull request. > @@ -23,6 +23,10 @@ @AutoValue public abstract class Tag { + public static final String DEFAULT_OWNER_KEY = "owner"; + public static final String DEFAULT_OWNER_VALUE = "jclouds"; + public static final String GROUP = "group"; not sure we

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-13 Thread Ignasi Barrera
nacx commented on this pull request. > @@ -50,7 +51,11 @@ public void handleError(HttpCommand command, HttpResponse > response) { break; case 401: case 403: -exception = new AuthorizationException(message, exception); +if

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-13 Thread Ignasi Barrera
nacx commented on this pull request. > +// public String apply(Map.Entry input) { +//return String.format(PORT_RANGE_FORMAT, input.getKey(), input.getValue()); +// } +// })); +// +// for (SecurityGroup securityGroup :

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-13 Thread Ignasi Barrera
nacx commented on this pull request. > + + public DependencyViolationException() { + super(); + } + + public DependencyViolationException(String arg0, Throwable arg1) { + super(arg0, arg1); + } + + public DependencyViolationException(String arg0) { + super(arg0); + }

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-10 Thread Andrea Turli
andreaturli commented on this pull request. > + + public abstract String description(); + + public abstract String regionId(); + + public abstract String status(); + + public abstract Map> userCidrs(); + + public abstract String vRouterId(); + + public abstract Map> vSwitchIds(); +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-10 Thread Andrea Turli
andreaturli commented on this pull request. > + checkTagsInNodeEquals(node, tags); + + getAnonymousLogger().info( + format("<< available node(%s) os(%s) in %ss", node.getId(), node.getOperatingSystem(), createSeconds)); + + watch.reset().start(); + +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-10 Thread Andrea Turli
andreaturli commented on this pull request. > + + public abstract Date creationTime(); + + public abstract String description(); + + public abstract String zoneId(); + + public abstract String status(); + + public abstract int availableIpAddressCount(); + + public abstract String

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-10 Thread Andrea Turli
andreaturli commented on this pull request. > + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-10 Thread Andrea Turli
andreaturli commented on this pull request. > +import org.jclouds.rest.annotations.RequestFilters; +import org.jclouds.rest.annotations.ResponseParser; +import org.jclouds.rest.annotations.Transform; + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton;

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-10 Thread Andrea Turli
@andreaturli pushed 1 commit. 801266b addressing more comments -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/443/files/3205bbfc559eeeda59f2f7994f1aa179d16057e0..801266bac92ae8d6c54cdec540b1860b95f8cb94

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-09 Thread Andrea Turli
@andreaturli pushed 1 commit. b2ce3b5 address some comments -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/443/files/b79a887eb460662edb19201977ae961f208dff88..b2ce3b5056c0330d747f04e85dfa815685422e4d

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-09 Thread Andrea Turli
andreaturli commented on this pull request. > + checkTagsInNodeEquals(node, tags); + + getAnonymousLogger().info( + format("<< available node(%s) os(%s) in %ss", node.getId(), node.getOperatingSystem(), createSeconds)); + + watch.reset().start(); + +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-09 Thread Ignasi Barrera
nacx requested changes on this pull request. > @@ -104,11 +117,39 @@ protected > CreateResourcesThenCreateNodes(CreateNodeWithGroupEncodedIntoName addN String regionId = template.getLocation().getId(); ECSServiceTemplateOptions options =

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-09 Thread Andrea Turli
andreaturli commented on this pull request. > } catch (Exception ex) { logger.warn(ex, "Error cleaning up resources for node %s", deadNode); } + + List securityGroups = cleanupResources.findOrphanedSecurityGroups(regionAndId.regionId(),

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-09 Thread Ignasi Barrera
nacx commented on this pull request. > } catch (Exception ex) { logger.warn(ex, "Error cleaning up resources for node %s", deadNode); } + + List securityGroups = cleanupResources.findOrphanedSecurityGroups(regionAndId.regionId(), deadNode.getGroup());

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-08 Thread Daniel Estévez
danielestevez commented on this pull request. > } catch (Exception ex) { logger.warn(ex, "Error cleaning up resources for node %s", deadNode); } + + List securityGroups = cleanupResources.findOrphanedSecurityGroups(regionAndId.regionId(),

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-08 Thread Andrea Turli
andreaturli commented on this pull request. > } catch (Exception ex) { logger.warn(ex, "Error cleaning up resources for node %s", deadNode); } + + List securityGroups = cleanupResources.findOrphanedSecurityGroups(regionAndId.regionId(),

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-08 Thread Daniel Estévez
danielestevez commented on this pull request. > } catch (Exception ex) { logger.warn(ex, "Error cleaning up resources for node %s", deadNode); } + + List securityGroups = cleanupResources.findOrphanedSecurityGroups(regionAndId.regionId(),

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-08 Thread Andrea Turli
andreaturli commented on this pull request. > } catch (Exception ex) { logger.warn(ex, "Error cleaning up resources for node %s", deadNode); } + + List securityGroups = cleanupResources.findOrphanedSecurityGroups(regionAndId.regionId(),

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-08 Thread Andrea Turli
andreaturli commented on this pull request. > } catch (Exception ex) { logger.warn(ex, "Error cleaning up resources for node %s", deadNode); } + + List securityGroups = cleanupResources.findOrphanedSecurityGroups(regionAndId.regionId(),

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-08 Thread Daniel Estévez
danielestevez commented on this pull request. > +import org.jclouds.rest.annotations.RequestFilters; +import org.jclouds.rest.annotations.ResponseParser; +import org.jclouds.rest.annotations.Transform; + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton;

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-08 Thread Daniel Estévez
danielestevez commented on this pull request. > } catch (Exception ex) { logger.warn(ex, "Error cleaning up resources for node %s", deadNode); } + + List securityGroups = cleanupResources.findOrphanedSecurityGroups(regionAndId.regionId(),

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-08 Thread Andrea Turli
andreaturli commented on this pull request. > } catch (Exception ex) { logger.warn(ex, "Error cleaning up resources for node %s", deadNode); } + + List securityGroups = cleanupResources.findOrphanedSecurityGroups(regionAndId.regionId(),

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-08 Thread Andrea Turli
@andreaturli pushed 4 commits. 701f36e add pagination to instanceStatus api 9dc04fb add network apis ebd1642 improve CreateResourcesThenCreateNodes b79a887 wip -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-06 Thread Ignasi Barrera
nacx commented on this pull request. > @@ -54,6 +46,7 @@ protected Properties setupProperties() { Properties properties = super.setupProperties(); vpcId = setIfTestSystemPropertyPresent(properties, provider + ".vpcId"); vSwitchId =

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-06 Thread Andrea Turli
andreaturli commented on this pull request. > @@ -54,6 +46,7 @@ protected Properties setupProperties() { Properties properties = super.setupProperties(); vpcId = setIfTestSystemPropertyPresent(properties, provider + ".vpcId"); vSwitchId =

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-06 Thread Andrea Turli
andreaturli commented on this pull request. > +@AutoValue +public abstract class EipAddress { + + EipAddress() { + } + + @SerializedNames({ "IpAddress", "AllocationId", "InternetChargeType" }) + public static EipAddress create(String ipAddress, String allocationId, String

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-06 Thread Andrea Turli
andreaturli commented on this pull request. > +// expect(serverApi.getServer(serverId)).andReturn(server); +// } +// +// private void applyWithExpectedErrorMessage(String expectedErrorMessage) { +// try { +// cleanupServer.apply(serverId); +// } catch

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-06 Thread Andrea Turli
andreaturli commented on this pull request. > @@ -54,6 +46,7 @@ protected Properties setupProperties() { Properties properties = super.setupProperties(); vpcId = setIfTestSystemPropertyPresent(properties, provider + ".vpcId"); vSwitchId =

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-06 Thread Andrea Turli
andreaturli commented on this pull request. > +annotations-java5 +RELEASE +compile + + +org.jetbrains +annotations-java5 +RELEASE +compile + + +org.jetbrains +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-06 Thread Ignasi Barrera
nacx requested changes on this pull request. > +annotations-java5 +RELEASE +compile + + +org.jetbrains +annotations-java5 +RELEASE +compile + + +org.jetbrains +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-05 Thread Andrea Turli
@andreaturli pushed 1 commit. 88d0852 address comments -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/443/files/39fef5305d6cdfb660ecee32244eba7e7f5f68b5..88d085280a99fcc7bb799721b873661fbb3feaeb

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Ignasi Barrera
nacx commented on this pull request. > + vSwitchId = setIfTestSystemPropertyPresent(properties, provider + > ".vSwitchId"); + return properties; + } + + @Override + protected TemplateBuilder templateBuilder() { + return super.templateBuilder() +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Ignasi Barrera
nacx commented on this pull request. > + this.instanceSuspendedPredicate = instanceSuspendedPredicate; + this.regionIds = regionIds; + this.cleanupResources = cleanupResources; + } + + @Override + public NodeAndInitialCredentials createNodeWithGroupEncodedIntoName(String

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
andreaturli commented on this pull request. > + vSwitchId = setIfTestSystemPropertyPresent(properties, provider + > ".vSwitchId"); + return properties; + } + + @Override + protected TemplateBuilder templateBuilder() { + return super.templateBuilder() +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
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

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
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 +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
andreaturli commented on this pull request. > + } else { +logger.warn(">> security group: (%s) has not been deleted.", securityGroupId); + } + } + + return instanceDeleted; + } + + private List getSecurityGroupIdsUsedByNode(RegionAndId regionAndId) {

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
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

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
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

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
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)

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
andreaturli commented on this pull request. > + @Override + public boolean apply(@Nullable InstanceType input) { +return contains(instanceTypeIds.build(), input.instanceTypeId()); + } + }).toList(); + +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
andreaturli commented on this pull request. > + transform(listLocations(), new Function() { + @Override + public String apply(Region location) { +return location.id(); + } + })); + + for (String

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
andreaturli commented on this pull request. > + for (String regionId : availableLocationNames) { + instanceTypeIds.addAll(getInstanceTypeId(regionId)); + } + + List instanceTypes = FluentIterable.from(api.instanceApi().listTypes()) + .filter(new Predicate()

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
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

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
andreaturli commented on this pull request. > + transform(listLocations(), new Function() { + @Override + public String apply(Region location) { +return location.id(); + } + })); + + for (String

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
andreaturli commented on this pull request. > +} + } + } + return instanceTypeIds; + } + + @Override + public Iterable listImages() { + final ImmutableList.Builder images = ImmutableList.builder(); + final List availableLocationNames = newArrayList(

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
andreaturli commented on this pull request. > + + InstanceRequest instanceRequest = api.instanceApi().create(regionId, imageId, securityGroupId, name, instanceType, + CreateInstanceOptions.Builder + .vSwitchId(vSwitchId) +

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-02 Thread Andrea Turli
andreaturli commented on this pull request. > + this.instanceSuspendedPredicate = instanceSuspendedPredicate; + this.regionIds = regionIds; + this.cleanupResources = cleanupResources; + } + + @Override + public NodeAndInitialCredentials

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-01 Thread Ignasi Barrera
nacx commented on this pull request. Thanks, @andreaturli! There are many comments but in general, it looks pretty good. Apart from the comments, we need proper tests for most of the things. Basically, every class in the `compute/functions` package needs to have a proper unit test. Also, add

[jclouds/jclouds-labs] [JCLOUDS-1430] Aliyun ECS (#443)

2018-08-01 Thread Andrea Turli
- add instance API - add compute abstraction You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds-labs/pull/443 -- Commit Summary -- * [JCLOUDS-1430] Aliyun ECS -- File Changes -- A aliyun-ecs/README.md (47) M