mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 22:41:12 +02:00
nodes: per-node default credentials seeded from the template
Add default_username/default_password as controller-only node properties (the netmiko_device_type pattern): they are not sent to the compute, persist with the project topology and can be updated or cleared per node. Creating a node from a template seeds them from the template appliance metadata, and the metadata itself is dropped there so it never leaks into the node properties.
This commit is contained in:
5 files changed
+125
No files matched your search
@@ -121,6 +121,14 @@ class NodeBase(BaseModel):
|
||||
description="Device type for Netmiko-based automation tools, overrides the template value",
|
||||
pattern=r"^[a-z0-9_]+$|^$",
|
||||
)
|
||||
default_username: Optional[str] = Field(
|
||||
None,
|
||||
description="Default username to log into the node, seeded from the template appliance metadata",
|
||||
)
|
||||
default_password: Optional[str] = Field(
|
||||
None,
|
||||
description="Default password to log into the node, seeded from the template appliance metadata",
|
||||
)
|
||||
aux: Optional[int] = Field(None, gt=0, le=65535, description="Auxiliary console TCP port")
|
||||
aux_type: Optional[ConsoleType] = None
|
||||
properties: Optional[dict] = Field(default_factory=dict, description="Properties specific to an emulator")
|
||||
|
||||
Reference in new issue
Block a user