mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-07-29 19:24:29 +00:00
Refactored coe_cluster{,_template} modules again
Change-Id: If9e28cf236db9a617657f177c0a7176eabc752ea
This commit is contained in:
@@ -1,18 +1,26 @@
|
||||
expected_fields:
|
||||
# Magnum might return more fields according to its documentation [0] but
|
||||
# openstacksdk normalizes coe cluster resources, moving most fields from
|
||||
# top level into a 'properties' field [1].
|
||||
# [0] https://docs.openstack.org/api-ref/container-infrastructure-management/#create-new-cluster
|
||||
# [1] https://opendev.org/openstack/openstacksdk/src/commit/d57c1fcab3b6cbe806cbae735fefa4983b200ab2/openstack/cloud/_normalize.py#L484
|
||||
- api_address
|
||||
- cluster_template_id
|
||||
- coe_version
|
||||
- create_timeout
|
||||
- created_at
|
||||
- discovery_url
|
||||
- fixed_network
|
||||
- fixed_subnet
|
||||
- flavor_id
|
||||
- id
|
||||
- is_floating_ip_enabled
|
||||
- is_master_lb_enabled
|
||||
- keypair
|
||||
- location
|
||||
- labels
|
||||
- master_addresses
|
||||
- master_count
|
||||
- master_flavor_id
|
||||
- name
|
||||
- node_addresses
|
||||
- node_count
|
||||
- properties
|
||||
- stack_id
|
||||
- status
|
||||
- status_reason
|
||||
- updated_at
|
||||
- uuid
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
external_network_id: '{{ external_network.network.id }}'
|
||||
fixed_network: ansible_internal_network
|
||||
fixed_subnet: ansible_internal_subnet
|
||||
floating_ip_enabled: true
|
||||
image_id: '{{ image_id }}'
|
||||
is_floating_ip_enabled: true
|
||||
keypair_id: '{{ keypair.keypair.id }}'
|
||||
name: k8s
|
||||
state: present
|
||||
@@ -90,8 +90,8 @@
|
||||
- name: Assert return values of coe_cluster module
|
||||
assert:
|
||||
that:
|
||||
# openstack.cloud.coe_cluster will only return 'id' on cluster creation when wait is false
|
||||
- "['id']|difference(coe_cluster.cluster.keys())|length == 0"
|
||||
# allow new fields to be introduced but prevent fields from being removed
|
||||
- expected_fields|difference(coe_cluster.cluster.keys())|length == 0
|
||||
|
||||
- name: Pause for 1 minutes to allow Magnum to create the Kubernetes cluster
|
||||
ansible.builtin.pause:
|
||||
|
||||
Reference in New Issue
Block a user