mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Use versioned docker API
Since docker v1.13 the unversioned docker API is deprecated.
Backport of gns3-server 2.0, commit effbe59
This commit is contained in:
parent
1e598d1890
commit
7d48eba01b
@ -113,11 +113,13 @@ class Docker(BaseManager):
|
|||||||
:returns: HTTP response
|
:returns: HTTP response
|
||||||
"""
|
"""
|
||||||
data = json.dumps(data)
|
data = json.dumps(data)
|
||||||
url = "http://docker/v" + DOCKER_MINIMUM_API_VERSION + "/" + path
|
|
||||||
|
|
||||||
if timeout is None:
|
if timeout is None:
|
||||||
timeout = 60 * 60 * 24 * 31 # One month timeout
|
timeout = 60 * 60 * 24 * 31 # One month timeout
|
||||||
|
|
||||||
|
if path == 'version':
|
||||||
|
url = "http://docker/v1.12/" + path # API of docker v1.0
|
||||||
|
else:
|
||||||
|
url = "http://docker/v" + DOCKER_MINIMUM_API_VERSION + "/" + path
|
||||||
try:
|
try:
|
||||||
if path != "version": # version is use by check connection
|
if path != "version": # version is use by check connection
|
||||||
yield from self._check_connection()
|
yield from self._check_connection()
|
||||||
|
Loading…
Reference in New Issue
Block a user