summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authoromnom62 <omnom62@outlook.com>2026-06-29 05:57:04 +1000
committeromnom62 <omnom62@outlook.com>2026-06-29 05:57:04 +1000
commit84a9b59774e3337f53066ec849994de724c89d2b (patch)
tree13d7dd849c81e331dcc4f4d1e9da113bd4021347 /tests/integration
parentd853f3ff31c2a2bee8a34f325c2972ac4f2db01a (diff)
downloadrest.vyos-84a9b59774e3337f53066ec849994de724c89d2b.tar.gz
rest.vyos-84a9b59774e3337f53066ec849994de724c89d2b.zip
T8989: SIT updated
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/targets/vyos_prefix_lists/tests/httpapi/overridden.yaml38
-rw-r--r--tests/integration/targets/vyos_prefix_lists/tests/httpapi/rtt.yaml63
2 files changed, 0 insertions, 101 deletions
diff --git a/tests/integration/targets/vyos_prefix_lists/tests/httpapi/overridden.yaml b/tests/integration/targets/vyos_prefix_lists/tests/httpapi/overridden.yaml
deleted file mode 100644
index f895488..0000000
--- a/tests/integration/targets/vyos_prefix_lists/tests/httpapi/overridden.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug:
- msg: START vyos_prefix_lists overridden integration tests on connection={{ ansible_connection }}
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Override prefix_lists configuration
- register: result
- vyos.rest.vyos_prefix_lists: &id001
- config:
- - afi: ipv4
- prefix_lists:
- - name: AnsibleIPv4PrefixList
- description: Overridden by ansible
- entries:
- - sequence: 2
- action: permit
- prefix: 92.168.10.0/26
- le: 32
- state: overridden
-
- - assert:
- that:
- - result.changed == true
-
- - name: Override prefix_lists configuration (IDEMPOTENT)
- register: result
- vyos.rest.vyos_prefix_lists: *id001
-
- - assert:
- that:
- - result.changed == false
- - result.commands == []
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_prefix_lists/tests/httpapi/rtt.yaml b/tests/integration/targets/vyos_prefix_lists/tests/httpapi/rtt.yaml
deleted file mode 100644
index 6ddeb27..0000000
--- a/tests/integration/targets/vyos_prefix_lists/tests/httpapi/rtt.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- debug:
- msg: START vyos_prefix_lists round trip integration tests on connection={{ ansible_connection }}
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: RTT - Apply base configuration
- vyos.rest.vyos_prefix_lists:
- config:
- - afi: ipv4
- prefix_lists:
- - name: AnsibleIPv4PrefixList
- description: PL configured by ansible
- entries:
- - sequence: 2
- action: permit
- prefix: 92.168.10.0/26
- le: 32
- - sequence: 3
- action: deny
- prefix: 72.168.2.0/24
- ge: 26
- state: merged
-
- - name: RTT - Gather configuration
- register: gathered
- vyos.rest.vyos_prefix_lists:
- state: gathered
-
- - name: RTT - Assert gathered matches applied
- assert:
- that:
- - gathered.gathered | selectattr('afi', 'eq', 'ipv4') | list | length == 1
- - gathered.gathered | selectattr('afi', 'eq', 'ipv4') | map(attribute='prefix_lists') | first | selectattr('name', 'eq', 'AnsibleIPv4PrefixList') | list | length == 1
-
- - name: RTT - Modify configuration
- vyos.rest.vyos_prefix_lists:
- config:
- - afi: ipv4
- prefix_lists:
- - name: AnsibleIPv4PrefixList
- description: Modified by ansible
- entries:
- - sequence: 2
- action: permit
- prefix: 92.168.10.0/26
- le: 32
- state: replaced
-
- - name: RTT - Gather modified configuration
- register: gathered2
- vyos.rest.vyos_prefix_lists:
- state: gathered
-
- - name: RTT - Assert modification applied correctly
- assert:
- that:
- - gathered2.gathered | selectattr('afi', 'eq', 'ipv4') | list | length == 1
- - gathered2.gathered | selectattr('afi', 'eq', 'ipv4') | map(attribute='prefix_lists') | first | selectattr('name', 'eq', 'AnsibleIPv4PrefixList') | map(attribute='entries') | first | length == 1
-
- always:
- - include_tasks: _remove_config.yaml