summaryrefslogtreecommitdiff
path: root/test/integration/targets/dellos9_config/tests/cli/sublevel.yaml
blob: b8e95d3b5ef53523532fb9da66ab0e4a049ad9b6 (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
39
40
41
42
43
---
- debug: msg="START cli/sublevel.yaml"

- name: setup test
  dellos9_config:
    lines:
      - 'no ip access-list extended test'
      - 'no ip access-list standard test'
    provider: "{{ cli }}"
    match: none

- name: configure sub level command
  dellos9_config:
    lines: ['seq 5 permit ip any any log threshold-in-msgs 10 interval 5']
    parents: ['ip access-list extended test']
    provider: "{{ cli }}"
  register: result

- assert:
    that:
      - "result.changed == true"
      - "'ip access-list extended test' in result.updates"
      - "'seq 5 permit ip any any log threshold-in-msgs 10 interval 5' in result.updates"

- name: configure sub level command idempotent check
  dellos9_config:
    lines: ['seq 5 permit ip any any log threshold-in-msgs 10 interval 5']
    parents: ['ip access-list extended test']
    provider: "{{ cli }}"
  register: result

- assert:
    that:
      - "result.changed == false"

- name: teardown
  dellos9_config:
    lines:
      - 'no ip access-list extended test'
    provider: "{{ cli }}"
    match: none

- debug: msg="END cli/sublevel.yaml"