|
|
|
@ -130,7 +130,7 @@ class Project:
|
|
|
|
|
@asyncio.coroutine
|
|
|
|
|
def clean_old_path(self, old_path):
|
|
|
|
|
"""
|
|
|
|
|
Called after a project location change. All the hypervisor should
|
|
|
|
|
Called after a project location change. All the compute should
|
|
|
|
|
have been notified before
|
|
|
|
|
"""
|
|
|
|
|
if self._temporary:
|
|
|
|
@ -323,10 +323,10 @@ class Project:
|
|
|
|
|
Closes the project, but keep information on disk
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
for module in self.hypervisor():
|
|
|
|
|
for module in self.compute():
|
|
|
|
|
yield from module.instance().project_closing(self)
|
|
|
|
|
yield from self._close_and_clean(self._temporary)
|
|
|
|
|
for module in self.hypervisor():
|
|
|
|
|
for module in self.compute():
|
|
|
|
|
yield from module.instance().project_closed(self)
|
|
|
|
|
|
|
|
|
|
@asyncio.coroutine
|
|
|
|
@ -380,7 +380,7 @@ class Project:
|
|
|
|
|
vm = self._vms_to_destroy.pop()
|
|
|
|
|
yield from vm.delete()
|
|
|
|
|
self.remove_vm(vm)
|
|
|
|
|
for module in self.hypervisor():
|
|
|
|
|
for module in self.compute():
|
|
|
|
|
yield from module.instance().project_committed(self)
|
|
|
|
|
|
|
|
|
|
@asyncio.coroutine
|
|
|
|
@ -389,10 +389,10 @@ class Project:
|
|
|
|
|
Removes project from disk
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
for module in self.hypervisor():
|
|
|
|
|
for module in self.compute():
|
|
|
|
|
yield from module.instance().project_closing(self)
|
|
|
|
|
yield from self._close_and_clean(True)
|
|
|
|
|
for module in self.hypervisor():
|
|
|
|
|
for module in self.compute():
|
|
|
|
|
yield from module.instance().project_closed(self)
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
@ -410,13 +410,13 @@ class Project:
|
|
|
|
|
log.warning("Purge old temporary project {}".format(project))
|
|
|
|
|
shutil.rmtree(path)
|
|
|
|
|
|
|
|
|
|
def hypervisor(self):
|
|
|
|
|
def compute(self):
|
|
|
|
|
"""
|
|
|
|
|
Returns all loaded VM hypervisor.
|
|
|
|
|
Returns all loaded VM compute.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
# We import it at the last time to avoid circular dependencies
|
|
|
|
|
from ..hypervisor import MODULES
|
|
|
|
|
from ..compute import MODULES
|
|
|
|
|
return MODULES
|
|
|
|
|
|
|
|
|
|
def emit(self, action, event):
|