jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 王逸群 <wyqqri...@gmail.com>
Subject Create SshClientFactory without ChefContext
Date Sun, 17 Jan 2016 11:26:36 GMT
Hi
I am trying to instantiate a ssh connection without ComputeService using
JCloud Chef API. I learned that in:


http://stackoverflow.com/questions/24777085/jclouds-chef-illegalaccesserror-on-tokentype2/24781011#24781011

However, since I own a private server in LAN, I need to configure the
bootstrap script with a custom SSL verify mode. However, I got a no enum
constant exception. Then I check this:

https://issues.apache.org/jira/browse/JCLOUDS-1050

It is fixed in 2.0.0. In JCloud-chef 2.0.0, ChefContext is abandoned, So I
wonder how can I instantiate a ssh connection without ChefContext.

P.S. In JCloud 1.9.1, the code to create a sshClientFactory is shown as
below, and ssh connection is instantiated by this factory.

SshClient.Factory sshFactory =
chefContext.unwrap().utils().injector().getInstance(Key.get(new
TypeLiteral<SshClient.Factory>() {}));

Best Regards,
Yiqun Wang

Mime
View raw message