Refactor libvirt create calls
* minimizes duplicated code for create * makes wait_for_destroy happen on shutdown instead of undefine * allows for destruction of an instance while leaving the domain * uses reset for hard reboot instead of create/destroy * makes resume_host_state use new methods instead of hard_reboot * makes rescue/unrescue not use hard reboot to recreate domain Change-Id: I2072f93ad6c889d534b04009671147af653048e7
This commit is contained in:
@@ -288,6 +288,11 @@ class Domain(object):
|
||||
self._state = VIR_DOMAIN_SHUTDOWN
|
||||
self._connection._mark_not_running(self)
|
||||
|
||||
def reset(self, flags):
|
||||
# FIXME: Not handling flags at the moment
|
||||
self._state = VIR_DOMAIN_RUNNING
|
||||
self._connection._mark_running(self)
|
||||
|
||||
def info(self):
|
||||
return [self._state,
|
||||
long(self._def['memory']),
|
||||
|
||||
Reference in New Issue
Block a user