Skip to content

Banner on a Cisco Nexus device #93

@jrpell

Description

@jrpell

Environment

  • Python version: Python 3.8.11
  • netutils version: netutils==1.0.0

Expected Behavior

I would expect the entire banner to be returned for me to work with.

Observed Behavior

Only get the first line of the banner back.

Steps to Reproduce

This happens whether I use this as a part of the Nautobot platform or if I just run this in a python IDLE session.

>>>from netutils.config.compliance import parser_map, section_config
>>> test_cfg = """feature tacacs+
... feature ospf
... feature bgp
... feature interface-vlan
... feature netflow
... feature hsrp
... feature lacp
... feature lldp
... 
... banner motd #
... This is a test,
... of a banner
... parse.
... #
... 
... ip domain-lookup
... """
>>> 
>>> test_cfg
'feature tacacs+\nfeature ospf\nfeature bgp\nfeature interface-vlan\nfeature netflow\nfeature hsrp\nfeature lacp\nfeature lldp\n\nbanner motd #\nThis is a test,\nof a banner\nparse.\n#\n\nip domain-lookup\n'
>>> 
>>> feature = {
... "name": "banner",
... "ordered": False,
... "section": [
... "banner"
... ]
... }
>>> 
>>> feature
{'name': 'banner', 'ordered': False, 'section': ['banner']}
>>> 
>>> actual = section_config(feature, test_cfg, "cisco_nxos")
>>> 
>>> actual
'banner motd #'
>>> 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions