You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by Russell <ru...@gmail.com> on 2010/06/25 01:35:47 UTC

Re: [libcloud] Rackspace & Linode drivers insert different node 'id' types in list_images() return value

I noticed the same thing. Most drivers seem to return IDs as strings (a lot
IDs are not even numeric), but a few are ints. I believe the one I noticed
was that GoGrid returns sizes with int IDs.

I would be inclined to say that all IDs should be strings.

-Russell

On Thu, Jun 24, 2010 at 4:19 PM, ssteinerX@gmail.com <ss...@gmail.com>wrote:

> Hi,
>        I'm working on getting default image/sizes for Rackspace and Linode.
>
>        I'm using the list_images() call to each driver.
>
>        Turns out that the type of the 'id' field is different (<str> for
> rackspace, <int> for linode).
>
>        Is this intentional, or a bug?
>
>        Seems pretty bug-like to me...but I'm not which is the "correct"
> type, nor have I tested this out on other providers.
>
> Thanks,
>
> S
>
>

Re: [libcloud] Rackspace & Linode drivers insert different node 'id' types in list_images() return value

Posted by "ssteinerX@gmail.com" <ss...@gmail.com>.
On Jun 24, 2010, at 7:49 PM, Jerry Chen wrote:

> 
> On Jun 24, 2010, at 6:45 PM, ssteinerX@gmail.com wrote:
> 
>> I'm not familiar with the development process around here...
> 
> Submit a patch to JIRA: https://issues.apache.org/jira/browse/LIBCLOUD

>> This would seem to have a strong potential for break existing code, though.
> 
> Indeed, so we should probably start a new thread alerting everyone, and also add it to release notes for the next version.

Now that I just did a quick perusal, it seems that many of the tests in test_base.py are manually creating nodes initialized with integer id's, so that was probably the way the first driver returned things and later drivers just had to adapt to what their API's returned.

I'm going to just write a wrapper around it that'll work either way and leave it at that -- this is a little too deeply intertwined in the code for my available time.

Thanks,

S




Re: [libcloud] Rackspace & Linode drivers insert different node 'id' types in list_images() return value

Posted by Jerry Chen <je...@apache.org>.
On Jun 24, 2010, at 6:45 PM, ssteinerX@gmail.com wrote:

> I'm not familiar with the development process around here...

Submit a patch to JIRA: https://issues.apache.org/jira/browse/LIBCLOUD

> This would seem to have a strong potential for break existing code, though.

Indeed, so we should probably start a new thread alerting everyone, and also add it to release notes for the next version.

Cheers,
Jerry


Re: [libcloud] Rackspace & Linode drivers insert different node 'id' types in list_images() return value

Posted by "ssteinerX@gmail.com" <ss...@gmail.com>.
On Jun 24, 2010, at 7:35 PM, Russell wrote:

> I noticed the same thing. Most drivers seem to return IDs as strings (a lot
> IDs are not even numeric), but a few are ints. I believe the one I noticed
> was that GoGrid returns sizes with int IDs.
> 
> I would be inclined to say that all IDs should be strings.

I agree, that would be more consistent.

It would actually smooth out one of the differences between Linode & Rackspace's implementations instead of perpetuating them.

I'm not familiar with the development process around here...

This would seem to have a strong potential for break existing code, though.

S