summaryrefslogtreecommitdiff
path: root/test/integration/targets/junos_command/tests/netconf_json/lessthanorequal.yaml
blob: e865605e3a90075ffee0917423f1e391f9568dc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
- debug: msg="START netconf_json/lessthanorequal.yaml on connection={{ ansible_connection }}"

- name: test le operator
  junos_command:
    commands:
      - show version
      - show interfaces lo0
    format: json
    wait_for:
      - "result[1]['interface-information'][0]['physical-interface'][0]['local-index'][0][data] le 6"
    provider: "{{ netconf }}"
  register: result

- assert:
    that:
      - "result.changed == false"
      - "result.stdout is defined"
      - "result.stdout_lines is defined"

- name: test <= operator
  junos_command:
    commands:
      - show version
      - show interfaces lo0
    format: json
    wait_for:
      - "result[1]['interface-information'][0]['physical-interface'][0]['local-index'][0][data] <= 6"
    provider: "{{ netconf }}"
  register: result

- assert:
    that:
      - "result.changed == false"
      - "result.stdout is defined"
      - "result.stdout_lines is defined"

- debug: msg="END netconf_json/lessthanorequal.yaml on connection={{ ansible_connection }}"