Re: [jclouds] JCLOUDS-973 Extending the sudo's configuration (#827)

2015-10-16 Thread Andrea Turli
thanks @nacx 

backport to 
[1.9.x](https://git1-us-west.apache.org/repos/asf?p=jclouds.git;a=commit;h=c6f2d846)


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/827#issuecomment-148671800

Re: [jclouds-site] add softlayer getting started (#174)

2015-11-10 Thread Andrea Turli
Thanks @nacx !

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/174#issuecomment-155386385

[jclouds-labs] add docker NetworkAPI (#221)

2015-11-10 Thread Andrea Turli
- bump api version to 1.21
- use `alpine/3.2` image for liveTests
- use `kwart/alpine-ext:3.2-ssh` image as ssh-able image
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * add docker NetworkAPI

-- File Changes --

M docker/README.md (4)
M docker/pom.xml (2)
M docker/src/main/java/org/jclouds/docker/DockerApi.java (8)
M docker/src/main/java/org/jclouds/docker/DockerApiMetadata.java (18)
M 
docker/src/main/java/org/jclouds/docker/compute/strategy/DockerComputeServiceAdapter.java
 (1)
A docker/src/main/java/org/jclouds/docker/domain/Network.java (105)
M docker/src/main/java/org/jclouds/docker/domain/NetworkSettings.java (175)
M docker/src/main/java/org/jclouds/docker/domain/State.java (17)
A docker/src/main/java/org/jclouds/docker/features/NetworkApi.java (100)
M 
docker/src/test/java/org/jclouds/docker/compute/BaseDockerApiLiveTest.java (5)
M 
docker/src/test/java/org/jclouds/docker/compute/DockerComputeServiceAdapterLiveTest.java
 (7)
M 
docker/src/test/java/org/jclouds/docker/compute/functions/ContainerToNodeMetadataTest.java
 (6)
M 
docker/src/test/java/org/jclouds/docker/config/DockerParserModuleTest.java (69)
M 
docker/src/test/java/org/jclouds/docker/features/ContainerApiLiveTest.java (9)
M 
docker/src/test/java/org/jclouds/docker/features/ContainerApiMockTest.java (2)
M docker/src/test/java/org/jclouds/docker/features/ImageApiLiveTest.java (3)
M docker/src/test/java/org/jclouds/docker/features/MiscApiLiveTest.java (12)
A docker/src/test/java/org/jclouds/docker/features/NetworkApiLiveTest.java 
(123)
A docker/src/test/java/org/jclouds/docker/features/NetworkApiMockTest.java 
(155)
M docker/src/test/java/org/jclouds/docker/parse/ContainerParseTest.java (45)
A docker/src/test/java/org/jclouds/docker/parse/NetworkParseTest.java (71)
A docker/src/test/java/org/jclouds/docker/parse/NetworksParseTest.java (97)
M docker/src/test/resources/container.json (270)
A docker/src/test/resources/network-creation.json (4)
A docker/src/test/resources/network.json (30)
A docker/src/test/resources/networks.json (56)

-- Patch Links --

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

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


Re: [jclouds-labs] add docker NetworkAPI (#221)

2015-11-10 Thread Andrea Turli
Using the following versions
```
$ docker version
Client:
 Version:  1.9.0
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   76d6bc9
 Built:Tue Nov  3 19:20:09 UTC 2015
 OS/Arch:  darwin/amd64

Server:
 Version:  1.9.0
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   76d6bc9
 Built:Tue Nov  3 19:20:09 UTC 2015
 OS/Arch:  linux/amd64
```

and starting from a clean docker host, this is the result of the liveTests

```
Results :

Tests run: 32, Failures: 0, Errors: 0, Skipped: 0
...
[INFO] BUILD SUCCESS
```

in ~1 minute.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#issuecomment-155462673

Re: [jclouds-labs] support docker api v1.18 (#174)

2015-11-10 Thread Andrea Turli
I think #221 supercedes this PR. @jbartece can you please look at it and report 
here, if #174 can be closed? Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/174#issuecomment-155463815

Re: [jclouds-labs] add docker NetworkAPI (#221)

2015-11-10 Thread Andrea Turli
unfortunately the failure is not related to this PR but to 
https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/927/org.apache.jclouds.labs$jdbc/

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#issuecomment-155475255

Re: [jclouds-labs] add docker NetworkAPI (#221)

2015-11-11 Thread Andrea Turli
>}
>  
>public Builder fromNetworkSettings(NetworkSettings in) {
>   return 
> this.ipAddress(in.ipAddress()).ipPrefixLen(in.ipPrefixLen()).gateway(in.gateway()).bridge(in.bridge())
> -   .portMapping(in.portMapping()).ports(in.ports());
> +   
> .portMapping(in.portMapping()).ports(in.ports()).sandboxId(in.sandboxId()).hairpinMode(in.hairpinMode()).linkLocalIPv6Address(in
> + 
> .linkLocalIPv6Address()).linkLocalIPv6PrefixLen(in.linkLocalIPv6PrefixLen()).sandboxKey(in.sandboxKey()).secondaryIPAddresses(in
> + 
> .secondaryIPAddresses()).secondaryIPv6Addresses(in.secondaryIPv6Addresses()).endpointId(in.endpointId()).globalIPv6Address(in
> + 
> .globalIPv6Address()).globalIPv6PrefixLen(in.globalIPv6PrefixLen()).ipv6Gateway(in.ipv6Gateway()).macAddress(in.macAddress())
> + .networks(in.networks());

completely agree! Next PRs will use the auto builders

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

Re: [jclouds-labs] add docker NetworkAPI (#221)

2015-11-11 Thread Andrea Turli
> +   public void testGetNetwork() {
> +  network = api().inspectNetwork(network.id());
> +  assertNotNull(network);
> +   }
> +
> +   @Test(dependsOnMethods = "testGetNetwork")
> +   public void testAttachContainerToNetwork() {
> +  api().connectContainerToNetwork(network.id(), container.id());
> +  Container foundContainer = 
> api.getContainerApi().inspectContainer(container.id());
> +  
> assertNotNull(Iterables.tryFind(foundContainer.networkSettings().networks().keySet(),
>  Predicates.equalTo(network.name())).orNull());
> +   }
> +
> +   @Test(dependsOnMethods = "testAttachContainerToNetwork")
> +   public void testDisconnectContainerFromNetwork() {
> +  api().disconnectContainerFromNetwork(network.id(), container.id());
> +  // TODO assertion

ops :)

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

Re: [jclouds-labs] add docker NetworkAPI (#221)

2015-11-11 Thread Andrea Turli
> +  assertNotNull(network);
> +  assertNotNull(network.id());
> +
> +   }
> +
> +   @Test(dependsOnMethods = "testCreateNetwork")
> +   public void testGetNetwork() {
> +  network = api().inspectNetwork(network.id());
> +  assertNotNull(network);
> +   }
> +
> +   @Test(dependsOnMethods = "testGetNetwork")
> +   public void testAttachContainerToNetwork() {
> +  api().connectContainerToNetwork(network.id(), container.id());
> +  Container foundContainer = 
> api.getContainerApi().inspectContainer(container.id());
> +  
> assertNotNull(Iterables.tryFind(foundContainer.networkSettings().networks().keySet(),
>  Predicates.equalTo(network.name())).orNull());

+1
thanks

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

Re: [jclouds-labs] add docker NetworkAPI (#221)

2015-11-11 Thread Andrea Turli
> +  container = api.getContainerApi().inspectContainer(container.id());
> +   }
> +
> +   @AfterClass
> +   protected void tearDown() {
> +  if (container != null) {
> + api.getContainerApi().stopContainer(container.id());
> + api.getContainerApi().removeContainer(container.id());
> +  }
> +  if (network != null) {
> + api().removeNetwork(network.id());
> +  }
> +   }
> +
> +   public void testCreateNetwork() throws IOException, InterruptedException {
> +  network = api().createNetwork(Network.create(NETWORK_NAME, null, null, 
> null, null, ImmutableMap. of(), 
> ImmutableMap. of()));

Not sure, maybe when I'll add auto value builders things will be easier?
I think there are a bunch of options:
- multiple Network.create() 
- `NetworkCreate` 
- Network.builder(). ... .build() using AutoValue builders
but maybe we should have some sort of guidelines.
wdyt?

Happy to solve it here or in a subsequent PR.

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

Re: [jclouds-labs] add docker NetworkAPI (#221)

2015-11-11 Thread Andrea Turli
> +
> +  try {
> + api.removeNetwork(networkId);
> + assertSent(server, "DELETE", "/networks/" + networkId);
> +
> +  } finally {
> + server.shutdown();
> +  }
> +   }
> +
> +   public void testConnectContainerToNetwork() throws Exception {
> +  MockWebServer server = mockWebServer(new 
> MockResponse().setResponseCode(200));
> +  NetworkApi api = api(DockerApi.class, 
> server.getUrl("/").toString()).getNetworkApi();
> +  try {
> + api.connectContainerToNetwork("1", "containerName");
> + assertSent(server, "POST", "/networks/1/connect");

I think I was using `@Produces` annotation in a wrong way as I had to use 
`@Headers` for `Content-Type` so I think it is now better. Sorry for the 
confusion!

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

Re: [jclouds-labs] add docker NetworkAPI (#221)

2015-11-11 Thread Andrea Turli
Thanks @nacx I think I'm done now, I hope :)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#issuecomment-155814158

Re: [jclouds-labs] add docker NetworkAPI (#221)

2015-11-13 Thread Andrea Turli
Thanks @nacx for the patience!

Merged at 
[master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/c57ac931)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#issuecomment-156470828

Re: [jclouds-labs] add docker NetworkAPI (#221)

2015-11-13 Thread Andrea Turli
Closed #221.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#event-463732998

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2015-11-17 Thread Andrea Turli
t;dr: I think I've fixed `AzureComputeServiceLiveTest#testListSizes` and 
`AzureComputeServiceContextLiveTest#testLaunchNodes` as @ilgrosso was 
suggesting.

Here the current situation for the entire `LiveTests` suite:

```
Tests run: 99, Failures: 3, Errors: 0, Skipped: 14, Time elapsed: 3,972.34 sec 
<<< FAILURE! - in TestSuite
testAddIpPermission(org.jclouds.azurecompute.compute.extensions.AzureComputeSecurityGroupExtensionLiveTest)
  Time elapsed: 10.993 sec  <<< FAILURE!
org.jclouds.http.HttpResponseException: command: PUT 
https://management.core.windows.net/341751b0-f348-45ce-9498-41cc68b4b45f/services/hostedservices/brooklyn-nwzrsw-yy-appli-ylsx-empty-mrro-39d/deployments/brooklyn-nwzrsw-yy-appli-ylsx-empty-mrro-39d/roles/brooklyn-nwzrsw-yy-appli-ylsx-empty-mrro-39d
 HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: [http://schemas.microsoft.com/windowsazure"; 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance";>BadRequestDuplicate
 input endpoint name(s) tcp_10-10 specified for role 
brooklyn-nwzrsw-yy-appli-ylsx-empty-mrro-39d.]
at 
org.jclouds.azurecompute.handlers.AzureComputeErrorHandler.handleError(AzureComputeErrorHandler.java:44)
at 
org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
at 
org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:136)
at 
org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:105)
at 
org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
at 
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
at 
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
at 
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
at 
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
at com.sun.proxy.$Proxy82.updateRole(Unknown Source)
at 
org.jclouds.azurecompute.compute.extensions.AzureComputeSecurityGroupExtension$6.operation(AzureComputeSecurityGroupExtension.java:267)
at 
org.jclouds.azurecompute.util.ConflictManagementPredicate.apply(ConflictManagementPredicate.java:120)
at 
org.jclouds.azurecompute.compute.extensions.AzureComputeSecurityGroupExtension.addIpPermission(AzureComputeSecurityGroupExtension.java:270)
at 
org.jclouds.compute.extensions.internal.BaseSecurityGroupExtensionLiveTest.testAddIpPermission(BaseSecurityGroupExtensionLiveTest.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at 
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:38)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

testCreateTwoNodesWithRunScript(org.jclouds.azurecompute.compute.AzureComputeServiceLiveTest)
  Time elapsed: 855.97 sec  <<< FAILURE!
org.jclouds.compute.RunNodesException: error running 2 nodes 
group(azurecompute-) location(West Europe) 
image(b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_1-LTS-amd64-server-20150123-en-us-30GB)
 size(BASIC_A1) options(AzureComputeTemplateOptions{virtualNetworkName=null, 
subnetNames=[], storageAccountName=jcloudsbchsfqegxc, storageAccountType=null, 
networkSecurityGroupName=null, reservedIPName=null})
Execution failures:

0 error[s]
Node failures:

1) RuntimeException on node azurecompute--f25:
java.lang.RuntimeException: 
org.jclouds.compute.callables.ScriptStillRunningException: time up waiting 600s 
for 
BlockUntilInitScriptStatusIsZeroThenReturnOutput{commandRunner=RunScr

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2015-11-18 Thread Andrea Turli
@ilgrosso yes indeed. The idea of this PR was not to fix all of the failing 
live tests but to simplify the usage of the templateOptions and to make 
virtualNetwork optional when provisioning a VM, I think.

I think we need to make sure that we can run those tests even in a 
non-completely clean environment, as problems like `Duplicate input endpoint 
...` may happen somewhere else, but I'm not sure we need to do it in this PR as 
it contains interesting enhancement IMHO that would be blocked otherwise. 



---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-157659442

Re: [jclouds-labs] support docker api v1.18 (#174)

2015-11-25 Thread Andrea Turli
close as #221 fix the same issues and has been already merged.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/174#issuecomment-159644092

Re: [jclouds-labs] support docker api v1.18 (#174)

2015-11-25 Thread Andrea Turli
Closed #174.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/174#event-474640206

Re: [jclouds] CloudStackComputeServiceAdapter static NAT change (#890)

2015-12-11 Thread Andrea Turli
+1 @Graeme-Miller, great work!
meriging now

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/890#issuecomment-163964018

Re: [jclouds] CloudStackComputeServiceAdapter static NAT change (#890)

2015-12-11 Thread Andrea Turli
Merged at 
[master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/75e2c699) and 
[1.9.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/36358bcc)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/890#issuecomment-163970174

Re: [jclouds] CloudStackComputeServiceAdapter static NAT change (#890)

2015-12-11 Thread Andrea Turli
Closed #890.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/890#event-489477134

Re: [jclouds-site] Added release notes for 1.9.2 (#176)

2016-01-16 Thread Andrea Turli
+1 thanks Ignasi

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/176#issuecomment-172240167

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-18 Thread Andrea Turli
@nacx I think we can merge it as it is a good step ahead although it needs some 
more work for the LiveTests which we can tackle in a subsequent PR, wdyt?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-172486974

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-18 Thread Andrea Turli
I think my best run with azurecompute was Failures: 5 Errors:0 Skipped: 0

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-172487960

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-18 Thread Andrea Turli
Closed #197.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#event-517768465

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-18 Thread Andrea Turli
Reopened #197.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#event-517768511

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-18 Thread Andrea Turli
@nacx I've squashed and rebased this. Good to merge?


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-172493267

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-20 Thread Andrea Turli
I will asap

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173218137

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-20 Thread Andrea Turli
Sorry not sure I'm following. Do I need to rebase this one?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173359730

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-20 Thread Andrea Turli
actually I did the same, waiting for the builder response now

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173381554

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-20 Thread Andrea Turli
Pushed to 
[master](https://git1-us-west.apache.org/repos/asf?p=jclouds-labs.git;a=commit;h=f9b393de)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173386290

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-20 Thread Andrea Turli
Closed #197.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#event-521028401

Re: [jclouds-labs] [JCLOUDS-981,JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#231)

2016-01-20 Thread Andrea Turli
Closed #231.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/231#event-521029543

Re: [jclouds-labs] [JCLOUDS-981,JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#231)

2016-01-20 Thread Andrea Turli
Thanks @kwart I've rebased and merged #197 which I think it is identical to 
yours now. 
Feel free to re-open in case I missed something, thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/231#issuecomment-173386550

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

2016-01-21 Thread Andrea Turli
Backported to 
[1.9.x](https://git1-us-west.apache.org/repos/asf?p=jclouds-labs.git;a=commit;h=a57446a1c4962f80d98e5b9728c66fea01a49c2f)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173527890

Re: [jclouds] Fix openstack nova when floating ips are not available (#860)

2016-01-21 Thread Andrea Turli
@nacx still good for merging?


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/860#issuecomment-173717563

Re: [jclouds] Fix openstack nova when floating ips are not available (#860)

2016-01-22 Thread Andrea Turli
Merged at 
[master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/a4a255fa)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/860#issuecomment-173874399

Re: [jclouds] Fix openstack nova when floating ips are not available (#860)

2016-01-22 Thread Andrea Turli
Closed #860.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/860#event-522786139

Re: [jira] [Commented] (JCLOUDS-664) Azure compute support

2016-01-22 Thread Andrea Turli
[~ritazh] I've seen your message on ML, thanks for that. That's pretty good
news! I don't think there is any ongoing effort to add ARM support so your
help would be much appreciated.
Feel free to ask questions/guidance on ML or IRC if you guys are keen to
start the implementation!

Il giorno ven 22 gen 2016 20:23 Rita Zhang (JIRA)  ha
scritto:

>
> [
> https://issues.apache.org/jira/browse/JCLOUDS-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15112912#comment-15112912
> ]
>
> Rita Zhang commented on JCLOUDS-664:
> 
>
> Thanks [~andreaturli]. I replied over there but I do not see it showing up
> in the thread. Just to be sure, I'm reposting it here. I am an open source
> engineer at Microsoft. We have couple of folks who can help out in getting
> the ARM implementation going. Before we dive into this, want to make sure
> we do not duplicate any ongoing efforts and that this is of an interest to
> the community.
>
> Thanks!
>
> > Azure compute support
> > -
> >
> > Key: JCLOUDS-664
> > URL: https://issues.apache.org/jira/browse/JCLOUDS-664
> > Project: jclouds
> >  Issue Type: New Feature
> >  Components: jclouds-compute, jclouds-labs
> >Affects Versions: 2.0.0
> >Reporter: Andrew Bayer
> >  Labels: azure
> > Fix For: 2.0.0
> >
> > Attachments: JCLOUDS-664.patch
> >
> >
> > So we've got a very old, very stale, very incomplete azure-management
> (a.k.a. compute) implementation in labs. Let's actually modernize and
> finish that thing. Azure is unquestionably the biggest cloud out there that
> we don't have viable support for, so it's a really useful target.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>


Re: [jclouds-labs] [JCLOUDS-1002] provide access to Docker container Config object in the Node template options (#240)

2016-02-22 Thread Andrea Turli
I think it gives a better control on the container spec and it is a 
semplification of the options as well. I agree with @nacx - *TemplateOptions 
couple with low-level features offered by the specific cloud so they dont need 
to be portable.
@gkrvlt any other thoughts?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/240#issuecomment-187373575

Re: [jclouds] fix for issue if SL machine has multiple credentials registered (#931)

2016-03-08 Thread Andrea Turli
lgtm, test passing. Thanks @ahgittin !

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/931#issuecomment-193794786

Re: [jclouds] fix for issue if SL machine has multiple credentials registered (#931)

2016-03-08 Thread Andrea Turli
Merged at 
[master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/d649c90d)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/931#issuecomment-193795526

Re: [jclouds] fix for issue if SL machine has multiple credentials registered (#931)

2016-03-08 Thread Andrea Turli
Closed #931.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/931#event-581757023

Re: [jclouds] fix for issue if SL machine has multiple credentials registered (#932)

2016-03-08 Thread Andrea Turli
Closed #932.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/932#event-581758335

Re: [jclouds] fix for issue if SL machine has multiple credentials registered (#932)

2016-03-08 Thread Andrea Turli
merged at 
[1.9.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/0248931c)
thanks @ahgittin 

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/932#issuecomment-193795850

Re: [jclouds] improve roll-back strategy when floating-ip are not available (b96c66d)

2016-03-14 Thread Andrea Turli
Sure sorry I've not noticed that. Thanks for heads-up!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/commit/b96c66dbceda360f8e75c95543d8940e3a540f7a#commitcomment-16690072

[jclouds] fix hpcloud compute adapter (#937)

2016-03-14 Thread Andrea Turli
this should fix 1.9.x branch given 
https://github.com/jclouds/jclouds/commit/b96c66dbceda360f8e75c95543d8940e3a540f7a#commitcomment-16676961
please @nacx can you review it?
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * fix hpcloud compute adapter

-- File Changes --

M 
providers/hpcloud-compute/src/main/java/org/jclouds/hpcloud/compute/HPCloudComputeServiceAdapter.java
 (6)

-- Patch Links --

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/937


Re: [jclouds] improve roll-back strategy when floating-ip are not available (b96c66d)

2016-03-14 Thread Andrea Turli
See https://github.com/jclouds/jclouds/pull/937

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/commit/b96c66dbceda360f8e75c95543d8940e3a540f7a#commitcomment-16691043

Re: [jclouds] fix hpcloud compute adapter (#937)

2016-03-15 Thread Andrea Turli
Merged at 
[1.9.x](https://git1-us-west.apache.org/repos/asf?p=jclouds.git;a=commit;h=47251f0e)

---
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/937#issuecomment-196707474

Re: [jclouds] fix hpcloud compute adapter (#937)

2016-03-15 Thread Andrea Turli
Closed #937.

---
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/937#event-589894680

Re: [jclouds-labs] Use non-privileged mode for compute (#248)

2016-03-19 Thread Andrea Turli
> @@ -109,7 +109,7 @@ public DockerComputeServiceAdapter(DockerApi api) {
>  
>   HostConfig.Builder hostConfigBuilder = HostConfig.builder()
>   .publishAllPorts(true)
> - .privileged(true);
> + .privileged(false);

probably better to add a property in the DockerTemplateOptions

---
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/248/files/b51b69b4e9e243d66a8390fdc4d628a5b904e5f5#r56723438

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
Great start @ritazh!
I plan to do a proper review shortly, but at a glance I'm really impressed by 
your contribution, in terms of code and documentation. Thanks!

---
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/250#issuecomment-201739683

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> +See the License for the specific language governing permissions and
> +limitations under the License.
> +
> +-->
> +http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> +
> +  4.0.0
> +  
> +org.apache.jclouds.labs
> +jclouds-labs
> +2.0.0-SNAPSHOT
> +  
> +
> +  
> +  azurecomputearm

maybe `azurecompute-arm` is more readable?

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514129

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +See the License for the specific language governing permissions and
> +limitations under the License.
> +
> +-->
> +http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> +
> +  4.0.0
> +  
> +org.apache.jclouds.labs
> +jclouds-labs
> +2.0.0-SNAPSHOT
> +  
> +
> +  
> +  azurecomputearm
> +  jclouds azure compute arm API

possibly ARM instead of arm as it is an acronym?

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514136

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +
> +  4.0.0
> +  
> +org.apache.jclouds.labs
> +jclouds-labs
> +2.0.0-SNAPSHOT
> +  
> +
> +  
> +  azurecomputearm
> +  jclouds azure compute arm API
> +  jclouds components to access an implementation of Azure's ARM 
> Compute Service
> +  bundle
> +
> +  
> +
> FIXME_subscription-id

if you decide to move to `azurecompute-arm` please edit those properties 
accordingly.

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514143

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +
> FIXME_subscription-id
> +
> FIXME_tenant-id
> +
> +
> https://management.azure.com/subscriptions/${test.jclouds.azurecomputearm.subscription-id}
> +
> 2014-04-01-preview
> +
> +
> /path/to/cert.p12
> +password to 
> cert
> +
> org.jclouds.azurecomputearm*;version="${project.version}"
> +
> org.jclouds*;version="${project.version}",*
> +  
> +
> +  
> +
> +  com.jamesmurty.utils
> +  java-xmlbuilder

is this still needed?

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514150

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + * 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, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.jclouds.azurecomputearm;

not entirely sure we want to use this package name. Something like 
`org.jclouds.azurecompute.arm` or `org.jclouds.azure.resourcemanager` may be 
more appropriate? no strong feelings though

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514168

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +
> +/**
> + * The Azure Resource Manager API is a REST API for managing your services 
> and deployments.
> + * 
> + *
> + * @see  href="https://msdn.microsoft.com/en-us/library/azure/dn790568.aspx"; >doc
> + */
> +public interface AzureComputeApi extends Closeable {
> +
> +   /**
> +* The Azure Resource Manager API includes operations for managing 
> resource groups in your subscription.
> +*
> +* @see  href="https://msdn.microsoft.com/en-us/library/azure/dn790546.aspx";>docs
> +*/
> +   @Delegate
> +   ResourceGroupApi getResourceGroupApi(@PathParam("subscriptionid") String 
> subscriptionid);

in `azurecompute` we started from the same idea, but we ended up with 
https://github.com/jclouds/jclouds-labs/blob/master/azurecompute/src/main/java/org/jclouds/azurecompute/AzureComputeProviderMetadata.java#L71
 where the SUBSCRIPTION_ID is part of the endpoint.
Do you think we should follow the same approach or you recommend a pathParam 
with the subscriptionId, for ARM?

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514190

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +  super(builder);
> +   }
> +
> +   public static class Builder extends BaseProviderMetadata.Builder {
> +
> +  protected Builder() {
> + super();
> +
> + id("azurecompute-arm")
> + .name("Azure Resource Management ")
> + .apiMetadata(new AzureManagementApiMetadata())
> + 
> .endpoint("https://management.azure.com/subscriptions/SUBSCRIPTION_ID";)
> + .homepage(URI.create("https://www.windowsazure.com/";))
> + 
> .console(URI.create("https://windows.azure.com/default.aspx";))
> + .linkedServices("azureblob", "azurequeue", "azuretable")
> + //.iso3166Codes(Region.iso3166Codes()) //TODO:LocationApi

don't commit commented code

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514196

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +   public abstract ResourceGroupProperties properties();
> +
> +   @SerializedNames({"id", "name", "location", "tags", "properties"})
> +   public static ResourceGroup create(String id, String name, String 
> location, HashMap tags, ResourceGroupProperties properties) {
> +  return new AutoValue_ResourceGroup(id, name, location, tags, 
> properties);
> +   }
> +
> +   public Builder toBuilder() {
> +  return builder().fromResourceGroup(this);
> +   }
> +
> +   public static Builder builder() {
> +  return new Builder();
> +   }
> +
> +   public static final class Builder {

notice since 1.1 Auto Value lib adds 
https://github.com/google/auto/tree/master/value#builders


---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514228

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +import org.jclouds.rest.annotations.SelectJson;
> +import org.jclouds.rest.annotations.Fallback;
> +import org.jclouds.rest.annotations.MapBinder;
> +import org.jclouds.rest.annotations.PayloadParam;
> +import org.jclouds.rest.annotations.PATCH;
> +import org.jclouds.rest.annotations.ResponseParser;
> +
> +
> +import org.jclouds.rest.binders.BindToJsonPayload;
> +
> +/**
> + * The Azure Resource Manager API includes operations for managing resource 
> groups in your subscription.
> + *
> + * @see  href="https://msdn.microsoft.com/en-us/library/azure/dn790546.aspx";>docs
> + */
> +@Path("/subscriptions/{subscriptionid}")

same as above: if we decide to pass the subscriptionId into the endpoint, then 
this will not be needed.

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514254

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +import org.jclouds.rest.binders.BindToJsonPayload;
> +
> +/**
> + * The Azure Resource Manager API includes operations for managing resource 
> groups in your subscription.
> + *
> + * @see  href="https://msdn.microsoft.com/en-us/library/azure/dn790546.aspx";>docs
> + */
> +@Path("/subscriptions/{subscriptionid}")
> +
> +@QueryParams(keys = "api-version", values = "2015-01-01")
> +@RequestFilters(OAuthFilter.class)
> +@Consumes(MediaType.APPLICATION_JSON)
> +public interface ResourceGroupApi extends Closeable{
> +
> +   @Named("resourcegroup:list")
> +   @Path("resourcegroups")

not entirely sure, but doesn't this need a leading slash?

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514268

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> + *
> + * @see  href="https://msdn.microsoft.com/en-us/library/azure/dn790546.aspx";>docs
> + */
> +@Path("/subscriptions/{subscriptionid}")
> +
> +@QueryParams(keys = "api-version", values = "2015-01-01")
> +@RequestFilters(OAuthFilter.class)
> +@Consumes(MediaType.APPLICATION_JSON)
> +public interface ResourceGroupApi extends Closeable{
> +
> +   @Named("resourcegroup:list")
> +   @Path("resourcegroups")
> +   @SelectJson("value")
> +   @GET
> +   @Fallback(EmptyListOnNotFoundOr404.class)
> +   List list();

I think this operation supports options. jclouds follows this pattern to 
support paginations and options. For an example see 
https://github.com/jclouds/jclouds/blob/master/providers/digitalocean2/src/main/java/org/jclouds/digitalocean2/features/DropletApi.java#L81-L116
 

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514378

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.jclouds.azurecomputearm.internal;
> +import static org.testng.Assert.assertNotNull;
> +
> +//import com.google.common.collect.ImmutableMap;
> +import org.jclouds.azurecomputearm.domain.ResourceGroup;
> +
> +//import org.testng.Assert;
> +import org.testng.annotations.AfterClass;
> +import org.testng.annotations.BeforeClass;
> +
> +//import java.util.Arrays;
> +import java.util.HashMap;
> +//import java.util.Map;

remove commented code

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514489

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +
> +  HashMap tags = new HashMap();
> +  tags.put("tagname1", "tagvalue1");
> +
> +  ResourceGroup resourceGroup = 
> api.getResourceGroupApi(subscriptionid).create("jcloudstest", "West US", 
> tags);
> +
> +  assertEquals(resourceGroup.name(), "jcloudstest");
> +  assertEquals(resourceGroup.location(), "westus");
> +  assertEquals(resourceGroup.tags().size(), 1);
> +  assertTrue(resourceGroup.id().contains("jcloudstest"));
> +
> +  assertEquals(server.getRequestCount(), 1);
> +  assertSent(server, "PUT", requestUrl + "/jcloudstest" + version, 
> String.format("{\"location\":\"%s\", \"tags\":{\"tagname1\":\"tagvalue1\"}}", 
> "West US"));
> +   }
> +
> +   public void testGetResourceGroup() throws InterruptedException {

I personally prefer something like 
https://github.com/jclouds/jclouds/blob/master/providers/digitalocean2/src/main/java/org/jclouds/digitalocean2/handlers/DigitalOcean2ErrorHandler.java#L38
 where the response is compared to the `new 
ResourceGroupParseTest().expected()`. This approach enhances readability of the 
test, `*ParseTest` tests the domain objects and adds good documentation to 
them. Wdyt?

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514480

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +   }
> +
> +   private void createResourceGroup(String name) {
> +  HashMap tags = new HashMap();
> +
> +  final ResourceGroup resourceGroup = 
> api.getResourceGroupApi(getSubscriptionId()).create(
> +  name, LOCATION, tags);
> +   }
> +
> +   private void deleteResourceGroup(String name) {
> +  api.getResourceGroupApi(getSubscriptionId()).delete(name);
> +   }
> +
> +   @BeforeClass
> +   @Override
> +   public void setup() {

I think this is not needed, remove it please.

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514487

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
> +  properties.setProperty(OPERATION_TIMEOUT, "6");
> +  properties.setProperty(OPERATION_POLL_INITIAL_PERIOD, "5");
> +  properties.setProperty(OPERATION_POLL_MAX_PERIOD, "15");
> +  properties.setProperty(TCP_RULE_FORMAT, "tcp_%s-%s");
> +  properties.setProperty(TCP_RULE_REGEXP, "tcp_\\d{1,5}-\\d{1,5}");
> +
> +  // for oauth
> +  AzureLiveTestUtils.defaultProperties(properties);
> +  checkNotNull(setIfTestSystemPropertyPresent(properties, 
> "jclouds.oauth.resource"), "test.jclouds.oauth.resource");
> +  checkNotNull(setIfTestSystemPropertyPresent(properties, 
> "oauth.endpoint"), "test.oauth.endpoint");
> +  return properties;
> +   }
> +
> +   @BeforeClass
> +   @Override
> +   public void setup() {

not needed, remote it please.

---
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/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514494

Re: [jclouds-labs] JCLOUDS-664 Azurecompute-arm ResourceGroupApi (#250)

2016-03-26 Thread Andrea Turli
Thanks @ritazh 

Some minor comments and suggestions, but other than those, great start!

I think we should just agree on the following:

- [ ] package names: `azurecomputearm` or `azure.compute.resourcemanager` or 
else?

---
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/250#issuecomment-201848027

Re: [jclouds-labs] Use non-privileged mode for compute (05a5eee)

2016-03-28 Thread Andrea Turli
Lgtm

---
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/commit/05a5eee84a5361081942945ed9ba51ff91fe30d3#commitcomment-16863080

Re: [jclouds/jclouds-labs] Added volumesFrom to Docker template options (#253)

2016-04-02 Thread Andrea Turli
>copyOf(exposedPorts), copyOf(securityOpts), hostConfig,
> -  copyOf(binds), copyOf(links), copyOf(lxcConf), 
> copyOf(portBindings), publishAllPorts, privileged,
> -  copyWithNullOf(dns), dnsSearch, volumesFrom, copyOf(capAdd), 
> copyOf(capDrop), copyOf(restartPolicy));
> +  copyWithNullOf(binds), copyWithNullOf(links), copyOf(lxcConf), 
> copyOf(portBindings), publishAllPorts, privileged,
> +  copyWithNullOf(dns), copyWithNullOf(dnsSearch), 
> copyWithNullOf(volumesFrom), copyWithNullOf(capAdd), copyWithNullOf(capDrop), 
> copyOf(restartPolicy));
> }
>  
> public static Builder builder() {

[minor] it would be nice to use Auto Value builder available since 1.1 
https://github.com/google/auto/tree/master/value#builders

---
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/253/files/b5561a412b212f2483520afd4eb6ac7e55cbb806#r58292799

Re: [jclouds/jclouds-labs] Added volumesFrom to Docker template options (#253)

2016-04-02 Thread Andrea Turli
> @@ -79,16 +78,16 @@ public Builder toBuilder() {
> public static final class Builder {

same here, see https://github.com/google/auto/tree/master/value#builders

---
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/253/files/b5561a412b212f2483520afd4eb6ac7e55cbb806#r58292812

Re: [jclouds/jclouds-labs] Added volumesFrom to Docker template options (#253)

2016-04-02 Thread Andrea Turli
thanks @grkvlt looks good, just a couple of minor comments

---
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/253#issuecomment-204708178

Re: [jclouds/jclouds-labs] Added volumesFrom to Docker template options (#252)

2016-04-02 Thread Andrea Turli
same comments as #252 
probably you don't need to create 2 PRs for master and 1.9.x but once master is 
merged you can certainly ask to backport it to 1.9.x. This way I think we 
reduce the number of PRs. 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/252#issuecomment-204708281

Re: [jclouds/jclouds-labs] Added volumesFrom to Docker template options (#253)

2016-04-04 Thread Andrea Turli
Sounds good to me. I'll take care of the builders later

---
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/253#issuecomment-205444612

Re: [jclouds/jclouds-labs] Added volumesFrom to Docker template options (#252)

2016-04-05 Thread Andrea Turli
thanks @grkvlt. Merged at 
[master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/31381953)

---
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/252#issuecomment-205718832

Re: [jclouds/jclouds-labs] Added volumesFrom to Docker template options (#252)

2016-04-05 Thread Andrea Turli
Closed #252.

---
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/252#event-614857839

Re: [jclouds/jclouds-labs] Added volumesFrom to Docker template options (#253)

2016-04-05 Thread Andrea Turli
Closed #253.

---
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/253#event-614859152

Re: [jclouds/jclouds-labs] Added volumesFrom to Docker template options (#253)

2016-04-05 Thread Andrea Turli
thanks @grkvlt, merged at 
[1.9.x](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/dbea9c3e)

---
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/253#issuecomment-205720340

Re: [jclouds/jclouds-labs-google] Implementation of password setting for windows (#170)

2016-04-07 Thread Andrea Turli
> + * In brief, the sequence is:
> + * 
> + *   Generate a temporary key for encrypting and decrypting the password
> + *   Send the RSA public key to the instance, by settings its metadata
> + *   Retrieve the result from the {@link SerialPortOutput}
> + *   Decode and decrypt the result.
> + * 
> + */
> +public class WindowsPasswordGenerator implements Function, 
> String> {
> +
> +   /**
> +* Indicates when the key should expire. Keys are one-time use, so the 
> metadata doesn't need to stay around for long.
> +* 10 minutes chosen to allow for differences between time on the client
> +* and time on the server.
> +*/
> +   private static final long EXPIRE_DURATION = 10 * 60 * 1000;

wouldn't be better to have a templateOptions for that?

---
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-google/pull/170/files/172e50d1a163c5ba80ed638cf9c7b25982ca204c#r58841126

Re: [jclouds/jclouds-labs-google] Implementation of password setting for windows (#170)

2016-04-07 Thread Andrea Turli
> +   userName = (String)params.get("userName");
> +   email = (String)params.get("email");
> +
> +  // TODO Check whether VM is up
> +  try {
> + // Generate the public/private key pair for encryption and 
> decryption.
> + // TODO do we need to explicitly set 2048 bits? Presumably "RSA" is 
> implicit
> + KeyPair keys = crypto.rsaKeyPairGenerator().genKeyPair();
> +
> + // Update instance's metadata with new "windows-keys" entry, and 
> wait for operation to 
> + // complete.
> + logger.debug("Generating windows key for instance %s, by updating 
> metadata", instance.get().name());
> + final InstanceApi instanceApi = api.instancesInZone(zone);
> + Metadata metadata = instance.get().metadata();
> + // If disableHtmlEscaping is not there, == will be escaped from 
> modulus value
> +  metadata.put("windows-keys", new 
> GsonBuilder().disableHtmlEscaping().create().toJson(extractKeyMetadata(keys)));

[minor] weird indentation

---
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-google/pull/170/files/172e50d1a163c5ba80ed638cf9c7b25982ca204c#r58841075

Re: [jclouds/jclouds-labs-google] Implementation of password setting for windows (#170)

2016-04-07 Thread Andrea Turli
> + logger.debug("Generating windows key for instance %s, by updating 
> metadata", instance.get().name());
> + final InstanceApi instanceApi = api.instancesInZone(zone);
> + Metadata metadata = instance.get().metadata();
> + // If disableHtmlEscaping is not there, == will be escaped from 
> modulus value
> +  metadata.put("windows-keys", new 
> GsonBuilder().disableHtmlEscaping().create().toJson(extractKeyMetadata(keys)));
> +
> + AtomicReference operation = 
> Atomics.newReference(instanceApi.setMetadata(instance.get().name(), 
> metadata));
> + operationDone.apply(operation);
> +
> + if (operation.get().httpErrorStatusCode() != null) {
> +logger.warn("Generating windows key for %s failed. Http Error 
> Code: %d HttpError: %s",
> +  operation.get().targetId(), 
> operation.get().httpErrorStatusCode(),
> +  operation.get().httpErrorMessage());
> + }
> +
> + TimeLimiter limiter = new SimpleTimeLimiter();

use a retry strategy like 
[this](https://github.com/jclouds/jclouds-labs/blob/master/azurecompute/src/main/java/org/jclouds/azurecompute/compute/AzureComputeServiceAdapter.java#L159-L177)

---
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-google/pull/170/files/172e50d1a163c5ba80ed638cf9c7b25982ca204c#r58841424

Re: [jclouds/jclouds-labs-google] Implementation of password setting for windows (#170)

2016-04-07 Thread Andrea Turli
> +Throwables.propagate(e);
> + }
> + serialPortContents = 
> instanceApi.getSerialPortOutput(instance.get().name(), 4).contents();
> + String[] contentEntries = 
> serialPortContents.split("\n");
> + passwordDict = new 
> Gson().fromJson(contentEntries[contentEntries.length - 1], Map.class);
> +  }
> +  return passwordDict.get("encryptedPassword");
> +   }
> +}, 5, TimeUnit.MINUTES, false); // Notice that timeoutDuration 
> should be less than EXPIRE_DURATION
> + } catch (Exception e) {
> +throw Throwables.propagate(e);
> + }
> +
> + return decryptPassword(checkNotNull(encryptedPassword, 
> "encryptedPassword shouldn't be null"), keys);
> +
> +  } catch (NoSuchAlgorithmException e) {

what's the benefit of multiple catches?

---
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-google/pull/170/files/172e50d1a163c5ba80ed638cf9c7b25982ca204c#r58841675

Re: [jclouds/jclouds-labs] JCLOUDS-664 Azurecompute-arm LocationApi (#256)

2016-04-12 Thread Andrea Turli
> + * This Azure Resource Manager API provides all of the locations that are 
> available for resource providers
> + * 
> + *
> + * @see  href="https://msdn.microsoft.com/en-US/library/azure/dn790540.aspx";>docs
> + */
> +@Path("/locations")
> +@RequestFilters(OAuthFilter.class)
> +@QueryParams(keys = "api-version", values = "2015-11-01")
> +@Produces(MediaType.APPLICATION_JSON)
> +@Consumes(MediaType.APPLICATION_JSON)
> +public interface LocationApi {
> +
> +   /**
> +* The List Locations operation lists all of the data center locations 
> that are valid for your subscription.
> +*/
> +   @Named("ListLocations")

[minor] jclouds tends to use "location:list" 

---
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/256/files/1552b1cc04701f6ec9c7eb1a90f91bf4bc5bf769#r59344511

Re: [jclouds/jclouds-labs] JCLOUDS-664 Azurecompute-arm LocationApi (#256)

2016-04-12 Thread Andrea Turli
> + */
> +package org.jclouds.azurecompute.arm.features;
> +
> +import org.jclouds.azurecompute.arm.domain.Location;
> +import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
> +import org.testng.annotations.Test;
> +
> +import static org.testng.Assert.assertTrue;
> +
> +@Test(groups = "live", testName = "LocationApiLiveTest")
> +public class LocationApiLiveTest extends BaseAzureComputeApiLiveTest {
> +
> +   @Test
> +   public void testList() {
> +  for (Location location : api().list()) {
> +  assertTrue(!location.id().isEmpty());

could you please add a "checkLocation(location);" where you assertNotNull on 
all the fields of Location?

---
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/256/files/1552b1cc04701f6ec9c7eb1a90f91bf4bc5bf769#r59344866

Re: [jclouds/jclouds-labs] JCLOUDS-664 Azurecompute-arm LocationApi (#256)

2016-04-12 Thread Andrea Turli
great job @ritazh 
only few minor comments from my side: please address them so we can merge this 
PR as well.

---
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/256#issuecomment-208812302

Re: [jclouds/jclouds-labs] JCLOUDS-664 Azurecompute-arm LocationApi (#256)

2016-04-13 Thread Andrea Turli
great! merging now, thanks @ritazh 

---
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/256#issuecomment-209278722

Re: [jclouds/jclouds-labs] JCLOUDS-664 Azurecompute-arm LocationApi (#256)

2016-04-13 Thread Andrea Turli
Closed #256.

---
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/256#event-625326123

Re: [jclouds/jclouds-labs] JCLOUDS-664 Azurecompute-arm LocationApi (#256)

2016-04-13 Thread Andrea Turli
merged at 
[master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/559fdecf)

---
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/256#issuecomment-209285813

Re: [jclouds/jclouds-labs-google] Support shortened hardwareId in GCE (#171)

2016-04-13 Thread Andrea Turli
wouldn't be easier just to edit the id built by 
[MachineTypeToHardware](https://github.com/jclouds/jclouds-labs-google/blob/1.9.x/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/MachineTypeToHardware.java#L58)
 ?

jclouds will list the hardwareProfiles and will transform it using the above 
function. Then the standard templateBuilder will compare the hardwareId with 
the list of harwareProfiles available and will find a match. wdyt? 

---
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-google/pull/171#issuecomment-209294837

Re: [jclouds/jclouds-labs-google] Implementation of password setting for windows (#170)

2016-04-26 Thread Andrea Turli
> @@ -173,6 +181,18 @@
>// Add lookup for InstanceToNodeMetadata
>diskToSourceImage.put(instance.get().disks().get(0).source(), 
> template.getImage().getUri());
>  
> +  boolean windows = options.autoCreateWindowsPassword() != null
> +   ? options.autoCreateWindowsPassword()
> +   : (OsFamily.WINDOWS == 
> template.getImage().getOperatingSystem().getFamily());

I think what @nacx means is that maybe you should simply remove this boolean 
windows and check at line 188 something like

```
if (options.autoCreateWindowsPassword() != null && OsFamily.WINDOWS == 
template.getImage().getOperatingSystem().getFamily() ) { ... }
```
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-google/pull/170/files/ae6a31bb0190a334fd4fa75a51e7b48ebbc15669#r61058283

Re: [jclouds/jclouds-labs-google] Implementation of password setting for windows (#170)

2016-04-26 Thread Andrea Turli
> @@ -0,0 +1 @@
> +org.jclouds.googlecomputeengine.GoogleComputeEngineApiMetadata

do we need to commit this file?

---
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-google/pull/170/files/96991e53462c8db314b277dcd332f66f6d602e3a#r61058487

Re: [jclouds/jclouds-labs-google] Implementation of password setting for windows (#170)

2016-04-27 Thread Andrea Turli
@nacx I think all of your comments have been addressed. good to merge it?


---
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-google/pull/170#issuecomment-215113790

Re: [jclouds/jclouds-labs] JCLOUDS-664 Azurecompute-arm VNetApi and SubnetApi (#262)

2016-04-27 Thread Andrea Turli
Great work @nacx and @ritazh.
@ritazh out of curiosity, do you have a rough idea on how many more PRs are 
needed to have a first usable azure-arm provider? Thanks

---
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/262#issuecomment-215178087

Re: [jclouds/jclouds-labs] JCLOUDS-664 Azurecompute-arm VNetApi and SubnetApi (#262)

2016-04-27 Thread Andrea Turli
Thx@ritazh

---
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/262#issuecomment-215310671

Re: [jclouds/jclouds] JCLOUDS-1105: Do not create the default security group if custom groups are specified (#947)

2016-05-02 Thread Andrea Turli
@nacx code looks sensible +1

I will keep this PR in mind if we need to revert/change the implementation 
later on, ok?

Thanks!

---
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/947#issuecomment-216151418

[jclouds/jclouds] [JCLOUDS-1108]: shorten hardwareId (#951)

2016-05-03 Thread Andrea Turli
This PR fixes https://issues.apache.org/jira/browse/JCLOUDS-1108 
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * [JCLOUDS-1108]: shorten hardwareId

-- File Changes --

M 
providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceAdapter.java
 (56)
M 
providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/MachineTypeToHardware.java
 (25)
M 
providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java
 (33)
M 
providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceMockTest.java
 (11)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/951.patch
https://github.com/jclouds/jclouds/pull/951.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/951


Re: [jclouds/jclouds] [JCLOUDS-1108]: shorten hardwareId (#951)

2016-05-04 Thread Andrea Turli
I think it is a nice-to-have but hard to achieve. I think short hardwareId will 
be enough, don't you think @bostko ?

---
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/951#issuecomment-216855320

Re: [jclouds/jclouds] [JCLOUDS-1108]: shorten hardwareId (#951)

2016-05-05 Thread Andrea Turli
@aledsage good points. Thanks for your comments.

Just a minor addition to what you said: if GCE CLI returns just simple names, I 
think we can return them and remove `uri` from `Hardware` so that 
`listHardwareProfiles` will be then consistent.

Makese sense @nacx, @aledsage, @bostko ?

---
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/951#issuecomment-217144114

Re: [jclouds/jclouds] [JCLOUDS-1108]: shorten hardwareId (#951)

2016-05-06 Thread Andrea Turli
Thanks @nacx and @aledsage for your interesting inputs to the conversation.

Let me step back for a moment, I think with this patch I'm trying to make the 
hardwareId independent of the `project` and `zone`, as GCE URI for MachineType 
looks like:
`https://www.googleapis.com/compute/v1/projects/jclouds-gce/zones/us-central1-a/machineTypes/f1-micro`.

My idea is to simplify the user experience: supplying a short hardwareId, one 
doesn't need to specify/remember the project + zone, but I understand @nacx  
when he said this approach may potentially "open the door to future issues, if 
the provider changes".

---
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/951#issuecomment-217399427

[jclouds/jclouds] update CloudstackTemplateOptions pattern (#956)

2016-05-19 Thread Andrea Turli

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

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

-- Commit Summary --

  * update CloudstackTemplateOptions pattern

-- File Changes --

M 
apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/options/CloudStackTemplateOptions.java
 (522)
M 
apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/strategy/CloudStackComputeServiceAdapter.java
 (3)
M 
apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/options/CloudStackTemplateOptionsTest.java
 (60)
M 
apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/strategy/OptionsConverterTest.java
 (26)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/956.patch
https://github.com/jclouds/jclouds/pull/956.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/956


<    7   8   9   10   11   12   13   14   15   16   >