Rename hypervisor to compute

Fix #487
pull/565/head
Julien Duponchelle 8 years ago
parent 3185baff0d
commit 58d4a529d4
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -24,7 +24,7 @@ from ..notification_queue import NotificationQueue
class NotificationManager:
"""
Manage the notification queue where the controller
will connect to get notifications from hypervisors
will connect to get notifications from computes
"""
def __init__(self):

@ -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):

@ -35,10 +35,10 @@ from pkg_resources import parse_version
log = logging.getLogger(__name__)
from gns3server.hypervisor.base_manager import BaseManager
from gns3server.hypervisor.vmware.vmware_vm import VMwareVM
from gns3server.hypervisor.vmware.vmware_error import VMwareError
from gns3server.hypervisor.vmware.nio_vmnet import NIOVMNET
from gns3server.compute.base_manager import BaseManager
from gns3server.compute.vmware.vmware_vm import VMwareVM
from gns3server.compute.vmware.vmware_error import VMwareError
from gns3server.compute.vmware.nio_vmnet import NIOVMNET
class VMware(BaseManager):

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save