Print out useful info on state change

This commit is contained in:
Joshua Boniface 2018-06-11 19:22:33 -04:00
parent f6f53296c9
commit f4493ed7c1
1 changed files with 2 additions and 0 deletions

View File

@ -242,6 +242,8 @@ class VMInstance:
except:
running = libvirt.VIR_DOMAIN_NOSTATE
ansiiprint.echo('VM state change for "{}": {} {}'.format(self.domuuid, self.state, self.hypervisor), '', 'i')
# Conditional pass one - If we're already doing something, bail out
if self.instart == True or self.instop == True or self.inshutdown == True or self.inmigrate == True or self.inreceive == True:
return 0