save_snapshot_locally nxos_snapshot (#40227)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
pull/39922/merge
Trishna Guha 6 years ago committed by GitHub
parent 86c945a628
commit 979f1e5ed1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -372,7 +372,7 @@ def main():
result['commands'] = action_results
result['changed'] = True
if action == 'create' and module.params['path']:
if action == 'create' and module.params['path'] and module.params['save_snapshot_locally']:
command = 'show snapshot | include {}'.format(module.params['snapshot_name'])
content = execute_show_command(command, module)[0]
if content:

@ -13,6 +13,7 @@
action: create
snapshot_name: test_snapshot1
description: Ansible
save_snapshot_locally: true
provider: "{{ connection }}"
- name: create another snapshot
@ -24,6 +25,7 @@
show_command: show ip interface brief
row_id: ROW_intf
element_key1: intf-name
save_snapshot_locally: true
provider: "{{ connection }}"
- name: compare snapshots

Loading…
Cancel
Save