mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 03:08:14 +00:00
Merge branch 'master' into 2.0
This commit is contained in:
commit
67fc563d81
@ -531,7 +531,11 @@ class DockerVM(BaseNode):
|
|||||||
yield from self._clean_servers()
|
yield from self._clean_servers()
|
||||||
yield from self._stop_ubridge()
|
yield from self._stop_ubridge()
|
||||||
|
|
||||||
state = yield from self._get_container_state()
|
try:
|
||||||
|
state = yield from self._get_container_state()
|
||||||
|
except DockerHttp404Error:
|
||||||
|
state = "stopped"
|
||||||
|
|
||||||
if state == "paused":
|
if state == "paused":
|
||||||
yield from self.unpause()
|
yield from self.unpause()
|
||||||
|
|
||||||
@ -576,6 +580,9 @@ class DockerVM(BaseNode):
|
|||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def reset(self):
|
def reset(self):
|
||||||
try:
|
try:
|
||||||
|
state = yield from self._get_container_state()
|
||||||
|
if state == "paused" or state == "running":
|
||||||
|
yield from self.stop()
|
||||||
if self.console_type == "vnc":
|
if self.console_type == "vnc":
|
||||||
if self._x11vnc_process:
|
if self._x11vnc_process:
|
||||||
try:
|
try:
|
||||||
@ -588,9 +595,6 @@ class DockerVM(BaseNode):
|
|||||||
yield from self._xvfb_process.wait()
|
yield from self._xvfb_process.wait()
|
||||||
except ProcessLookupError:
|
except ProcessLookupError:
|
||||||
pass
|
pass
|
||||||
state = yield from self._get_container_state()
|
|
||||||
if state == "paused" or state == "running":
|
|
||||||
yield from self.stop()
|
|
||||||
# v – 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false.
|
# v – 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false.
|
||||||
# force - 1/True/true or 0/False/false, Kill then remove the container. Default false.
|
# force - 1/True/true or 0/False/false, Kill then remove the container. Default false.
|
||||||
yield from self.manager.query("DELETE", "containers/{}".format(self._cid), params={"force": 1, "v": 1})
|
yield from self.manager.query("DELETE", "containers/{}".format(self._cid), params={"force": 1, "v": 1})
|
||||||
@ -655,7 +659,6 @@ class DockerVM(BaseNode):
|
|||||||
if nio.capturing:
|
if nio.capturing:
|
||||||
yield from self._ubridge_send('bridge start_capture bridge{adapter} "{pcap_file}"'.format(adapter=adapter_number,
|
yield from self._ubridge_send('bridge start_capture bridge{adapter} "{pcap_file}"'.format(adapter=adapter_number,
|
||||||
pcap_file=nio.pcap_output_file))
|
pcap_file=nio.pcap_output_file))
|
||||||
|
|
||||||
yield from self._ubridge_send('bridge start bridge{adapter}'.format(adapter=adapter_number))
|
yield from self._ubridge_send('bridge start bridge{adapter}'.format(adapter=adapter_number))
|
||||||
|
|
||||||
def _delete_ubridge_connection(self, adapter_number):
|
def _delete_ubridge_connection(self, adapter_number):
|
||||||
|
0
gns3server/symbols/.gitkeep
Normal file
0
gns3server/symbols/.gitkeep
Normal file
Loading…
Reference in New Issue
Block a user