[libgovirt] storage-domain: Parse storage domain status
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt] storage-domain: Parse storage domain status
- Date: Thu, 12 Mar 2015 13:03:54 +0000 (UTC)
commit 18d7c0050e283156c7466960cc7189fc7a2997c7
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu Mar 12 13:03:27 2015 +0100
storage-domain: Parse storage domain status
RHEV API documentation indicates that the storage domain status is in
the /storage_domain_status element, but this is wrong, one should get it
from /status/state instead. We can now handle such paths thanks to the
helper introduced in the previous commit.
govirt/ovirt-storage-domain.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/govirt/ovirt-storage-domain.c b/govirt/ovirt-storage-domain.c
index 15bb22a..a037043 100644
--- a/govirt/ovirt-storage-domain.c
+++ b/govirt/ovirt-storage-domain.c
@@ -295,7 +295,7 @@ ovirt_resource_parse_xml(OvirtResource *resource,
const char *value_str;
GValue value = { 0, };
- value_str = ovirt_rest_xml_node_get_content(node, elements->xml_node, NULL);
+ value_str = ovirt_rest_xml_node_get_content_from_path(node, elements->xml_node);
if (value_str == NULL) {
g_debug("Could not find node %s", elements->xml_node);
continue;
@@ -342,7 +342,7 @@ ovirt_storage_domain_refresh_from_xml(OvirtStorageDomain *domain,
{ "used", G_TYPE_UINT64, "used" },
{ "committed", G_TYPE_UINT64, "committed" },
{ "storage_format", OVIRT_TYPE_STORAGE_DOMAIN_FORMAT_VERSION, "version" },
- { "storage_domain_state", OVIRT_TYPE_STORAGE_DOMAIN_STATE, "state" },
+ { "status/state", OVIRT_TYPE_STORAGE_DOMAIN_STATE, "state" },
{ NULL, G_TYPE_INVALID, NULL }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]