netdevops / hier_config

Hierarchical Configuration
MIT License
126 stars 24 forks source link

Banner on Nexus devices #102

Closed jrpell closed 2 years ago

jrpell commented 2 years ago

Maybe I'm missing something but the banner check will not work on Nexus devices. The format of my banner is this:

banner motd #
Multiline
text
here.
#

No matter how I run it or what tweaks I make, it has this result:

File "/home//lib64/python3.8/site-packages/hier_config/root.py", line 402, in _load_from_string_lines assert not in_banner, "we are still in a banner for some reason" AssertionError: we are still in a banner for some reason

Obviously it thinks it's still in the banner and not detecting the "#" as the end of the banner. I've tried on multiple Nexus devices with the same result. It works fine on IOS devices. I can provide more information if needed. If there's a set work around for this then maybe I've missed it.

More info: hier-config==2.2.0 I'm also making sure I'm setting the style to "nxos".

Thanks!

jrpell commented 2 years ago

After digging into this, I found the issue is not hier-config, rather with netutils which was not parsing the data right and sending to hier-config for assessment.