mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-13 01:20:58 +00:00
Merge remote-tracking branch 'origin/unstable' into unstable
This commit is contained in:
commit
2fc63601bf
@ -93,11 +93,8 @@ class VMwareVM(BaseVM):
|
|||||||
"enable_remote_console": self.enable_remote_console,
|
"enable_remote_console": self.enable_remote_console,
|
||||||
"adapters": self._adapters,
|
"adapters": self._adapters,
|
||||||
"adapter_type": self.adapter_type,
|
"adapter_type": self.adapter_type,
|
||||||
"use_any_adapter": self.use_any_adapter}
|
"use_any_adapter": self.use_any_adapter,
|
||||||
if self._linked_clone:
|
"vm_directory": self.working_dir}
|
||||||
json["vm_directory"] = self.working_dir
|
|
||||||
else:
|
|
||||||
json["vm_directory"] = None
|
|
||||||
return json
|
return json
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -347,7 +344,7 @@ class VMwareVM(BaseVM):
|
|||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
cwd=self.working_dir)
|
cwd=self.working_dir)
|
||||||
|
|
||||||
monitor_process(self._ubridge_process, self._termination_callback)
|
#monitor_process(self._ubridge_process, self._termination_callback)
|
||||||
log.info("ubridge started PID={}".format(self._ubridge_process.pid))
|
log.info("ubridge started PID={}".format(self._ubridge_process.pid))
|
||||||
except (OSError, subprocess.SubprocessError) as e:
|
except (OSError, subprocess.SubprocessError) as e:
|
||||||
ubridge_stdout = self.read_ubridge_stdout()
|
ubridge_stdout = self.read_ubridge_stdout()
|
||||||
|
@ -20,7 +20,6 @@ import sys
|
|||||||
import aiohttp
|
import aiohttp
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
import netifaces
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -115,10 +114,12 @@ def is_interface_up(interface):
|
|||||||
:returns: boolean
|
:returns: boolean
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if interface not in netifaces.interfaces():
|
|
||||||
return False
|
|
||||||
|
|
||||||
if sys.platform.startswith("linux"):
|
if sys.platform.startswith("linux"):
|
||||||
|
|
||||||
|
import netifaces
|
||||||
|
if interface not in netifaces.interfaces():
|
||||||
|
return False
|
||||||
|
|
||||||
import fcntl
|
import fcntl
|
||||||
SIOCGIFFLAGS = 0x8913
|
SIOCGIFFLAGS = 0x8913
|
||||||
try:
|
try:
|
||||||
@ -144,6 +145,7 @@ def interfaces():
|
|||||||
|
|
||||||
results = []
|
results = []
|
||||||
if not sys.platform.startswith("win"):
|
if not sys.platform.startswith("win"):
|
||||||
|
import netifaces
|
||||||
for interface in netifaces.interfaces():
|
for interface in netifaces.interfaces():
|
||||||
ip_address = ""
|
ip_address = ""
|
||||||
ip_addresses = netifaces.ifaddresses(interface)
|
ip_addresses = netifaces.ifaddresses(interface)
|
||||||
|
14
setup.py
14
setup.py
@ -45,12 +45,14 @@ dependencies = [
|
|||||||
"raven>=5.2.0"
|
"raven>=5.2.0"
|
||||||
]
|
]
|
||||||
|
|
||||||
try:
|
if not sys.platform.startswith("win"):
|
||||||
import netifaces
|
# netifaces if not used on Windows
|
||||||
except ImportError:
|
try:
|
||||||
# add gns3-netifaces only if netifaces isn't already installed
|
import netifaces
|
||||||
# for instance via a Debian package.
|
except ImportError:
|
||||||
dependencies.append("gns3-netifaces>=0.10.4.1")
|
# add gns3-netifaces only if netifaces isn't already installed
|
||||||
|
# for instance via a Debian package.
|
||||||
|
dependencies.append("gns3-netifaces>=0.10.4.1")
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="gns3-server",
|
name="gns3-server",
|
||||||
|
Loading…
Reference in New Issue
Block a user