1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-13 20:08:55 +00:00

Set the hostname for docker containers

Fix #437
This commit is contained in:
Julien Duponchelle 2016-02-23 19:22:35 +01:00
parent 87eef545e1
commit 057b637961
No known key found for this signature in database
GPG Key ID: F1E2485547D4595D
2 changed files with 6 additions and 0 deletions

View File

@ -153,6 +153,7 @@ class DockerVM(BaseVM):
image_infos = yield from self._get_image_informations()
params = {
"Hostname": self._name,
"Name": self._name,
"Image": self._image,
"NetworkDisabled": True,

View File

@ -91,6 +91,7 @@ def test_create(loop, project, manager):
"Volumes": {},
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu"
})
assert vm._cid == "e90e34656806"
@ -121,6 +122,7 @@ def test_create_start_cmd(loop, project, manager):
"Cmd": ["/bin/ls"],
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu"
})
assert vm._cid == "e90e34656806"
@ -151,6 +153,7 @@ def test_create_environment(loop, project, manager):
"Volumes": {},
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu"
})
assert vm._cid == "e90e34656806"
@ -180,6 +183,7 @@ def test_create_image_not_available(loop, project, manager):
"Volumes": {},
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu"
})
assert vm._cid == "e90e34656806"
@ -382,6 +386,7 @@ def test_update(loop, vm):
"Volumes": {},
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu"
})
assert vm.console == original_console