-
Notifications
You must be signed in to change notification settings - Fork 173
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
Fix BGP ASDOT notation handling in ios_bgp_global module #1124
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1124 +/- ##
==========================================
+ Coverage 86.90% 87.06% +0.16%
==========================================
Files 193 199 +6
Lines 11904 12083 +179
==========================================
+ Hits 10345 10520 +175
- Misses 1559 1563 +4 |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
… into bug_asdot_fix
for more information, see https://pre-commit.ci
plugins/module_utils/network/ios/argspec/bgp_global/bgp_global.py
Outdated
Show resolved
Hide resolved
for more information, see https://pre-commit.ci
@Girish5tri The local_as.number parameter is updated from int to string that might impact the end user anywhere they have gathered facts and it is safe to consider it as a user-facing change.
Recommended changes -
Reference -
cisco.ios/plugins/modules/ios_snmp_server.py Line 491 in c0aeb5a
CC @roverflow |
plugins/module_utils/network/ios/argspec/bgp_global/bgp_global.py
Outdated
Show resolved
Hide resolved
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
SUMMARY
This PR fixes an issue with the ios_bgp_global module where it fails to handle BGP Autonomous System numbers in ASDOT notation, specifically for the local_as command. The module was previously trying to convert ASDOT notation numbers (e.g., "500.65083") to integers, which caused errors when parsing BGP configurations
To resolve this, we implement deprecation of the "number" parameter in the local_as configuration. The number parameter(type int) has been deprecated in favor of asn(type string) in the bgp_global.py argspec file. This modification allows the module to correctly process ASDOT notation by treating these numbers as strings instead of integers.
Fixes : #1096
ISSUE TYPE
COMPONENT NAME
cisco.ios.bgp_global
ADDITIONAL INFORMATION
The issue occurred when trying to retrieve or configure BGP information with configurations using ASDOT notation in the local_as command. This resulted in the following error:
configuration:
To fix this, the changes were made in the bgp_global.py argspec, rm templates and config files.
These change allows the module to accept and correctly process ASDOT notation in the local_as command. unit and integration tests have been added to verify the correct handling of ASDOT notation in this context.