1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-18 14:28:08 +00:00

Improve warning if fusion is not installed or in non standard location

For the moment I don't see a good reason to not installating fusion
in the standard location.  If check in Docker Machine code they don't
support it. And with their large user base we can think it's safe.

Fix #435
This commit is contained in:
Julien Duponchelle 2016-02-25 12:15:38 +01:00
parent ebb8c0d0b0
commit e91e3525c4
No known key found for this signature in database
GPG Key ID: F1E2485547D4595D

View File

@ -35,10 +35,10 @@ from pkg_resources import parse_version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
from ..base_manager import BaseManager from gns3server.modules.base_manager import BaseManager
from .vmware_vm import VMwareVM from gns3server.modules.vmware.vmware_vm import VMwareVM
from .vmware_error import VMwareError from gns3server.modules.vmware.vmware_error import VMwareError
from .nio_vmnet import NIOVMNET from gns3server.modules.vmware.nio_vmnet import NIOVMNET
class VMware(BaseManager): class VMware(BaseManager):
@ -162,8 +162,8 @@ class VMware(BaseManager):
else: else:
if sys.platform.startswith("darwin"): if sys.platform.startswith("darwin"):
if not os.path.isdir("/Applications/VMware Fusion.app"): if not os.path.isdir("/Applications/VMware Fusion.app"):
raise VMwareError("VMware Fusion is not installed") raise VMwareError("VMware Fusion is not installed in the standard location /Applications/VMware Fusion.app")
return # FIXME: no version checking on Mac OS X return # FIXME: no version checking on Mac OS X but we support all versions of fusion
vmware_path = VMware._get_linux_vmware_binary() vmware_path = VMware._get_linux_vmware_binary()
if vmware_path is None: if vmware_path is None:
@ -646,3 +646,10 @@ class VMware(BaseManager):
if path is None: if path is None:
path = shutil.which("vmplayer") path = shutil.which("vmplayer")
return path return path
if __name__ == '__main__':
loop = asyncio.get_event_loop()
vmware = VMware.instance()
print("=> Check version")
loop.run_until_complete(asyncio.async(vmware.check_vmware_version()))