forked from shaba/openuds
* Fixed a bug on oVirt
* Added devel support for "notify ready from os manager"
This commit is contained in:
parent
eb9993f607
commit
0b2e38a85d
@ -265,7 +265,7 @@ class OVirtLinkedDeployment(UserDeployment):
|
||||
if self._vmid != '': # Powers off
|
||||
try:
|
||||
state = self.service().getMachineState(self._vmid)
|
||||
if state == 'up' and state == 'suspended':
|
||||
if state in ('up', 'suspended'):
|
||||
self.service().stopMachine(self._vmid)
|
||||
except:
|
||||
logger.debug('Can\t set machine state to stopped')
|
||||
|
@ -165,6 +165,9 @@ def develAction(credentials, action, ids ):
|
||||
logger.debug('Releasing in use from {0}'.format(uds.friendly_name))
|
||||
uds.setState(State.USABLE)
|
||||
uds.setInUse(False)
|
||||
elif action == 'notifyReady':
|
||||
logger.debug('Notifying ready from os manager to {0}'.format(uds.friendly_name))
|
||||
uds.getInstance().osmanager().process(uds, 'ready', '{0}=1.2.3.4'.format(uds.unique_id))
|
||||
else:
|
||||
logger.debug('Setting {0} to usable'.format(uds.friendly_name))
|
||||
uds.setState(State.USABLE)
|
||||
|
Loading…
Reference in New Issue
Block a user