Bug 1413628

Summary: Missing storage domain statuses
Product: [oVirt] ovirt-engine Reporter: Filip Krepinsky <fkrepins>
Component: RestAPIAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-16 15:47:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Filip Krepinsky 2017-01-16 14:59:03 UTC
Description of problem:
/api/storagedomains does not return status of a storage domain, except unattached statuses

Version-Release number of selected component (if applicable):
4.2.0

Actual results:
null or <status>unattached</status>

Expected results:
<status>$ACTUAL_STATUS</status>

Additional info:
relevant code: https://gerrit.ovirt.org/#/c/226/3/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResource.java

Comment 1 Juan Hernández 2017-01-16 15:47:58 UTC
The status of the storage domain can't be displayed in /ovirt-engine/api/storagedomains because a storage domain may be attached to multiple data centers, and may have different status for each data center. For example, a NFS ISO storage domain may be attached to two data centers, and it may be "active" in one of them and "inactive" in the other one. To get this status you need to go to the relevant attached storage domain and check the status:

  GET /ovirt-engine/api/datacenters/{dc:id}/storagedomains/{sd:id}