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:
YueGuobin 2026-02-20 23:38:00 +08:00
parent c5b9f379fe
commit 56ece7ce88
2 changed files with 6 additions and 0 deletions

View File

@ -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")

View File

@ -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):