mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-07-25 09:14:31 +00:00
Add module to filter available volume services.
Add a way to filter which volume service is running on a host or list which hosts run available volume services. Closes-Bug: #2010490 Change-Id: Icb17f6019a61d9346472d83ddcd2ad29c340ea05
This commit is contained in:
committed by
Gaël THEROND
parent
fef5e127d4
commit
903eeb7db7
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
|
||||
Reference in New Issue
Block a user