New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HP Comware config parser #467
Add HP Comware config parser #467
Conversation
dc36c4d
to
9481cad
Compare
rule 2 permit source 10.180.50.0 0.0.0.127 destination 10.1.4.62 0 | ||
rule 3 permit source 10.180.50.0 0.0.0.127 destination 10.2.4.62 0 | ||
# | ||
header motd # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add
- a one line motd
- A non-compliant banner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
test: ✅ Add non-compliant banner test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sometimes 1 banner line is like
header motd "my banner"
Which doesn't have the same delimiters, trying to verify that as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @itdependsnetworks ,
I want to make sure about CiscoConfigParser banner parser.
I saw that the delimiter was set statically: _, delimeter, banner = config_line.partition("^C")
Is the IOSConfigParser supported whenever the banner is delimited using $
or #
instead of ^C
?
Because, I have difficulties to dynamically get HP delimiter, and want to set the partition parameter with #
.
So I can support the single/multiline banner with #
delimiter only. (like Cisco using ^C)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm :)
solved by making build_banner without inherit the super class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @itdependsnetworks,
Instead of handling multiline banner, we also finished handle the singleline banner as your suggest above.
I wanted to let you know that I handle two types of delimiter:
- caret_c
^C
- for example:
header motd ^CThis is a single line banner^C
- Single delimiter - for example:
header motd "This is a single line banner"
, or
header motd #This is a single line banner#
My colleague @bintangf will be responsible for creating the unit testing, as well as the MR.
Please let us know if you have any additional input other than the single-line banner above.
Best regards,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added more commits about single-line banners and banners with different delimiters.
I'm good with this, just need the conflicts resolved. |
test: ✅ Add HP Comware config parser
test: ✅ Add HP Comware parser tests
test: ✅ Add HP Comware compliance tests