[ACM] Pass uuid to created policy

A UUID needs to be passed to the created policy.

Signed-off-by: stefan Berger <stefanb@us.ibm.com>
This commit is contained in:
Keir Fraser committed 2008-06-13 13:55:50 +01:00
1 parent 639bf0b3c7
commit 8b53284ae7
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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(),
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.