mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-31 05:13:49 +02:00
parent
699647dbda
commit
c361d27531
@ -71,6 +71,7 @@ class QemuVM(BaseVM):
|
||||
self._cpulimit_process = None
|
||||
self._monitor = None
|
||||
self._stdout_file = ""
|
||||
self._execute_lock = asyncio.Lock()
|
||||
|
||||
# QEMU VM settings
|
||||
if qemu_path:
|
||||
@ -818,6 +819,7 @@ class QemuVM(BaseVM):
|
||||
Starts this QEMU VM.
|
||||
"""
|
||||
|
||||
with (yield from self._execute_lock):
|
||||
if self.is_running():
|
||||
# resume the VM if it is paused
|
||||
yield from self.resume()
|
||||
@ -888,6 +890,7 @@ class QemuVM(BaseVM):
|
||||
Stops this QEMU VM.
|
||||
"""
|
||||
|
||||
with (yield from self._execute_lock):
|
||||
# stop the QEMU process
|
||||
self._hw_virtualization = False
|
||||
if self.is_running():
|
||||
|
@ -104,6 +104,8 @@ class Route(object):
|
||||
if request.headers["AUTHORIZATION"] == aiohttp.helpers.BasicAuth(user, password).encode():
|
||||
return
|
||||
|
||||
log.error("Invalid auth. Username should %s", user)
|
||||
|
||||
response = Response(request=request, route=route)
|
||||
response.set_status(401)
|
||||
response.headers["WWW-Authenticate"] = 'Basic realm="GNS3 server"'
|
||||
|
Loading…
Reference in New Issue
Block a user