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:
jfehlig@jfehlig2.provo.novell.com committed 2006-12-13 18:06:48 -07:00
1 parent d2cd19a8b2
commit 160ed4756b
3 files changed
+1 -4

No files matched your search

+1 -1
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.