aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
290 stars 209 forks source link

eos_cli_config_gen/aliases.j2 is missing an CR at the end and attaching the "!" directly to the alias. #405

Closed kmueller68 closed 3 years ago

kmueller68 commented 3 years ago

Issue Type

Summary

eos_cli_config_gen/aliases.j2 is missing an CR at the end and attaching the "!" directly to the alias.

current:

{# eos - aliases #}
{% if aliases is defined and aliases is not none %}
!
{{ aliases }}{% endif %}

might become:

{# eos - aliases #}
{% if aliases is defined and aliases is not none %}
!
{{ aliases }}
{% endif %}

Role or Module Name

avd/roles/eos_cli_config_gen/templates/eos/aliases.j2

arista.avd collection and Python libraries version

$ pip freeze

OS / Environment

EOS Version

Cloudvision version

OS running Ansible

Steps to reproduce

aliases: |
 alias copp show policy-map copp copp-system-policy
 alias help bash echo -e "sib : show ip bgp\nsibs : show ip bgp summary\nsiib : show ip int brief\nsir : show ip route\nsenz : show interface counter error | nz\nsnz : show interface counter | nz\nsps : show port-channel summary\nspd : show port-channel detail all\nsqnz : show interface counter queue | nz\nsrnz : show interface counter rate | nz\nsmac : show mac address-table dynamic\nsarp : show ip arp\ncopp : show policy-map copp copp-system-policy\ninfo : version, serial and mlag"
 alias sarp show ip arp

Expected results

alias help bash echo -e "sib : show ip bgp\nsibs : show ip bgp summary\nsiib : show ip int brief\nsir : show ip route\nsenz : show interface counter error | nz\nsnz : show interface counter | nz\nsps : show port-channel summary\nspd : show port-channel detail all\nsqnz : show interface counter queue | nz\nsrnz : show interface counter rate | nz\nsmac : show mac address-table dynamic\nsarp : show ip arp\ncopp : show policy-map copp copp-system-policy\ninfo : version, serial and mlag"
alias sarp show ip arp
!

Actual results

 alias copp show policy-map copp copp-system-policy
 alias help bash echo -e "sib : show ip bgp\nsibs : show ip bgp summary\nsiib : show ip int brief\nsir : show ip route\nsenz : show 
 interface counter error | nz\nsnz : show interface counter | nz\nsps : show port-channel summary\nspd : show port-channel 
 detail all\nsqnz : show interface counter queue | nz\nsrnz : show interface counter rate | nz\nsmac : show mac address-table 
 dynamic\nsarp : show ip arp\ncopp : show policy-map copp copp-system-policy\ninfo : version, serial and mlag"
 alias sarp show ip arp!
kmueller68 commented 3 years ago

Thank you very much for fixing this. best regards Karlheinz