mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
Add vendor, model and netmiko_device_type fields to templates
Add three new optional fields to the template schema: - vendor: Device vendor (e.g., Cisco, Juniper, Huawei) - model: Device model (e.g., ISR4451-X, MX204, NE40E) - netmiko_device_type: Netmiko device type for automation (e.g., cisco_ios, juniper_junos, huawei) These fields enable AI/LLM integration to determine the appropriate Netmiko device type when automating network device configuration. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c5b9f379fe
commit
56ece7ce88
@ -36,6 +36,9 @@ class Template(BaseTable):
|
||||
builtin = Column(Boolean, default=False)
|
||||
usage = Column(String)
|
||||
template_type = Column(String)
|
||||
vendor = Column(String)
|
||||
model = Column(String)
|
||||
netmiko_device_type = Column(String)
|
||||
compute_id = Column(String)
|
||||
images = relationship("Image", secondary=image_template_map, back_populates="templates")
|
||||
|
||||
|
||||
@ -48,6 +48,9 @@ class TemplateBase(BaseModel):
|
||||
template_type: Optional[NodeType] = None
|
||||
compute_id: Optional[str] = None
|
||||
usage: Optional[str] = ""
|
||||
vendor: Optional[str] = Field(None, description="Device vendor (e.g., Cisco, Juniper, Huawei)")
|
||||
model: Optional[str] = Field(None, description="Device model (e.g., ISR4451-X, MX204, NE40E)")
|
||||
netmiko_device_type: Optional[str] = Field(None, description="Netmiko device type for automation (e.g., cisco_ios, juniper_junos, huawei)")
|
||||
|
||||
|
||||
class TemplateCreate(TemplateBase):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user