Skip to content
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

[ios_bgp_global/ address_family] fix parsing of password_options while gathering password configuratin #1122

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/fragments/bgp_global_render_pass.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
bugfixes:
- ios_bgp_global - fix parsing of password_options while gathering password configuration from appliance.
- ios_bgp_address_family - fix parsing of password_options while gathering password configuration from appliance.
Original file line number Diff line number Diff line change
Expand Up @@ -1586,8 +1586,8 @@ def __init__(self, lines=None, module=None):
"getval": re.compile(
r"""
\s\sneighbor\s(?P<neighbor_address>\S+)\spassword
\s(?P<encryption>\d+)
(\s(?P<pass_key>.$))?
(\s(?P<encryption>\d+))
(\s(?P<pass_key>.+))?
$""",
re.VERBOSE,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,7 @@ def __init__(self, lines=None, module=None):
r"""
\sneighbor\s(?P<neighbor_address>\S+)\spassword
\s(?P<encryption>\d+)
(\s(?P<pass_key>.$))?
(\s(?P<pass_key>.+))?
$""",
re.VERBOSE,
),
Expand Down
9 changes: 8 additions & 1 deletion tests/unit/modules/network/ios/test_ios_bgp_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ def test_ios_bgp_global_parsed(self):
timers bgp 100 200 150
redistribute connected metric 10
neighbor 192.0.2.1 remote-as 100
neighbor 192.0.2.1 password 7 DEQPITOP101395
neighbor 192.0.2.1 route-map test-route out
address-family ipv4
neighbor 192.0.2.28 activate
Expand All @@ -652,7 +653,13 @@ def test_ios_bgp_global_parsed(self):
{
"remote_as": "100",
"neighbor_address": "192.0.2.1",
"route_maps": [{"name": "test-route", "out": True}],
"route_maps": [
{"name": "test-route", "out": True},
],
"password_options": {
"encryption": 7,
"pass_key": "DEQPITOP101395",
},
},
],
}
Expand Down
Loading