Network Config Generator
Network Config Generator
Explore network device configuration templating with Jinja2. Edit template variables and see the rendered configuration in real-time.
How It Works
- Select a supported template (
standards-configoraaa-config) - Fill in the context variables
- Submit to the Flask API (
POST /api/render-config) - View the rendered configuration in the output panel
This demo showcases: - Jinja2 Templating – Industry-standard template engine for configuration management - Variable Substitution – Dynamic config generation based on inputs - Network Automation – Practical example of IaC (Infrastructure as Code)
Supported Templates
- Standards Enforcement (
standards-config)- NTP, DNS, SNMP, syslog, and management interface settings.
- AAA Configuration (
aaa-config)- RADIUS server definitions, AAA group policies, authentication/authorization/accounting, and SSH access controls.
Expected API Behavior
- Endpoint:
POST /api/render-config - Success response:
200withsuccess: true,template_id, andrendered_output. - Validation failure:
400witherrordescribing the invalid field. - Unsupported template:
400withUnknown template_id.
Example success payload:
{
"template_id": "standards-config",
"context": {
"device_name": "router-01",
"domain_name": "example.com",
"management_ip": "192.168.1.1",
"management_subnet": "255.255.255.0",
"management_interface": "GigabitEthernet0/0/0",
"ntp_server_1": "8.8.8.8",
"ntp_server_2": "1.1.1.1",
"timezone": "CST",
"dns_server_1": "8.8.8.8",
"dns_server_2": "1.1.1.1",
"snmp_community": "public",
"snmp_write_community": "private",
"snmp_location": "Sioux Falls, SD",
"snmp_contact": "[email protected]",
"syslog_server": "192.168.1.100"
}
}