Refactored endpoint module and explained region attribute

Regions have IDs, but do not have names.
Ref.: https://docs.openstack.org/api-ref/identity/v3/#regions

Change-Id: I2512bbde6e96e2ab0f1fef0230295223f46105dd
This commit is contained in:
Jakob Meng
2022-06-23 11:33:40 +02:00
parent c6c1c6a070
commit ad3a3a89f2
2 changed files with 38 additions and 33 deletions

View File

@@ -1,5 +1,5 @@
---
- name: Create a service for compute
- name: Create a service endpoint for compute
openstack.cloud.endpoint:
cloud: "{{ cloud }}"
service: nova
@@ -9,7 +9,7 @@
state: present
register: endpoint_test
- name: Ensure service was created
- name: Ensure service endpoint was created
assert:
that:
- endpoint_test.endpoint.id is defined
@@ -19,7 +19,7 @@
that:
- endpoint_test.endpoint.url == "http://controller:9292"
- name: Create service for compute again
- name: Create service endpoint for compute again
openstack.cloud.endpoint:
cloud: "{{ cloud }}"
service: nova
@@ -34,7 +34,7 @@
that:
- not endpoint_again.changed
- name: Update endpoint url
- name: Update service endpoint url
openstack.cloud.endpoint:
cloud: "{{ cloud }}"
service: nova
@@ -44,12 +44,12 @@
state: present
register: endpoint_updated
- name: Ensure endpoint was updated
- name: Ensure service endpoint was updated
assert:
that:
- endpoint_updated.endpoint.url == "http://controller:9393"
- name: Delete endpoint
- name: Delete service endpoint
openstack.cloud.endpoint:
cloud: "{{ cloud }}"
service: nova
@@ -59,7 +59,7 @@
state: absent
register: endpoint_deleted
- name: Ensure endpoint was deleted
- name: Ensure service endpoint was deleted
assert:
that:
- endpoint_deleted.changed