Revision 874f6148 lib/hypervisor/hv_fake.py
b/lib/hypervisor/hv_fake.py | ||
---|---|---|
165 | 165 |
raise errors.HypervisorError("Failed to start instance %s: %s" % |
166 | 166 |
(instance.name, err)) |
167 | 167 |
|
168 |
def StopInstance(self, instance, force=False, retry=False, name=None): |
|
168 |
def StopInstance(self, instance, force=False, retry=False, name=None, |
|
169 |
timeout=None): |
|
169 | 170 |
"""Stop an instance. |
170 | 171 |
|
171 | 172 |
For the fake hypervisor, this just removes the file in the base |
172 | 173 |
dir, if it exist, otherwise we raise an exception. |
173 | 174 |
|
174 | 175 |
""" |
176 |
assert(timeout is None or force is not None) |
|
177 |
|
|
175 | 178 |
if name is None: |
176 | 179 |
name = instance.name |
177 | 180 |
if not self._IsAlive(name): |
Also available in: Unified diff