Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)

2014-10-21 Thread Daniel Estévez
  
 -   /**
 -* Specifies the name for the virtual machine. The name must be unique
 -* within Windows Azure.
 -*/
 -   private final String roleName;
 +   /** Specifies the name for the virtual machine. The name must be unique 
 within Windows Azure. */

Actually this is not true. Hosted Services name are unique in Azure (they're 
used for DNS) but VM role names are only unique inside the hosted/cloud service 
they're deployed in.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/92/files#r19132594

Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)

2017-02-16 Thread Daniel Estévez
@danielestevez pushed 1 commit.

c24e690  Changes log message


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/360/files/a79e560de96d32abaf8bf52a2b093bc39523687a..c24e690f26b4e3fae5b3663f129f8e4bdcfa20b7


Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)

2017-02-09 Thread Daniel Estévez
@danielestevez pushed 1 commit.

a79e560  Returns null image if node not found


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/360/files/7791b58e5791835f920b7c83cfc630821d1be402..a79e560de96d32abaf8bf52a2b093bc39523687a


Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)

2017-02-13 Thread Daniel Estévez
@danielestevez pushed 1 commit.

92d3336  Overrides tests


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/360/files/a79e560de96d32abaf8bf52a2b093bc39523687a..92d3336bc6fb3b2ff61b17c1a64ba1d5030dd7c2


