You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/netconf_get/tests/sros/basic.yaml

57 lines
1.6 KiB
YAML

---
- debug: msg="START netconf_get sros/basic.yaml on connection={{ ansible_connection }}"
- name: Get complete configuration data (SROS)
netconf_get:
filter: <configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf"/>
register: result
- assert:
that:
- "'urn:nokia.com:sros:ns:yang:sr:conf' in result.stdout"
- "'urn:nokia.com:sros:ns:yang:sr:state' not in result.stdout"
- name: Get complete state data (SROS)
netconf_get:
filter: <state xmlns="urn:nokia.com:sros:ns:yang:sr:state"/>
register: result
- assert:
that:
- "'urn:nokia.com:sros:ns:yang:sr:state' in result.stdout"
- "'urn:nokia.com:sros:ns:yang:sr:conf' not in result.stdout"
- name: Get service configuration data from candidate datastore (SROS)
netconf_get:
source: candidate
filter: <configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf"><service/></configure>
display: json
register: result
- assert:
that:
- "'<service>' in result.stdout"
- name: Get system configuration data from running datastore (SROS)
netconf_get:
source: running
filter: <configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf"><system/></configure>
register: result
- assert:
that:
- "'<system>' in result.stdout"
- name: Get complete configuration and state data (SROS)
netconf_get:
register: result
- assert:
that:
- "'<service>' in result.stdout"
- "'<system>' in result.stdout"
- "'urn:nokia.com:sros:ns:yang:sr:conf' in result.stdout"
- "'urn:nokia.com:sros:ns:yang:sr:state' in result.stdout"
- debug: msg="END netconf_get sros/basic.yaml on connection={{ ansible_connection }}"