[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 03 of 10] Export xc_domain_resume to xend
# HG changeset patch # User Brendan Cully <brendan@xxxxxxxxx> # Date 1166166342 28800 # Node ID 76574bc1ca50ece678c606887558e9f910361ac5 # Parent 08aa64728a7485274c5765968c77c07771ebbbf1 Export xc_domain_resume to xend. Signed-off-by: Brendan Cully <brendan@xxxxxxxxx> diff -r 08aa64728a74 -r 76574bc1ca50 tools/python/xen/lowlevel/xc/xc.c --- a/tools/python/xen/lowlevel/xc/xc.c Thu Dec 14 23:05:42 2006 -0800 +++ b/tools/python/xen/lowlevel/xc/xc.c Thu Dec 14 23:05:42 2006 -0800 @@ -160,6 +160,10 @@ static PyObject *pyxc_domain_destroy(XcO return dom_op(self, args, xc_domain_destroy); } +static PyObject *pyxc_domain_resume(XcObject *self, PyObject *args) +{ + return dom_op(self, args, xc_domain_resume); +} static PyObject *pyxc_vcpu_setaffinity(XcObject *self, PyObject *args, @@ -1031,6 +1035,13 @@ static PyMethodDef pyxc_methods[] = { METH_VARARGS, "\n" "Destroy a domain.\n" " dom [int]: Identifier of domain to be destroyed.\n\n" + "Returns: [int] 0 on success; -1 on error.\n" }, + + { "domain_resume", + (PyCFunction)pyxc_domain_resume, + METH_VARARGS, "\n" + "Resume execution of a suspended domain.\n" + " dom [int]: Identifier of domain to be resumed.\n\n" "Returns: [int] 0 on success; -1 on error.\n" }, { "vcpu_setaffinity", diff -r 08aa64728a74 -r 76574bc1ca50 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Thu Dec 14 23:05:42 2006 -0800 +++ b/tools/python/xen/xend/XendDomainInfo.py Thu Dec 14 23:05:42 2006 -0800 @@ -1525,6 +1525,15 @@ class XendDomainInfo: self.cleanupDomain() + + def resumeDomain(self): + log.debug("XendDomainInfo.resumeDomain(%s)", str(self.domid)) + + try: + if self.domid is not None: + xc.domain_resume(self.domid) + except: + log.exception("XendDomainInfo.resume: xc.domain_resume failed on domain %s." % (str(self.domid))) # # Channels for xenstore and console _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |