mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Rel240/fix nxos interface ospf (#28898)
* Fixes 28897 nxos_interface_ospf idempotence * Handle all characters upper or lower with tests
This commit is contained in:
parent
ae2e84146e
commit
fb1aa54341
2 changed files with 126 additions and 2 deletions
|
@ -394,7 +394,15 @@ def main():
|
|||
'message_digest_password']],
|
||||
supports_check_mode=True)
|
||||
|
||||
if not module.params['interface'].startswith('loopback') and not module.params['interface'].startswith('port-channel'):
|
||||
# Normalize interface input data.
|
||||
#
|
||||
# * For port-channel and loopback interfaces expection is all lower case names.
|
||||
# * All other interfaces the expectation is an uppercase leading character
|
||||
# followed by lower case characters.
|
||||
#
|
||||
if re.match(r'(port-channel|loopback)', module.params['interface'], re.I):
|
||||
module.params['interface'] = module.params['interface'].lower()
|
||||
else:
|
||||
module.params['interface'] = module.params['interface'].capitalize()
|
||||
|
||||
warnings = list()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue