* Michael Pasternak <mpastern(a)redhat.com> [2012-08-27 09:57]:
On 08/27/2012 05:41 PM, Ryan Harper wrote:
> * Michael Pasternak <mpastern(a)redhat.com> [2012-08-27 09:24]:
>> >
>> >
>> > Hi Ryan,
>> >
> He Michael,
>
>> > SD status available only in datacenter context [1], as some of domains
>> > may be shared between datacenters, i.e:
>> >
>> > dc = api.datacenters.get(name="xxx")
>> > sd = dc.storagedomains.get(name="images-cluster1")
>> > sd.status
>> >
>> > [1] except of 'unatached' domains.
> Right, this does make checking the state/status of a storage domain
> programtically troublesome.
>
> I can get a list of all storagedomains, but only some of them will have.
> the 'status' attribute. If it doesn't have the status attribute, then I
> need to enumerate all of the datacenters, and for each datacenter, I can
> list the storage domains, and check the status there.
>
> Any reason the status of each storagedomain can't be present under
> api/storagedomains?
>
storagedomain can be shared between different datacenters,
i.e it may have status X in DC1 and Y in DC2, so only use-case
for SD to have status outside of DC context, is when it not attached
yet.
OK, that makes sense.
>
> Also, any tips on deleting 'unattached' domains via the python bindings?
>
see my reply in original email.
Thanks!
--
Michael Pasternak
RedHat, ENG-Virtualization R&D
--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh(a)us.ibm.com