0

I have been reading about the support jclouds added to the Cinder Openstack API, and i was looking at this example usage on Rackspace Cloud.

https://github.com/jclouds/jclouds-examples/blob/master/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java

does anybody know is this is supported for HP Cloud as well? if not, how can i use HP Cloud Block Storage with jclouds?

thanks a lot!

Eli Polonsky
  • 511
  • 1
  • 3
  • 11

2 Answers2

0

You should be able to use the Cinder API with HP but I tried it out and it wasn't working. Here's what I did.

Iterable<Module> modules = ImmutableSet.<Module> of(new SLF4JLoggingModule());

RestContext<CinderApi, CinderAsyncApi> cinder = ContextBuilder.newBuilder("openstack-cinder")
  .endpoint("https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/")
  .apiVersion("1.1")
  .credentials(myHpTenantName + ":" + myHpUsername, myHpPassword)
  .modules(modules)
  .build(CinderApiMetadata.CONTEXT_TOKEN);
VolumeApi volumeApi = cinder.getApi().getVolumeApiForZone("az-1.region-a.geo-1");
System.out.println(volumeApi.list());

The call to list() returns an empty list but with logging turned on I can see that it's actually a 404 causing the empty list to be returned. The URL that's created to list the volumes is

https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/myHpTenantId/volumes

Which I think should be valid according to the HP service catalog but it's returning a 404.

I'll ping someone I know from HP and see if we can get to the bottom of this.

Everett Toews
  • 10,337
  • 10
  • 44
  • 45
  • dont you have version mismatch here? the endpoint contains v2.0 but the you specify version 1.1 to the builder...in any case thanks, i will try and get it to work. ill update here of my progress. – Eli Polonsky Jan 31 '13 at 20:15
  • It's v2.0 of the authentication (Keystone) API but v1.1 of the Cinder API. – Everett Toews Jan 31 '13 at 20:58
0

HP Cloud's support for the OpenStack Block Storage (Cinder) API is coming soon. Please refer to our API documentation for reference to the currently supported Block Storage APIs: https://docs.hpcloud.com/api/block-storage/