Skip to contentSkip to conversation

Pass uuid to created policy

PATCH New Stefan Berger 1 participant 1 message Jun 13, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Pass uuid to created policy

A UUID needs to be passed to the created policy.

tools/python/xen/util/acmpolicy.py +2 -2
Index: 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)
tools/python/xen/xend/XendXSPolicyAdmin.py +1 -1
Index: 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(),

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel