libcloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sengor <seng...@gmail.com>
Subject Re: [libcloud] Custom API queries
Date Thu, 13 Jan 2011 15:56:04 GMT
I agree in principle, however given:
- various cloud APIs are far from being standardised
- providers seem to add new/custom features to their respective APIs
across versions

it'd be of practical use to have a generic/freeform low level REST API
interface exposed via the NodeDriver. Even for the sake of provider
specific point-in-time API debugging.

On Thu, Jan 13, 2011 at 4:30 PM, Paul Querna <paul@querna.org> wrote:
> On Wed, Jan 12, 2011 at 8:16 PM, Sengor <sengork@gmail.com> wrote:
>> Hi guys,
>>
>> Is it safe enough (long term interface wise) to utilise this mechanism
>> for sending custom queries to cloud provider APIs?
>>
>> Example:
>>>>> from libcloud.types import Provider
>>>>> from libcloud.providers import get_driver
>>>>> from libcloud.drivers import ibm_sbc
>>>>> d=get_driver(Provider.IBM)
>>>>> c=d("username", "password")
>>>>> c.connection.request(ibm_sbc.REST_BASE+'/keys').body
>> '<?xml version="1.0"...>'
>>
>> Where '/keys' could be an arbitrary REST API call.
>>
>
> It would be better to wrap most of these in ex_ prefix APIs on the
> main driver object -- while I dont think there is a plan to rewrite
> connection any time soon, relying on it seems very much like a
> non-public API -- it would be best to just submit patches for adding
> more things, see the rackspace or amazon drivers for example, they
> have many extension apis.
>
> Thanks,
>
> Paul
>



-- 
sengork

Mime
View raw message