You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@libcloud.apache.org by Alex Amies <al...@gmail.com> on 2011/11/24 01:51:36 UTC
Extending / Registering a new provider
What is the model and method for extending an existing provider or
registering your own provider? Looking at the doc and code I can figure
out how to use the existing providers but I want to add more function to my
cloud provider (IBM). I cannot see anything explaining that.
Thanks
Alex
Re: Extending / Registering a new provider
Posted by Tomaž Muraus <to...@apache.org>.
Usually when you want to add more functionality to a provider driver this
means adding extension methods or arguments.
Extension methods are methods which aren't covered by the Libcloud base API
and are usually specific to the provider.
Extension methods and arguments can be recognized, because they are
prefixed with "ex_". Here is an example of an extension method in the EC2
driver -
https://github.com/apache/libcloud/blob/trunk/libcloud/compute/drivers/ec2.py#L505
.
If you want to add a new provider, besides implementing the driver you also
need to do these two things:
- add a new Provider constant in libcloud.<api name>.types
- add a provider to libcloud.<api name>.providers
We have a bunch of drivers with extension methods (EC2, Rackspace, etc.) so
you can browse the code for more example.
If you have any more specific questions about the functionality you want to
add, let us know.
Tomaz
On Thu, Nov 24, 2011 at 1:51 AM, Alex Amies <al...@gmail.com> wrote:
> What is the model and method for extending an existing provider or
> registering your own provider? Looking at the doc and code I can figure
> out how to use the existing providers but I want to add more function to my
> cloud provider (IBM). I cannot see anything explaining that.
>
> Thanks
>
> Alex
>