NetStacksNetStacks

Variables & Extraction

Define and manage template variables.

Variable Types

TypeDescriptionExample Value
StringText value"Router-01"
NumberInteger or decimal100
BooleanTrue/falsetrue
ListArray of values["10.0.0.1", "10.0.0.2"]
ObjectKey-value pairs{"name": "vlan10", "id": 10}

Auto-Extraction

NetStacks automatically detects variables in your templates by parsing Jinja2 expressions. Variables appear in the sidebar for configuration.

{# Template content #}
hostname {{ hostname }}
ip name-server {{ dns_primary }}
ip name-server {{ dns_secondary }}

{# Auto-extracted variables:
   - hostname (string)
   - dns_primary (string)
   - dns_secondary (string)
#}

Variable Sources

Variables can be populated from multiple sources:

  • Manual Entry - User enters values at deployment
  • Device Attributes - Pull from device metadata
  • API Resources - Fetch from external APIs
  • Stack Defaults - Inherit from stack template
  • Override - Per-device overrides