[Engine-devel] Fwd: storagedomain status via API

Michael Pasternak mpastern at redhat.com
Mon Aug 27 14:55:24 UTC 2012


On 08/27/2012 05:41 PM, Ryan Harper wrote:
> * Michael Pasternak <mpastern at 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.

> 
> Also, any tips on deleting 'unattached' domains via the python bindings?
> 

see my reply in original email.

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D



More information about the Engine-devel mailing list