mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-18 23:43:48 +02:00
Merge branch 'master' into 2.0
This commit is contained in:
commit
c0abe0edfd
@ -1,5 +1,14 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 1.5.1 07/07/2016
|
||||||
|
|
||||||
|
* Increase the number of interface for docker
|
||||||
|
* Add the method in the bad request answer
|
||||||
|
* Fix a rare crash in IOU
|
||||||
|
* Fix a crash when docker is used but not installed
|
||||||
|
* Backport Docker node hot linking
|
||||||
|
* Allows hot-linking for Docker containers. Ref #267.
|
||||||
|
|
||||||
## 1.5.0 27/06/2016
|
## 1.5.0 27/06/2016
|
||||||
|
|
||||||
* Fix import of project with no disk
|
* Fix import of project with no disk
|
||||||
|
@ -326,7 +326,7 @@ class VMwareVM(BaseNode):
|
|||||||
yield from self._ubridge_send('bridge add_nio_fusion_vmnet {name} "{interface}"'.format(name=vnet, interface=vmnet_interface))
|
yield from self._ubridge_send('bridge add_nio_fusion_vmnet {name} "{interface}"'.format(name=vnet, interface=vmnet_interface))
|
||||||
else:
|
else:
|
||||||
yield from self._ubridge_send('bridge add_nio_ethernet {name} "{interface}"'.format(name=vnet,
|
yield from self._ubridge_send('bridge add_nio_ethernet {name} "{interface}"'.format(name=vnet,
|
||||||
interface=vmnet_interface))
|
interface=vmnet_interface))
|
||||||
|
|
||||||
if isinstance(nio, NIOUDP):
|
if isinstance(nio, NIOUDP):
|
||||||
yield from self._ubridge_send('bridge add_nio_udp {name} {lport} {rhost} {rport}'.format(name=vnet,
|
yield from self._ubridge_send('bridge add_nio_udp {name} {lport} {rhost} {rport}'.format(name=vnet,
|
||||||
@ -375,7 +375,7 @@ class VMwareVM(BaseNode):
|
|||||||
if not self._ubridge_hypervisor:
|
if not self._ubridge_hypervisor:
|
||||||
raise VMwareError("Cannot start the packet capture: uBridge is not running")
|
raise VMwareError("Cannot start the packet capture: uBridge is not running")
|
||||||
yield from self._ubridge_send('bridge start_capture {name} "{output_file}"'.format(name=vnet,
|
yield from self._ubridge_send('bridge start_capture {name} "{output_file}"'.format(name=vnet,
|
||||||
output_file=output_file))
|
output_file=output_file))
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def _stop_ubridge_capture(self, adapter_number):
|
def _stop_ubridge_capture(self, adapter_number):
|
||||||
|
@ -252,7 +252,7 @@ class VMwareHandler:
|
|||||||
vmware_manager = VMware.instance()
|
vmware_manager = VMware.instance()
|
||||||
vm = vmware_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
|
vm = vmware_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
|
||||||
nio_type = request.json["type"]
|
nio_type = request.json["type"]
|
||||||
if nio_type not in ("nio_udp", "nio_vmnet", "nio_nat"):
|
if nio_type not in ("nio_udp", "nio_vmnet", "nio_nat", "nio_tap"):
|
||||||
raise HTTPConflict(text="NIO of type {} is not supported".format(nio_type))
|
raise HTTPConflict(text="NIO of type {} is not supported".format(nio_type))
|
||||||
nio = vmware_manager.create_nio(request.json)
|
nio = vmware_manager.create_nio(request.json)
|
||||||
yield from vm.adapter_add_nio_binding(int(request.match_info["adapter_number"]), nio)
|
yield from vm.adapter_add_nio_binding(int(request.match_info["adapter_number"]), nio)
|
||||||
|
@ -140,6 +140,7 @@ def is_interface_up(interface):
|
|||||||
# TODO: Windows & OSX support
|
# TODO: Windows & OSX support
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def _check_windows_service(service_name):
|
def _check_windows_service(service_name):
|
||||||
|
|
||||||
import pywintypes
|
import pywintypes
|
||||||
@ -156,6 +157,7 @@ def _check_windows_service(service_name):
|
|||||||
raise aiohttp.web.HTTPInternalServerError(text="Could not check if the {} service is running: {}".format(service_name, e.strerror))
|
raise aiohttp.web.HTTPInternalServerError(text="Could not check if the {} service is running: {}".format(service_name, e.strerror))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def interfaces():
|
def interfaces():
|
||||||
"""
|
"""
|
||||||
Gets the network interfaces on this server.
|
Gets the network interfaces on this server.
|
||||||
@ -185,13 +187,19 @@ def interfaces():
|
|||||||
"type": interface_type})
|
"type": interface_type})
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
service_installed = True
|
||||||
if not _check_windows_service("npf") and not _check_windows_service("npcap"):
|
if not _check_windows_service("npf") and not _check_windows_service("npcap"):
|
||||||
raise aiohttp.web.HTTPInternalServerError("The NPF or Npcap is not installed or running")
|
service_installed = False
|
||||||
results = get_windows_interfaces()
|
else:
|
||||||
|
results = get_windows_interfaces()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
message = "pywin32 module is not installed, please install it on the server to get the available interface names"
|
message = "pywin32 module is not installed, please install it on the server to get the available interface names"
|
||||||
raise aiohttp.web.HTTPInternalServerError(text=message)
|
raise aiohttp.web.HTTPInternalServerError(text=message)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error("uncaught exception {type}".format(type=type(e)), exc_info=1)
|
log.error("uncaught exception {type}".format(type=type(e)), exc_info=1)
|
||||||
raise aiohttp.web.HTTPInternalServerError(text="uncaught exception: {}".format(e))
|
raise aiohttp.web.HTTPInternalServerError(text="uncaught exception: {}".format(e))
|
||||||
|
|
||||||
|
if service_installed is False:
|
||||||
|
raise aiohttp.web.HTTPInternalServerError(text="The Winpcap or Npcap is not installed or running")
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
Loading…
Reference in New Issue
Block a user