Revision f28ec899
b/lib/backend.py | ||
---|---|---|
1099 | 1099 |
if iname in hyper.ListInstances(): |
1100 | 1100 |
_Fail("Could not shutdown instance %s even by destroy", iname) |
1101 | 1101 |
|
1102 |
try: |
|
1103 |
hyper.CleanupInstance(instance.name) |
|
1104 |
except errors.HypervisorError, err: |
|
1105 |
logging.warning("Failed to execute post-shutdown cleanup step: %s", err) |
|
1106 |
|
|
1102 | 1107 |
_RemoveBlockDevLinks(iname, instance.disks) |
1103 | 1108 |
|
1104 | 1109 |
|
b/lib/hypervisor/hv_base.py | ||
---|---|---|
130 | 130 |
""" |
131 | 131 |
raise NotImplementedError |
132 | 132 |
|
133 |
def CleanupInstance(self, instance_name): |
|
134 |
"""Cleanup after a stopped instance |
|
135 |
|
|
136 |
This is an optional method, used by hypervisors that need to cleanup after |
|
137 |
an instance has been stopped. |
|
138 |
|
|
139 |
@type instance_name: string |
|
140 |
@param instance_name: instance name to cleanup after |
|
141 |
|
|
142 |
""" |
|
143 |
pass |
|
144 |
|
|
133 | 145 |
def RebootInstance(self, instance): |
134 | 146 |
"""Reboot an instance.""" |
135 | 147 |
raise NotImplementedError |
Also available in: Unified diff