mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Fix ComputeConflictError import
This commit is contained in:
parent
fda2a37b98
commit
a1c76ec4f2
@ -24,7 +24,8 @@ import os
|
|||||||
from .controller_error import (
|
from .controller_error import (
|
||||||
ControllerError,
|
ControllerError,
|
||||||
ControllerTimeoutError,
|
ControllerTimeoutError,
|
||||||
ComputeError
|
ComputeError,
|
||||||
|
ComputeConflictError
|
||||||
)
|
)
|
||||||
from .ports.port_factory import PortFactory, StandardPortFactory, DynamipsPortFactory
|
from .ports.port_factory import PortFactory, StandardPortFactory, DynamipsPortFactory
|
||||||
from ..utils.images import images_directories
|
from ..utils.images import images_directories
|
||||||
@ -403,7 +404,7 @@ class Node:
|
|||||||
response = await self._compute.post(
|
response = await self._compute.post(
|
||||||
f"/projects/{self._project.id}/{self._node_type}/nodes", data=data, timeout=timeout
|
f"/projects/{self._project.id}/{self._node_type}/nodes", data=data, timeout=timeout
|
||||||
)
|
)
|
||||||
except ComputeConflict as e:
|
except ComputeConflictError as e:
|
||||||
if e.response.get("exception") == "ImageMissingError":
|
if e.response.get("exception") == "ImageMissingError":
|
||||||
res = await self._upload_missing_image(self._node_type, e.response["image"])
|
res = await self._upload_missing_image(self._node_type, e.response["image"])
|
||||||
if not res:
|
if not res:
|
||||||
|
Loading…
Reference in New Issue
Block a user