Re: [jclouds/jclouds-labs] Adds new available Azure locations (#362)

2017-02-16 Thread Daniel Estévez
:up: Where did you get those locations info? 
https://azure.microsoft.com/en-ca/regions/ doesn't show them

-- 
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/362#issuecomment-280322460

Re: [jclouds/jclouds-labs] Adds new available Azure locations (#362)

2017-02-16 Thread Daniel Estévez
@danielestevez pushed 1 commit.

0442b71  Adds missing location code


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/362/files/13488ee3674dd22e1bcbef1c11c908042e10e96b..0442b7125cfbfe29612f7176663d7efc7a39fcb6


[jclouds/jclouds-labs] Adds new available Azure locations (#362)

2017-02-15 Thread Daniel Estévez
Returned by Location API but not whitelisted yet
reference https://azure.microsoft.com/en-ca/regions/
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/362

-- Commit Summary --

  * Adds new available Azure locations according to 
https://azure.microsoft.com/en-ca/regions/

-- File Changes --

M 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Region.java 
(6)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/362.patch
https://github.com/jclouds/jclouds-labs/pull/362.diff

-- 
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/362


[jclouds/jclouds-labs] Fixes error in availabilitySetName field (#361)

2017-02-15 Thread Daniel Estévez

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/361

-- Commit Summary --

  * Fixes error in availabilitySetName field

-- File Changes --

M 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/options/AzureTemplateOptions.java
 (8)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/361.patch
https://github.com/jclouds/jclouds-labs/pull/361.diff

-- 
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/361


[jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)

2017-02-09 Thread Daniel Estévez

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/360

-- Commit Summary --

  * Checks existence of node before getting SecurityGroups and Images

-- File Changes --

M 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java
 (3)
M 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/ResourceDefinitionToCustomImage.java
 (3)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/360.patch
https://github.com/jclouds/jclouds-labs/pull/360.diff

-- 
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/360


Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)

2017-02-17 Thread Daniel Estévez
@danielestevez pushed 1 commit.

fee81c5  Fixes missing log message


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/360/files/c24e690f26b4e3fae5b3663f129f8e4bdcfa20b7..fee81c55eff009ed917785036decd884ca105b50


Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)

2017-02-17 Thread Daniel Estévez
danielestevez commented on this pull request.



> @@ -123,8 +123,7 @@ public Image call() throws Exception {
 
 Image image = 
resourceDefinitionToImage.create(cloneTemplate.getSourceNodeId(), 
cloneTemplate.getName())
   .apply(definitions.get(0));
-checkState(image != null, "Image %s was not created for the 
requested node",
-  cloneTemplate.getSourceNodeId());
+checkState(image != null, "Image for node %s was not be created", 
cloneTemplate.getSourceNodeId());

oops, sorry

-- 
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/360#discussion_r101752563

Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)

2017-02-17 Thread Daniel Estévez
@danielestevez pushed 1 commit.

fe3a13b  Fixes log message again


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/360/files/fee81c55eff009ed917785036decd884ca105b50..fe3a13bd07d2927ab4f69c8e1ce8ee451c048857


Re: [jclouds/jclouds-labs] JCLOUDS-1254 Filters storage account by current available locations (#370)

2017-03-17 Thread Daniel Estévez
danielestevez commented on this pull request.



> @@ -16,10 +16,23 @@
  */
 package org.jclouds.azurecompute.arm.compute;
 
+import static com.google.common.base.Preconditions.checkState;
+import static com.google.common.collect.Iterables.contains;
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.find;
+import static com.google.common.collect.Iterables.getOnlyElement;
+import static 
org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtension.CONTAINER_NAME;
+import static 
org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtension.CUSTOM_IMAGE_OFFER;
+import static 
org.jclouds.azurecompute.arm.compute.functions.VMImageToImage.decodeFieldsFromUniqueId;
+import static 
org.jclouds.azurecompute.arm.compute.functions.VMImageToImage.encodeFieldsToUniqueIdCustom;
+import static 
org.jclouds.azurecompute.arm.compute.functions.VMImageToImage.getMarketplacePlanFromImageMetadata;
+import static 
org.jclouds.azurecompute.arm.config.AzureComputeProperties.IMAGE_PUBLISHERS;
+import static 
org.jclouds.compute.util.ComputeServiceUtils.metadataAndTagsAsCommaDelimitedValue;
+import static org.jclouds.util.Closeables2.closeQuietly;

My IDE is configured to put all static imports first. Not sure if there is an 
established style convention for this issue in jclouds.

-- 
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/370#pullrequestreview-27702778

[jclouds/jclouds-labs] JCLOUDS-1254 Filters storage account by current available locations (#370)

2017-03-17 Thread Daniel Estévez

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/370

-- Commit Summary --

  * JCLOUDS-1254 Filters storage account by current available locations

-- File Changes --

M 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java
 (42)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/370.patch
https://github.com/jclouds/jclouds-labs/pull/370.diff

-- 
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/370


Re: [jclouds/jclouds-labs] [JCLOUDS-1257] Initial support ManagedDataDisks (#372)

2017-03-20 Thread Daniel Estévez
danielestevez commented on this pull request.



> +   public void deleteImageResourceDoesNotExist() {
+  assertNull(api().delete(imageName));
+   }
+
+   @Test(dependsOnMethods = "deleteImageResourceDoesNotExist")
+   public void CreateVirtualMachineImageFromExistingVM() {
+  String id = 
String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachines/myVM",
 getSubscriptionId(), resourceGroupName);
+  ImageProperties properties = ImageProperties.builder()
+  
.sourceVirtualMachine(ImageProperties.SourceVirtualMachine.create(id))
+  .build();
+  Image image = api().createOrUpdate(imageName, LOCATION, properties);
+  assertTrue(stateReached("Succeeded"), "start operation did not complete 
in the configured timeout");
+  assertTrue(id.equals(image.properties().sourceVirtualMachine().id()));
+   }
+
+   @Test(dependsOnMethods = "CreateVirtualMachineImageFromExistingVM")

As i commented in devlist, we should also try to add thests for creating image 
from existing disk, blob or snapshot. Maybe later  but good to have TODOs for 
it here

-- 
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/372#pullrequestreview-27881265

Re: [jclouds/jclouds-labs] [JCLOUDS-1257] Initial support ManagedDataDisks (#372)

2017-03-20 Thread Daniel Estévez
danielestevez commented on this pull request.



> +import org.jclouds.rest.annotations.ResponseParser;
+import org.jclouds.rest.annotations.SelectJson;
+import org.jclouds.rest.binders.BindToJsonPayload;
+
+@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Compute/images")
+@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
+@Consumes(MediaType.APPLICATION_JSON)
+public interface ImageApi {
+
+   @Named("image:list")
+   @SelectJson("value")
+   @GET
+   @Fallback(EmptyListOnNotFoundOr404.class)
+   List list();
+
+   @Named("image:create_or_update")

I'm following this 
https://docs.microsoft.com/en-us/rest/api/manageddisks/images/images-create and 
it doesn't seem that you can update an image with this API, only update. Have 
you tried it?
i checked at least you can't change 'sourceVirtualMachine' to an existing Image 
and name can't be changed either

-- 
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/372#pullrequestreview-27880944

Re: [jclouds/jclouds-labs] Implements metrics and metricdefinitions API (#396)

2017-06-27 Thread Daniel Estévez
danielestevez commented on this pull request.



> +/**
+ *
+ */
+@AutoValue
+public abstract class MetricData {
+
+   /**
+* The timestamp for the metric value in ISO 8601 format.
+*/
+   public abstract Date timeStamp();
+
+   /**
+* The average value in the time range
+*/
+   @Nullable
+   public abstract String total();

Ok, we could get Double for all fields but i still think we should return a 
String as Azure API does. If we force Double for let's say "total" this could 
be ok for metrics in bytes (as Network In) but would make no sense for metrics 
with no decimals (like Disk Read Operations/Sec that is a smaller count that 
could be even Int)

Since jclouds will not do any calculations with these values i think we should 
return them as they are and let the user decide how to parse them.

Thoughts?

-- 
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/396#discussion_r124293765

Re: [jclouds/jclouds-labs] Implements metrics and metricdefinitions API (#396)

2017-06-27 Thread Daniel Estévez
@danielestevez pushed 1 commit.

d353bbc  Returns numeric data as Double/Long


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/396/files/9312229b35c40debb33e66e324958102348dc751..d353bbc22a9c5b3b8e074c3506d480b47c5bba48


Re: [jclouds/jclouds-labs] Implements metrics and metricdefinitions API (#396)

2017-06-26 Thread Daniel Estévez
@danielestevez pushed 1 commit.

9312229  Addresses comments by @nacx


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/396/files/44cd5b8fe62b6bae060b3995c438533cfc249dc2..9312229b35c40debb33e66e324958102348dc751


[jclouds/jclouds-labs] Fixes India regions to their actual name (#392)

2017-05-22 Thread Daniel Estévez

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/392

-- Commit Summary --

  * Fixes India regions to their actual name

-- File Changes --

M 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Region.java 
(6)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/392.patch
https://github.com/jclouds/jclouds-labs/pull/392.diff

-- 
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/392


Re: [jclouds/jclouds-labs] Implements metrics and metricdefinitions API (#396)

2017-06-16 Thread Daniel Estévez
danielestevez commented on this pull request.



> +* The metrics API includes operations to get insights into entities 
> within your
+* subscription.
+*
+* @see https://docs.microsoft.com/en-us/rest/api/monitor/metrics;>docs
+*/
+   @Delegate
+   MetricsApi getMetricsApi(@PathParam("resourceid") String resourceid);
+
+   /**
+* The metric definitions API includes operations to get insights available 
for entities within your
+* subscription.
+*
+* @see https://docs.microsoft.com/en-us/rest/api/monitor/metricdefinitions;>docs
+*/
+   @Delegate
+   MetricDefinitionsApi getMetricsDefinitionsApi(@PathParam("resourceid") 
String resourceid);

That was my original idea but they're two different APIs in Azure and therefore 
deal with different entities and api-versions so i thought it'd be more 
maintainable if we'd keep it that way

-- 
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/396#discussion_r122482133

Re: [jclouds/jclouds-labs] Implements metrics and metricdefinitions API (#396)

2017-06-16 Thread Daniel Estévez
danielestevez commented on this pull request.



> + * A Metric definition for a resource
+ */
+@AutoValue
+public abstract class MetricDefinition {
+
+   @Nullable
+   public abstract String resourceid();
+
+   public abstract MetricDefinition.MetricName name();
+
+   @Nullable
+   public abstract Boolean isDimensionRequired();
+
+   public abstract String unit();
+
+   public abstract String primaryAggregationType();

Correct. Will change to enum: None, Average, Count, Total, Minimum, Maximum 
seem to be the only possible values

-- 
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/396#discussion_r122482693

Re: [jclouds/jclouds-labs] Implements metrics and metricdefinitions API (#396)

2017-06-16 Thread Daniel Estévez
danielestevez commented on this pull request.



> +/**
+ *
+ */
+@AutoValue
+public abstract class MetricData {
+
+   /**
+* The timestamp for the metric value in ISO 8601 format.
+*/
+   public abstract Date timeStamp();
+
+   /**
+* The average value in the time range
+*/
+   @Nullable
+   public abstract String total();

It's a String according to Azure documentation but yes, i think we could get 
them as Double/Long. I'll test this

-- 
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/396#discussion_r122482583

[jclouds/jclouds-labs] Implements metrics and metricdefinitions API (#396)

2017-06-13 Thread Daniel Estévez
- https://docs.microsoft.com/en-us/rest/api/monitor/metrics
- https://docs.microsoft.com/en-us/rest/api/monitor/metricdefinitions
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/396

-- Commit Summary --

  * Implements metrics and metricdefinitions API

-- File Changes --

M 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeApi.java
 (20)
M 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadata.java
 (4)
A 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Metric.java 
(64)
A 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricData.java
 (72)
A 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricDefinition.java
 (90)
A 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApi.java
 (52)
A 
azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/MetricsApi.java
 (51)
A 
azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApiLiveTest.java
 (130)
A 
azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApiMockTest.java
 (62)
A 
azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricsApiLiveTest.java
 (142)
A 
azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricsApiMockTest.java
 (71)
A azurecompute-arm/src/test/resources/metricdefinitions.json (25)
A azurecompute-arm/src/test/resources/metrics.json (19)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/396.patch
https://github.com/jclouds/jclouds-labs/pull/396.diff

-- 
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/396


Re: [jclouds/jclouds] Removes check for group name when deleting (#1202)

2018-05-04 Thread Daniel Estévez
Checked again:

The problem happens when trying to security groups from nodes not created by 
jclouds and therefore, not respecting naming convention (using Upper case 
breaks 
[DnsNameValidator](https://github.com/danielestevez/jclouds/blob/9cdd53b0b7a87fa26a77b9ce370882f2a9cc7d71/core/src/main/java/org/jclouds/predicates/validators/DnsNameValidator.java#L55))

Now these security groups already existing in subscription will be ignored and 
only jclouds "implicit" created groups will be removed, as the original intent 
was.

-- 
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/pull/1202#issuecomment-386639937

Re: [jclouds/jclouds] JCLOUDS-1294: Attempt to retry RetryableErrors in Azure ARM (#1203)

2018-05-04 Thread Daniel Estévez
Well, i can confirm it fixes the failing tests :clap: 
I'll run the full suite of LiveTests to see if i find more problems

-- 
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/pull/1203#issuecomment-386736498

Re: [jclouds/jclouds] Removes check for group name when deleting (#1202)

2018-05-07 Thread Daniel Estévez
For the first point, i supposed it made sense to delete only those "implicit" 
orphaned groups created by jclouds, but it's true it'd delete groups from the 
subscription so adding a tag would make this process indeed more robust.

For the validator, i thought there was maybe a reason to use a valid DNS 
ruleset so i did'nt want to change this as a first fix. If you can confirm 
there is not such reason i will add a new Azure-compatible validator and run 
the tests again!


-- 
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/pull/1202#issuecomment-387071085

[jclouds/jclouds] Uses default password with conflictive characters (#1207)

2018-05-14 Thread Daniel Estévez

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1207

-- Commit Summary --

  * Uses default password with conflictive characters

-- File Changes --

M 
compute/src/test/java/org/jclouds/compute/callables/RunScriptOnNodeUsingSshTest.java
 (13)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1207.patch
https://github.com/jclouds/jclouds/pull/1207.diff

-- 
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/pull/1207


Re: [jclouds/jclouds] Uses default password with conflictive characters (#1207)

2018-05-14 Thread Daniel Estévez
cc @demobox 

-- 
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/pull/1207#issuecomment-388958574

Re: [jclouds/jclouds] Fixes Run SSH script for passwords with special characters (#1205)

2018-05-14 Thread Daniel Estévez
danielestevez commented on this pull request.



> @@ -103,7 +103,7 @@ public void simpleRootTestWithSudoPassword() {
   expect(sshClient.getUsername()).andReturn("tester");
   expect(sshClient.getHostAddress()).andReturn("somewhere.example.com");
   expect(
-sshClient.exec("sudo -S sh <<'RUN_SCRIPT_AS_ROOT_SSH'\n" + 
"testpassword!\n" + "echo $USER\n"
+sshClient.exec("sudo -S sh <<'RUN_SCRIPT_AS_ROOT_SSH'\n" + 
"'testpassword!'\n" + "echo $USER\n"

@demobox 
That line of code 
https://github.com/jclouds/jclouds/pull/1205#discussion-diff-187774732R118 is 
already covered in simpleRootTest and testUserAddAsRoot tests

This PR adds a conflictive password for all tests 
https://github.com/jclouds/jclouds/pull/1207


-- 
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/pull/1205#discussion_r188094382

Re: [jclouds/jclouds] Fixes Run SSH script for passwords with special characters (#1205)

2018-05-14 Thread Daniel Estévez
danielestevez commented on this pull request.



> @@ -112,7 +112,8 @@ protected ExecResponse runCommand(String command) {
public String execAsRoot(String command) {
   if (node.getCredentials().identity.equals("root")) {
   } else if (node.getCredentials().shouldAuthenticateSudo()) {
- command = String.format("sudo -S sh <<'%s'\n%s\n%s%s\n", MARKER, 
node.getCredentials().getOptionalPassword().get(), command, MARKER);
+ command = String.format("sudo -S sh <<'%s'\n'%s'\n%s%s\n", MARKER, 
node.getCredentials().getOptionalPassword
+   ().get(), command, MARKER);
   } else {
  command = String.format("sudo sh <<'%s'\n%s%s\n", MARKER, command, 
MARKER);

It shouldn't need one since the problem only happens when we submit a 
conflictive password

-- 
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/pull/1205#discussion_r188088462

[jclouds/jclouds] Fixes Run SSH script for passwords with special characters (#1205)

2018-05-11 Thread Daniel Estévez
Passwords can contain special characters as parentheses, password parameter 
should be wrapped in '' to avoid this syntax errors in SSH command
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1205

-- Commit Summary --

  * Fixes Run SSH script for passwords with special characters (as parentheses)

-- File Changes --

M 
compute/src/main/java/org/jclouds/compute/callables/RunScriptOnNodeUsingSsh.java
 (3)
M 
compute/src/test/java/org/jclouds/compute/callables/RunScriptOnNodeUsingSshTest.java
 (2)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1205.patch
https://github.com/jclouds/jclouds/pull/1205.diff

-- 
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/pull/1205


Re: [jclouds/jclouds] Fixes Run SSH script for passwords with special characters (#1205)

2018-05-11 Thread Daniel Estévez
It's just a sometimes since these kind of characters can be included in 
password random generator

https://github.com/danielestevez/jclouds/blob/9fef6ed06b027c1525579c88b58aa9f5833687fd/core/src/main/java/org/jclouds/util/PasswordGenerator.java#L65



-- 
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/pull/1205#issuecomment-388467721

[jclouds/jclouds] Increases session interval from 60 seconds to a higher value (#1206)

2018-05-11 Thread Daniel Estévez
To avoid problems with the cache, and specifically running the 
AzureComputeImageExtensionLiveTest suite.

ARM is quite slow and it takes usually more than one minute (default value) for 
certain operations. The testImageIsCachedAfterBeingCreated in that suite fails 
often since it takes longer than one minute to destroy the created node in 
testCreateImage and cache does not contain the image.

It should be safe to increase this value in the provider metadata. 5 minutes 
looks good but open to discuss

Would be good to add this also to 
https://github.com/danielestevez/jclouds/blob/83c0a3c7b255ec744c6150ce76c40e8301280c79/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/AzureLiveTestUtils.java
 ?


You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1206

-- Commit Summary --

  * Sets session interval from 60 seconds to a higher value to avoid problems 
with cache

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadata.java
 (1)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1206.patch
https://github.com/jclouds/jclouds/pull/1206.diff

-- 
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/pull/1206


Re: [jclouds/jclouds] Increases session interval from 60 seconds to a higher value (#1206)

2018-05-11 Thread Daniel Estévez
Sorry about that, fixed

-- 
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/pull/1206#issuecomment-388499413

Re: [jclouds/jclouds] Removes check for group name when deleting (#1202)

2018-05-04 Thread Daniel Estévez
Ok! I'll take a look at it again. 

When i tried it it was trying to remove a security group already existing in 
the user subscription, maybe the problem is there


-- 
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/pull/1202#issuecomment-386596221

Re: [jclouds/jclouds] JCLOUDS-1418: Add missing PowerState values (#1208)

2018-05-15 Thread Daniel Estévez
LGTM we need to cover these new states. :+1: 

-- 
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/pull/1208#issuecomment-389181232

Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-17 Thread Daniel Estévez
Good to know!
Then i guess it's again another problem with the caseInsensitive feature since 
i always try in one of the problematic regions **CanadaEast**
Will investigate further

-- 
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/pull/1210#issuecomment-389883645

Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-17 Thread Daniel Estévez
Some context about what @nacx is talking about 
https://stackoverflow.com/questions/50068324/azure-arm-api-returns-locations-with-inconsistent-case

It affects also other of the new regions (not only CanadaEast) and working on 
it we discovered some unrelated issues like this one with the default 
credentials. As a separate JIRA from the case insensitive support for this 
provider.


-- 
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/pull/1210#issuecomment-389909740

Re: [jclouds/jclouds] Fixes assert for IpPermissions collection (#1209)

2018-05-16 Thread Daniel Estévez
Fail!... and fixed!

-- 
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/pull/1209#issuecomment-389517489

[jclouds/jclouds] Fixes assert for IpPermissions collection (#1209)

2018-05-15 Thread Daniel Estévez
Azure does not return IpPermissions in order so this test fails randomly
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1209

-- Commit Summary --

  * Fixes assert for IpPermissions collection

-- File Changes --

M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtensionLiveTest.java
 (4)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1209.patch
https://github.com/jclouds/jclouds/pull/1209.diff

-- 
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/pull/1209


Re: [jclouds/jclouds] Removes check for group name when deleting (#1202)

2018-05-23 Thread Daniel Estévez
This simple validator should work https://github.com/jclouds/jclouds/pull/1213 
and we could close this PR

-- 
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/pull/1202#issuecomment-391501389

[jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-23 Thread Daniel Estévez

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1213

-- Commit Summary --

  * Adds new more relaxed validator for Azure entities

-- File Changes --

A 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzureNameValidator.java
 (61)
M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeHttpApiModule.java
 (5)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1213.patch
https://github.com/jclouds/jclouds/pull/1213.diff

-- 
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/pull/1213


Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-24 Thread Daniel Estévez
Added a test! (and fixed an error message by the way) with all the main cases i 
could think of @nacx 
Also, i added this class under _org.jclouds.azurecompute.arm.config.*_ not sure 
if it's the best place so feel free to suggest any other one

-- 
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/pull/1213#issuecomment-391841803

Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-16 Thread Daniel Estévez
danielestevez commented on this pull request.



> +  // Otherwise fallback to the image default credentials strategy
+  if (template instanceof CloneImageTemplate) {
+ final CloneImageTemplate cloneImageTemplate = (CloneImageTemplate) 
template;
+ future = Futures.transform(future, new Function() {
+@Override
+public Image apply(Image input) {
+   if (input.getDefaultCredentials() != null) {
+  return input;
+   }
+   Credentials nodeCredentials = credentialStore.get("node#" + 
cloneImageTemplate.getSourceNodeId());
+   if (nodeCredentials != null) {
+  logger.info(">> Adding node(%s) credentials to 
image(%s)...", cloneImageTemplate.getSourceNodeId(),
+cloneImageTemplate.getName());
+  return ImageBuilder.fromImage(input)
+
.defaultCredentials(LoginCredentials.fromCredentials(nodeCredentials)).build();
+   } else {

Remember to add this default credentials also for not CloneImageTemplate

-- 
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/pull/1210#pullrequestreview-120840206

Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-16 Thread Daniel Estévez
Tried and fixes the issues with the missing credentials in 
_testSpawnNodeFromImage_ :+1: 

However _testImageIsRemovedFromCacheAfterDeletion_ still fails it 
_testSpawnNodeFromImage_ is enabled but that's a different issue.

-- 
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/pull/1210#issuecomment-389683840

Re: [jclouds/jclouds] Removes check for group name when deleting (#1202)

2018-05-16 Thread Daniel Estévez
About this, i started to implement a custom validation for ARM here extending 
current interfaces
https://github.com/danielestevez/jclouds/commits/groupNamingValidation
Still not sure about the implementation, and specially naming but there it is 
if you want to take a look

-- 
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/pull/1202#issuecomment-389671765

[jclouds/jclouds] Fixes/adds fields primary for NetworkInterfaceCard (#1217)

2018-06-14 Thread Daniel Estévez
* Field 'primary' was missing in NetworkInterfaceCardProperties
* Field 'primary' was misplaced in IpConfiguration instead of 
IpConfigurationProperties

This causes problems when using the provider to configure multiple IPs per NIC 
and multiple NICs per VirtualMachine


Check 
https://docs.microsoft.com/en-us/rest/api/virtualnetwork/networkinterfaces/get#networkinterface
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1217

-- Commit Summary --

  * Fixes/adds fields primary for NetworkInterfaceCardProperties and misplaced 
in IpConfiguration

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IpConfiguration.java
 (13)
M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IpConfigurationProperties.java
 (22)
M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceCardProperties.java
 (19)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiLiveTest.java
 (12)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiMockTest.java
 (39)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineApiLiveTest.java
 (18)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApiLiveTest.java
 (32)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApiMockTest.java
 (31)
M 
providers/azurecompute-arm/src/test/resources/createnetworkinterfacecard.json 
(47)
M 
providers/azurecompute-arm/src/test/resources/getnetworkinterfacecard.json (3)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1217.patch
https://github.com/jclouds/jclouds/pull/1217.diff

-- 
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/pull/1217


[jclouds/jclouds] Adds minor improvements to readability (#1215)

2018-05-29 Thread Daniel Estévez
Based on suggestions by @demobox in original PR 
https://github.com/jclouds/jclouds/pull/1213
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1215

-- Commit Summary --

  * Adds minor improvements to readability

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzureNameValidator.java
 (15)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1215.patch
https://github.com/jclouds/jclouds/pull/1215.diff

-- 
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/pull/1215


[jclouds/jclouds] Checks network availability before working with created networks (#1214)

2018-05-29 Thread Daniel Estévez
This affected (at least) 
[AzureComputeImageExtensionLiveTest](https://github.com/jclouds/jclouds/blob/master/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeImageExtensionLiveTest.java)
 running in some regions. (worked in North/West Europe but failed consistently 
in CanadaEast)

This check will add some stability when running in different regions

(Unrelated> Is there a policy on ordering the imports?)
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1214

-- Commit Summary --

  * Checks network availability before working with recently created networks

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzurePredicatesModule.java
 (108)
M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodes.java
 (32)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodesTest.java
 (17)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1214.patch
https://github.com/jclouds/jclouds/pull/1214.diff

-- 
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/pull/1214


Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-29 Thread Daniel Estévez
Thanks for the suggestions @demobox, PR was already merged but i added those 
improvements here https://github.com/jclouds/jclouds/pull/1215

-- 
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/pull/1213#issuecomment-392917310

Re: [jclouds/jclouds] Adds minor improvements to readability (#1215)

2018-05-29 Thread Daniel Estévez
@danielestevez pushed 1 commit.

2fd4f07  changes exception text for readability


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1215/files/7a4b3a7adce354137ce13482cacc1bbab695b232..2fd4f076861632a5f68a3241a84db181115002c9


Re: [jclouds/jclouds] Adds minor improvements to readability (#1215)

2018-05-29 Thread Daniel Estévez
danielestevez commented on this pull request.



> @@ -54,7 +55,7 @@ private CharMatcher getAcceptableRange() {
 
protected IllegalArgumentException exception(String name, String reason) {
   return new IllegalArgumentException(
-String.format("Object '%s' doesn't match Azure naming constraints. 
" + "Reason: %s.", name,
+String.format("Object '%s' doesn't match Azure naming constraints. 
" + "Reason: %s", name,

:up: with no period

-- 
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/pull/1215#discussion_r191574178

Re: [jclouds/jclouds] Adds minor improvements to readability (#1215)

2018-05-30 Thread Daniel Estévez
I think so! I opened the PR against 2.1.x as in the previous one but @nacx will 
surely merge it to 2.1.x and master

-- 
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/pull/1215#issuecomment-393170081

[jclouds/jclouds] Implements VirtualMachineAPI deallocate operation (#1220)

2018-06-29 Thread Daniel Estévez
https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/deallocate
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1220

-- Commit Summary --

  * Implements VirtualMachineAPI deallocate operation

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualMachineApi.java
 (6)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineApiLiveTest.java
 (11)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1220.patch
https://github.com/jclouds/jclouds/pull/1220.diff

-- 
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/pull/1220


[jclouds/jclouds] Protects from NPE since SecurityGroup.getLocation() is nullable (#1201)

2018-05-03 Thread Daniel Estévez
Right now running the AzureComputeSecurityGroupExtensionLiveTest will fail with 
a NPE if you have any securityGroup in you subscription in any location not 
included in Set locations

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1201

-- Commit Summary --

  * Protects from NPE input.getLocation() is nullable

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java
 (2)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1201.patch
https://github.com/jclouds/jclouds/pull/1201.diff

-- 
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/pull/1201


[jclouds/jclouds] Removes check for group name when deleting (#1202)

2018-05-03 Thread Daniel Estévez
This currently fails if you use a securityGroup with Upper case letters in your 
subscription.
Naming check shouldn't be needed in a delete operation.
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1202

-- Commit Summary --

  * Removes check for group name when deleting

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java
 (5)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1202.patch
https://github.com/jclouds/jclouds/pull/1202.diff

-- 
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/pull/1202


[jclouds/jclouds] Adds new Generally Available azure locations for Australia and France (#1219)

2018-06-21 Thread Daniel Estévez

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1219

-- Commit Summary --

  * Adds new Generally Available azure locations for Australia and France

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Region.java
 (6)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1219.patch
https://github.com/jclouds/jclouds/pull/1219.diff

-- 
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/pull/1219


Re: [jclouds/jclouds] JCLOUDS-1436: Add support for aws ec2 m5 instance types (#1233)

2018-07-31 Thread Daniel Estévez
Isn't this the same PR as https://github.com/jclouds/jclouds/pull/1232 but with 
wrong checkstyle?

If i'm right, could you please close this one?

-- 
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/pull/1233#issuecomment-409387225

Re: [jclouds/jclouds] JCLOUDS-1387: Add support for c5 instance types in AWS ec2 (#1232)

2018-07-31 Thread Daniel Estévez
danielestevez approved this pull request.

Thanks @VRanga000 the code looks good for those new profiles!



-- 
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/pull/1232#pullrequestreview-142168312

Re: [jclouds/jclouds] JCLOUDS-1436: Add support for aws ec2 m5 instance types (#1233)

2018-07-31 Thread Daniel Estévez
Sorry! Got it now.
Please review the checkstyle since it seems to be breaking the build

-- 
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/pull/1233#issuecomment-409394722

Re: [jclouds/jclouds] JCLOUDS-1387: Add support for c5 instance types in AWS ec2 (#1232)

2018-08-01 Thread Daniel Estévez
Pushed to 
[master](https://github.com/jclouds/jclouds/commit/982c6bea0252689c23628079ab66998ac2a36aa9)
 and 
[2.1.x](https://github.com/jclouds/jclouds/commit/0ee68a5f836a654619a5bbf635e19e1d478f058e)!
 Thanks @VRanga000  !!

-- 
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/pull/1232#issuecomment-409726100

Re: [jclouds/jclouds] JCLOUDS-1436: Add support for aws ec2 m5 instance types (#1233)

2018-08-01 Thread Daniel Estévez
danielestevez 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/pull/1233#pullrequestreview-142542476

Re: [jclouds/jclouds] JCLOUDS-1387: Add support for c5 instance types in AWS ec2 (#1232)

2018-08-01 Thread Daniel Estévez
Closed #1232.

-- 
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/pull/1232#event-1766300928

Re: [jclouds/jclouds] JCLOUDS-1436: Add support for aws ec2 m5 instance types (#1233)

2018-08-01 Thread Daniel Estévez
Closed #1233.

-- 
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/pull/1233#event-1766308008

Re: [jclouds/jclouds] JCLOUDS-1436: Add support for aws ec2 m5 instance types (#1233)

2018-08-01 Thread Daniel Estévez
Pushed to 
[2.1.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/e54312aa) and 
[master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/cf672337) !!
Thanks @VRanga000 !!

-- 
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/pull/1233#issuecomment-409731274

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(), 
deadNode.getGroup());
+ for (SecurityGroup securityGroup : securityGroups) {
+logger.debug(">> destroying security group %s ...", 
securityGroup.id());
+if 
(cleanupResources.cleanupSecurityGroupIfOrphaned(regionAndId.regionId(), 
securityGroup.id())) {
+   logger.debug(">> security group: (%s) has been deleted.", 
securityGroup.id());
+} else {
+   logger.warn(">> security group: (%s) has not been deleted.", 
securityGroup.id());
+}
+ }
+
+ // FIXME not sure it is correct to always delete vSwitch and VPC

I can see an option to decide if jclouds would create AND delete resources 
needed for a deployment... something like a `invasive mode = on` but not sure 
about the implications.
Maybe as a different PR and keeping this with the automatic mode?

-- 
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#discussion_r208739432

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(), 
deadNode.getGroup());
+ for (SecurityGroup securityGroup : securityGroups) {
+logger.debug(">> destroying security group %s ...", 
securityGroup.id());
+if 
(cleanupResources.cleanupSecurityGroupIfOrphaned(regionAndId.regionId(), 
securityGroup.id())) {
+   logger.debug(">> security group: (%s) has been deleted.", 
securityGroup.id());
+} else {
+   logger.warn(">> security group: (%s) has not been deleted.", 
securityGroup.id());
+}
+ }
+
+ // FIXME not sure it is correct to always delete vSwitch and VPC

I don't see the value in having jclouds deleting VPCs that were not created by 
jclouds. We should always keep the resources created by the user by the 
provider API/Portal or 3rd party apps
What case of use would make sense here?

-- 
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#discussion_r208733508

Re: [jclouds/jclouds-site] draft release notes 2.1.1 (#217)

2018-08-10 Thread Daniel Estévez
danielestevez commented on this pull request.



> +* [JCLOUDS-1410] - SoftLayer cannot provision with private image
+* [JCLOUDS-1422] - LocalBlobStore.list ignores recursive flag when prefix set
+* [JCLOUDS-1427] - NPE when deserializing Elastic IPs that have tags
+* [JCLOUDS-1433] - IllegalArgumentException from Strings2.replaceTokens
+
+The complete list of fixed issues and improvements can be found 
[here](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12314430=12342884).
+
+##  Known Issues
+
+There are a number of open JIRA issues related to OpenStack endpoint and API 
version support: 
[JCLOUDS-114](https://issues.apache.org/jira/browse/JCLOUDS-114), 
[JCLOUDS-773](https://issues.apache.org/jira/browse/JCLOUDS-773) and 
[JCLOUDS-1197](https://issues.apache.org/jira/browse/JCLOUDS-1197). In 
particular, jclouds does not currently support OpenStack Keystone v3; the 
community is currently [actively working on that](https://s.apache.org/OSbY).
+
+## Credits
+
+jclouds would like to thank everyone who contributed time and effort in order 
to make this release happen:
+
+* [Daniel Estevez](https://github.com/danielestevez) for his contributions to 
the Azure ARM provider.

Then we should add 
https://github.com/jclouds/jclouds/issues?q=is%3Apr+author%3AVRanga000 for the 
EC2 new instance types and 
https://github.com/jclouds/jclouds/issues?q=is%3Apr+author%3Ajglick for the 
IllegalArgumentException fix in jclouds-core

-- 
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-site/pull/217#discussion_r209341229

Re: [jclouds/jclouds-site] draft release notes 2.1.1 (#217)

2018-08-15 Thread Daniel Estévez
danielestevez commented on this pull request.



> +## Credits
+
+jclouds would like to thank everyone who contributed time and effort in order 
to make this release happen:
+
+* [Vikas Rangarajan](https://github.com/VRanga000) for his contribution to the 
new instance types supported in the AWS ec2 provider.
+* [Jesse Glick](https://github.com/jglick) for the fix for AWS S3 signatures.
+* [Alix Lourme](https://github.com/axel3rd) for the Openstack Keystone V3 
domain configuration for projects.
+* [Daniel Estevez](https://github.com/danielestevez) for his contributions to 
the Azure ARM provider.
+* Apache jclouds 
[PMC](http://people.apache.org/committers-by-project.html#jclouds-pmc) and 
community for verifying the release.
+* Check out who has been busy on [Open 
Hub](https://www.openhub.net/p/jclouds/contributors?query==latest_commit).
+
+## Test Results
+
+Please see the discussion and the vote threads for live test results for 2.1.1:
+
+* RC1 [vote](https://s.apache.org/jclouds211rc1vote) and 
[discussion](https://s.apache.org/jclouds201rc1discuss) threads.

And it's done! Thanks @demobox for noticing

-- 
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-site/pull/217#discussion_r210279248

Re: [jclouds/jclouds-site] draft release notes 2.1.1 (#217)

2018-08-14 Thread Daniel Estévez
danielestevez commented on this pull request.



> +1. [Known Issues](#knownissues)
+1. [Credits](#credits)
+1. [Test Results](#test)
+
+## Introduction
+
+Apache jclouds 2.1.1 is the first bugfix release after jclouds 2.1 and comes 
with several bugfixes and performance improvements. 
+You can [read the official announcement 
here](https://s.apache.org/jclouds211). To get started with jclouds, please see 
the [jclouds installation guide](/start/install/).
+
+## Release Highlights
+
+Apache jclouds 2.1.1 new features include:
+
+* Add support for c5 and R4 instance types in AWS ec2.
+* Add the new Paris region to aws-ec2
+* Support different "domain" for "identity/user" and "project" in OpenStack 
Keystone V3

Not sure what should be the writing here, @demobox @andreaturli ? Is there a 
reference for this new feature?

-- 
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-site/pull/217#discussion_r210019530

Re: [jclouds/jclouds-site] draft release notes 2.1.1 (#217)

2018-08-10 Thread Daniel Estévez
danielestevez commented on this pull request.



> +1. [Introduction](#intro)
+1. [Release Highlights](#highlights)
+1. [Known Issues](#knownissues)
+1. [Credits](#credits)
+1. [Test Results](#test)
+
+## Introduction
+
+Apache jclouds 2.1.1 is the first bugfix release after jclouds 2.1 and comes 
with several bugfixes and performance improvements. 
+You can [read the official announcement 
here](https://s.apache.org/jclouds211). To get started with jclouds, please see 
the [jclouds installation guide](/start/install/).
+
+## Release Highlights
+
+Apache jclouds 2.1.1 new features include:
+
+* Add support for c5 and R4 instance types in AWS ec2.

Also m5 instance types were added but the JIRA 
(https://issues.apache.org/jira/browse/JCLOUDS-1436) fixVersion was wrong. I 
just updated it to 2.1.1
@demobox AWS docs use uppercase or lowercase, we should keep all lowercase imho

-- 
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-site/pull/217#discussion_r209263413

Re: [jclouds/jclouds-site] draft release notes 2.1.1 (#217)

2018-08-10 Thread Daniel Estévez
danielestevez commented on this pull request.



> +* [JCLOUDS-1410] - SoftLayer cannot provision with private image
+* [JCLOUDS-1422] - LocalBlobStore.list ignores recursive flag when prefix set
+* [JCLOUDS-1427] - NPE when deserializing Elastic IPs that have tags
+* [JCLOUDS-1433] - IllegalArgumentException from Strings2.replaceTokens
+
+The complete list of fixed issues and improvements can be found 
[here](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12314430=12342884).
+
+##  Known Issues
+
+There are a number of open JIRA issues related to OpenStack endpoint and API 
version support: 
[JCLOUDS-114](https://issues.apache.org/jira/browse/JCLOUDS-114), 
[JCLOUDS-773](https://issues.apache.org/jira/browse/JCLOUDS-773) and 
[JCLOUDS-1197](https://issues.apache.org/jira/browse/JCLOUDS-1197). In 
particular, jclouds does not currently support OpenStack Keystone v3; the 
community is currently [actively working on that](https://s.apache.org/OSbY).
+
+## Credits
+
+jclouds would like to thank everyone who contributed time and effort in order 
to make this release happen:
+
+* [Daniel Estevez](https://github.com/danielestevez) for his contributions to 
the Azure ARM provider.

Not sure how this section works but should it include anyone who contributed to 
the release? 

-- 
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-site/pull/217#pullrequestreview-145247438

Re: [jclouds/jclouds-site] draft release notes 2.1.1 (#217)

2018-08-14 Thread Daniel Estévez
@danielestevez pushed 1 commit.

a7a5604  Adds more JIRA issues fixed and mentions contributors


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-site/pull/217/files/7b33e7eab42bef7b2b68332fa8180d0551337ab0..a7a56048b32bb2cf056d7c3afa2e57dc72d6459d


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(), 
deadNode.getGroup());
+ for (SecurityGroup securityGroup : securityGroups) {
+logger.debug(">> destroying security group %s ...", 
securityGroup.id());
+if 
(cleanupResources.cleanupSecurityGroupIfOrphaned(regionAndId.regionId(), 
securityGroup.id())) {
+   logger.debug(">> security group: (%s) has been deleted.", 
securityGroup.id());
+} else {
+   logger.warn(">> security group: (%s) has not been deleted.", 
securityGroup.id());
+}
+ }
+
+ // FIXME not sure it is correct to always delete vSwitch and VPC

This is a similar case as this https://github.com/jclouds/jclouds/pull/1202 
(still unfinished) PR in ARM provider. 

Basically we should be able to identify if those VPC/vSwitch were created by 
the jclouds providers and delete them only if empty AND created by us. We use 
tags in the ARM to check this, is there anything similar in Aliyun API?

-- 
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#discussion_r208698367

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;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import java.beans.ConstructorProperties;
+import java.util.List;
+import java.util.Map;
+

Is there a documentation reference for this API?

-- 
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-144566565

Re: [jclouds/jclouds] JCLOUDS-1441: Enables support for ARM regions in China (#1237)

2018-09-04 Thread Daniel Estévez
@danielestevez pushed 1 commit.

4511cf1  Adds unit test for china oauth endpoint check


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1237/files/f1087b632942508f7b8281f1ae37e51bb143f557..4511cf13e810afa866290c8920f44f67b7302f67


Re: [jclouds/jclouds] JCLOUDS-1441: Enables support for ARM regions in China (#1237)

2018-09-04 Thread Daniel Estévez
@danielestevez pushed 1 commit.

f1087b6  Adapted Endpoints for APIs GraphRBAC and Vault


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1237/files/eef75b8bf50c56a365cb81be9a61694a29ffbedf..f1087b632942508f7b8281f1ae37e51bb143f557


Re: [jclouds/jclouds] JCLOUDS-1441: Enables support for ARM regions in China (#1237)

2018-09-06 Thread Daniel Estévez
Squashed and merged to 
[2.1.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/951b6b44) and 
[master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/a07ab5a9)

-- 
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/pull/1237#issuecomment-419123254

Re: [jclouds/jclouds] JCLOUDS-1441: Enables support for ARM regions in China (#1237)

2018-09-06 Thread Daniel Estévez
Closed #1237.

-- 
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/pull/1237#event-1830625159

[jclouds/jclouds] JCLOUDS-1441: Enables support for ARM regions in China (#1237)

2018-08-29 Thread Daniel Estévez
- Only one blocker hardcoded was fixed in AzureComputeHttpApiModule.java
- Endpoints for GraphAPI and VaultAPI are also hardcoded but we could deal with 
this as separate PRs (i couldn't make this work with Guice)
- Also added two new China regions to keep the plugin up to date.

Just with this and using the right credentials and oauth endpoint for the China 
regions i could run all the livetests (see Jira)
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1237

-- Commit Summary --

  * JCLOUDS-1441: Enables support for ARM regions in China

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeHttpApiModule.java
 (4)
M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/GraphRBAC.java
 (3)
M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Region.java
 (2)
M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VaultApi.java
 (122)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/config/ParseTenantIdTest.java
 (7)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/BaseAzureComputeApiLiveTest.java
 (3)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1237.patch
https://github.com/jclouds/jclouds/pull/1237.diff

-- 
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/pull/1237


[jclouds/jclouds] Adds listall methods to NetworkInterfaceCardApi and PublicIPAddressApi (#1225)

2018-07-09 Thread Daniel Estévez

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1225

-- Commit Summary --

  * Adds listAll to PublicIPAddressAPI
  * Adds listAll to NetworkInterfaceCardApi

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApi.java
 (16)
M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApi.java
 (16)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiLiveTest.java
 (6)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiMockTest.java
 (23)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiLiveTest.java
 (10)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiMockTest.java
 (45)
A providers/azurecompute-arm/src/test/resources/PublicIPAddressListAll.json 
(102)
A 
providers/azurecompute-arm/src/test/resources/listallnetworkinterfaces.json 
(100)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1225.patch
https://github.com/jclouds/jclouds/pull/1225.diff

-- 
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/pull/1225


Re: [jclouds/jclouds] Adds listall methods to NetworkInterfaceCardApi and PublicIPAddressApi (#1225)

2018-07-10 Thread Daniel Estévez
danielestevez commented on this pull request.



> @@ -119,6 +119,16 @@ public void listPublicIPAddresses() {
   assertTrue(ipList.size() > 0);
}
 
+   @Test(groups = "live", dependsOnMethods = "createPublicIPAddress")
+   public void listAllPublicIPAddresses() {

same :)


-- 
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/pull/1225#discussion_r201353593

Re: [jclouds/jclouds] Adds listall methods to NetworkInterfaceCardApi and PublicIPAddressApi (#1225)

2018-07-10 Thread Daniel Estévez
danielestevez commented on this pull request.



> @SelectJson("value")
@GET
@Fallback(EmptyListOnNotFoundOr404.class)
List list();
 
+   @Named("networkinterfacecard:list_all")
+   @Path("/providers/Microsoft.Network/networkInterfaces")
+   @SelectJson("value")
+   @GET
+   @Fallback(EmptyListOnNotFoundOr404.class)
+   List listAll();

Been thinking about this one... i like *listAll* since the path already has the 
subscription and requires no resourcegroup, so *listAll* is (obviously?) 
retrieving all the IPs in subscription.
However this led me to notice a bigger problem: to retrieve all Ips in 
subscription you're now required to provide a resourcegroupname just to get the 
reference this API and this makes no sense
 
https://github.com/danielestevez/jclouds/blob/00b6697d096b54a1f4dc6cbb6a308f91cb0728fc/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeApi.java#L118

I think we should remove the required *@PathParam("resourcegroup") String 
resourcegroup* in this case, but it looks like a big change... see any problem 
with this?

Same applies to the publicIpAddressApi

-- 
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/pull/1225#discussion_r201356587

Re: [jclouds/jclouds] Adds listall methods to NetworkInterfaceCardApi and PublicIPAddressApi (#1225)

2018-07-10 Thread Daniel Estévez
danielestevez commented on this pull request.



> +  String path = String
+
.format("/subscriptions/%s/providers/Microsoft.Network/networkInterfaces?%s", 
subscriptionid, apiVersion);
+
+  assertSent(server, "GET", path);
+  assertTrue(nicList.size() == 3);
+  assertTrue(nicList.get(0).properties().ipConfigurations().size() > 0);
+  
assertEquals(nicList.get(0).properties().ipConfigurations().get(0).properties().privateIPAllocationMethod(),
+"Dynamic");
+  assertTrue(nicList.get(1).properties().ipConfigurations().size() > 0);
+  
assertEquals(nicList.get(1).properties().ipConfigurations().get(0).properties().privateIPAllocationMethod(),
+"Static");
+  assertTrue(nicList.get(2).properties().ipConfigurations().size() > 0);
+  assertNotEquals(IdReference.extractResourceGroup(nicList.get(2).id()), 
resourcegroup);
+  
assertEquals(nicList.get(2).properties().ipConfigurations().get(0).properties().privateIPAllocationMethod(),
+"Static");
+   }

Forgot that one, sorry

-- 
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/pull/1225#discussion_r201353514

Re: [jclouds/jclouds] Adds listall methods to NetworkInterfaceCardApi and PublicIPAddressApi (#1225)

2018-07-10 Thread Daniel Estévez
danielestevez commented on this pull request.



> @@ -105,6 +105,12 @@ public void listNetworkInterfaceCards() {
   assertTrue(nicList.contains(api().get(nicName)));
}
 
+   @Test(dependsOnMethods = "createNetworkInterfaceCard")
+   public void listAllNetworkInterfaceCards() {

Good catch, that test could definitely fail.

-- 
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/pull/1225#discussion_r201353467

Re: [jclouds/jclouds] Adds listall methods to NetworkInterfaceCardApi and PublicIPAddressApi (#1225)

2018-07-10 Thread Daniel Estévez
@danielestevez pushed 3 commits.

ebf4a1c  Addresses comments on tests
4ce685a  Removes resourceGroup parameter from NetworkInterfaceCardApi
ca677c6  Removes resourceGroup parameter from PublicIPAddressApi


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1225/files/cb31ce999e3fc6ba20bff90e4b27c17a88aff5da..ca677c6844ded096d17908f6f8ec1493f51068ed


Re: [jclouds/jclouds] Adds listall methods to NetworkInterfaceCardApi and PublicIPAddressApi (#1225)

2018-07-10 Thread Daniel Estévez
danielestevez commented on this pull request.



> @SelectJson("value")
@GET
@Fallback(EmptyListOnNotFoundOr404.class)
List list();
 
+   @Named("networkinterfacecard:list_all")
+   @Path("/providers/Microsoft.Network/networkInterfaces")
+   @SelectJson("value")
+   @GET
+   @Fallback(EmptyListOnNotFoundOr404.class)
+   List listAll();

The Nullable solution seems the less intrusive solution for this case, i guess. 
Will do

-- 
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/pull/1225#discussion_r201480750

Re: [jclouds/jclouds] Adds listall methods to NetworkInterfaceCardApi and PublicIPAddressApi (#1225)

2018-07-10 Thread Daniel Estévez
Removed previous solution and added the optional/nullable resourcegroup 
parameter as solution! 

-- 
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/pull/1225#issuecomment-403970005

Re: [jclouds/jclouds] Adds listall methods to NetworkInterfaceCardApi and PublicIPAddressApi (#1225)

2018-07-10 Thread Daniel Estévez
danielestevez commented on this pull request.



> @SelectJson("value")
@GET
@Fallback(EmptyListOnNotFoundOr404.class)
List list();
 
+   @Named("networkinterfacecard:list_all")
+   @Path("/providers/Microsoft.Network/networkInterfaces")
+   @SelectJson("value")
+   @GET
+   @Fallback(EmptyListOnNotFoundOr404.class)
+   List listAll();

But in that 3rd option, the user is forced to pass a resource group he doesn't 
know anything about (it could even not exist) and that's very confusing

I added 2 commits with the changes to those APIs but i guess that breaks 
compatibility with clients and won't be accepted, right? I believe, however, 
it's the best way to go

-- 
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/pull/1225#discussion_r201461297

[jclouds/jclouds] Adds missing virtualMachine field to NetworkInterfaceCardProperties (#1229)

2018-07-11 Thread Daniel Estévez

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1229

-- Commit Summary --

  * Adds missing virtualMachine field to NetworkInterfaceCardProperties

-- File Changes --

M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceCardProperties.java
 (13)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiMockTest.java
 (2)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApiMockTest.java
 (3)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1229.patch
https://github.com/jclouds/jclouds/pull/1229.diff

-- 
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/pull/1229


[jclouds/jclouds] Adds method checkIpAvailability to VirtualNetworkApi (#1231)

2018-07-12 Thread Daniel Estévez
https://docs.microsoft.com/en-us/rest/api/virtualnetwork/virtualnetworks/checkipaddressavailability
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1231

-- Commit Summary --

  * Adds method checkIpAvailability to VirtualNetworkApi

-- File Changes --

A 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IpAddressAvailabilityResult.java
 (39)
M 
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApi.java
 (16)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApiLiveTest.java
 (76)
M 
providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApiMockTest.java
 (33)
A providers/azurecompute-arm/src/test/resources/ipavailable.json (3)
A providers/azurecompute-arm/src/test/resources/ipnotavailable.json (10)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1231.patch
https://github.com/jclouds/jclouds/pull/1231.diff

-- 
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/pull/1231


Re: [jclouds/jclouds] Adds method checkIpAvailability to VirtualNetworkApi (#1231)

2018-07-12 Thread Daniel Estévez
danielestevez commented on this pull request.



> @@ -73,4 +74,11 @@ VirtualNetwork 
> createOrUpdate(@PathParam("virtualnetworkname") String virtualnet
@DELETE
@ResponseParser(FalseOn204.class)
boolean delete(@PathParam("virtualnetworkname") String virtualnetworkname);
+
+   @Named("virtualnetwork:check_ip_address_availability")
+   @Path("/{virtualnetworkname}/CheckIPAddressAvailability")
+   @GET
+   @Fallback(NullOnNotFoundOr404.class)

Right there, the default should be enough

-- 
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/pull/1231#discussion_r202184355

Re: [jclouds/jclouds] Adds method checkIpAvailability to VirtualNetworkApi (#1231)

2018-07-12 Thread Daniel Estévez
danielestevez commented on this pull request.



> +   public void checkIpAvailable() throws InterruptedException {
+  server.enqueue(jsonResponse("/ipavailable.json"));
+
+  final VirtualNetworkApi vnApi = api.getVirtualNetworkApi(resourcegroup);
+  IpAddressAvailabilityResult checkResult = 
vnApi.checkIPAddressAvailability(virtualNetwork, ipAvailable);
+
+  String path = 
String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft"
+  + 
".Network/virtualNetworks/%s/CheckIPAddressAvailability?ipAddress=%s&%s", 
subscriptionid,
+resourcegroup,
+virtualNetwork, ipAvailable, apiVersion);
+  assertSent(server, "GET", path);
+  assertTrue(checkResult.available());
+  assertTrue(checkResult.availableIPAddresses().isEmpty());
+   }
+
+   public void checkIpNotAvailable() throws InterruptedException {

The point is that the response can change (has an extra field). Maybe the 
redundant one is the checkIpAvailable since that one only has one field?

-- 
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/pull/1231#discussion_r202193401

Re: [jclouds/jclouds] Adds method checkIpAvailability to VirtualNetworkApi (#1231)

2018-07-12 Thread Daniel Estévez
@danielestevez pushed 1 commit.

37ce4a7  Addresses @nacx comments


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1231/files/427fcdb34f6e8698e2c0ad218f65aac4a8964ef8..37ce4a7d29ad54d9b9436e668336bed07a998a7f


Re: [jclouds/jclouds] Adds method checkIpAvailability to VirtualNetworkApi (#1231)

2018-07-12 Thread Daniel Estévez
danielestevez commented on this pull request.



>  
   VirtualNetwork vn = api().createOrUpdate(virtualNetworkName, LOCATION, 
null, virtualNetworkProperties);
 
+  resourceAvailable.apply(new Supplier() {
+ @Override
+ public Provisionable get() {
+VirtualNetwork updated = api().get(virtualNetworkName);
+return updated == null ? null : updated.properties();
+ }
+  });

: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/pull/1231#discussion_r202185932

Re: [jclouds/jclouds] Adds method checkIpAvailability to VirtualNetworkApi (#1231)

2018-07-12 Thread Daniel Estévez
danielestevez commented on this pull request.



> + */
+package org.jclouds.azurecompute.arm.domain;
+
+import java.util.List;
+
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+import com.google.common.collect.ImmutableList;
+
+@AutoValue
+public abstract class IpAddressAvailabilityResult {
+   public abstract boolean available();
+
+   @Nullable

True, i should have removed this when added the null check in the `create`

-- 
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/pull/1231#discussion_r202185909

Re: [jclouds/jclouds] Adds method checkIpAvailability to VirtualNetworkApi (#1231)

2018-07-12 Thread Daniel Estévez
@danielestevez pushed 1 commit.

e71ce96  Fixed formatter maximum line width. Removed redundantTest


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1231/files/37ce4a7d29ad54d9b9436e668336bed07a998a7f..e71ce969ef1a6498cf323d75fa0e876d6b81c87a


Re: [jclouds/jclouds] Adds method checkIpAvailability to VirtualNetworkApi (#1231)

2018-07-12 Thread Daniel Estévez
Squashed and ready to merge, thanks @nacx  !

-- 
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/pull/1231#issuecomment-404673071

Re: [jclouds/jclouds] Implements VirtualMachineAPI deallocate operation (#1220)

2018-07-09 Thread Daniel Estévez
@danielestevez pushed 1 commit.

cb8881b  Adds missing mock test


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1220/files/b76a2b6ecf997e4214fa7990b3d58d1f1b095043..cb8881bbac7f8fc448acd59772c00891814d7cea


  1   2   >