How jconwell3115/golden_config_generator works
This CLI converts one existing IOS/IOS-XE configuration into a site-specific golden configuration. It reads the old file, extracts device identity and configuration blocks, prepares a host-named template from a base template, renders the result, and writes the new configuration. The README also describes per-site Jinja templates and manually reviewed transfer of unstructured interface and routing blocks. The source excerpt is partial, so edges are limited to workflow relationships supported by the README or visible source.
Main entry points: golden_config_generator.py Config generator · new_switch_templates Generated host template · site_1.j2 Site 1 template · site_2.j2 Site 2 template
Components 16
Conversion workflow
- CLI entry
golden_config_generator.py - Config generator
golden_config_generator.py - Device identity
golden_config_generator.py - VLAN extraction
golden_config_generator.py - Routing extraction
golden_config_generator.py - Service extraction
golden_config_generator.py
Template system
- Template preparation
golden_config_generator.py - Jinja rendering
golden_config_generator.py - Base switch template
templates/switch_template.j2 - Site 1 template
templates/site_1.j2 - Site 2 template
templates/site_2.j2 - Site 3 template
templates/site_3.j2 - Generated host template
templates/new_switch_templates
Configuration files
- Old configurations
configuration_files/old_configurations - Generated configurations
configuration_files/new_configurations
Other components
- Operator
Connections 16
- Operator → CLI entry: starts
README.md - CLI entry → Config generator: runs
golden_config_generator.py - Config generator → Old configurations: reads
golden_config_generator.py - Config generator → Device identity: extracts
README.md - Config generator → VLAN extraction: extracts
README.md - Config generator → Routing extraction: extracts
README.md - Config generator → Service extraction: extracts
README.md - Config generator → Template preparation: prepares
golden_config_generator.py - Template preparation → Base switch template: reads
golden_config_generator.py - Template preparation → Generated host template: creates
golden_config_generator.py - Jinja rendering → Generated host template: renders
README.md - Config generator → Jinja rendering: invokes
golden_config_generator.py - Jinja rendering → Generated configurations: writes
README.md - Site 1 template → Jinja rendering: provides site config
- Site 2 template → Jinja rendering: provides site config
- Site 3 template → Jinja rendering: provides site config