Revision bbcf7ad0 lib/hypervisor/hv_chroot.py

b/lib/hypervisor/hv_chroot.py
177 177
      raise HypervisorError("Can't run the chroot start script: %s" %
178 178
                            result.output)
179 179

  
180
  def StopInstance(self, instance, force=False, retry=False):
180
  def StopInstance(self, instance, force=False, retry=False, name=None):
181 181
    """Stop an instance.
182 182

  
183 183
    This method has complicated cleanup tests, as we must:
......
186 186
      - finally unmount the instance dir
187 187

  
188 188
    """
189
    root_dir = self._InstanceDir(instance.name)
189
    if name is None:
190
      name = instance.name
191

  
192
    root_dir = self._InstanceDir(name)
190 193
    if not os.path.exists(root_dir) or not self._IsDirLive(root_dir):
191 194
      return
192 195

  

Also available in: Unified diff