From: Stefan Berger Subject: [PATCH] [xend] [ACM] Pass uuid to created policy Date: Fri, 13 Jun 2008 07:50:47 -0400 Message-ID: <1213357847.28397.4.camel@gsal-3.watson.ibm.com> Reply-To: stefanb@us.ibm.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-Hn09ixY7L3tFPlh+p5sp" 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 --=-Hn09ixY7L3tFPlh+p5sp Content-Type: text/plain Content-Transfer-Encoding: 7bit A UUID needs to be passed to the created policy. Signed-off-by: stefan Berger --=-Hn09ixY7L3tFPlh+p5sp Content-Disposition: attachment; filename=create_forced_policy_with_uuid.diff Content-Type: text/x-patch; name=create_forced_policy_with_uuid.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: xen-unstable.hg_16716/tools/python/xen/util/acmpolicy.py =================================================================== --- xen-unstable.hg_16716.orig/tools/python/xen/util/acmpolicy.py +++ xen-unstable.hg_16716/tools/python/xen/util/acmpolicy.py @@ -507,7 +507,7 @@ class ACMPolicy(XSPolicy): rc = self.compile() return rc, errors - def force_default_policy(klass): + def force_default_policy(klass, policy_ref): """ Force the installation of the DEFAULT policy if for example no XML of the current policy is available and @@ -518,7 +518,7 @@ class ACMPolicy(XSPolicy): """ errors = "" - acmpol_new = ACMPolicy(xml = get_DEFAULT_policy()) + acmpol_new = ACMPolicy(xml = get_DEFAULT_policy(), ref=policy_ref) from xen.lowlevel import acm dom0_ssidref = acm.getssid(0) Index: xen-unstable.hg_16716/tools/python/xen/xend/XendXSPolicyAdmin.py =================================================================== --- xen-unstable.hg_16716.orig/tools/python/xen/xend/XendXSPolicyAdmin.py +++ xen-unstable.hg_16716/tools/python/xen/xend/XendXSPolicyAdmin.py @@ -63,7 +63,7 @@ class XSPolicyAdmin: except Exception, e: log.error("Could not find XML representation of policy '%s': " "%s" % (act_pol_name,e)) - rc, errors, acmpol_def = ACMPolicy.force_default_policy() + rc, errors, acmpol_def = ACMPolicy.force_default_policy(ref) if rc == xsconstants.XSERR_SUCCESS: self.xsobjs[ref] = acmpol_def self.policies[ref] = (acmpol_def.get_name(), --=-Hn09ixY7L3tFPlh+p5sp 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 --=-Hn09ixY7L3tFPlh+p5sp--