ia64/xen-unstable

changeset 7084:6f49c06d5feb

Remove unused imports, and unused progress parameters from domain_save, domain_restore. Rename one instance of id to domid.
author emellor@ewan
date Tue Sep 27 22:06:15 2005 +0100 (2005-09-27)
parents 679e93b5c6cd
children 8d5760e8e3f1
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Tue Sep 27 22:05:03 2005 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Tue Sep 27 22:06:15 2005 +0100
     1.3 @@ -28,13 +28,11 @@ import xen.lowlevel.xc
     1.4  from xen.xend import sxp
     1.5  from xen.xend import XendRoot
     1.6  from xen.xend import XendCheckpoint
     1.7 -from xen.xend.XendDomainInfo import XendDomainInfo, shutdown_reason
     1.8 +from xen.xend.XendDomainInfo import XendDomainInfo
     1.9  from xen.xend import EventServer
    1.10  from xen.xend.XendError import XendError
    1.11  from xen.xend.XendLogging import log
    1.12 -from xen.xend import scheduler
    1.13  from xen.xend.server import relocate
    1.14 -from xen.xend.xenstore.xstransact import xstransact
    1.15  
    1.16  
    1.17  xc = xen.lowlevel.xc.new()
    1.18 @@ -157,15 +155,15 @@ class XendDomain:
    1.19              eserver.inject('xend.domain.create', [info.getName(),
    1.20                                                    info.getDomid()])
    1.21  
    1.22 -    def _delete_domain(self, id, notify=True):
    1.23 +    def _delete_domain(self, domid, notify=True):
    1.24          """Remove a domain from the tables.
    1.25  
    1.26          @param id:     domain id
    1.27          @param notify: send a domain died event if true
    1.28          """
    1.29 -        info = self.domains.get(id)
    1.30 +        info = self.domains.get(domid)
    1.31          if info:
    1.32 -            del self.domains[id]
    1.33 +            del self.domains[domid]
    1.34              info.cleanup()
    1.35              info.delete()
    1.36              if notify:
    1.37 @@ -235,11 +233,10 @@ class XendDomain:
    1.38              config = nested
    1.39          return XendDomainInfo.restore(config)
    1.40  
    1.41 -    def domain_restore(self, src, progress=False):
    1.42 +    def domain_restore(self, src):
    1.43          """Restore a domain from file.
    1.44  
    1.45          @param src:      source file
    1.46 -        @param progress: output progress if true
    1.47          """
    1.48  
    1.49          try:
    1.50 @@ -367,12 +364,11 @@ class XendDomain:
    1.51          
    1.52          return None
    1.53  
    1.54 -    def domain_save(self, id, dst, progress=False):
    1.55 +    def domain_save(self, id, dst):
    1.56          """Start saving a domain to file.
    1.57  
    1.58          @param id:       domain id
    1.59          @param dst:      destination file
    1.60 -        @param progress: output progress if true
    1.61          """
    1.62  
    1.63          try: