diff options
Diffstat (limited to 'templating/templates')
-rw-r--r-- | templating/templates/switch.txt | 19 | ||||
-rw-r--r-- | templating/templates/switches.txt | 7 |
2 files changed, 0 insertions, 26 deletions
diff --git a/templating/templates/switch.txt b/templating/templates/switch.txt deleted file mode 100644 index 0fd9754..0000000 --- a/templating/templates/switch.txt +++ /dev/null @@ -1,19 +0,0 @@ -{# - This can be used through GET /templating/switch.txt?switch=e41-2 - - It is provided as a simple demo of how to combine "GET parameters" with - templating. - - #} -{% set sw = options["switch"] %} -{% set s = objects["public/switches"].switches[sw] %} -{% if s %} -{% set mg = objects["read/switches-management"].switches[sw] %} - -Switch {{ sw }} has management ip {{ mg.mgmt_v4_addr }} - -It is assoicated with distro {{ s.distro_name }} -{% else %} -Switch not found -{% endif %} - diff --git a/templating/templates/switches.txt b/templating/templates/switches.txt deleted file mode 100644 index 0cc203b..0000000 --- a/templating/templates/switches.txt +++ /dev/null @@ -1,7 +0,0 @@ -{% for switch in objects["public/switches"].switches %} - {% set mg = objects["read/switches-management"].switches[switch] %} - {% set s = objects["public/switches"].switches[switch] %} - {% if mg.subnet4 -%} - {{ switch }} {{mg.subnet4 }} {{ mg.subnet6 }} {{ mg.mgmt_v4_addr }} {{ mg.mgmt_v6_addr }} {{ mg.traffic_vlan }} {{ s.distro_name }} - {% endif %} -{% endfor %} |