incubator-libcloud mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rudiger Wolf <Rudiger.W...@ThroughputFocus.com>
Subject Re: [libcloud] Problem with Rackspace and libcloud 0.4.0?
Date Fri, 08 Oct 2010 15:50:50 GMT
On 08/10/10 15:13, Jerry Chen wrote:
> Hi Rudiger,
>
> The problem, as it turns out, is just the main loop.
>
> On Oct 8, 2010, at 8:27 AM, Rudiger Wolf wrote:
>
>> # retrieve available images and sizes
>> images = conn.list_images()
>> # [<NodeImage: id=3, name=Gentoo 2008.0, driver=Rackspace  ...>, ...]
>> sizes = conn.list_sizes()
>> # [<NodeSize: id=1, name=256 server, ram=256 ... driver=Rackspace ...>, ...]
>>
>> match = None
>> for item in images:
>>     if item.name.find('Ubuntu 10.04 LTS') != -1:
>>         match = True
>
> Here your match boolean is set to true if you see a Lucid Lynx image.
> Cheers,
> Jerry


Thanks Jerry. Sorted it out now. Works as expected!
Have a great weekend.

Mime
View raw message