Re: [jclouds/jclouds-labs] [JCLOUDS-1430] - add more features (#441)

2018-07-18 Thread Andrea Turli
@nacx I think I've addressed all of your comments except the ones for 
auto/value as I can't extend a @AutoValue class with a @AutoValue subclass

-- 
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/441#issuecomment-405881586

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] - add more features (#441)

2018-07-18 Thread Andrea Turli
@andreaturli pushed 1 commit.

03b7073  address comments


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/441/files/ad4dd9931e0b325f685d274509d99b7123957f46..03b707362be9d648ab9bdb89a409837f4a7ac748


Re: [jclouds/jclouds-labs] [JCLOUDS-1430] - add more features (#441)

2018-07-18 Thread Andrea Turli
andreaturli commented on this pull request.



> +  }
+   }
+
+   @Named("tag:add")
+   @POST
+   @QueryParams(keys = "Action", values = "AddTags")
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   Request add(@QueryParam("RegionId") String region, 
@QueryParam("ResourceId") String resourceId,
+@QueryParam("ResourceType") String resourceType,
+TagOptions tagOptions);
+
+   @Named("tag:remove")
+   @POST
+   @QueryParams(keys = "Action", values = "RemoveTags")
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   Request remove(@QueryParam("RegionId") String region,

I think so, I'll add a method with optional queryparams to remove one tag only

-- 
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/441#discussion_r203304904

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] - add more features (#441)

2018-07-18 Thread Andrea Turli
andreaturli commented on this pull request.



> +return new Function>() {
+   @Override
+   public IterableWithMarker apply(Object input) {
+  String regionId = arg0.get().toString();
+  ListTagsOptions listTagsOptions = 
ListTagsOptions.Builder.paginationOptions(PaginationOptions.class.cast(input));
+  return api.tagApi().list(regionId, listTagsOptions);
+   }
+};
+ }
+  }
+   }
+
+   @Named("tag:add")
+   @POST
+   @QueryParams(keys = "Action", values = "AddTags")
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)

ok

-- 
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/441#discussion_r203304737

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] - add more features (#441)

2018-07-18 Thread Andrea Turli
andreaturli commented on this pull request.



> +  static class ToPagedIterable extends 
> Arg0ToPagedIterable {
+
+ private final ECSComputeServiceApi api;
+
+ @Inject
+ ToPagedIterable(ECSComputeServiceApi api) {
+this.api = api;
+ }
+
+ @Override
+ protected Function> 
markerToNextForArg0(final Optional arg0) {
+return new Function>() {
+   @Override
+   public IterableWithMarker apply(Object input) {
+  String regionId = arg0.get().toString();
+  ListSecurityGroupsOptions listSecurityGroupsOptions = 
ListSecurityGroupsOptions.Builder.paginationOptions(PaginationOptions.class.cast(input));

ok refactored 

-- 
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/441#discussion_r203304329

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] - add more features (#441)

2018-07-18 Thread Andrea Turli
andreaturli commented on this pull request.



> +   @POST
+   @QueryParams(keys = "Action", values = "ImportKeyPair")
+   KeyPair importKeyPair(@QueryParam("RegionId") String region,
+ @QueryParam("PublicKeyBody") String publicKeyBody,
+ @QueryParam("KeyPairName") String keyPairName);
+
+   @Named("sshKeyPair:delete")
+   @POST
+   @QueryParams(keys = "Action", values = "DeleteKeyPairs")
+   Request delete(@QueryParam("RegionId") String region);
+
+   @Named("sshKeyPair:delete")
+   @POST
+   @QueryParams(keys = "Action", values = "DeleteKeyPairs")
+   Request delete(@QueryParam("RegionId") String region, DeleteKeyPairOptions 
deleteOptions);
+}

you mean `delete`? yes one or more. Have changed it as names are not optionals

-- 
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/441#discussion_r203304248

Re: [jclouds/jclouds-labs] [JCLOUDS-1430] - add more features (#441)

2018-07-18 Thread Andrea Turli
andreaturli commented on this pull request.



> +   @Named("sshKeyPair:create")
+   @POST
+   @QueryParams(keys = "Action", values = "CreateKeyPair")
+   KeyPairRequest create(@QueryParam("RegionId") String region, 
@QueryParam("KeyPairName") String keyPairName);
+
+   @Named("sshKeyPair:import")
+   @POST
+   @QueryParams(keys = "Action", values = "ImportKeyPair")
+   KeyPair importKeyPair(@QueryParam("RegionId") String region,
+ @QueryParam("PublicKeyBody") String publicKeyBody,
+ @QueryParam("KeyPairName") String keyPairName);
+
+   @Named("sshKeyPair:delete")
+   @POST
+   @QueryParams(keys = "Action", values = "DeleteKeyPairs")
+   Request delete(@QueryParam("RegionId") String region);

good point, this is useless. Removing

-- 
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/441#discussion_r203271177