mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Fix VM.get_power_state API. On the xend side an integer representation of the power state was being returned instead of a string representation as specified by the XenAPI spec.
On the c-bindings side the marshalling code converts the string representation to an enum value. A subsequent attempt to convert the enum from a string to an enum was causing a seg fault. Signed-off-by: Jim Fehlig <jfehlig@novell.com>
This commit is contained in:
1 parent
d2cd19a8b2
commit
160ed4756b
3 files changed
+1
-4
No files matched your search
@@ -669,7 +669,7 @@ class XendAPI:
|
||||
# attributes (ro)
|
||||
def VM_get_power_state(self, session, vm_ref):
|
||||
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
|
||||
return xen_api_success(dom.state)
|
||||
return xen_api_success(dom.get_power_state())
|
||||
|
||||
def VM_get_resident_on(self, session, vm_ref):
|
||||
return xen_api_success(XendNode.instance().uuid)
|
||||
|
||||