jclouds-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <n...@apache.org>
Subject Re: JClouds ProfitBricks Rest issue
Date Wed, 30 Dec 2015 10:19:40 GMT
I'm forwarding this to the dev@ list.

When implementing the compute abstraction, you'll need to implement two
main things: the ComputeService interface implementation, and a set of
functions to transform each entity from the provider specific domain to the
jclouds portable model. Jclouds always works with that portable model (with
the NodeMetadata object) and the info it has is completely up to those
functions.

When building the model entities, most have a pair of properties "id" and
"providerId". The former is the id of the object "jclouds will use to
identify it" and the latter is the real id of the entitt in the provider.
Many providers use a custom coding for the id to provide additional info,
for example, in AWS an image object would have "ami-1234" as the providerId
but "us-east-1/ami-1234" as the id jclouds will use.

So one option you have is to follow this approach (used in aws, openstack,
digitalocean and others) and implement the transformation function to
encode the location in the object id (and then implement the ComputeService
interface accordingly).

HTH!

I.
El 29/12/2015 9:50, "Mirza Licina" <mirza@stackpointcloud.com> escribió:

> Hi, it’s Mirza from the irc channel.
>
> I’m working on the Compute part of the api for ProfitBricks Rest and I
> have a small issue. The thing is that to access server api, endpoints such
> as “/datacenters/datacenterId/server/serverId“ should be used. However, the
> Compute interface uses methods that accept only server id (such as start,
> stop server, get node .. etc). My question is, what would be the right way
> to incorporate dataCenterId into the compute api?
>
> Thank in advance!
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message