Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {# ############################################## fail if add, no longer supported #}
- {% if 'add' in interface['value']['switchport']['trunk']['allowed_vlans'] %}
- {{ you_cant_use_the_add_statement_anymore }}
- {% endif %}
- {# ############################################## remediate the trunk list #}
- {% set trunk_vlan_changes = configuration_prechange['matches']['sections'][0]['section_content']|trunk_vlan_remediate(interface['value']['switchport']['trunk']['allowed_vlans']['vlans'],20) %}
- {% if 'vlans' in trunk_vlan_changes and trunk_vlan_changes['vlans'] %}
- {% set _ = desired.append("switchport trunk allowed vlan %s" % (trunk_vlan_changes['vlans'])) %}
- {% endif %}{# vlans #}
- {% for entry in trunk_vlan_changes['vlans_add'] %}
- {% set _ = desired.append("switchport trunk allowed vlan add %s" % (entry)) %}
- {% endfor %}{# vlans_add #}
- {% for entry in trunk_vlan_changes['vlans_remove'] %}
- {% set _ = desired.append("switchport trunk allowed vlan remove %s" % (entry)) %}
- {% endfor %}{# vlans_remove #}
- {% endif %}{# allowed-vlans #}
- {% endif %}{# switchport trunk #}
Add Comment
Please, Sign In to add comment