ia64/xen-unstable

changeset 12148:57f59959aa80

[XEND] Fix some missing variables in XendDomain caught by pylint.

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Fri Oct 27 16:45:40 2006 +0100 (2006-10-27)
parents 808f5aa6dbb0
children b87603c00fee
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Fri Oct 27 16:44:15 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Fri Oct 27 16:45:40 2006 +0100
     1.3 @@ -528,10 +528,10 @@ class XendDomain:
     1.4                  
     1.5                  if dom.state == XendDomainInfo.DOM_STATE_RUNNING:
     1.6                      shutdownAction = dom.info.get('on_xend_stop', 'ignore')
     1.7 -                    if shouldShutdown and shutdownAction == 'shutdown':
     1.8 +                    if shutdownAction == 'shutdown':
     1.9                          log.debug('Shutting down domain: %s' % dom.getName())
    1.10                          dom.shutdown("poweroff")
    1.11 -                    elif shouldShutdown and shutdownAction == 'suspend':
    1.12 +                    elif shutdownAction == 'suspend':
    1.13                          chkfile = self._managed_check_point_path(dom.getName())
    1.14                          self.domain_save(dom.domid, chkfile)
    1.15          finally:
    1.16 @@ -584,7 +584,7 @@ class XendDomain:
    1.17              if not dom:
    1.18                  return None
    1.19  
    1.20 -            value = dom.get_device_property(klass, devid, field)
    1.21 +            value = dom.get_device_property(klass, dev_uuid, field)
    1.22              return value
    1.23          except ValueError, e:
    1.24              pass
    1.25 @@ -952,15 +952,16 @@ class XendDomain:
    1.26      def domain_dump(self, domid, filename, live, crash):
    1.27          """Dump domain core."""
    1.28  
    1.29 -        dominfo = self.domain_lookup_by_name_or_id_nr(domid)
    1.30 +        dominfo = self.domain_lookup_nr(domid)
    1.31          if not dominfo:
    1.32              raise XendInvalidDomain(str(domid))
    1.33  
    1.34 -        if dominfo.getDomid() == PRIV_DOMAIN:
    1.35 +        if dominfo.getDomid() == DOM0_ID:
    1.36              raise XendError("Cannot dump core for privileged domain %s" % domid)
    1.37  
    1.38          try:
    1.39 -            log.info("Domain core dump requested for domain %s (%d) live=%d crash=%d.",
    1.40 +            log.info("Domain core dump requested for domain %s (%d) "
    1.41 +                     "live=%d crash=%d.",
    1.42                       dominfo.getName(), dominfo.getDomid(), live, crash)
    1.43              return dominfo.dumpCore(filename)
    1.44          except Exception, ex: