Help Using JClouds and VmWare API

94 views
Skip to first unread message

Alfredo Quiroga-Villamil

unread,
May 24, 2010, 4:43:43 PM5/24/10
to jcl...@googlegroups.com
All:

I just got all the dependencies worked out for my project using the
latest jclouds API. I am attempting to directly talk to the vCloud API
using VmWare as follows:


RestContext<VCloudAsyncClient, VCloudClient> context =

VCloudContextFactory.createContext(URI.create("https://XXX.XXX.XXX.XXX/api/v0.9/login"),
"administrator@OrgName", "mypassword").getProviderSpecificContext();

and I keep getting the following exception:

com.google.inject.CreationException: Guice creation errors:

1) No implementation for
org.jclouds.compute.strategy.PopulateDefaultLoginCredentialsForImageStrategy
was bound.
at org.jclouds.vcloud.compute.config.VCloudComputeServiceContextModule.provideImages(VCloudComputeServiceContextModule.java:325)

1 error

Any ideas?

Thanks in advance,

Alfredo

--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.

Adrian Cole

unread,
May 24, 2010, 6:11:59 PM5/24/10
to jcl...@googlegroups.com
Hi, Alfredo.

I'm afraid we haven't tested vCloud 0.9 for lack of a public endpoint.
However, if you use the 1.0-SNAPSHOT version of jclouds, this should
get you started. Please expect problems, as there are sufficient
differences in the 0.9 model to break things.

import static org.jclouds.vcloud.reference.VCloudConstants.PROPERTY_VCLOUD_VERSION;
import static org.jclouds.vcloud.reference.VCloudConstants.PROPERTY_VCLOUD_ENDPOINT;

Properties overrides = new Properties();
overrides.setProperty(PROPERTY_VCLOUD_VERSION, "0.9");
overrides.setProperty(PROPERTY_VCLOUD_ENDPOINT,
"https://XXX.XXX.XXX.XXX/api");

// add the ssh module, if you are using ComputeService to launch
scripts, otherwise leave it out
ComputeServiceContext context = new
ComputeServiceContextFactory().createContext("vcloud", user, password,
ImmutableSet.of(new Log4JLoggingModule(), new
JshSshClientModule()), overrides);

RestContext<VCloudAsyncClient, VCloudClient> providerContext =
context.getProviderContext();

Note that you can also use the system property
-Dvcloud.endpoint=https://XXX.XXX.XXX.XXX/api

I hope this helps.

-Adrian
log4j.xml

Alfredo Quiroga-Villamil

unread,
May 24, 2010, 10:08:30 PM5/24/10
to jcl...@googlegroups.com
Adrian:

Appreciate the response. After trying the code you sent me I am still
getting the following:

com.google.inject.CreationException: Guice creation errors:

1) No implementation for
org.jclouds.compute.strategy.PopulateDefaultLoginCredentialsForImageStrategy
was bound.
at org.jclouds.vcloud.compute.config.VCloudComputeServiceContextModule.provideImages(VCloudComputeServiceContextModule.java:325)

1 error

Any ideas? Or since the SDK has not been tested against 0.9 this might
be due to recent changes made in the VmWare vCloud (after 0.8)?

Thanks in advance,

Alfredo

Adrian Cole

unread,
May 24, 2010, 11:29:20 PM5/24/10
to jcl...@googlegroups.com
Hi, Alfredo.

The stack you've pasted in suggests you are not using 1.0-SNAPSHOT, as
there aren't 325 lines in that file anymore ;)

We are releasing 1.0-beta-6 shortly (w/in 48 hours), but you can also
try 1.0-SNAPSHOT now.

Cheers,
-Adrian

On Mon, May 24, 2010 at 7:08 PM, Alfredo Quiroga-Villamil

Alfredo Quiroga-Villamil

unread,
May 25, 2010, 8:04:11 AM5/25/10
to jcl...@googlegroups.com
Adrian:

Thanks for the reply. This is what I had before in my pom.xml:

<project xmlns="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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>SnapCreatorUI</groupId>
<artifactId>SnapCreatorUI</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>SnapCreatorUIMaven</name>

<repositories>
<repository>
<id>jclouds</id>
<url>http://jclouds.googlecode.com/svn/repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-aws</artifactId>
<version>1.0-beta-5</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-rackspace</artifactId>
<version>1.0-beta-5</version>
</dependency>
<!-- continue as wanted, rimuhosting, vcloud, azure, etc. -->
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-vcloud</artifactId>
<version>1.0-beta-5</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-terremark</artifactId>
<version>1.0-beta-5</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-log4j</artifactId>
<version>1.0-beta-5</version>
</dependency>
</dependencies>
</project>

Just to be on the safe side I changed that to: <version>1.0-SNAPSHOT</version>.

I updated my maven SnapShot via the Eclipse Plugin for maven and ran
it again. Same exception as before. It's the pom.xml correct?

I am trying to avoid having to use a REST implementation to access the
vCloud so if We could manage to get this to work it would be really
nice since it seems like one things are in place, getting info from
the vCloud it's very simple via this SDK.

Thanks in advance,

Alfredo

Adrian Cole

unread,
May 25, 2010, 1:32:53 PM5/25/10
to jcl...@googlegroups.com
Hi, Alfredo.

I'm sure you should be getting at least a different line number in the
stack trace, but regardless, beta-6 will go out today.

I don't expect 0.9 to work, since there are schema changes that affect
the model. As much as it kills me to say it, until we get help from a
volunteer who has access to a 0.9 endpoint, I don't see this
improving.

Are you in a position to help bring 0.9 support into jclouds?

Cheers,
-Adrian

On Tue, May 25, 2010 at 5:04 AM, Alfredo Quiroga-Villamil
Reply all
Reply to author
Forward
0 new messages