mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Fix nxos_vtp_password and nxos_vrf_interface for remove idempotency tests (#27724)
* fixes for 27600 27676 * add sanity tests
This commit is contained in:
parent
63d0ea3d5a
commit
babec35faa
10 changed files with 145 additions and 136 deletions
|
@ -222,7 +222,9 @@ def main():
|
|||
changed = False
|
||||
end_state = existing
|
||||
|
||||
if vrf != existing['vrf'] and state == 'absent':
|
||||
if not existing['vrf']:
|
||||
pass
|
||||
elif vrf != existing['vrf'] and state == 'absent':
|
||||
module.fail_json(msg='The VRF you are trying to remove '
|
||||
'from the interface does not exist '
|
||||
'on that interface.',
|
||||
|
|
|
@ -215,7 +215,10 @@ def main():
|
|||
|
||||
commands = []
|
||||
if state == 'absent':
|
||||
if vtp_password is not None:
|
||||
# if vtp_password is not set, some devices returns '\\'
|
||||
if not existing['vtp_password'] or existing['vtp_password'] == '\\':
|
||||
pass
|
||||
elif vtp_password is not None:
|
||||
if existing['vtp_password'] == proposed['vtp_password']:
|
||||
commands.append(['no vtp password'])
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue