ia64/xen-unstable

changeset 17863:a41d14c3bf19

[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>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 13 13:55:50 2008 +0100 (2008-06-13)
parents 49c5d6723e35
children d4dcd4d39952
files tools/python/xen/util/acmpolicy.py tools/python/xen/xend/XendXSPolicyAdmin.py
line diff
     1.1 --- a/tools/python/xen/util/acmpolicy.py	Fri Jun 13 13:55:19 2008 +0100
     1.2 +++ b/tools/python/xen/util/acmpolicy.py	Fri Jun 13 13:55:50 2008 +0100
     1.3 @@ -507,7 +507,7 @@ class ACMPolicy(XSPolicy):
     1.4              rc = self.compile()
     1.5          return rc, errors
     1.6  
     1.7 -    def force_default_policy(klass):
     1.8 +    def force_default_policy(klass, policy_ref):
     1.9          """
    1.10             Force the installation of the DEFAULT policy if for
    1.11             example no XML of the current policy is available and
    1.12 @@ -518,7 +518,7 @@ class ACMPolicy(XSPolicy):
    1.13          """
    1.14          errors = ""
    1.15  
    1.16 -        acmpol_new = ACMPolicy(xml = get_DEFAULT_policy())
    1.17 +        acmpol_new = ACMPolicy(xml = get_DEFAULT_policy(), ref=policy_ref)
    1.18  
    1.19          from xen.lowlevel import acm
    1.20          dom0_ssidref = acm.getssid(0)
     2.1 --- a/tools/python/xen/xend/XendXSPolicyAdmin.py	Fri Jun 13 13:55:19 2008 +0100
     2.2 +++ b/tools/python/xen/xend/XendXSPolicyAdmin.py	Fri Jun 13 13:55:50 2008 +0100
     2.3 @@ -63,7 +63,7 @@ class XSPolicyAdmin:
     2.4          except Exception, e:
     2.5              log.error("Could not find XML representation of policy '%s': "
     2.6                        "%s" % (act_pol_name,e))
     2.7 -            rc, errors, acmpol_def = ACMPolicy.force_default_policy()
     2.8 +            rc, errors, acmpol_def = ACMPolicy.force_default_policy(ref)
     2.9              if rc == xsconstants.XSERR_SUCCESS:
    2.10                  self.xsobjs[ref] = acmpol_def
    2.11                  self.policies[ref] = (acmpol_def.get_name(),