jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Everett Toews <everett.to...@RACKSPACE.COM>
Subject Re: OpenStack Cinder ViolumeAPI vs Nova VolumeAPI
Date Wed, 07 Aug 2013 21:52:58 GMT
On Aug 7, 2013, at 11:15 AM, Bk Lau wrote:

> Hi:
> 
> Currently NovaApi.class exposes the VolumeApi and VolumeAttachmentApi. I don't see a
Volume.Status.ATTACHING state.
> 
> But with the Cinder Vol/Attachment API, there is one.
> 
> My question is: How does JCloud's  NovaApi class
> automatically return one over the other?.

It won't. These are really separate APIs and jclouds treats them as such.

If you're coding to org.jclouds.openstack.cinder.v1.features.VolumeApi, you'll get anything
available in that API. 

If you're coding to org.jclouds.openstack.nova.v2_0.extensions.VolumeApi, you'll get anything
available in that API.

Historically speaking in OpenStack, the Nova Volume API was copied over to the Cinder API
v1. The Nova Volume API was then deprecated so you will only find it in older OpenStack deployments.
The Cinder API is the way forward for block storage in OpenStack.

> More specifically, if Cinder is available,
> would  NovaAPI.getVolumeExtensionForZone(...)
> returns the Cinder version?

No. The Volume API in Nova is separate from the Cinder service in OpenStack. 

NovaApi.getVolumeExtensionForZone(...) will only ever return the Nova Volume API.

> If not how does one determine if Cinder is supported and
> get the Cinder Api in JCloud?

The block storage feature will typically be advertised by your OpenStack provider in some
way. "Hey! Use our block storage service!"

To programmatically determine if it's supported you can try to create a CinderApi like so
[1] or manually authenticate [2] and iterate through the service catalog looking for the cinder
service.

HTH,
Everett


[1] https://github.com/jclouds/jclouds-examples/blob/master/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java#L120-124

[2] http://blog.phymata.com/2013/06/17/jclouds-manual-authentication-with-openstack/
Mime
View raw message