diff --git a/gns3server/modules/docker/__init__.py b/gns3server/modules/docker/__init__.py index 49a7f4b1..786ce1ea 100644 --- a/gns3server/modules/docker/__init__.py +++ b/gns3server/modules/docker/__init__.py @@ -25,6 +25,7 @@ import shutil import asyncio import subprocess import logging +import aiohttp import docker log = logging.getLogger(__name__) @@ -126,7 +127,7 @@ class Docker(BaseManager): if cid not in self._vms: raise aiohttp.web.HTTPNotFound( - text="Docker container with ID {} doesn't exist".format(vm_id)) + text="Docker container with ID {} doesn't exist".format(cid)) container = self._vms[cid] if project_id: diff --git a/gns3server/modules/docker/docker_vm.py b/gns3server/modules/docker/docker_vm.py index d08cff02..e70c982c 100644 --- a/gns3server/modules/docker/docker_vm.py +++ b/gns3server/modules/docker/docker_vm.py @@ -128,7 +128,7 @@ class Container(BaseVM): def stop(self): """Stops this Docker container.""" result = yield from self.manager.execute( - "stop", {"container": self._id}) + "kill", {"container": self._id}) log.info("Docker container '{name}' [{image}] stopped".format( name=self._name, image=self._image)) diff --git a/gns3server/schemas/docker.py b/gns3server/schemas/docker.py index 15c03ab3..cb10b7d8 100644 --- a/gns3server/schemas/docker.py +++ b/gns3server/schemas/docker.py @@ -42,6 +42,11 @@ DOCKER_CREATE_SCHEMA = { "type": "string", "minLength": 1, }, + "console": { + "description": "console name", + "type": "string", + "minLength": 1, + }, }, "additionalProperties": False, }