mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
* adding the desired state config to the new vrf fixes #32111 * fix default vrf initial configured * add unit test
This commit is contained in:
parent
4faf4ff215
commit
2c99cbc874
2 changed files with 13 additions and 2 deletions
|
@ -260,11 +260,17 @@ def map_obj_to_commands(updates, module, warnings):
|
|||
else:
|
||||
add('protocol unix-socket')
|
||||
|
||||
if needs_update('state') and not needs_update('vrf'):
|
||||
if want['state'] == 'stopped':
|
||||
add('shutdown')
|
||||
elif want['state'] == 'started':
|
||||
add('no shutdown')
|
||||
|
||||
|
||||
if needs_update('vrf'):
|
||||
add('vrf %s' % want['vrf'])
|
||||
|
||||
if needs_update('state'):
|
||||
# switching operational vrfs here
|
||||
# need to add the desired state as well
|
||||
if want['state'] == 'stopped':
|
||||
add('shutdown')
|
||||
elif want['state'] == 'started':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue