mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 14:51:13 +02:00
templates: add netmiko_device_type for automation tools
Common template field (schema + templates table column + Alembic migration) holding the Netmiko device type (e.g. 'cisco_xr', 'nokia_srl') so Netmiko/Nornir based tooling can look up how to reach a node's CLI without hard-coded vendor mappings. Free-form lowercase string on purpose: Netmiko's platform list evolves independently of GNS3.
This commit is contained in:
4 files changed
+37
-2
No files matched your search
+26
@@ -0,0 +1,26 @@
|
||||
"""add netmiko_device_type to templates table
|
||||
|
||||
Revision ID: b3c7e2a91d4f
|
||||
Revises: 8f2a1c4e9d3b
|
||||
Create Date: 2026-08-16 10:00:00.000000
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'b3c7e2a91d4f'
|
||||
down_revision = '8f2a1c4e9d3b'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
|
||||
op.add_column('templates', sa.Column('netmiko_device_type', sa.String()))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
|
||||
op.drop_column('templates', 'netmiko_device_type')
|
||||
Reference in new issue
Block a user