Re: [jclouds/jclouds-karaf] JCLOUDS-1172: Explicitly fallback to the Groovy scripting engine (#78)

2016-09-06 Thread Ignasi Barrera
Great! Would it make sense to keep this anyway as a sane fallback, or should we 
replace it by a runtime exception? Silently returning null is not OK.

We have already the default engine jars in the classpath, and if we throw an 
exception users won't be able to workaround it. I'd say that even with your 
patch it makes sense to keep this fallback. 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-karaf/pull/78#issuecomment-245183163

[jira] [Updated] (JCLOUDS-1146) BlobStoreContext and BlobStore break reflexive propety of object equals

2016-09-06 Thread Ryan MacDowell (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCLOUDS-1146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan MacDowell updated JCLOUDS-1146:

Attachment: ReflexiveTest.java

> BlobStoreContext and BlobStore break reflexive propety of object equals
> ---
>
> Key: JCLOUDS-1146
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1146
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 1.9.2
>Reporter: Ryan MacDowell
> Attachments: ReflexiveTest.java
>
>
> Create a BlobStoreContext, call the equals method on it and pass in itself, 
> the result should be true but it is false.  
> Get the BlobStore from a context and call the equals method on it and pass in 
> itself, the result should be true but is false with certain providers e.g. 
> "transient", "azureBlob".
> From the javadoc
> {quote}
> Indicates whether some other object is "equal to" this one.
> The equals method implements an equivalence relation on non-null object 
> references:
> It is reflexive: for any non-null reference value x, x.equals\(x\) should 
> return true.
> {quote}
> {code:java|title=ReflexiveTest.java|borderStyle=solid}
> import org.jclouds.ContextBuilder;
> import org.jclouds.blobstore.BlobStore;
> import org.jclouds.blobstore.BlobStoreContext;
> //Test for equals behavior
> public class ReflexiveTest {
>   public static void main(String[] args) {
>   BlobStoreContext context = 
> ContextBuilder.newBuilder("azureblob")
>   .credentials("someId", "someKey")
>   .build(BlobStoreContext.class);
>   System.out.println("Context should equal itself " + 
> context.equals(context));
>   BlobStore store = context.getBlobStore();
>   System.out.println("Store should equal itself " + 
> store.equals(store));
>   }
> }
> {code}
> From my tests azureBlob and transient never equals itself, yet somehow aws-s3 
> BlobStores equal themselves, but not BlobStoreContext.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (JCLOUDS-1058) ComputeService cannot cancel tasks in ProfitBricks

2016-09-06 Thread Ignasi Barrera (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCLOUDS-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignasi Barrera resolved JCLOUDS-1058.
-
   Resolution: Fixed
Fix Version/s: 2.0.0

> ComputeService cannot cancel tasks in ProfitBricks
> --
>
> Key: JCLOUDS-1058
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1058
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.9.2
>Reporter: Ignasi Barrera
>  Labels: profitbricks
> Fix For: 2.0.0
>
>
> Attempting to cancel a task in ProfitBricks results in an 
> Authorization/Timeout exception. Details on how to reproduce and the 
> investigations that have been made can be found here:
> https://github.com/jclouds/jclouds-labs/pull/224#issuecomment-165712742
> {code}
> Exception in thread "main" org.jclouds.rest.AuthorizationException: 
> (root:pw[97db1846570837fce6ff62a408f1d26a]@00.00.00.00:22) 
> (root:pw[97db1846570837fce6ff62a408f1d26a]@00.00.00.00:22) error acquiring 
> {hostAndPort=00.00.00.00:22, loginUser=root, ssh=1533657934, 
> connectTimeout=6, sessionTimeout=6} (out of retries - max 7): 
> Exhausted available authentication methods
> at org.jclouds.sshj.SshjSshClient.propagate(SshjSshClient.java:395)
> at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:205)
> at org.jclouds.sshj.SshjSshClient.connect(SshjSshClient.java:225)
> at 
> org.jclouds.compute.callables.SudoAwareInitManager.refreshAndRunAction(SudoAwareInitManager.java:74)
> at 
> org.jclouds.compute.callables.BlockUntilInitScriptStatusIsZeroThenReturnOutput.interruptTask(BlockUntilInitScriptStatusIsZeroThenReturnOutput.java:159)
> at 
> com.google.common.util.concurrent.AbstractFuture.cancel(AbstractFuture.java:136)
> at 
> io.devcsrj.report.jclouds.RunScriptUsingBasicLogin.testWeCanCancelTask(RunScriptUsingBasicLogin.java:107)
> at 
> io.devcsrj.report.jclouds.RunScriptUsingBasicLogin.main(RunScriptUsingBasicLogin.java:92)
> Caused by: net.schmizz.sshj.userauth.UserAuthException: Exhausted available 
> authentication methods
> at net.schmizz.sshj.SSHClient.auth(SSHClient.java:217)
> at net.schmizz.sshj.SSHClient.auth(SSHClient.java:193)
> at net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:278)
> at net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:248)
> at net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:232)
> at 
> org.jclouds.sshj.SSHClientConnection.create(SSHClientConnection.java:165)
> at 
> org.jclouds.sshj.SSHClientConnection.create(SSHClientConnection.java:49)
> at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:195)
> ... 6 more
> Caused by: net.schmizz.sshj.userauth.UserAuthException: Timeout expired
> at 
> net.schmizz.sshj.userauth.UserAuthException$1.chain(UserAuthException.java:33)
> at 
> net.schmizz.sshj.userauth.UserAuthException$1.chain(UserAuthException.java:26)
> at net.schmizz.concurrent.Promise.retrieve(Promise.java:139)
> at 
> net.schmizz.sshj.userauth.UserAuthImpl.authenticate(UserAuthImpl.java:69)
> at net.schmizz.sshj.SSHClient.auth(SSHClient.java:211)
> ... 13 more
> Caused by: java.util.concurrent.TimeoutException: Timeout expired
> ... 16 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (JCLOUDS-1173) List method has different behavior on different cloud providers

