mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-08 06:13:13 +00:00
Merge "Add module to filter available volume services."
This commit is contained in:
9
ci/roles/volume_service/defaults/main.yml
Normal file
9
ci/roles/volume_service/defaults/main.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
expected_fields:
|
||||
- availability_zone
|
||||
- binary
|
||||
- disabled_reason
|
||||
- host
|
||||
- name
|
||||
- state
|
||||
- status
|
||||
- updated_at
|
||||
23
ci/roles/volume_service/tasks/main.yml
Normal file
23
ci/roles/volume_service/tasks/main.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: Fetch volume services
|
||||
openstack.cloud.volume_service_info:
|
||||
cloud: "{{ cloud }}"
|
||||
register: volume_services
|
||||
|
||||
- name: Assert return values of volume_service_info module
|
||||
assert:
|
||||
that:
|
||||
- volume_services.volume_services | length > 0
|
||||
# allow new fields to be introduced but prevent fields from being removed
|
||||
- expected_fields|difference(volume_services.volume_services[0].keys())|length == 0
|
||||
|
||||
- name: Fetch volume services with filters
|
||||
openstack.cloud.volume_service_info:
|
||||
cloud: "{{ cloud }}"
|
||||
binary: "cinder-volume"
|
||||
register: volume_services
|
||||
|
||||
- name: Assert return values of volume_service_info module
|
||||
assert:
|
||||
that:
|
||||
- volume_services.volume_services | length > 0
|
||||
@@ -57,5 +57,6 @@
|
||||
- { role: volume, tags: volume }
|
||||
- { role: volume_type, tags: volume_type }
|
||||
- { role: volume_backup, tags: volume_backup }
|
||||
- { role: volume_service, tags: volume_service }
|
||||
- { role: volume_snapshot, tags: volume_snapshot }
|
||||
- { role: volume_type_access, tags: volume_type_access }
|
||||
|
||||
Reference in New Issue
Block a user