# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213361750 -3600
# Node ID a41d14c3bf190a5a3523b15fdc417a043b00a844
# Parent 49c5d6723e35168704ac72214b2f334ca6af27cf
[ACM] Pass uuid to created policy
A UUID needs to be passed to the created policy.
Signed-off-by: stefan Berger <stefanb@xxxxxxxxxx>
---
tools/python/xen/util/acmpolicy.py | 4 ++--
tools/python/xen/xend/XendXSPolicyAdmin.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff -r 49c5d6723e35 -r a41d14c3bf19 tools/python/xen/util/acmpolicy.py
--- a/tools/python/xen/util/acmpolicy.py Fri Jun 13 13:55:19 2008 +0100
+++ b/tools/python/xen/util/acmpolicy.py Fri Jun 13 13:55:50 2008 +0100
@@ -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)
diff -r 49c5d6723e35 -r a41d14c3bf19 tools/python/xen/xend/XendXSPolicyAdmin.py
--- a/tools/python/xen/xend/XendXSPolicyAdmin.py Fri Jun 13 13:55:19
2008 +0100
+++ b/tools/python/xen/xend/XendXSPolicyAdmin.py Fri Jun 13 13:55:50
2008 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|