2016-09-06 Thread Ryan MacDowell (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCLOUDS-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan MacDowell updated JCLOUDS-1173:

Attachment: ListTest.java

> List method has different behavior on different cloud providers
> ---
>
> Key: JCLOUDS-1173
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1173
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 1.9.2
>Reporter: Ryan MacDowell
> Attachments: ListTest.java
>
>
> I'm seeing different behavior for the BlobStore list method of aws-s3 and 
> transient.  On aws-s3 the PageSet contains the directory itself and on azure 
> and transient it does not.  
> The example below shows that transient gives a size of 1 and aws-s3 gives a 
> size of 2 even though they are setup exactly the same.  
> {code:title=ListTest.java}
> import org.jclouds.ContextBuilder;
> import org.jclouds.blobstore.BlobStore;
> import org.jclouds.blobstore.BlobStoreContext;
> import org.jclouds.blobstore.domain.Blob;
> import com.amazonaws.auth.AWSCredentials;
> import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
> //Test for equals behavior
> public class ListTest {
>   public static void main(String[] args) {
>   String containerName = "test.container";
>   String dataString = "testData";
>   String testDirectory = "testDirectory";
>   String blobName = "blob1";
>   AWSCredentials creds = new 
> DefaultAWSCredentialsProviderChain().getCredentials();
>   //Setup the contexts
>   BlobStoreContext transientContext = 
> ContextBuilder.newBuilder("transient")
>   .credentials(creds.getAWSAccessKeyId(), 
> creds.getAWSSecretKey())
>   .build(BlobStoreContext.class);
>   BlobStoreContext awsS3Context = 
> ContextBuilder.newBuilder("aws-s3")
>   .credentials(creds.getAWSAccessKeyId(), 
> creds.getAWSSecretKey())
>   .build(BlobStoreContext.class);
>   //Setup the blobstores
>   BlobStore transientStore = transientContext.getBlobStore();
>   BlobStore awsStore = awsS3Context.getBlobStore();
>   //Setup the container
>   transientStore.createContainerInLocation(null, containerName);
>   awsStore.createContainerInLocation(null, containerName);
>   //Setup the directories
>   transientStore.createDirectory(containerName, testDirectory);
>   awsStore.createDirectory(containerName, testDirectory);
>   //setup the blobs
>   Blob transientBlob = transientStore.blobBuilder(testDirectory 
> +"/" + blobName).build();
>   Blob awsBlob = awsStore.blobBuilder(testDirectory +"/" + 
> blobName).build();
>   //create the payloads
>   byte[] transientPayload = dataString.getBytes();
>   byte[] awsPayload = dataString.getBytes();
>   //set the payloads
>   transientBlob.setPayload(transientPayload);
>   awsBlob.setPayload(awsPayload);
>   //Upload the blobs
>   transientStore.putBlob(containerName, transientBlob);
>   awsStore.putBlob(containerName, awsBlob);
>   System.out.println("Directory size should be the same but is 
> not: transient + " + transientStore.list(containerName).size()
>   + ", aws = " + 
> awsStore.list(containerName).size());
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [jclouds/jclouds-cli] Misc cleanup (#31)

2016-09-06 Thread Andrew Phillips
> \ No newline at end of file
> +featuresBoot=jclouds-chef,jclouds-aws-ec2,jclouds-aws-s3

`config:list` and other commands still seem to be present

-- 
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-cli/pull/31/files/0061346d112da919d20fe52c51973c6f46ef6ec2..bc003de96a72d889203a0b043b03a7161f93d7cb#r77762920

Re: [jclouds/jclouds-cli] Misc cleanup (#31)

2016-09-06 Thread Andrew Phillips
> @@ -39,11 +39,12 @@ 
> org/apache/aries/blueprint/org.apache.aries.blueprint.api/${aries.blueprint.api.
>  
> org/apache/aries/blueprint/org.apache.aries.blueprint.core/${aries.blueprint.core.version}/org.apache.aries.blueprint.core-${aries.blueprint.core.version}.jar=20
>  
> org/apache/aries/blueprint/org.apache.aries.blueprint.cm/${aries.blueprint.cm.version}/org.apache.aries.blueprint.cm-${aries.blueprint.cm.version}.jar=20
>  
> -org/apache/karaf/shell/org.apache.karaf.shell.console/${karaf.version}/org.apache.karaf.shell.console-${karaf.version}.jar=29
> +org/apache/karaf/shell/org.apache.karaf.shell.console/${karaf.version}/org.apache.karaf.shell.console-${karaf.version}.jar=25

See 
https://github.com/apache/karaf/blob/karaf-2.3.11/assemblies/apache-karaf/src/main/filtered-resources/minimal/startup.properties
 for the motivation for these 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-cli/pull/31/files/0061346d112da919d20fe52c51973c6f46ef6ec2#r77762880

Re: [jclouds/jclouds-cli] Misc cleanup (#31)

2016-09-06 Thread Andrew Phillips
> @@ -137,13 +137,13 @@
>  
>  false
>  
> -
> +

[jira] [Updated] (JCLOUDS-1173) List method has different behavior on different cloud providers

2016-09-06 Thread Ryan MacDowell (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCLOUDS-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan MacDowell updated JCLOUDS-1173:

Description: 
I'm seeing different behavior for the BlobStore list method of aws-s3 and 
transient.  On aws-s3 the PageSet contains the directory itself and on azure 
and transient it does not.  

The example below shows that transient gives a size of 1 and aws-s3 gives a 
size of 2 even though they are setup exactly the same.  

{code:title=ListTest.java}
import org.jclouds.ContextBuilder;
import org.jclouds.blobstore.BlobStore;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.domain.Blob;

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
//Test for equals behavior
public class ListTest {
public static void main(String[] args) {
String containerName = "test.container";
String dataString = "testData";
String testDirectory = "testDirectory";
String blobName = "blob1";
AWSCredentials creds = new 
DefaultAWSCredentialsProviderChain().getCredentials();
//Setup the contexts
BlobStoreContext transientContext = 
ContextBuilder.newBuilder("transient")
.credentials(creds.getAWSAccessKeyId(), 
creds.getAWSSecretKey())
.build(BlobStoreContext.class);
BlobStoreContext awsS3Context = 
ContextBuilder.newBuilder("aws-s3")
.credentials(creds.getAWSAccessKeyId(), 
creds.getAWSSecretKey())
.build(BlobStoreContext.class);
//Setup the blobstores
BlobStore transientStore = transientContext.getBlobStore();
BlobStore awsStore = awsS3Context.getBlobStore();
//Setup the container
transientStore.createContainerInLocation(null, containerName);
awsStore.createContainerInLocation(null, containerName);
//Setup the directories
transientStore.createDirectory(containerName, testDirectory);
awsStore.createDirectory(containerName, testDirectory);
//setup the blobs
Blob transientBlob = transientStore.blobBuilder(testDirectory 
+"/" + blobName).build();
Blob awsBlob = awsStore.blobBuilder(testDirectory +"/" + 
blobName).build();
//create the payloads
byte[] transientPayload = dataString.getBytes();
byte[] awsPayload = dataString.getBytes();
//set the payloads
transientBlob.setPayload(transientPayload);
awsBlob.setPayload(awsPayload);
//Upload the blobs
transientStore.putBlob(containerName, transientBlob);
awsStore.putBlob(containerName, awsBlob);

System.out.println("Directory size should be the same but is 
not: transient + " + transientStore.list(containerName).size()
+ ", aws = " + 
awsStore.list(containerName).size());
}
}
{code}


  was:
I'm seeing different behavior for the BlobStore list method of aws-s3 and 
transient.  On aws-s3 the PageSet contains the directory itself and on azure 
and transient it does not.  

The example below shows that transient gives a size of 1 and aws-s3 gives a 
size of 2 even though they are setup exactly the same.  

{code:title=ListTest.java}
import org.jclouds.ContextBuilder;
import org.jclouds.blobstore.BlobStore;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.domain.Blob;

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
//Test for equals behavior
public class ListTest {
public static void main(String[] args) {
String containerName = "pega.engineering.ci.automatedtesting";
String dataString = "testData";
String testDirectory = "testDirectory";
String blobName = "blob1";
AWSCredentials creds = new 
DefaultAWSCredentialsProviderChain().getCredentials();
//Setup the contexts
BlobStoreContext transientContext = 
ContextBuilder.newBuilder("transient")
.credentials(creds.getAWSAccessKeyId(), 
creds.getAWSSecretKey())
.build(BlobStoreContext.class);
BlobStoreContext awsS3Context = 
ContextBuilder.newBuilder("aws-s3")
.credentials(creds.getAWSAccessKeyId(), 
creds.getAWSSecretKey())
.build(BlobStoreContext.class);
//Setup the blobstores
BlobStore transientStore = transientContext.getBlobStore();
 

[jclouds/jclouds-cli] Misc cleanup (#31)

2016-09-06 Thread Andrew Phillips

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

  https://github.com/jclouds/jclouds-cli/pull/31

-- Commit Summary --

  * Align the startup.properties file with Karaf 2.3.11
  * Remove a non-existent feature from the list of features to boot on startup
  * Tentatively remove Guava from the system deps for the distribution

-- File Changes --

M assembly/src/main/assembly/unix.xml (4)
M assembly/src/main/assembly/win.xml (4)
M assembly/src/main/filtered-resources/etc/org.apache.karaf.features.cfg (2)
M assembly/src/main/filtered-resources/etc/startup.properties (7)
M project/pom.xml (2)

-- Patch Links --

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


[jira] [Created] (JCLOUDS-1173) List method has different behavior on different cloud providers

2016-09-06 Thread Ryan MacDowell (JIRA)
Ryan MacDowell created JCLOUDS-1173:
---

 Summary: List method has different behavior on different cloud 
providers
 Key: JCLOUDS-1173
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1173
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-blobstore
Affects Versions: 1.9.2
Reporter: Ryan MacDowell


I'm seeing different behavior for the BlobStore list method of aws-s3 and 
transient.  On aws-s3 the PageSet contains the directory itself and on azure 
and transient it does not.  

The example below shows that transient gives a size of 1 and aws-s3 gives a 
size of 2 even though they are setup exactly the same.  

{code:title=ListTest.java}
import org.jclouds.ContextBuilder;
import org.jclouds.blobstore.BlobStore;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.domain.Blob;

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
//Test for equals behavior
public class ListTest {
public static void main(String[] args) {
String containerName = "pega.engineering.ci.automatedtesting";
String dataString = "testData";
String testDirectory = "testDirectory";
String blobName = "blob1";
AWSCredentials creds = new 
DefaultAWSCredentialsProviderChain().getCredentials();
//Setup the contexts
BlobStoreContext transientContext = 
ContextBuilder.newBuilder("transient")
.credentials(creds.getAWSAccessKeyId(), 
creds.getAWSSecretKey())
.build(BlobStoreContext.class);
BlobStoreContext awsS3Context = 
ContextBuilder.newBuilder("aws-s3")
.credentials(creds.getAWSAccessKeyId(), 
creds.getAWSSecretKey())
.build(BlobStoreContext.class);
//Setup the blobstores
BlobStore transientStore = transientContext.getBlobStore();
BlobStore awsStore = awsS3Context.getBlobStore();
//Setup the container
transientStore.createContainerInLocation(null, containerName);
awsStore.createContainerInLocation(null, containerName);
//Setup the directories
transientStore.createDirectory(containerName, testDirectory);
awsStore.createDirectory(containerName, testDirectory);
//setup the blobs
Blob transientBlob = transientStore.blobBuilder(testDirectory 
+"/" + blobName).build();
Blob awsBlob = awsStore.blobBuilder(testDirectory +"/" + 
blobName).build();
//create the payloads
byte[] transientPayload = dataString.getBytes();
byte[] awsPayload = dataString.getBytes();
//set the payloads
transientBlob.setPayload(transientPayload);
awsBlob.setPayload(awsPayload);
//Upload the blobs
transientStore.putBlob(containerName, transientBlob);
awsStore.putBlob(containerName, awsBlob);

System.out.println("Directory size should be the same but is 
not: transient + " + transientStore.list(containerName).size()
+ ", aws = " + 
awsStore.list(containerName).size());
}
}
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JCLOUDS-1074) Compatibility with Guava 20

2016-09-06 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/JCLOUDS-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15469541#comment-15469541
 ] 

ASF subversion and git services commented on JCLOUDS-1074:
--

Commit 7cde28a4d2af3cde0adec62186b19116893b06f2 in jclouds's branch 
refs/heads/master from [~gaul]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=7cde28a ]

JCLOUDS-1074: Guava 20 compatibility

* dynamically call TypeToken.isSupertypeOf with Guava 19 and later and
  TypeToken.isAssignableFrom with Guava 18 and earlier
* consume or ignore values from methods with CheckReturnValue
* replace usage of removed Iterators.emptyIterator


> Compatibility with Guava 20
> ---
>
> Key: JCLOUDS-1074
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1074
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-core
>Affects Versions: 2.0.0
>Reporter: Olivier Voortman
>  Labels: guava
>
> Hello,
> It seems jclouds is still using some deprecated methods from the Guava 
> library, which are now removed from version 20.0-SNAPSHOT.
> For example :
> java.lang.NoSuchMethodError: 
> com.google.common.reflect.TypeToken.isAssignableFrom(Lcom/google/common/reflect/TypeToken;)Z
> Used here :
> org.jclouds.apis.Apis$1.apply(Apis.java:134)
> See removal of those methods from Guava here :
> https://github.com/google/guava/commit/f001be54c2e3676d39623942e96b97699d42467a
> This should be quite easy to fix.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> BTW, regarding the shaded bundle fix, it works, but there is still this error 
> when the CLI starts:

>From [this example of 
>`startup.properties`](https://github.com/apache/karaf/blob/karaf-2.3.11/assemblies/apache-karaf/src/main/filtered-resources/etc/startup.properties#L75),
> it looks like we're simply not importing/starting some of the features that 
>would be necessary for this.

The message is a warning rather than an error, so I _think_ we should be good 
to ignore it...but then again, I'm hardly the expert ;-)

-- 
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-karaf/pull/77#issuecomment-245168756

Re: [jclouds/jclouds-karaf] Try to use an OSGi-compliant way of loading JSR 223 script engines (#79)

2016-09-06 Thread Andrew Phillips
@nacx Could you give (a CLI built from) this a shot? It looks like it should be 
working

```
jclouds> jclouds:compute-service-create --provider aws-ec2 --identity key 
--credential secret --name test
Waiting for compute service with name: test.
jclouds> jclouds:location-list --provider aws-ec2 --name test
** For engine groovy, result is: org.jclouds.karaf.commands.table.internal.O
SGiScriptEngine@5c322524
[id][scope]  [description]   [parent]
us-west-2   REGION   us-west-2   aws-ec2
eu-west-1   REGION   eu-west-1   aws-ec2
ap-northeast-1a ZONE ap-northeast-1a ap-northeast-1
ap-northeast-1c ZONE ap-northeast-1c ap-northeast-1
ap-southeast-1a ZONE ap-southeast-1a ap-southeast-1
eu-west-1a  ZONE eu-west-1a  eu-west-1
us-east-1b  ZONE us-east-1b  us-east-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-karaf/pull/79#issuecomment-245166148

Re: [jclouds/jclouds-karaf] Try to use an OSGi-compliant way of loading JSR 223 script engines (#79)

2016-09-06 Thread Andrew Phillips
> +  return null;
> +}
> + }
> +
> + /**
> +  * Iterates through all bundles to get the available @link 
> ScriptEngineFactory classes
> +  * @return the names of the available ScriptEngineFactory classes
> +  * @throws IOException
> +  */
> + private List findFactoryCandidates(BundleContext context) {
> + Bundle[] bundles = context.getBundles();
> + List factoryCandidates = new ArrayList();
> + for (Bundle bundle : bundles) {
> +  if (bundle == null) {
> +continue;
> +  }

Wow, some funky formatting 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-karaf/pull/79/files/0b99dad1aa7786eaf11028bf91fc1d272c189f0b#r77755910

Re: [jclouds/jclouds-karaf] Try to use an OSGi-compliant way of loading JSR 223 script engines (#79)

2016-09-06 Thread Andrew Phillips
> @@ -0,0 +1,79 @@
> +/*

Lots of cleanup and review still to go with these three classes

-- 
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-karaf/pull/79/files/0b99dad1aa7786eaf11028bf91fc1d272c189f0b#r77755845

[jclouds/jclouds-karaf] Try to use an OSGi-compliant way of loading JSR 223 script engines (#79)

2016-09-06 Thread Andrew Phillips
Alternative to #78, but addressing the same issue.
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-karaf/pull/79

-- Commit Summary --

  * Try to use an OSGi-compliant way of loading JSR 223 script engines

-- File Changes --

M 
commands/src/main/java/org/jclouds/karaf/commands/table/BasicShellTableFactory.java
 (9)
A 
commands/src/main/java/org/jclouds/karaf/commands/table/internal/OSGiScriptEngine.java
 (79)
A 
commands/src/main/java/org/jclouds/karaf/commands/table/internal/OSGiScriptEngineFactory.java
 (83)
A 
commands/src/main/java/org/jclouds/karaf/commands/table/internal/OSGiScriptEngineManager.java
 (272)
M 
commands/src/main/java/org/jclouds/karaf/commands/table/internal/ScriptEngineShellTable.java
 (12)
M commands/src/main/resources/OSGI-INF/blueprint/jclouds-commands.xml (8)
M feature/src/main/resources/feature.xml (1)

-- Patch Links --

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


Re: [jclouds/jclouds-labs] Pb compute api (#292)

2016-09-06 Thread Reijhanniel Jearl Campos
> +
> +@Override
> +public DataCenter get() {
> +DataCenter dataCenter = api.create(TEST_DC_NAME, "desc,,,", 
> Location.US_LAS.getId());
> +predicate.apply(dataCenter.id());
> +
> +return api.getDataCenter(dataCenter.id());
> +}
> +});
> +
> +// final TemplateBuilder templateBuilder = 
> view.getComputeService().templateBuilder();
> +//templateBuilder.osFamily(OsFamily.UBUNTU);
> +//templateBuilder.osVersionMatches("16.04");
> +//templateBuilder.locationId(dataCenter.id());
> +//templateBuilder.hardwareId("cpu=4,ram=2,disk=30");
> +//templateBuilder.imageId("02a49ebb-27b7-11e6-8e88-52540005ab80");

Remove these 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/292/files/1533bf29a80f2c87834f501abd91ea399debd688#r77746811

Re: [jclouds/jclouds-labs] Pb compute api (#292)

2016-09-06 Thread Reijhanniel Jearl Campos
> +@Test(groups = "live", singleThreaded = true, testName = 
> "ProfitBricksComputeServiceLiveTest")
> +public class ProfitBricksComputeServiceLiveTest extends 
> BaseComputeServiceLiveTest {
> +
> +//private static final String TEST_DC_NAME = "computeServiceLiveTest" + 
> System.currentTimeMillis();
> +private static final String TEST_DC_NAME = "computeServiceLiveTest";
> +
> +private DataCenter dataCenter;
> +
> +public ProfitBricksComputeServiceLiveTest() {
> +provider = "profitbricks-rest";
> +//System.setProperty("http.proxyHost", "127.0.0.1");
> +//System.setProperty("https.proxyHost", "127.0.0.1");
> +//System.setProperty("http.proxyPort", "");
> +//System.setProperty("https.proxyPort", "");
> +//System.setProperty("javax.net.ssl.trustStore", "C:\\Program 
> Files\\Java\\jdk1.8.0_73\\jre\\lib\\security\\FiddlerKeystore");
> +//System.setProperty("javax.net.ssl.trustStorePassword", "testme");

Remove these commented test values (including the `TEST_DC_NAME` 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-labs/pull/292/files/1533bf29a80f2c87834f501abd91ea399debd688#r77746753

Re: [jclouds/jclouds-labs] Pb compute api (#292)

2016-09-06 Thread Reijhanniel Jearl Campos
> +import org.jclouds.scriptbuilder.statements.java.InstallJDK;
> +import org.jclouds.scriptbuilder.statements.login.AdminAccess;
> +import org.jclouds.ssh.SshClient;
> +import org.jclouds.ssh.SshException;
> +import static org.jclouds.util.Predicates2.retry;
> +import static org.testng.Assert.assertEquals;
> +import static org.testng.Assert.assertFalse;
> +import static org.testng.Assert.assertNotNull;
> +import static org.testng.Assert.assertTrue;
> +import static org.testng.Assert.fail;
> +import org.testng.annotations.AfterClass;
> +import org.testng.annotations.BeforeGroups;
> +import org.testng.annotations.Test;
> +
> +@Test(groups = {"integration", "live"}, singleThreaded = true)
> +public abstract class BaseTest extends BaseComputeServiceContextLiveTest {

The ssh-related issue was already fixed by @nacx with 
[https://github.com/jclouds/jclouds/pull/995], so you can revert the the 
overridden methods in this test class.

-- 
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/292/files/1533bf29a80f2c87834f501abd91ea399debd688#r77746649

[jira] [Commented] (JCLOUDS-1058) ComputeService cannot cancel tasks in ProfitBricks

2016-09-06 Thread Reijhanniel Jearl Campos (JIRA)

[ 
https://issues.apache.org/jira/browse/JCLOUDS-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15469160#comment-15469160
 ] 

Reijhanniel Jearl Campos commented on JCLOUDS-1058:
---

[~nacx] Shouldn't this be closed with your 
[commit](https://github.com/jclouds/jclouds/pull/995)?

> ComputeService cannot cancel tasks in ProfitBricks
> --
>
> Key: JCLOUDS-1058
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1058
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.9.2
>Reporter: Ignasi Barrera
>  Labels: profitbricks
>
> Attempting to cancel a task in ProfitBricks results in an 
> Authorization/Timeout exception. Details on how to reproduce and the 
> investigations that have been made can be found here:
> https://github.com/jclouds/jclouds-labs/pull/224#issuecomment-165712742
> {code}
> Exception in thread "main" org.jclouds.rest.AuthorizationException: 
> (root:pw[97db1846570837fce6ff62a408f1d26a]@00.00.00.00:22) 
> (root:pw[97db1846570837fce6ff62a408f1d26a]@00.00.00.00:22) error acquiring 
> {hostAndPort=00.00.00.00:22, loginUser=root, ssh=1533657934, 
> connectTimeout=6, sessionTimeout=6} (out of retries - max 7): 
> Exhausted available authentication methods
> at org.jclouds.sshj.SshjSshClient.propagate(SshjSshClient.java:395)
> at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:205)
> at org.jclouds.sshj.SshjSshClient.connect(SshjSshClient.java:225)
> at 
> org.jclouds.compute.callables.SudoAwareInitManager.refreshAndRunAction(SudoAwareInitManager.java:74)
> at 
> org.jclouds.compute.callables.BlockUntilInitScriptStatusIsZeroThenReturnOutput.interruptTask(BlockUntilInitScriptStatusIsZeroThenReturnOutput.java:159)
> at 
> com.google.common.util.concurrent.AbstractFuture.cancel(AbstractFuture.java:136)
> at 
> io.devcsrj.report.jclouds.RunScriptUsingBasicLogin.testWeCanCancelTask(RunScriptUsingBasicLogin.java:107)
> at 
> io.devcsrj.report.jclouds.RunScriptUsingBasicLogin.main(RunScriptUsingBasicLogin.java:92)
> Caused by: net.schmizz.sshj.userauth.UserAuthException: Exhausted available 
> authentication methods
> at net.schmizz.sshj.SSHClient.auth(SSHClient.java:217)
> at net.schmizz.sshj.SSHClient.auth(SSHClient.java:193)
> at net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:278)
> at net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:248)
> at net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:232)
> at 
> org.jclouds.sshj.SSHClientConnection.create(SSHClientConnection.java:165)
> at 
> org.jclouds.sshj.SSHClientConnection.create(SSHClientConnection.java:49)
> at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:195)
> ... 6 more
> Caused by: net.schmizz.sshj.userauth.UserAuthException: Timeout expired
> at 
> net.schmizz.sshj.userauth.UserAuthException$1.chain(UserAuthException.java:33)
> at 
> net.schmizz.sshj.userauth.UserAuthException$1.chain(UserAuthException.java:26)
> at net.schmizz.concurrent.Promise.retrieve(Promise.java:139)
> at 
> net.schmizz.sshj.userauth.UserAuthImpl.authenticate(UserAuthImpl.java:69)
> at net.schmizz.sshj.SSHClient.auth(SSHClient.java:211)
> ... 13 more
> Caused by: java.util.concurrent.TimeoutException: Timeout expired
> ... 16 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [jclouds/jclouds-labs] Pb compute api (#292)

2016-09-06 Thread Reijhanniel Jearl Campos
> +destroyVolume(volumeId, dataCenterId);
> +}
> +}
> +// Last paranoid check
> +waitDcUntilAvailable.apply(dataCenterId);
> +
> +LoginCredentials serverCredentials = LoginCredentials.builder()
> +.user(loginUser)
> +.password(password)
> +.build();
> +String serverInDataCenterId = 
> DataCenterAndId.fromDataCenterAndId(dataCenterId, serverId).slashEncode();
> +rebootNode(serverInDataCenterId);
> +waitServerUntilAvailable.apply(ServerRef.create(dataCenterId, 
> serverId));
> +
> +try {
> +Thread.sleep(9);

Also, why the need for 90-second sleep here? If the provisioning process still 
not done here (*sigh*), adjust instead the default values of the 
`waitServerUntilAvailable` predicate or datacenter, whichever applicable.

-- 
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/292/files/1533bf29a80f2c87834f501abd91ea399debd688#r77745128

Re: [jclouds/jclouds-labs] Pb compute api (#292)

2016-09-06 Thread Reijhanniel Jearl Campos
> +}
> +// Last paranoid check
> +waitDcUntilAvailable.apply(dataCenterId);
> +
> +LoginCredentials serverCredentials = LoginCredentials.builder()
> +.user(loginUser)
> +.password(password)
> +.build();
> +String serverInDataCenterId = 
> DataCenterAndId.fromDataCenterAndId(dataCenterId, serverId).slashEncode();
> +rebootNode(serverInDataCenterId);
> +waitServerUntilAvailable.apply(ServerRef.create(dataCenterId, 
> serverId));
> +
> +try {
> +Thread.sleep(9);
> +} catch (InterruptedException ex) {
> +
> java.util.logging.Logger.getLogger(ProfitBricksComputeServiceAdapter.class.getName()).log(Level.SEVERE,
>  null, ex);

Use the injected `logger` 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-labs/pull/292/files/1533bf29a80f2c87834f501abd91ea399debd688#r77744876

Re: [jclouds/jclouds-labs] Pb compute api (#292)

2016-09-06 Thread Reijhanniel Jearl Campos
> +return api.serverApi().attachVolume(
> +Server.Request.attachVolumeBuilder()
> +.dataCenterId(dataCenterId)
> +.serverId(serverId)
> +.volumeId(volumeId)
> +.build()
> +);
> +}
> +}));
> +
> +logger.trace(">> volume connected.");
> +} catch (Exception ex) {
> +// delete unconnected volume
> +logger.warn(ex, ">> failed to connect volume '%s'. 
> deleting..", volumeId);
> +destroyVolume(volumeId, dataCenterId);
> +}

Prior this volume-creating code block, a 
[*bootVolume*](https://github.com/jclouds/jclouds-labs/pull/292/files#diff-3cfe9775f2121ca815ae0fce43f9d211R187)
 is attached to the server. That server-volume pair already constitutes a 
jcloud node. The additional volumes here are more like, additional storages, 
not necessarily making the node unusable if they fail in attaching.

-- 
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/292/files/9251ab7434bcafb1dcbec5a718acc3c24517c94d#r77744780

Re: [jclouds/jclouds-labs] Pb compute api (#292)

2016-09-06 Thread Reijhanniel Jearl Campos
> +final String password = "LTbAHNbcMt";
> +
> +//final org.jclouds.compute.domain.Image image = template.getImage();
> +
> +// provision all volumes based on hardware
> +List volumes = hardware.getVolumes();
> +List volumeIds = 
> Lists.newArrayListWithExpectedSize(volumes.size());
> +
> +int i = 1;
> +for (final Volume volume : volumes) {
> +try {
> +logger.trace("<< provisioning volume '%s'", volume);
> +final 
> org.apache.jclouds.profitbricks.rest.domain.Volume.Request.CreatePayload 
> request = 
> org.apache.jclouds.profitbricks.rest.domain.Volume.Request.creatingBuilder()
> +.dataCenterId(dataCenterId)
> +// put image to first volume
> +.image("02a49ebb-27b7-11e6-8e88-52540005ab80")

Take the image id from the template options instead

-- 
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/292/files/1533bf29a80f2c87834f501abd91ea399debd688#r77744368

Re: [jclouds/jclouds-labs] Pb compute api (#292)

2016-09-06 Thread Reijhanniel Jearl Campos
> +this.provisioningManager = provisioningManager;
> +}
> +
> +private void SetDataCenterId(String id) {
> +dataCenterId = id;
> +}
> +
> +@Override
> +public NodeAndInitialCredentials 
> createNodeWithGroupEncodedIntoName(String group, String name, Template 
> template) {
> +final String dataCenterId = template.getLocation().getId();
> +SetDataCenterId(dataCenterId);
> +Hardware hardware = template.getHardware();
> +TemplateOptions options = template.getOptions();
> +final String loginUser = isNullOrEmpty(options.getLoginUser()) ? 
> "root" : options.getLoginUser();
> +//final String password = options.hasLoginPassword() ? 
> options.getLoginPassword() : Passwords.generate();
> +final String password = "LTbAHNbcMt";

Is... this password suppose to be 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/292/files/1533bf29a80f2c87834f501abd91ea399debd688#r77744270

Re: [jclouds/jclouds-labs] Pb compute api (#292)

2016-09-06 Thread Reijhanniel Jearl Campos
Hi @alibazlamit !

The initial comments on this PR haven't been addressed yet; see [Files 
Changed](https://github.com/jclouds/jclouds-labs/pull/292/files) tab of this 
PR, most notably style-checks. The diff made it looked like that this PR 
changed *everything* due to the formatting changes. While this does not 
necessarily break code correctness, reviewing becomes 10x more times difficult 
(actually, 5700+ additions ;) ), as we're *might* be seeing changes not 
intentionally addressed by this PR (i.e.: Compute Service).

Could you take care of that first, by removing the disabled 
``s, and reformatting the source? If you're using eclipse or 
idea, they have a profile you can format 
[here](https://cwiki.apache.org/confluence/display/JCLOUDS/Coding+Standards).

-- 
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/292#issuecomment-245140170

Re: [jclouds/jclouds-karaf] JCLOUDS-1172: Explicitly fallback to the Groovy scripting engine (#78)

2016-09-06 Thread Andrew Phillips
Thanks for this, @nacx! I think I'm a little closer to getting the 
`OGSiScriptEngineManager` approach that you linked to originally to work - will 
try to see if I can figure that out one way or the other soon

-- 
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-karaf/pull/78#issuecomment-245134381

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> +${import.packages}
> +  
> +
> +  
> +  
> +org.apache.maven.plugins
> +maven-shade-plugin
> +2.4.3
> +
> +  
> +package
> +
> +  shade
> +
> +
> +  
> ${project.build.directory}/dependency-reduced-pom.xml

Thought: add a comment to clarify this? Something like
```

```
?

-- 
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-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77740874

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
Thanks for the changes, @nacx! Just one more additional thing that I noticed 
while working on this: the dependency on 
`org.apache.servicemix.bundles.jsch-agentproxy-jsch` in the root POM can 
probably be removed too.

-- 
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-karaf/pull/77#issuecomment-245133735

[jira] [Commented] (JCLOUDS-1172) Script engines are not loaded in the interactive shell

2016-09-06 Thread Ignasi Barrera (JIRA)

[ 
https://issues.apache.org/jira/browse/JCLOUDS-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15468829#comment-15468829
 ] 

Ignasi Barrera commented on JCLOUDS-1172:
-

Well, the problem is not Groovy itself. It fails to load any engine. I've also 
tried configuring it to use javascript, as it is already part of the JRE since 
Java 6, but the issue remains. The pull request just workarounds this by 
manually setting up the default engine (Groovy until now) if no engine can be 
loaded via dynamic discovery.

> Script engines are not loaded in the interactive shell
> --
>
> Key: JCLOUDS-1172
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1172
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-karaf
>Affects Versions: 1.9.2
>Reporter: Ignasi Barrera
>Assignee: Ignasi Barrera
>
> When using the interactive shell, the script engines that are used to render 
> the values of the columns are not loaded, resulting in blank output lines 
> when running commands.
> This affects only the interactive shell.
> See this discussion for more details: 
> https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244901813



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JCLOUDS-1172) Script engines are not loaded in the interactive shell

2016-09-06 Thread Andrew Gaul (JIRA)

[ 
https://issues.apache.org/jira/browse/JCLOUDS-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15468807#comment-15468807
 ] 

Andrew Gaul commented on JCLOUDS-1172:
--

Our use of Groovy is overkill for this formatting feature.  If it makes more 
sense we could just rip Groovy out.

> Script engines are not loaded in the interactive shell
> --
>
> Key: JCLOUDS-1172
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1172
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-karaf
>Affects Versions: 1.9.2
>Reporter: Ignasi Barrera
>Assignee: Ignasi Barrera
>
> When using the interactive shell, the script engines that are used to render 
> the values of the columns are not loaded, resulting in blank output lines 
> when running commands.
> This affects only the interactive shell.
> See this discussion for more details: 
> https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244901813



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Ignasi Barrera
Removed the offending commit that screwed up the poms and changed the parent of 
the bundles one. Also moved the engine fix to 
https://github.com/jclouds/jclouds-karaf/pull/78

-- 
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-karaf/pull/77#issuecomment-245096702

[jclouds/jclouds-karaf] JCLOUDS-1172: Explicitly fallback to the Groocy scripting engine (#78)

2016-09-06 Thread Ignasi Barrera
https://issues.apache.org/jira/browse/JCLOUDS-1172

Force the use of the default Groovy engine if the script engine factory can't 
load any scripting engine. See 
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244901813 for 
more details.

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

  https://github.com/jclouds/jclouds-karaf/pull/78

-- Commit Summary --

  * Explicitly fallback to the Groocy scripting engine

-- File Changes --

M commands/pom.xml (4)
M 
commands/src/main/java/org/jclouds/karaf/commands/table/internal/ScriptEngineShellTable.java
 (14)

-- Patch Links --

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


Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Ignasi Barrera
@nacx pushed 1 commit.

5f4d9d1  Fixed parent pom


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/228233239da796ee8c8b00692923fe57b3b47e22..5f4d9d15ede060019c0170ad476b79a45c8819a4


[jira] [Created] (JCLOUDS-1172) Script engines are not loaded in the interactive shell

2016-09-06 Thread Ignasi Barrera (JIRA)
Ignasi Barrera created JCLOUDS-1172:
---

 Summary: Script engines are not loaded in the interactive shell
 Key: JCLOUDS-1172
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1172
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-karaf
Affects Versions: 1.9.2
Reporter: Ignasi Barrera
Assignee: Ignasi Barrera


When using the interactive shell, the script engines that are used to render 
the values of the columns are not loaded, resulting in blank output lines when 
running commands.

This affects only the interactive shell.

See this discussion for more details: 
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244901813



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> @@ -23,6 +23,7 @@ limitations under the License.
>  chef
>  org.apache.jclouds.karaf
>  2.0.0-SNAPSHOT
> +../..

See comment below

-- 
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-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686084

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> +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.
> +-->
> +
> +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
> +jclouds-karaf
> +2.0.0-SNAPSHOT
> +../..

For `chef`, submodules depend on the immediate parent, which would be 
`bundles`, in this case. Do that here too?

-- 
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-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686274

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> @@ -23,6 +23,7 @@ limitations under the License.
>  chef
>  org.apache.jclouds.karaf
>  2.0.0-SNAPSHOT
> +../..

See comment below

-- 
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-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686093

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
@nacx Suggestion: break out the "fix output" issue out into a different JIRA 
issue and PR? I think that's a slightly different discussion from the bundle 
fix that this PR is about?

-- 
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-karaf/pull/77#issuecomment-245035065

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> @@ -23,6 +23,7 @@ limitations under the License.
>  chef
>  org.apache.jclouds.karaf
>  2.0.0-SNAPSHOT
> +../..

See comment below

-- 
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-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686061

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> +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.
> +-->
> +
> +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
> +jclouds-karaf
> +2.0.0-SNAPSHOT
> +..

Isn't this the default value?

-- 
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-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686166

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> @@ -21,6 +21,7 @@ limitations under the License.
>  jclouds-karaf
>  org.apache.jclouds
>  2.0.0-SNAPSHOT
> +..

Isn't that the default value?

-- 
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-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686126

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> @@ -23,6 +23,7 @@ limitations under the License.
>  chef
>  org.apache.jclouds.karaf
>  2.0.0-SNAPSHOT
> +../..

I don't think this is correct - the `chef` artifact is indeed one level up

-- 
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-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686003

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Ignasi Barrera
We are not passing any value. The [default 
configuration](https://github.com/jclouds/jclouds-karaf/blob/master/feature/src/main/resources/shell.cfg)
 does not set the engine value, so "groovy" was used (which seems to be the 
[right 
value](https://github.com/groovy/groovy-core/blob/master/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java#L44)).
 I've also tried setting custom values there and directly instantiating the 
javascript engine classes provided by the JRE, but both tests failed.

>but nothing happened? Were you able to query the OSGiScriptEngineManager to 
>see which engines it had been able to load?

Yes. Well, there is no default constructor for that class; it requires the 
BundleContext. I tried getting the context by calling the OSGI `FrameworkUtil` 
to get and pass it to the engine. However, it couldn't load the engines. I'm 
pretty sure I was doing something wrong here, as I don't know enough about OSGi 
to be confident about what I was doing :)

>The question I would have at this point is whether this ever worked? I'd be 
>surprised if it was broken all the way from the time it was implemented. So I 
>wonder what has changed (on the Felix side?) to break this?

I really don't know. Honestly, I've never used the interactive shell except for 
installing features for other providers, so I have never tried. I don't know if 
there were relevant changes that might have broken this.


BTW, regarding the shaded bundle fix, it works, but there is still this error 
when the CLI starts:

```
$ cat karaf.log
Sep 06, 2016 3:28:20 PM org.apache.karaf.main.SimpleFileLock lock
INFO: locking
2016-09-06 15:28:21,596 | INFO  | FelixStartLevel  | fileinstall
  | ?   ? | 6 - 
org.apache.felix.fileinstall - 3.4.2 | Updating configuration from 
org.apache.jclouds.credentials.cfg
2016-09-06 15:28:21,866 | INFO  | FelixStartLevel  | BlueprintExtender  
  | rint.container.BlueprintExtender  146 | 12 - 
org.apache.aries.blueprint.core - 1.4.0 | No quiesce support is available, so 
blueprint components will not participate in quiesce operations
2016-09-06 15:28:22,953 | WARN  | FelixStartLevel  | ConsoleFactory 
  | ell.console.jline.ConsoleFactory  193 | 15 - 
org.apache.karaf.shell.console - 2.3.9 | Error starting ssh agent for local 
console
java.lang.NoClassDefFoundError: org/apache/sshd/agent/SshAgent
at 
org.apache.karaf.shell.console.jline.ConsoleFactory.startAgent(ConsoleFactory.java:186)[15:org.apache.karaf.shell.console:2.3.9]
at 
org.apache.karaf.shell.console.jline.ConsoleFactory.doStart(ConsoleFactory.java:118)[15:org.apache.karaf.shell.console:2.3.9]
at 
org.apache.karaf.shell.console.jline.ConsoleFactory$1.run(ConsoleFactory.java:91)
at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_51]
at javax.security.auth.Subject.doAs(Subject.java:415)[:1.7.0_51]
at 
org.apache.karaf.shell.console.jline.ConsoleFactory.start(ConsoleFactory.java:89)[15:org.apache.karaf.shell.console:2.3.9]
at 
org.apache.karaf.shell.console.jline.ConsoleFactory.registerCommandProcessor(ConsoleFactory.java:68)[15:org.apache.karaf.shell.console:2.3.9]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)[:1.7.0_51]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
at 
org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[12:org.apache.aries.blueprint.core:1.4.0]
at 
org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$Listener.invokeMethods(AbstractServiceReferenceRecipe.java:574)[12:org.apache.aries.blueprint.core:1.4.0]
at 
org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$Listener.bind(AbstractServiceReferenceRecipe.java:556)[12:org.apache.aries.blueprint.core:1.4.0]
at 
org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.bind(AbstractServiceReferenceRecipe.java:451)[12:org.apache.aries.blueprint.core:1.4.0]
at 
org.apache.aries.blueprint.container.ReferenceRecipe.bind(ReferenceRecipe.java:168)[12:org.apache.aries.blueprint.core:1.4.0]
at 
org.apache.aries.blueprint.container.ReferenceRecipe.retrack(ReferenceRecipe.java:136)[12:org.apache.aries.blueprint.core:1.4.0]
at 
org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.updateListeners(AbstractServiceReferenceRecipe.java:443)[12:org.apache.aries.blueprint.core:1.4.0]
at 
org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:115)[12:org.apache.aries.blueprint.core:1.4.0]
at 

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
The question I would have at this point is whether this ever worked? I'd be 
surprised if it was broken all the way from the time it was implemented. So I 
wonder what has changed (on the Felix side?) to break 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-karaf/pull/77#issuecomment-244950309

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
>  I've also copied the classes mentioned here but that didn't work...

Just to confirm: you followed the instructions in that blog post and replaced
```
private final ScriptEngineManager scriptEngineFactory = new 
ScriptEngineManager();
```
with
```
private final ScriptEngineManager scriptEngineFactory = new 
OSGiScriptEngineManager();
```
but nothing happened? Were you able to query the `OSGiScriptEngineManager` to 
see which engines it had been able to load?

-- 
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-karaf/pull/77#issuecomment-244950033

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> The problem is that the scriptEngine is not loaded and is always null when 
> running in the interactive shell, which results in silently printing null 
> values when a NPE occurs.

Which value is passed in for the `engine` parameter? From your explanation and 
what I can see in the code, the problem is that 
`scriptEngineFactory.getEngineByName` is no longer returning anything? If so, 
do we know whether we are passing the correct argument to that 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-karaf/pull/77#issuecomment-244949211

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Andrew Phillips
> +${import.packages}
> +  
> +
> +  
> +  
> +org.apache.maven.plugins
> +maven-shade-plugin
> +2.4.3
> +
> +  
> +package
> +
> +  shade
> +
> +
> +  
> ${project.build.directory}/dependency-reduced-pom.xml

> This way we ignore it and we don't commit it to the SCM.

Ah, clear - this is **not** the default value, in other words. Thanks for 
clarifying!

-- 
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-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77632459

Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api (#315)

2016-09-06 Thread Ignasi Barrera
Thanks @alibazlamit! Take care of reformatting the code to use 3 space 
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/pull/315#issuecomment-244946602

Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api (#315)

2016-09-06 Thread Ignasi Barrera
> + * 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.apache.jclouds.oneandone.rest.domain;
> +
> +import com.google.auto.value.AutoValue;
> +
> +@AutoValue
> +public abstract class GenericRequest {

This class seems to not be used at all. Remove 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/pull/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77630685

Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api (#315)

2016-09-06 Thread Ignasi Barrera
> @@ -37,7 +37,7 @@
>
>  
>
> -2.0.0-SNAPSHOT
> +2.0.0-SNAPSHOT

Discard this change

-- 
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/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77631496

Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api (#315)

2016-09-06 Thread Ignasi Barrera
> +  assertNodeAvailable(currentServer);
> +  currentPrivateNetwork = 
> privateNetworkApi().create(PrivateNetwork.CreatePrivateNetwork.builder()
> +  .name("jclouds privatenetwork")
> +  .networkAddress("192.168.1.0")
> +  .subnetMask("255.255.255.0")
> +  .build());
> +   }
> +
> +   @Test
> +   public void testList() {
> +  privateNetworks = privateNetworkApi().list();
> +
> +  Assert.assertTrue(privateNetworks.size() > 0);
> +   }
> +
> +   @Test(dependsOnMethods = "testList")

There is no need for this dependency.

-- 
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/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77631232

Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api (#315)

2016-09-06 Thread Ignasi Barrera
> +
> +  PrivateNetwork updateResult = 
> privateNetworkApi().attachServer(currentPrivateNetwork.id(), 
> PrivateNetwork.Server.CreateServer.create(servers));
> +
> +  assertNotNull(updateResult);
> +
> +   }
> +
> +   @Test(dependsOnMethods = "testAttachServer")
> +   public void testListServers() {
> +  
> assertPrivateNetworkAvailable(ServerPrivateNetworkRef.create(currentServer.id(),
>  currentPrivateNetwork.id()));
> +  List servers = 
> privateNetworkApi().listServers(currentPrivateNetwork.id());
> +
> +  Assert.assertTrue(servers.size() > 0);
> +   }
> +
> +   @Test(dependsOnMethods = "testListServers")

Better depend on the attach test too.

-- 
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/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77631387

Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api (#315)

2016-09-06 Thread Ignasi Barrera
> +   public void testList() {
> +  privateNetworks = privateNetworkApi().list();
> +
> +  Assert.assertTrue(privateNetworks.size() > 0);
> +   }
> +
> +   @Test(dependsOnMethods = "testList")
> +   public void testListWithOption() {
> +  GenericQueryOptions options = new GenericQueryOptions();
> +  options.options(0, 0, null, "jclouds", null);
> +  List resultWithQuery = 
> privateNetworkApi().list(options);
> +
> +  Assert.assertTrue(resultWithQuery.size() > 0);
> +   }
> +
> +   @Test(dependsOnMethods = "testListWithOption")

No need for the dependency.

-- 
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/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77631265

Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api (#315)

2016-09-06 Thread Ignasi Barrera
> +
> +  public abstract String name();
> +
> +  @SerializedNames({"id", "name"})
> +  public static Server create(String id, String name) {
> + return new AutoValue_PrivateNetwork_Server(id, name);
> +  }
> +
> +  @AutoValue
> +  public abstract static class CreateServer {
> +
> + public abstract List servers();
> +
> + @SerializedNames({"servers"})
> + public static CreateServer create(List servers) {
> +return new AutoValue_PrivateNetwork_Server_CreateServer(servers 
> == null ? ImmutableList.of() : servers);

Enforce an immutable list when present too.

-- 
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/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77630827

Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api (#315)

2016-09-06 Thread Ignasi Barrera
> +  final Predicate predicate = DockerComputeServiceAdapter
> +
> .createPredicateMatchingRepoTags("docker.io/kwart/alpine-ext:3.3-ssh");
> +  assertFalse(predicate.apply(IMAGE_REPO_TAGS_MULTI));
> +  assertFalse(predicate.apply(IMAGE_REPO_TAGS_EMPTY));
> +  assertTrue(predicate.apply(IMAGE_REPO_TAGS_WITH_HOST));
> +   }
> +
> +   public void testRepoTagLatestWithHost() {
> +  final Predicate predicate = DockerComputeServiceAdapter
> +.createPredicateMatchingRepoTags("docker.io/kwart/alpine-ext");
> +  assertFalse(predicate.apply(IMAGE_REPO_TAGS_MULTI));
> +  assertFalse(predicate.apply(IMAGE_REPO_TAGS_EMPTY));
> +  assertTrue(predicate.apply(IMAGE_REPO_TAGS_WITH_HOST));
> +   }
> +
> +}

Make sure your branch is properly rebased. This class shouldn't be part of the 
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-labs/pull/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77630377

Re: [jclouds/jclouds-karaf] [JCLOUDS-858] Upgrade Jersey bundle to 1.19 (#64)

2016-09-06 Thread Ignasi Barrera
I don't really know the purpose of this change, so let's wait for @iocanel or 
close it if there is no update in a reasonable amount of time?

-- 
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-karaf/pull/64#issuecomment-244903499

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Ignasi Barrera
>Independently of this PR: now that we have the framework for including shaded 
>bundles relatively easily, perhaps worth considering making one that applies 
>ymnk/jsch-agent-proxy#24 and then switching back to SSHJ?

Absolutely. Let's address that in another 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-karaf/pull/77#issuecomment-244902646

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Ignasi Barrera
@demobox Addressed the review comments.

I've also been able to fix the display issue, but I'm pretty sure it is not the 
best solution. The problem is that the 
[scriptEngine](https://github.com/jclouds/jclouds-karaf/blob/master/commands/src/main/java/org/jclouds/karaf/commands/table/internal/ScriptEngineShellTable.java#L40)
 is not loaded and is always `null` when running in the interactive shell, 
which results in silently printing [null 
values](https://github.com/jclouds/jclouds-karaf/blob/master/commands/src/main/java/org/jclouds/karaf/commands/table/internal/ScriptEngineShellTable.java#L49-L58)
 when a NPE occurs.

I've spent these days trying to figure out why the "groovy" engine (the 
[default 
one](https://github.com/jclouds/jclouds-karaf/blob/master/commands/src/main/java/org/jclouds/karaf/commands/table/BasicShellTableFactory.java#L42))
 can't be loaded in interactive mode, but with no success at all. I've tried 
changing it to "JavaScript", as it is bundled in the JRE since Java 6, but it 
failed to load it too. I've also copied the classes mentioned 
[here](https://devnotesblog.wordpress.com/2011/09/07/scripting-using-jsr-223-in-an-osgi-environment/)
 but that didn't worked. I don't really know how to properly fix this.

The workaround is to explicitly load the Groovy engine (have a look at the last 
commit) if no engine can be loaded. This way we keep our default engine and the 
only possible issue would be users manually configuring a different engine and 
working in interactive mode. If the expressions they use to render the columns 
in the command output are not compatible with Groovy, the output won't be 
rendeded. Anyway, I think it is a reasonable fallback. WDYT @demobox?

@ccustine @iocanel I would really appreciate your feedback on 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-karaf/pull/77#issuecomment-244901813

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Ignasi Barrera
@nacx pushed 2 commits.

9c7d134  Addressed review comments
fc62962  Explicitly fallback to the Groocy scripting engine


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f..fc62962216847e92c464638902993b7231a17a25


Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Ignasi Barrera
> +${import.packages}
> +  
> +
> +  
> +  
> +org.apache.maven.plugins
> +maven-shade-plugin
> +2.4.3
> +
> +  
> +package
> +
> +  shade
> +
> +
> +  
> ${project.build.directory}/dependency-reduced-pom.xml

The shade plugin puts the reduced pom in the root directory (not in `target`) 
and the RAT plugin complains about it. This way we ignore it and we don't 
commit it to the SCM.

-- 
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-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77601104

Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle (#77)

2016-09-06 Thread Ignasi Barrera
> +
> +  org.apache.jclouds.karaf.bundles
> +  jsch-agentproxy-jsch
> +  jclouds :: Karaf :: JSCH Agentproxy Shaded Bundle
> +  bundle
> +
> +  
> +
> +  org.apache.servicemix.bundles
> +  
> org.apache.servicemix.bundles.jsch-agentproxy-jsch
> +  ${jsch.agentproxy.bundle.version}
> +
> +  
> +
> +  
> +

Right. We deliberately remove the "exports", since that was the offending part. 
The resulting Manifest is a good one to be used 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-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77600971