diff options
author | Ansible Core Team <info@ansible.com> | 2020-03-09 09:40:31 +0000 |
---|---|---|
committer | Ansible Core Team <info@ansible.com> | 2020-03-09 09:40:31 +0000 |
commit | 9c3977000b96a42eddcd4ddbe2c351f153e98c83 (patch) | |
tree | 1ba2a21d72e67e5f1487a74759465f1cee232e33 /test/integration/targets/netconf_get/tests/iosxr/basic.yaml | |
parent | 42b02d1be2d0ede8e1d05c54bb415b03b162ce41 (diff) | |
download | ansible-9c3977000b96a42eddcd4ddbe2c351f153e98c83.tar.gz |
Migrated to ansible.netcommon
Diffstat (limited to 'test/integration/targets/netconf_get/tests/iosxr/basic.yaml')
-rw-r--r-- | test/integration/targets/netconf_get/tests/iosxr/basic.yaml | 163 |
1 files changed, 0 insertions, 163 deletions
diff --git a/test/integration/targets/netconf_get/tests/iosxr/basic.yaml b/test/integration/targets/netconf_get/tests/iosxr/basic.yaml deleted file mode 100644 index 0a6066d4fa..0000000000 --- a/test/integration/targets/netconf_get/tests/iosxr/basic.yaml +++ /dev/null @@ -1,163 +0,0 @@ ---- -- debug: msg="START netconf_get iosxr/basic.yaml on connection={{ ansible_connection }}" - -- name: setup interface - iosxr_config: - commands: - - description this is test interface Loopback999 - - no shutdown - parents: - - interface Loopback999 - match: none - connection: network_cli - -- name: get running interface confiugration with filter - netconf_get: - source: running - filter: <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"></interface-configurations> - register: result - connection: netconf - -- assert: - that: - - "'<description>this is test interface Loopback999</description>' in result.stdout" - - "'<usernames>' not in result.stdout" - -- name: test lock=never, get-config, running interface confiugration with filter without lock - netconf_get: - source: running - lock: never - filter: <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"></interface-configurations> - register: result - connection: netconf - -- assert: - that: - - "'<description>this is test interface Loopback999</description>' in result.stdout" - - "'<usernames>' not in result.stdout" - -- name: test lock=if-supported, get-config, running interface confiugration with filter without lock - netconf_get: - source: running - lock: if-supported - filter: <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"></interface-configurations> - register: result - connection: netconf - -- assert: - that: - - "'<description>this is test interface Loopback999</description>' in result.stdout" - - "'<usernames>' not in result.stdout" - -- name: Failure scenario, get-config information with lock - netconf_get: - source: running - lock: always - register: result - ignore_errors: True - connection: netconf - -- assert: - that: - - "'<bad-element>running</bad-element>' in result.msg" - -- name: Failure scenario, fetch config from startup - netconf_get: - source: startup - register: result - ignore_errors: True - connection: netconf - -- assert: - that: - - "'startup source is not supported' in result.msg" - -- name: test get, information from running datastore without lock - netconf_get: - lock: never - filter: <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"></interface-configurations> - register: result - connection: netconf - -- assert: - that: - - "'<description>this is test interface Loopback999</description>' in result.stdout" - -- name: test get, information from running datastore with lock if supported - netconf_get: - lock: if-supported - filter: <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"></interface-configurations> - register: result - connection: netconf - -- assert: - that: - - "'<description>this is test interface Loopback999</description>' in result.stdout" - -- name: Failure scenario, get information from running with lock - netconf_get: - lock: always - register: result - ignore_errors: True - connection: netconf - -- assert: - that: - - "'<bad-element>running</bad-element>' in result.msg" - -- name: get configuration and state data in json format - netconf_get: - source: running - display: json - register: result - connection: netconf - -- assert: - that: - - "{{ result['output']['data']['aaa'] is defined}}" - -- name: get configuration data in xml pretty format - netconf_get: - source: running - display: pretty - register: result - connection: netconf - -- assert: - that: - - "{{ result['output'] is defined}}" - -- name: get configuration data in xml with namespace stripped - netconf_get: - source: running - display: xml - register: result - connection: netconf - -- assert: - that: - - "{{ result['output'] is defined}}" - - "{{ 'xmlns' not in result.output }}" - -- name: Failure scenario, unsupported filter - netconf_get: - filter: configuration/state - register: result - ignore_errors: True - connection: netconf - -- assert: - that: - - "'filter value \\'configuration/state\\' of type xpath is not supported' in result.msg" - -- name: setup - teardown - iosxr_config: - commands: - - no description - - shutdown - parents: - - interface Loopback999 - match: none - connection: network_cli - -- debug: msg="END netconf_get iosxr/basic.yaml on connection={{ ansible_connection }}" |