mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-25 16:28:11 +00:00
Merge branch '1.5' into 2.0
This commit is contained in:
commit
6949976d12
@ -100,14 +100,17 @@ class Docker(BaseManager):
|
|||||||
"""
|
"""
|
||||||
data = json.dumps(data)
|
data = json.dumps(data)
|
||||||
url = "http://docker/" + path
|
url = "http://docker/" + path
|
||||||
response = yield from aiohttp.request(
|
try:
|
||||||
method,
|
response = yield from aiohttp.request(
|
||||||
url,
|
method,
|
||||||
connector=(yield from self.connector()),
|
url,
|
||||||
params=params,
|
connector=(yield from self.connector()),
|
||||||
data=data,
|
params=params,
|
||||||
headers={"content-type": "application/json", },
|
data=data,
|
||||||
)
|
headers={"content-type": "application/json", },
|
||||||
|
)
|
||||||
|
except aiohttp.ClientResponseError as e:
|
||||||
|
raise DockerError("Docker has returned an error: {}".format(str(e)))
|
||||||
if response.status >= 300:
|
if response.status >= 300:
|
||||||
body = yield from response.read()
|
body = yield from response.read()
|
||||||
try:
|
try:
|
||||||
|
@ -1545,7 +1545,14 @@ class Router(BaseNode):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if self.startup_config or self.private_config:
|
if self.startup_config or self.private_config:
|
||||||
|
|
||||||
module_workdir = self.project.module_working_directory(self.manager.module_name.lower())
|
module_workdir = self.project.module_working_directory(self.manager.module_name.lower())
|
||||||
|
try:
|
||||||
|
config_path = os.path.join(module_workdir, "configs")
|
||||||
|
os.makedirs(config_path, exist_ok=True)
|
||||||
|
except OSError as e:
|
||||||
|
raise DynamipsError("Could could not create configuration directory {}: {}".format(config_path, e))
|
||||||
|
|
||||||
startup_config_base64, private_config_base64 = yield from self.extract_config()
|
startup_config_base64, private_config_base64 = yield from self.extract_config()
|
||||||
if startup_config_base64:
|
if startup_config_base64:
|
||||||
if not self.startup_config:
|
if not self.startup_config:
|
||||||
|
Loading…
Reference in New Issue
Block a user