Shutdown Source VM (PAUSED) on successfull migration + blackened all .py files
This commit is contained in:
parent
29e938dc74
commit
9bdf4d2180
31 changed files with 1307 additions and 638 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue