Makes stack module compatible with new sdk version

Change-Id: Iec99be0f422f1fab9b17e581b7b47a7540de749c
This commit is contained in:
anbanerj
2022-06-30 14:34:08 +02:00
committed by Jakob Meng
parent b416a3e242
commit 41f3007a80
3 changed files with 164 additions and 48 deletions

View File

@@ -1,2 +1,35 @@
---
stack_name: "test-stack"
expected_fields:
- added
- capabilities
- created_at
- deleted
- deleted_at
- description
- environment
- environment_files
- files
- files_container
- id
- is_rollback_disabled
- links
- name
- notification_topics
- outputs
- owner_id
- parameters
- parent_id
- replaced
- stack_name
- status
- status_reason
- tags
- template
- template_description
- template_url
- timeout_mins
- unchanged
- updated
- updated_at
- user_project_id

View File

@@ -5,6 +5,12 @@
# template is searched related to playbook location or as absolute path
template: "roles/orchestration/files/hello-world.yaml"
name: "{{ stack_name }}"
register: minimal_stack
- name: Assert fields returned by create stack
assert:
that: item in minimal_stack.stack
loop: "{{ expected_fields }}"
- name: List stacks
openstack.cloud.stack_info:
@@ -21,6 +27,11 @@
name: "{{ stack_name }}"
register: test_stack
- name: Assert fields returned by stack info
assert:
that: item in test_stack.stack[0]
loop: "{{ expected_fields }}"
- assert:
that:
- test_stack is defined