inline!
On Fri, Oct 26, 2012 at 8:25 PM, Everett Toews
<
everet...@rackspace.com> wrote:
> Cool. Thanks.
>
> After a bit of coding I've got a number of questions on how
> openstack-cinder will fit into the overall jclouds architecture.
>
> 1. Region or Zone?
>
> openstack-glance, openstack-nova and openstack-quantum all use the
> ZoneModule but openstack-swift uses the RegionModule. I was leaning
> towards using the RegionModule for openstack-cinder because the
> serviceCatalog from Keystone spits back things called region but I thought
> there might be more to it than that. Which should I use and why?
region is a service that has datacenter failure resilience, zone is
for things better mapped to datacenters. HP named their urls for
swift on region basis, which was the original history. Hopefully,
swift is indeed resilient to a zone failure. Otherwise it might not
have been a good choice.
Keystone has a generic field named ~region, but since that's not used
precisely, you can ignore it. For example,our ZoneModule uses the
same data that is in the Keystone region field, since keystone has no
location scope defined outside region right now (unless that's
changed)
Very likely cinder has the same fault tolerance as nova, so I'd assume
it is zone.
>
> 2. To split or not split the API?
>
> The API isn't that big but there are 3 distinct parts to it: Volumes,
> Volume Types, and Snapshots. Most OpenStack APIs (whether driven by
> extensions or not) seem to get the split out treatment. Should I follow
> that pattern here?
yep. I don't see a reason to change, as the intent is to be resource
based (ex. volume is a distinct resource from snapshot, etc)
>
> 3. Best practice for getting a handle on the API?
>
> I've got a bit of working code now that I can run against my local Folsom
> devstack. Here's how I'm doing it.
>
> Iterable<Module> modules = ImmutableSet.<Module> of(
> new SLF4JLoggingModule());
>
> String provider = "openstack-cinder";
> String identity = "demo:demo"; // tenantName:userName
> String key = "devstack";
>
>
> RestContext<CinderApi, CinderAsyncApi> cinder =
> ContextBuilder.newBuilder(provider)
> .credentials(identity, key)
> .endpoint("
http://172.16.0.1:5000/v2.0/")
> .modules(modules)
> .build(CinderApiMetadata.CONTEXT_TOKEN);
>
> System.out.println(cinder.getApi().getConfiguredRegions());
>
> Is that the best way to get a handle on the API to start working with it?
yeah
>
>
> Any other sage advice for a Friday afternoon?
sorry too late for that :) Anyway, best advice is always to look at
most recent code and follow that. best luck!