$ nova boot --flavor <flavor> --block_device_mapping <dev_name>=<id>:<type>:<size>:<delete_on_terminate> <name>see link below:
On Aug 7, 2013, at 11:15 AM, Bk Lau wrote:It won't. These are really separate APIs and jclouds treats them as such.
> 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?.
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.
No. The Volume API in Nova is separate from the Cinder service in OpenStack.
> More specifically, if Cinder is available,
> would NovaAPI.getVolumeExtensionForZone(...)
> returns the Cinder version?
NovaApi.getVolumeExtensionForZone(...) will only ever return the Nova Volume API.
The block storage feature will typically be advertised by your OpenStack provider in some way. "Hey! Use our block storage service!"
> If not how does one determine if Cinder is supported and
> get the Cinder Api in JCloud?
To programmatically determine if it's supported you can try to create a CinderApi like so  or manually authenticate  and iterate through the service catalog looking for the cinder service.