Banner as children probably should not be parsed like banner login or banner motd.
Observed Behavior
Example config:
We have a snippet code like this
group-policy Grs-POLICY attributes
banner value xxx
banner value xxxxx
dns-server value x.x.x.x x.x.x.x
This raises an error message raise ValueError("There was an error parsing your banner, the end of the banner could not be found")
Steps to Reproduce
from netutils.config.parser import ASAConfigParser, ConfigLine
config = '''
group-policy Grs-POLICY attributes
banner value xxx
banner value xxxxx
dns-server value x.x.x.x x.x.x.x'''
config_tree = ASAConfigParser(str(config))
print(config_tree)
NB: Our temporary solution is to remove the lstrip() from def is_banner_start(self, line: str) in parser.py file. We are still not sure if this can affect other device platform. Perhaps opening the issue and discussing it together is a better option. Have a nice day everyone!
Environment
Expected Behavior
Banner as children probably should not be parsed like banner login or banner motd.
Observed Behavior
Example config: We have a snippet code like this group-policy Grs-POLICY attributes banner value xxx banner value xxxxx dns-server value x.x.x.x x.x.x.x This raises an error message raise ValueError("There was an error parsing your banner, the end of the banner could not be found")
Steps to Reproduce
from netutils.config.parser import ASAConfigParser, ConfigLine config = ''' group-policy Grs-POLICY attributes banner value xxx banner value xxxxx dns-server value x.x.x.x x.x.x.x''' config_tree = ASAConfigParser(str(config)) print(config_tree)
NB: Our temporary solution is to remove the lstrip() from def is_banner_start(self, line: str) in parser.py file. We are still not sure if this can affect other device platform. Perhaps opening the issue and discussing it together is a better option. Have a nice day everyone!