Shutdown Source VM (PAUSED) on successfull migration + blackened all .py files

This commit is contained in:
ahmadbilalkhalid 2019-12-30 14:35:07 +05:00
commit 9bdf4d2180
31 changed files with 1307 additions and 638 deletions

View file

@ -13,13 +13,12 @@ class VMStatus:
def declare_stopped(vm):
vm['hostname'] = ''
vm['in_migration'] = False
vm['status'] = VMStatus.stopped
vm["hostname"] = ""
vm["in_migration"] = False
vm["status"] = VMStatus.stopped
class VMEntry(SpecificEtcdEntryBase):
def __init__(self, e):
self.owner = None # type: str
self.specs = None # type: dict
@ -48,7 +47,9 @@ class VMEntry(SpecificEtcdEntryBase):
def add_log(self, msg):
self.log = self.log[:5]
self.log.append("{} - {}".format(datetime.now().isoformat(), msg))
self.log.append(
"{} - {}".format(datetime.now().isoformat(), msg)
)
class VmPool: