Re: [jclouds/jclouds-labs] JCLOUDS-1181 oneandone-vpn-api (#319)

2016-09-27 Thread alibazlamit
alibazlamit commented on this pull request.



> +import com.google.inject.TypeLiteral;
+import java.io.ByteArrayInputStream;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.zip.ZipInputStream;
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import org.apache.jclouds.oneandone.rest.domain.VPNConfig;
+import org.jclouds.http.functions.ParseJson;
+import org.jclouds.json.Json;
+
+@Singleton
+public class VPNConfigParser extends ParseJson {
+
+   @Inject
+   public VPNConfigParser(Json json) {

I tried removing the parser class that create an error it could not parse the 
JSON correctly for a reason so i decided to leave it like this, i have removed 
the public modifier and pushed the change. 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/319

Re: [jclouds/jclouds-labs] JCLOUDS-1181 oneandone-vpn-api (#319)

2016-09-27 Thread alibazlamit
@alibazlamit pushed 1 commit.

426a288  remove public constructor


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/319/files/4331e099037b24edea158bfa3d20228c9c39035d..426a288b57f1de9a554568766ebd966399ab0d39


Re: [jclouds/jclouds-labs] fix azure-arm features live tests (#317)

2016-09-27 Thread Andrea Turli
Closed #317.

-- 
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/317#event-803805178

Re: [jclouds/jclouds-labs] fix azure-arm features live tests (#317)

2016-09-27 Thread Andrea Turli
merged at 
[master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/c458bafd)

-- 
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/317#issuecomment-249864763

Re: [jclouds/jclouds-labs] JCLOUDS-1181 oneandone-vpn-api (#319)

2016-09-27 Thread Ignasi Barrera
nacx commented on this pull request.



> +import com.google.inject.TypeLiteral;
+import java.io.ByteArrayInputStream;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.zip.ZipInputStream;
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import org.apache.jclouds.oneandone.rest.domain.VPNConfig;
+import org.jclouds.http.functions.ParseJson;
+import org.jclouds.json.Json;
+
+@Singleton
+public class VPNConfigParser extends ParseJson {
+
+   @Inject
+   public VPNConfigParser(Json json) {

The visibility of this constructor still needs to be reduced by removing the 
public modifier (see 
[this](https://github.com/google/guice/wiki/KeepConstructorsHidden)). Or you 
can completely remove the parser class and bring back the `@SelectJson` 
annotation in the api method.

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

Re: [jclouds/jclouds-labs] fix azure-arm features live tests (#317)

2016-09-27 Thread Ignasi Barrera
Absolutely! You rock!

-- 
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/317#issuecomment-249854724

Re: [jclouds/jclouds-labs] fix azure-arm features live tests (#317)

2016-09-27 Thread Andrea Turli
@andreaturli pushed 1 commit.

1bf9d27  fix VirtualMachineLiveTest


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/317/files/071c533908fc8e908074f0bd6fc6deb75d325782..1bf9d272b61efae7ab5d2b9a18674a43898d73b8


Re: [jclouds/jclouds-labs] fix azure-arm features live tests (#317)

2016-09-27 Thread Andrea Turli
@nacx I think we are good to merge this
```
Results :

Failed tests:
  
AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testCompareSizes:887->BaseComputeServiceLiveTest.doCompareSizes:891
 » Provision
  
AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testCreateAndRunAService:733->BaseComputeServiceLiveTest.createAndRunAServiceInGroup:747->BaseComputeServiceLiveTest.buildTemplate:541
 » Provision
  AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testImageById:212 » 
Provision
  
AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testOptionToNotBlock:850->BaseComputeServiceLiveTest.buildTemplate:541
 » Provision
  
AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testWeCanCancelTasks:282->BaseComputeServiceLiveTest.buildTemplate:541
 » Provision
  
AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testTemplateMatch:341->BaseComputeServiceLiveTest.buildTemplate:541
 » Provision
  
AzureTemplateBuilderLiveTest>BaseTemplateBuilderLiveTest.testTemplateBuilderWithLoginUserSpecified:189->BaseTemplateBuilderLiveTest.tryOverrideUsingPropertyKey:213
 expected [[user=foo, passwordPresent=true, privateKeyPresent=false, 
shouldAuthenticateSudo=true]] but found [[user=jclouds, passwordPresent=true, 
privateKeyPresent=false, shouldAuthenticateSudo=false]]
  
AzureComputeImageExtensionLiveTest>BaseImageExtensionLiveTest.testCreateImage:100
 » RunNodes

Tests run: 108, Failures: 8, Errors: 0, Skipped: 17
```

-- 
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/317#issuecomment-249843346

Re: [jclouds/jclouds-labs] JCLOUDS-1181 oneandone-vpn-api (#319)

2016-09-27 Thread alibazlamit
@alibazlamit pushed 1 commit.

4331e09  Updated with changes


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/319/files/debbc9b5bc3c2d072ee55d9f184d3c59ed778fb8..4331e099037b24edea158bfa3d20228c9c39035d


Re: [jclouds/jclouds-labs] fix azure-arm features live tests (#317)

2016-09-27 Thread Andrea Turli
@nacx I think we are good to merge this
```
Results :

Failed tests:
  
AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testCompareSizes:887->BaseComputeServiceLiveTest.doCompareSizes:891
 » Provision
  
AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testCreateAndRunAService:733->BaseComputeServiceLiveTest.createAndRunAServiceInGroup:747->BaseComputeServiceLiveTest.buildTemplate:541
 » Provision
  AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testImageById:212 » 
Provision
  
AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testOptionToNotBlock:850->BaseComputeServiceLiveTest.buildTemplate:541
 » Provision
  
AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testWeCanCancelTasks:282->BaseComputeServiceLiveTest.buildTemplate:541
 » Provision
  
AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testTemplateMatch:341->BaseComputeServiceLiveTest.buildTemplate:541
 » Provision
  
AzureTemplateBuilderLiveTest>BaseTemplateBuilderLiveTest.testTemplateBuilderWithLoginUserSpecified:189->BaseTemplateBuilderLiveTest.tryOverrideUsingPropertyKey:213
 expected [[user=foo, passwordPresent=true, privateKeyPresent=false, 
shouldAuthenticateSudo=true]] but found [[user=jclouds, passwordPresent=true, 
privateKeyPresent=false, shouldAuthenticateSudo=false]]
  
AzureComputeImageExtensionLiveTest>BaseImageExtensionLiveTest.testCreateImage:100
 » RunNodes

Tests run: 108, Failures: 8, Errors: 0, Skipped: 17
```

-- 
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/317#issuecomment-249843116

Re: [jclouds/jclouds-labs] JCLOUDS-1181 oneandone-vpn-api (#319)

2016-09-27 Thread alibazlamit
alibazlamit commented on this pull request.



> +   public static class ToZipStream implements Function ZipInputStream> {
+
+  @Inject
+  public ToZipStream() {
+ super();
+  }
+
+  @Override
+  public ZipInputStream apply(VPNConfig input) {
+ try {
+byte[] decoded = base64().decode(input.content());
+ZipInputStream zipStream = new ZipInputStream(new 
ByteArrayInputStream(decoded));
+return zipStream;
+ } catch (Exception ex) {
+
Logger.getLogger(VPNConfigParser.class.getName()).log(Level.SEVERE, null, ex);
+return null;

Removed the try catch, if the API fails to return the config the fallback with 
work as needed and return a null object, no need for a try catch in there, if 
any other error should be returned from the API the error handler will do its 
job.

Changes pushed

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

Re: [jclouds/jclouds-labs] Vagrant provider (#160)

2016-09-27 Thread Svet
@nacx There's no vagrant API, so it's using the cli under the hood. It's 
possible to install a plugin which exposes an API, but since the provider makes 
most sense when used locally better not introduce another abstraction layer 
(and add extra setup steps for users).

I've updated the dependency to a released version (no transitive dependencies 
there) and rebased. Live tests are passing.

-- 
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/160#issuecomment-249791883