From: Stefan Berger Subject: [PATCH] [xend] [ACM] Allow removal of labels on suspended domain Date: Fri, 06 Jun 2008 17:34:26 -0400 Message-ID: <1212788066.28696.4.camel@gsal-3.watson.ibm.com> Reply-To: stefanb@us.ibm.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-erbL/cBkmxDnZXl5cEWr" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org --=-erbL/cBkmxDnZXl5cEWr Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch enables the removal of a label from a suspended domain. This is similar to changing a label which is already supported. Signed-off-by: Stefan Berger --=-erbL/cBkmxDnZXl5cEWr Content-Disposition: attachment; filename=allow_remove_label_while_domain_suspended.diff Content-Type: text/x-patch; name=allow_remove_label_while_domain_suspended.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py +++ root/xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py @@ -2891,9 +2891,9 @@ class XendDomainInfo: DOM_STATES[state]) return (-xsconstants.XSERR_VM_WRONG_STATE, "", "", 0) - # Remove security label. Works only for halted domains + # Remove security label. Works only for halted or suspended domains if not seclab or seclab == "": - if state not in [ DOM_STATE_HALTED ]: + if state not in [ DOM_STATE_HALTED, DOM_STATE_SUSPENDED ]: return (-xsconstants.XSERR_VM_WRONG_STATE, "", "", 0) if self.info.has_key('security_label'): --=-erbL/cBkmxDnZXl5cEWr Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-erbL/cBkmxDnZXl5cEWr--