mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Allow projects containing missing images to open in a degraded state instead of failing to load
This commit is contained in:
1 parent
de8e1039a9
commit
59a367b88d
8 files changed
+923
-18
No files matched your search
@@ -99,6 +99,16 @@ class NodePort(BaseModel):
|
||||
mac_address: Union[str, None] = Field(None, pattern="^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$")
|
||||
|
||||
|
||||
class MissingImage(BaseModel):
|
||||
"""
|
||||
A missing image referenced by a node.
|
||||
"""
|
||||
|
||||
property: Optional[str] = Field(None, description="Node property referencing the image")
|
||||
image: str = Field(..., description="Requested image filename")
|
||||
image_type: Optional[str] = Field(None, description="Type of image (qemu/ios/iou/docker)")
|
||||
|
||||
|
||||
class NodeBase(BaseModel):
|
||||
"""
|
||||
Node data.
|
||||
@@ -182,6 +192,13 @@ class Node(NodeBase):
|
||||
None,
|
||||
description="Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller",
|
||||
)
|
||||
missing_image: bool = Field(
|
||||
False,
|
||||
description="True when the node could not be created on its compute because a required image is missing. Read only",
|
||||
)
|
||||
missing_images: List[MissingImage] = Field(
|
||||
default_factory=list, description="List of missing images referenced by the node. Read only"
|
||||
)
|
||||
|
||||
|
||||
class NodeDuplicate(BaseModel):
|
||||
|
||||
Reference in new issue
Block a user