mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-08 02:01:31 -07:00
Deprecate tests used as filters (#32361)
* Warn on tests used as filters * Update docs, add aliases for tests that fit more gramatically with test syntax * Fix rst formatting * Add successful filter, alias of success * Remove renamed_deprecation, it was overkill * Make directory alias for is_dir * Update tests to use proper jinja test syntax * Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax * Add conversion script, porting guide updates, and changelog updates * Update newly added uses of tests as filters * No underscore variable * Convert recent tests as filter changes to win_stat * Fix some changes related to rebasing a few integration tests * Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name * Add test for tests_as_filters_warning * Update tests as filters in newly added/modified tests * Address recent changes to several integration tests * Address recent changes in cs_vpc
This commit is contained in:
parent
fd4a6cf7ad
commit
4fe08441be
349 changed files with 4086 additions and 3844 deletions
|
@ -55,8 +55,8 @@
|
|||
- name: verify output
|
||||
assert:
|
||||
that:
|
||||
- output|changed
|
||||
- not output|failed
|
||||
- output is changed
|
||||
- output is not failed
|
||||
- "'user:{{ ansible_user }}:r--' in output.acl"
|
||||
- "'user:{{ ansible_user }}:r--' in getfacl_output.stdout_lines"
|
||||
##############################################################################
|
||||
|
@ -72,8 +72,8 @@
|
|||
- name: verify output
|
||||
assert:
|
||||
that:
|
||||
- not output|changed
|
||||
- not output|failed
|
||||
- output is not changed
|
||||
- output is not failed
|
||||
- "'user::rw-' in output.acl"
|
||||
- "'user:{{ ansible_user }}:r--' in output.acl"
|
||||
- "'group::r--' in output.acl"
|
||||
|
@ -100,8 +100,8 @@
|
|||
- name: verify output
|
||||
assert:
|
||||
that:
|
||||
- output|changed
|
||||
- not output|failed
|
||||
- output is changed
|
||||
- output is not failed
|
||||
- "'user:{{ ansible_user }}:r--' not in output.acl"
|
||||
- "'user:{{ ansible_user }}:r--' not in getfacl_output.stdout_lines"
|
||||
##############################################################################
|
||||
|
@ -122,8 +122,8 @@
|
|||
- name: verify output
|
||||
assert:
|
||||
that:
|
||||
- output|changed
|
||||
- not output|failed
|
||||
- output is changed
|
||||
- output is not failed
|
||||
- "'user:{{ ansible_user }}:rw-' in output.acl"
|
||||
- "'default:user:{{ ansible_user }}:rw-' in getfacl_output.stdout_lines"
|
||||
##############################################################################
|
||||
|
@ -145,8 +145,8 @@
|
|||
- name: verify output
|
||||
assert:
|
||||
that:
|
||||
- output|changed
|
||||
- not output|failed
|
||||
- output is changed
|
||||
- output is not failed
|
||||
- "'user:{{ ansible_user }}:rw-' in output.acl"
|
||||
- "'default:user:{{ ansible_user }}:rw-' in getfacl_output.stdout_lines"
|
||||
##############################################################################
|
||||
|
@ -165,8 +165,8 @@
|
|||
- name: verify output
|
||||
assert:
|
||||
that:
|
||||
- not output|changed
|
||||
- not output|failed
|
||||
- output is not changed
|
||||
- output is not failed
|
||||
- "'user:{{ ansible_user }}:rw-' in output.acl"
|
||||
- "'default:user:{{ ansible_user }}:rw-' in getfacl_output.stdout_lines"
|
||||
##############################################################################
|
||||
|
@ -198,8 +198,8 @@
|
|||
- name: verify output
|
||||
assert:
|
||||
that:
|
||||
- output|changed
|
||||
- not output|failed
|
||||
- output is changed
|
||||
- output is not failed
|
||||
- "'user::rwx' in getfacl_output.stdout_lines"
|
||||
- "'group::r-x' in getfacl_output.stdout_lines"
|
||||
- "'other::r-x' in getfacl_output.stdout_lines"
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
- name: Check previous task failed
|
||||
assert:
|
||||
that:
|
||||
- 'alternative|failed'
|
||||
- 'alternative is failed'
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
- name: check expected command was executed
|
||||
assert:
|
||||
that:
|
||||
- 'alternative|success'
|
||||
- 'alternative|changed'
|
||||
- 'alternative is successful'
|
||||
- 'alternative is changed'
|
||||
when: with_link
|
||||
|
||||
- block:
|
||||
|
@ -26,8 +26,8 @@
|
|||
- name: check expected command was executed
|
||||
assert:
|
||||
that:
|
||||
- 'alternative|success'
|
||||
- 'alternative|changed'
|
||||
- 'alternative is successful'
|
||||
- 'alternative is changed'
|
||||
when: not with_link
|
||||
|
||||
- name: execute dummy command
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
- name: check expected command was executed
|
||||
assert:
|
||||
that:
|
||||
- 'alternative|changed'
|
||||
- 'alternative is changed'
|
||||
- 'cmd.stdout == "dummy{{ item }}"'
|
||||
|
||||
- name: check that alternative has been updated
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
- name: uninstall quilt with apt
|
||||
apt: pkg=quilt state=absent purge=yes
|
||||
register: apt_result
|
||||
when: dpkg_result|success
|
||||
when: dpkg_result is successful
|
||||
tags: ['test_apt_builddep']
|
||||
|
||||
# install build-dep for netcat
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
- name: use python-apt
|
||||
set_fact:
|
||||
python_apt: python-apt
|
||||
when: ansible_python_version | version_compare('3', '<')
|
||||
when: ansible_python_version is version('3', '<')
|
||||
|
||||
- name: use python3-apt
|
||||
set_fact:
|
||||
python_apt: python3-apt
|
||||
when: ansible_python_version | version_compare('3', '>=')
|
||||
when: ansible_python_version is version('3', '>=')
|
||||
|
||||
# UNINSTALL 'python-apt'
|
||||
# The `apt` module has the smarts to auto-install `python-apt`. To test, we
|
||||
|
@ -22,7 +22,7 @@
|
|||
- name: uninstall {{ python_apt }} with apt
|
||||
apt: pkg={{ python_apt }} state=absent purge=yes
|
||||
register: apt_result
|
||||
when: dpkg_result|success
|
||||
when: dpkg_result is successful
|
||||
|
||||
# UNINSTALL 'hello'
|
||||
# With 'python-apt' uninstalled, the first call to 'apt' should install
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
- name: use python-apt
|
||||
set_fact:
|
||||
python_apt: python-apt
|
||||
when: ansible_python_version | version_compare('3', '<')
|
||||
when: ansible_python_version is version('3', '<')
|
||||
|
||||
- name: use python3-apt
|
||||
set_fact:
|
||||
python_apt: python3-apt
|
||||
when: ansible_python_version | version_compare('3', '>=')
|
||||
when: ansible_python_version is version('3', '>=')
|
||||
|
||||
# UNINSTALL 'python-apt'
|
||||
# The `apt_repository` module has the smarts to auto-install `python-apt`. To
|
||||
|
@ -30,7 +30,7 @@
|
|||
- name: uninstall {{ python_apt }} with apt
|
||||
apt: pkg={{ python_apt }} state=absent purge=yes
|
||||
register: apt_result
|
||||
when: dpkg_result|success
|
||||
when: dpkg_result is successful
|
||||
|
||||
#
|
||||
# TEST: apt_repository: repo=<name>
|
||||
|
|
|
@ -101,8 +101,8 @@
|
|||
that:
|
||||
- async_result.ansible_job_id is match('\d+\.\d+')
|
||||
- async_result.finished == 1
|
||||
- async_result | changed == false
|
||||
- async_result | failed
|
||||
- async_result is changed == false
|
||||
- async_result is failed
|
||||
- async_result.msg == 'failed gracefully'
|
||||
|
||||
- name: test exception module failure
|
||||
|
@ -119,7 +119,7 @@
|
|||
- async_result.ansible_job_id is match('\d+\.\d+')
|
||||
- async_result.finished == 1
|
||||
- async_result.changed == false
|
||||
- async_result | failed == true
|
||||
- async_result is failed == true
|
||||
- async_result.stderr is search('failing via exception', multiline=True)
|
||||
|
||||
- name: test leading junk before JSON
|
||||
|
@ -135,7 +135,7 @@
|
|||
- async_result.ansible_job_id is match('\d+\.\d+')
|
||||
- async_result.finished == 1
|
||||
- async_result.changed == true
|
||||
- async_result | success
|
||||
- async_result is successful
|
||||
|
||||
- name: test trailing junk after JSON
|
||||
async_test:
|
||||
|
@ -150,5 +150,5 @@
|
|||
- async_result.ansible_job_id is match('\d+\.\d+')
|
||||
- async_result.finished == 1
|
||||
- async_result.changed == true
|
||||
- async_result | success
|
||||
- async_result is successful
|
||||
- async_result.warnings[0] is search('trailing junk after module output')
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
- name: assert
|
||||
assert:
|
||||
that:
|
||||
- bad_uri_result|failed
|
||||
- bad_uri_result is failed
|
||||
|
||||
# ============================================================
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
- name: assert lambda upload succeeded
|
||||
assert:
|
||||
that:
|
||||
- 'not result|failed'
|
||||
- 'result is not failed'
|
||||
|
||||
- name: test lambda works
|
||||
execute_lambda:
|
||||
|
@ -131,7 +131,7 @@
|
|||
- name: assert lambda manages to respond as expected
|
||||
assert:
|
||||
that:
|
||||
- 'not result|failed'
|
||||
- 'result is not failed'
|
||||
- 'result.result.output.message == "hello Mr Ansible Tests"'
|
||||
|
||||
# ============================================================
|
||||
|
@ -157,7 +157,7 @@
|
|||
- name: assert lambda fails with proper message
|
||||
assert:
|
||||
that:
|
||||
- 'result|failed'
|
||||
- 'result is failed'
|
||||
- 'result.msg != "MODULE FAILURE"'
|
||||
- 'result.changed == False'
|
||||
- '"requires at least one security group and one subnet" in result.msg'
|
||||
|
@ -188,7 +188,7 @@
|
|||
- name: assert lambda remains as before
|
||||
assert:
|
||||
that:
|
||||
- 'not result|failed'
|
||||
- 'result is not failed'
|
||||
- 'result.changed == False'
|
||||
|
||||
|
||||
|
@ -212,7 +212,7 @@
|
|||
- name: assert lambda upload succeeded
|
||||
assert:
|
||||
that:
|
||||
- 'not result|failed'
|
||||
- 'result is not failed'
|
||||
- 'result.changed == True'
|
||||
|
||||
- name: test lambda works
|
||||
|
@ -229,7 +229,7 @@
|
|||
- name: assert lambda manages to respond as expected
|
||||
assert:
|
||||
that:
|
||||
- 'not result|failed'
|
||||
- 'result is not failed'
|
||||
- 'result.result.output.message == "hello Mr Ansible Tests. I think you are great!!"'
|
||||
|
||||
# ============================================================
|
||||
|
@ -250,7 +250,7 @@
|
|||
- name: assert lambda manages to respond as expected
|
||||
assert:
|
||||
that:
|
||||
- 'result|failed'
|
||||
- 'result is failed'
|
||||
- 'result.changed == False'
|
||||
|
||||
# ============================================================
|
||||
|
@ -267,7 +267,7 @@
|
|||
- name: assert state=absent
|
||||
assert:
|
||||
that:
|
||||
- 'not result|failed'
|
||||
- 'result is not failed'
|
||||
- 'result.changed == True'
|
||||
|
||||
# ============================================================
|
||||
|
@ -331,7 +331,7 @@
|
|||
- name: assert lambda manages to respond as expected
|
||||
assert:
|
||||
that:
|
||||
- 'not result|failed'
|
||||
- 'result is not failed'
|
||||
|
||||
- name: wait for async job 1
|
||||
async_status: jid={{ async_1.ansible_job_id }}
|
||||
|
@ -402,7 +402,7 @@
|
|||
- name: assert lambda creation has succeeded
|
||||
assert:
|
||||
that:
|
||||
- 'not result|failed'
|
||||
- 'result is not failed'
|
||||
|
||||
- name: wait for async job 1
|
||||
async_status: jid={{ async_1.ansible_job_id }}
|
||||
|
@ -446,5 +446,5 @@
|
|||
- name: assert state=absent
|
||||
assert:
|
||||
that:
|
||||
- 'not result|failed'
|
||||
- 'result is not failed'
|
||||
- 'result.changed == False'
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'async_hello_world.msg == "Hello, World!"'
|
||||
when: not async_hello_world|skipped
|
||||
when: async_hello_world is not skipped
|
||||
|
||||
- name: Async Hello, Ansible!
|
||||
action: "helloworld_{{ ansible_system|lower }}"
|
||||
|
@ -50,4 +50,4 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'async_hello_ansible.msg == "Hello, Ansible!"'
|
||||
when: not async_hello_ansible|skipped
|
||||
when: async_hello_ansible is not skipped
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
- name: verify that the file was marked as changed in check mode
|
||||
assert:
|
||||
that:
|
||||
- "template_result|changed"
|
||||
- "template_result is changed"
|
||||
- "not foo.stat.exists"
|
||||
|
||||
- name: Actually create the file, disable check mode
|
||||
|
@ -46,5 +46,5 @@
|
|||
- name: verify that the file was not changed
|
||||
assert:
|
||||
that:
|
||||
- "checkmode_disabled|changed"
|
||||
- "not template_result2|changed"
|
||||
- "checkmode_disabled is changed"
|
||||
- "template_result2 is not changed"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "'汉语' in command.stdout"
|
||||
- command | changed # as of 2.2, raw should default to changed: true for consistency w/ shell/command/script modules
|
||||
- command is changed # as of 2.2, raw should default to changed: true for consistency w/ shell/command/script modules
|
||||
|
||||
### copy local file with unicode filename and content
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
- name: assert copy worked
|
||||
assert:
|
||||
that:
|
||||
- 'copy_result|success'
|
||||
- 'copy_result|changed'
|
||||
- 'copy_result is successful'
|
||||
- 'copy_result is changed'
|
||||
|
||||
- name: stat copied file
|
||||
stat:
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
- name: Assert copy failed
|
||||
assert:
|
||||
that:
|
||||
- 'copy_result|failed'
|
||||
- 'copy_result is failed'
|
||||
|
||||
- name: Stat dest path
|
||||
stat:
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
- name: Assert that the file was not changed
|
||||
assert:
|
||||
that:
|
||||
- "not copy_result2|changed"
|
||||
- "copy_result2 is not changed"
|
||||
|
||||
- name: Overwrite the file using the content system
|
||||
copy:
|
||||
|
@ -129,7 +129,7 @@
|
|||
- name: Assert that the file has changed
|
||||
assert:
|
||||
that:
|
||||
- "copy_result3|changed"
|
||||
- "copy_result3 is changed"
|
||||
- "'content' not in copy_result3"
|
||||
- "stat_results.stat.checksum == ('modified'|hash('sha1'))"
|
||||
- "stat_results.stat.mode != '0700'"
|
||||
|
@ -154,7 +154,7 @@
|
|||
- name: Assert that the file has changed
|
||||
assert:
|
||||
that:
|
||||
- "copy_result3|changed"
|
||||
- "copy_result3 is changed"
|
||||
- "'content' not in copy_result3"
|
||||
- "stat_results.stat.checksum == ('modified'|hash('sha1'))"
|
||||
- "stat_results.stat.mode == '0700'"
|
||||
|
@ -269,7 +269,7 @@
|
|||
- name: Assert that empty source failed
|
||||
assert:
|
||||
that:
|
||||
- failed_copy | failed
|
||||
- failed_copy is failed
|
||||
- "'src (or content) is required' in failed_copy.msg"
|
||||
|
||||
- name: Try without destination to ensure it fails
|
||||
|
@ -285,7 +285,7 @@
|
|||
- name: Assert that missing destination failed
|
||||
assert:
|
||||
that:
|
||||
- failed_copy | failed
|
||||
- failed_copy is failed
|
||||
- "'dest is required' in failed_copy.msg"
|
||||
|
||||
- name: Try without source to ensure it fails
|
||||
|
@ -301,7 +301,7 @@
|
|||
- name: Assert that missing source failed
|
||||
assert:
|
||||
that:
|
||||
- failed_copy | failed
|
||||
- failed_copy is failed
|
||||
- "'src (or content) is required' in failed_copy.msg"
|
||||
|
||||
- name: Try with both src and content to ensure it fails
|
||||
|
@ -315,7 +315,7 @@
|
|||
- name: Assert that mutually exclusive parameters failed
|
||||
assert:
|
||||
that:
|
||||
- failed_copy | failed
|
||||
- failed_copy is failed
|
||||
- "'mutually exclusive' in failed_copy.msg"
|
||||
|
||||
- name: Try with content and directory as destination to ensure it fails
|
||||
|
@ -332,7 +332,7 @@
|
|||
- name: Assert that content and directory as destination failed
|
||||
assert:
|
||||
that:
|
||||
- failed_copy | failed
|
||||
- failed_copy is failed
|
||||
- "'can not use content with a dir as dest' in failed_copy.msg"
|
||||
|
||||
- name: Clean up
|
||||
|
@ -359,7 +359,7 @@
|
|||
- name: Assert that the file has changed
|
||||
assert:
|
||||
that:
|
||||
- "copy_results|changed"
|
||||
- "copy_results is changed"
|
||||
- "stat_results.stat.checksum == ('foo.txt\n'|hash('sha1'))"
|
||||
- "stat_results.stat.mode == '0500'"
|
||||
|
||||
|
@ -386,7 +386,7 @@
|
|||
- name: Assert that the file has changed and has correct mode
|
||||
assert:
|
||||
that:
|
||||
- "copy_results|changed"
|
||||
- "copy_results is changed"
|
||||
- "copy_results.mode == '0547'"
|
||||
- "stat_results.stat.checksum == ('foo.txt\n'|hash('sha1'))"
|
||||
- "stat_results.stat.mode == '0547'"
|
||||
|
@ -437,7 +437,7 @@
|
|||
- name: Assert that the recursive copy did something
|
||||
assert:
|
||||
that:
|
||||
- "recursive_copy_result|changed"
|
||||
- "recursive_copy_result is changed"
|
||||
|
||||
- name: Check that a file in a directory was transferred
|
||||
stat:
|
||||
|
@ -547,7 +547,7 @@
|
|||
- name: Assert that the second copy did not change anything
|
||||
assert:
|
||||
that:
|
||||
- "not recursive_copy_result|changed"
|
||||
- "recursive_copy_result is not changed"
|
||||
|
||||
- name: Cleanup the recursive copy subdir
|
||||
file:
|
||||
|
@ -594,7 +594,7 @@
|
|||
- name: Assert that the recursive copy did something
|
||||
assert:
|
||||
that:
|
||||
- "recursive_copy_result|changed"
|
||||
- "recursive_copy_result is changed"
|
||||
|
||||
- name: Check that a file in a directory was transferred
|
||||
stat:
|
||||
|
@ -702,7 +702,7 @@
|
|||
- name: Assert that the second copy did not change anything
|
||||
assert:
|
||||
that:
|
||||
- "not recursive_copy_result|changed"
|
||||
- "recursive_copy_result is not changed"
|
||||
|
||||
- name: Cleanup the recursive copy subdir
|
||||
file:
|
||||
|
@ -749,7 +749,7 @@
|
|||
- name: Assert that the recursive copy did something
|
||||
assert:
|
||||
that:
|
||||
- "recursive_copy_result|changed"
|
||||
- "recursive_copy_result is changed"
|
||||
|
||||
- name: Check that a file in a directory was transferred
|
||||
stat:
|
||||
|
@ -867,7 +867,7 @@
|
|||
- name: Assert that the second copy did not change anything
|
||||
assert:
|
||||
that:
|
||||
- "not recursive_copy_result|changed"
|
||||
- "recursive_copy_result is not changed"
|
||||
|
||||
- name: Cleanup the recursive copy subdir
|
||||
file:
|
||||
|
@ -1153,7 +1153,7 @@
|
|||
- name: Assert that the file has changed and is not a link
|
||||
assert:
|
||||
that:
|
||||
- "copy_results|changed"
|
||||
- "copy_results is changed"
|
||||
- "'content' not in copy_results"
|
||||
- "stat_results.stat.checksum == ('modified'|hash('sha1'))"
|
||||
- "not stat_results.stat.islnk"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc is successful
|
||||
|
||||
- name: test fail if missing name
|
||||
action: cs_account
|
||||
|
@ -14,7 +14,7 @@
|
|||
- name: verify results of fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- acc|failed
|
||||
- acc is failed
|
||||
- 'acc.msg == "missing required arguments: name"'
|
||||
|
||||
- name: test fail if missing params if state=present
|
||||
|
@ -25,7 +25,7 @@
|
|||
- name: verify results of fail if missing params if state=present
|
||||
assert:
|
||||
that:
|
||||
- acc|failed
|
||||
- acc is failed
|
||||
- 'acc.msg == "missing required arguments: email, username, password, first_name, last_name"'
|
||||
|
||||
- name: test create user account in check mode
|
||||
|
@ -42,8 +42,8 @@
|
|||
- name: verify results of create account in check mode
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
|
||||
- name: test create user account
|
||||
cs_account:
|
||||
|
@ -58,8 +58,8 @@
|
|||
- name: verify results of create account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -79,8 +79,8 @@
|
|||
- name: verify results of create account idempotence
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- not acc|changed
|
||||
- acc is successful
|
||||
- acc is not changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -96,8 +96,8 @@
|
|||
- name: verify results of lock user account in check mode
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -112,8 +112,8 @@
|
|||
- name: verify results of lock user account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -128,8 +128,8 @@
|
|||
- name: verify results of lock user account idempotence
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- not acc|changed
|
||||
- acc is successful
|
||||
- acc is not changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -145,8 +145,8 @@
|
|||
- name: verify results of disable user account in check mode
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -161,8 +161,8 @@
|
|||
- name: verify results of disable user account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -177,8 +177,8 @@
|
|||
- name: verify results of disable user account idempotence
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- not acc|changed
|
||||
- acc is successful
|
||||
- acc is not changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -194,8 +194,8 @@
|
|||
- name: verify results of lock disabled user account in check mode
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -210,8 +210,8 @@
|
|||
- name: verify results of lock disabled user account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -226,8 +226,8 @@
|
|||
- name: verify results of lock disabled user account idempotence
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- not acc|changed
|
||||
- acc is successful
|
||||
- acc is not changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -243,8 +243,8 @@
|
|||
- name: verify results of enable user account in check mode
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -259,8 +259,8 @@
|
|||
- name: verify results of enable user account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -275,8 +275,8 @@
|
|||
- name: verify results of enable user account idempotence
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- not acc|changed
|
||||
- acc is successful
|
||||
- acc is not changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -292,8 +292,8 @@
|
|||
- name: verify results of remove user account in check mode
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -308,8 +308,8 @@
|
|||
- name: verify results of remove user account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -324,8 +324,8 @@
|
|||
- name: verify results of remove user account idempotence
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- not acc|changed
|
||||
- acc is successful
|
||||
- acc is not changed
|
||||
|
||||
- name: test create user disabled account
|
||||
cs_account:
|
||||
|
@ -341,8 +341,8 @@
|
|||
- name: verify results of create disabled account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -357,8 +357,8 @@
|
|||
- name: verify results of remove disabled user account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -379,8 +379,8 @@
|
|||
- name: verify results of create locked account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -395,8 +395,8 @@
|
|||
- name: verify results of remove locked user account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -417,8 +417,8 @@
|
|||
- name: verify results of create unlocked/enabled account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
@ -433,8 +433,8 @@
|
|||
- name: verify results of remove unlocked/enabled user account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_user"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag is successful
|
||||
|
||||
- name: test fail if missing name
|
||||
cs_affinitygroup:
|
||||
|
@ -16,7 +16,7 @@
|
|||
- name: verify results of fail if missing name
|
||||
assert:
|
||||
that:
|
||||
- ag|failed
|
||||
- ag is failed
|
||||
- "ag.msg == 'missing required arguments: name'"
|
||||
|
||||
- name: test fail unknown affinity type
|
||||
|
@ -28,7 +28,7 @@
|
|||
- name: verify test fail unknown affinity type
|
||||
assert:
|
||||
that:
|
||||
- ag|failed
|
||||
- ag is failed
|
||||
- "ag.msg == 'affinity group type not found: unexistent affinity type'"
|
||||
|
||||
- name: test present affinity group in check mode
|
||||
|
@ -38,8 +38,8 @@
|
|||
- name: verify results of create affinity group in check mode
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag|changed
|
||||
- ag is successful
|
||||
- ag is changed
|
||||
|
||||
- name: test present affinity group
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}_ag
|
||||
|
@ -47,8 +47,8 @@
|
|||
- name: verify results of create affinity group
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag|changed
|
||||
- ag is successful
|
||||
- ag is changed
|
||||
- ag.name == "{{ cs_resource_prefix }}_ag"
|
||||
|
||||
- name: test present affinity group is idempotence
|
||||
|
@ -57,8 +57,8 @@
|
|||
- name: verify results present affinity group is idempotence
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- not ag|changed
|
||||
- ag is successful
|
||||
- ag is not changed
|
||||
- ag.name == "{{ cs_resource_prefix }}_ag"
|
||||
|
||||
- name: test absent affinity group in check mode
|
||||
|
@ -68,8 +68,8 @@
|
|||
- name: verify results of absent affinity group in check mode
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag|changed
|
||||
- ag is successful
|
||||
- ag is changed
|
||||
- ag.name == "{{ cs_resource_prefix }}_ag"
|
||||
|
||||
- name: test absent affinity group
|
||||
|
@ -78,8 +78,8 @@
|
|||
- name: verify results of absent affinity group
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag|changed
|
||||
- ag is successful
|
||||
- ag is changed
|
||||
- ag.name == "{{ cs_resource_prefix }}_ag"
|
||||
|
||||
- name: test absent affinity group is idempotence
|
||||
|
@ -88,6 +88,6 @@
|
|||
- name: verify results of absent affinity group is idempotence
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- not ag|changed
|
||||
- ag is successful
|
||||
- ag is not changed
|
||||
- ag.name is undefined
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: verify setup cluster is absent
|
||||
assert:
|
||||
that:
|
||||
- cluster|success
|
||||
- cluster is successful
|
||||
|
||||
- name: setup zone is present
|
||||
cs_zone:
|
||||
|
@ -19,7 +19,7 @@
|
|||
- name: verify setup zone is present
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- zone is successful
|
||||
|
||||
- name: setup pod is present
|
||||
cs_pod:
|
||||
|
@ -32,7 +32,7 @@
|
|||
- name: verify setup pod is present
|
||||
assert:
|
||||
that:
|
||||
- pod|success
|
||||
- pod is successful
|
||||
|
||||
- name: test fail if missing name
|
||||
cs_cluster:
|
||||
|
@ -41,7 +41,7 @@
|
|||
- name: verify results of fail if missing name
|
||||
assert:
|
||||
that:
|
||||
- cluster|failed
|
||||
- cluster is failed
|
||||
- "cluster.msg == 'missing required arguments: name'"
|
||||
|
||||
- name: test fail if pod not found
|
||||
|
@ -56,7 +56,7 @@
|
|||
- name: verify results of fail if missing name
|
||||
assert:
|
||||
that:
|
||||
- cluster|failed
|
||||
- cluster is failed
|
||||
- "cluster.msg == 'Pod unexistent not found in zone {{ cs_resource_prefix }}-zone'"
|
||||
|
||||
- name: test create cluster in check mode
|
||||
|
@ -71,7 +71,7 @@
|
|||
- name: verify test create cluster in check mode
|
||||
assert:
|
||||
that:
|
||||
- cluster_origin|changed
|
||||
- cluster_origin is changed
|
||||
|
||||
- name: test create cluster
|
||||
cs_cluster:
|
||||
|
@ -84,7 +84,7 @@
|
|||
- name: verify test create cluster
|
||||
assert:
|
||||
that:
|
||||
- cluster_origin|changed
|
||||
- cluster_origin is changed
|
||||
- cluster_origin.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster_origin.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster_origin.allocation_state == "Enabled"
|
||||
|
@ -102,7 +102,7 @@
|
|||
assert:
|
||||
that:
|
||||
- cluster.id == cluster_origin.id
|
||||
- not cluster|changed
|
||||
- cluster is not changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Enabled"
|
||||
|
@ -120,7 +120,7 @@
|
|||
- name: verify test update cluster in check mode
|
||||
assert:
|
||||
that:
|
||||
- cluster|changed
|
||||
- cluster is changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Enabled"
|
||||
|
@ -138,7 +138,7 @@
|
|||
- name: verify test update cluster
|
||||
assert:
|
||||
that:
|
||||
- cluster|changed
|
||||
- cluster is changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Enabled"
|
||||
|
@ -156,7 +156,7 @@
|
|||
- name: verify test update cluster idempotence
|
||||
assert:
|
||||
that:
|
||||
- not cluster|changed
|
||||
- cluster is not changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Enabled"
|
||||
|
@ -173,7 +173,7 @@
|
|||
- name: verify test disable cluster in check mode
|
||||
assert:
|
||||
that:
|
||||
- cluster|changed
|
||||
- cluster is changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Enabled"
|
||||
|
@ -189,7 +189,7 @@
|
|||
- name: verify test disable cluster
|
||||
assert:
|
||||
that:
|
||||
- cluster|changed
|
||||
- cluster is changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Disabled"
|
||||
|
@ -205,7 +205,7 @@
|
|||
- name: verify test disable cluster idempotence
|
||||
assert:
|
||||
that:
|
||||
- not cluster|changed
|
||||
- cluster is not changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Disabled"
|
||||
|
@ -221,7 +221,7 @@
|
|||
- name: verify test enable cluster in check mode
|
||||
assert:
|
||||
that:
|
||||
- cluster|changed
|
||||
- cluster is changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Disabled"
|
||||
|
@ -237,7 +237,7 @@
|
|||
- name: verify test enable cluster
|
||||
assert:
|
||||
that:
|
||||
- cluster|changed
|
||||
- cluster is changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Enabled"
|
||||
|
@ -253,7 +253,7 @@
|
|||
- name: verify test enable cluster idempotence
|
||||
assert:
|
||||
that:
|
||||
- not cluster|changed
|
||||
- cluster is not changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Enabled"
|
||||
|
@ -272,7 +272,7 @@
|
|||
assert:
|
||||
that:
|
||||
- cluster.id == cluster_origin.id
|
||||
- cluster|changed
|
||||
- cluster is changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Enabled"
|
||||
|
@ -288,7 +288,7 @@
|
|||
assert:
|
||||
that:
|
||||
- cluster.id == cluster_origin.id
|
||||
- cluster|changed
|
||||
- cluster is changed
|
||||
- cluster.name == "{{ cs_resource_prefix }}-cluster"
|
||||
- cluster.zone == "{{ cs_resource_prefix }}-zone"
|
||||
- cluster.allocation_state == "Enabled"
|
||||
|
@ -303,4 +303,4 @@
|
|||
- name: verify test remove cluster idempotence
|
||||
assert:
|
||||
that:
|
||||
- not cluster|changed
|
||||
- cluster is not changed
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: verify test configuration storage
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config is successful
|
||||
|
||||
- name: test update configuration account in check mode
|
||||
cs_configuration:
|
||||
|
@ -20,8 +20,8 @@
|
|||
- name: verify update configuration account in check mode
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "true"
|
||||
- config.name == "allow.public.user.templates"
|
||||
- config.scope == "account"
|
||||
|
@ -36,8 +36,8 @@
|
|||
- name: verify update configuration account
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "false"
|
||||
- config.name == "allow.public.user.templates"
|
||||
- config.scope == "account"
|
||||
|
@ -52,8 +52,8 @@
|
|||
- name: verify update configuration account idempotence
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- not config|changed
|
||||
- config is successful
|
||||
- config is not changed
|
||||
- config.value == "false"
|
||||
- config.name == "allow.public.user.templates"
|
||||
- config.scope == "account"
|
||||
|
@ -68,8 +68,8 @@
|
|||
- name: verify update configuration account
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "true"
|
||||
- config.name == "allow.public.user.templates"
|
||||
- config.scope == "account"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: verify test configuration cluster
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config is successful
|
||||
|
||||
- name: test update configuration cluster in check mode
|
||||
cs_configuration:
|
||||
|
@ -20,8 +20,8 @@
|
|||
- name: verify update configuration cluster in check mode
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "1.0"
|
||||
- config.name == "cpu.overprovisioning.factor"
|
||||
- config.scope == "cluster"
|
||||
|
@ -36,8 +36,8 @@
|
|||
- name: verify update configuration cluster
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "2.0"
|
||||
- config.name == "cpu.overprovisioning.factor"
|
||||
- config.scope == "cluster"
|
||||
|
@ -52,8 +52,8 @@
|
|||
- name: verify update configuration cluster idempotence
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- not config|changed
|
||||
- config is successful
|
||||
- config is not changed
|
||||
- config.value == "2.0"
|
||||
- config.name == "cpu.overprovisioning.factor"
|
||||
- config.scope == "cluster"
|
||||
|
@ -68,8 +68,8 @@
|
|||
- name: verify reset configuration cluster
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "1.0"
|
||||
- config.name == "cpu.overprovisioning.factor"
|
||||
- config.scope == "cluster"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: verify results of fail if missing arguments
|
||||
assert:
|
||||
that:
|
||||
- config|failed
|
||||
- config is failed
|
||||
- "config.msg.startswith('missing required arguments: ')"
|
||||
|
||||
- name: test configuration
|
||||
|
@ -17,7 +17,7 @@
|
|||
- name: verify test configuration
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config is successful
|
||||
|
||||
- name: test update configuration string in check mode
|
||||
cs_configuration:
|
||||
|
@ -28,8 +28,8 @@
|
|||
- name: verify test update configuration string in check mode
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "global"
|
||||
- config.name == "network.loadbalancer.haproxy.stats.visibility"
|
||||
|
||||
|
@ -41,8 +41,8 @@
|
|||
- name: verify test update configuration string
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "all"
|
||||
- config.name == "network.loadbalancer.haproxy.stats.visibility"
|
||||
|
||||
|
@ -54,8 +54,8 @@
|
|||
- name: verify test update configuration string idempotence
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- not config|changed
|
||||
- config is successful
|
||||
- config is not changed
|
||||
- config.value == "all"
|
||||
- config.name == "network.loadbalancer.haproxy.stats.visibility"
|
||||
|
||||
|
@ -67,8 +67,8 @@
|
|||
- name: verify test reset configuration string
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "global"
|
||||
- config.name == "network.loadbalancer.haproxy.stats.visibility"
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
|||
- name: verify test configuration
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config is successful
|
||||
|
||||
- name: test update configuration bool in check mode
|
||||
cs_configuration:
|
||||
|
@ -91,8 +91,8 @@
|
|||
- name: verify test update configuration bool in check mode
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "false"
|
||||
- config.name == "vmware.recycle.hung.wokervm"
|
||||
|
||||
|
@ -104,8 +104,8 @@
|
|||
- name: verify test update configuration bool
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "true"
|
||||
- config.name == "vmware.recycle.hung.wokervm"
|
||||
|
||||
|
@ -117,8 +117,8 @@
|
|||
- name: verify test update configuration bool idempotence
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- not config|changed
|
||||
- config is successful
|
||||
- config is not changed
|
||||
- config.value == "true"
|
||||
- config.name == "vmware.recycle.hung.wokervm"
|
||||
|
||||
|
@ -130,8 +130,8 @@
|
|||
- name: verify test reset configuration bool
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "false"
|
||||
- config.name == "vmware.recycle.hung.wokervm"
|
||||
|
||||
|
@ -143,7 +143,7 @@
|
|||
- name: verify test configuration
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config is successful
|
||||
|
||||
- name: test update configuration float in check mode
|
||||
cs_configuration:
|
||||
|
@ -154,8 +154,8 @@
|
|||
- name: verify update configuration float in check mode
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "0.7"
|
||||
- config.name == "agent.load.threshold"
|
||||
|
||||
|
@ -167,8 +167,8 @@
|
|||
- name: verify update configuration float
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "0.81"
|
||||
- config.name == "agent.load.threshold"
|
||||
|
||||
|
@ -180,8 +180,8 @@
|
|||
- name: verify update configuration float idempotence
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- not config|changed
|
||||
- config is successful
|
||||
- config is not changed
|
||||
- config.value == "0.81"
|
||||
- config.name == "agent.load.threshold"
|
||||
|
||||
|
@ -193,8 +193,8 @@
|
|||
- name: verify reset configuration float
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "0.7"
|
||||
- config.name == "agent.load.threshold"
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: verify test configuration storage
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config is successful
|
||||
|
||||
- name: test update configuration storage in check mode
|
||||
cs_configuration:
|
||||
|
@ -20,8 +20,8 @@
|
|||
- name: verify update configuration storage in check mode
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "2.0"
|
||||
- config.name == "storage.overprovisioning.factor"
|
||||
- config.scope == "storagepool"
|
||||
|
@ -36,8 +36,8 @@
|
|||
- name: verify update configuration storage
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "3.0"
|
||||
- config.name == "storage.overprovisioning.factor"
|
||||
- config.scope == "storagepool"
|
||||
|
@ -52,8 +52,8 @@
|
|||
- name: verify update configuration storage idempotence
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- not config|changed
|
||||
- config is successful
|
||||
- config is not changed
|
||||
- config.value == "3.0"
|
||||
- config.name == "storage.overprovisioning.factor"
|
||||
- config.scope == "storagepool"
|
||||
|
@ -68,8 +68,8 @@
|
|||
- name: verify reset configuration storage
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "2.0"
|
||||
- config.name == "storage.overprovisioning.factor"
|
||||
- config.scope == "storagepool"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: verify test configuration zone
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config is successful
|
||||
|
||||
- name: test update configuration zone
|
||||
cs_configuration:
|
||||
|
@ -19,8 +19,8 @@
|
|||
- name: verify update configuration zone
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "true"
|
||||
- config.name == "use.external.dns"
|
||||
- config.scope == "zone"
|
||||
|
@ -35,8 +35,8 @@
|
|||
- name: verify update configuration zone idempotence
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- not config|changed
|
||||
- config is successful
|
||||
- config is not changed
|
||||
- config.value == "true"
|
||||
- config.name == "use.external.dns"
|
||||
- config.scope == "zone"
|
||||
|
@ -51,8 +51,8 @@
|
|||
- name: verify reset configuration zone
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config is successful
|
||||
- config is changed
|
||||
- config.value == "false"
|
||||
- config.name == "use.external.dns"
|
||||
- config.scope == "zone"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- dom|success
|
||||
- dom is successful
|
||||
|
||||
- name: test fail if missing name
|
||||
action: cs_domain
|
||||
|
@ -16,7 +16,7 @@
|
|||
- name: verify results of fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- dom|failed
|
||||
- dom is failed
|
||||
- 'dom.msg == "missing required arguments: path"'
|
||||
|
||||
- name: test fail if ends with /
|
||||
|
@ -27,7 +27,7 @@
|
|||
- name: verify results of fail if ends with /
|
||||
assert:
|
||||
that:
|
||||
- dom|failed
|
||||
- dom is failed
|
||||
- dom.msg == "Path '{{ cs_resource_prefix }}_domain/' must not end with /"
|
||||
|
||||
- name: test create a domain in check mode
|
||||
|
@ -38,7 +38,7 @@
|
|||
- name: verify results of test create a domain in check mode
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
|
||||
- name: test create a domain
|
||||
cs_domain:
|
||||
|
@ -47,7 +47,7 @@
|
|||
- name: verify results of test create a domain
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_domain"
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
|||
- name: verify results of test create a domain idempotence
|
||||
assert:
|
||||
that:
|
||||
- not dom|changed
|
||||
- dom is not changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_domain"
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
|||
- name: verify results of test create a domain idempotence2
|
||||
assert:
|
||||
that:
|
||||
- not dom|changed
|
||||
- dom is not changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_domain"
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
|||
- name: test fail to create a subdomain for inexistent domain
|
||||
assert:
|
||||
that:
|
||||
- dom|failed
|
||||
- dom is failed
|
||||
- dom.msg == "Parent domain path ROOT/inexistent does not exist"
|
||||
|
||||
- name: test create a subdomain in check mode
|
||||
|
@ -92,7 +92,7 @@
|
|||
- name: verify results of test create a domain in check mode
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
|
||||
- name: test create a subdomain
|
||||
cs_domain:
|
||||
|
@ -101,7 +101,7 @@
|
|||
- name: verify results of test create a domain
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_subdomain"
|
||||
|
||||
|
@ -112,7 +112,7 @@
|
|||
- name: verify results of test create a subdomain idempotence
|
||||
assert:
|
||||
that:
|
||||
- not dom|changed
|
||||
- dom is not changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_subdomain"
|
||||
|
||||
|
@ -125,7 +125,7 @@
|
|||
- name: verify results of test update a subdomain in check mode
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
- dom.network_domain is undefined
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_subdomain"
|
||||
|
@ -138,7 +138,7 @@
|
|||
- name: verify results of test update a subdomain
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
- dom.network_domain == "domain.example.com"
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_subdomain"
|
||||
|
@ -151,7 +151,7 @@
|
|||
- name: verify results of test update a subdomain idempotence
|
||||
assert:
|
||||
that:
|
||||
- not dom|changed
|
||||
- dom is not changed
|
||||
- dom.network_domain == "domain.example.com"
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_subdomain"
|
||||
|
@ -165,7 +165,7 @@
|
|||
- name: verify results of test delete a subdomain in check mode
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_subdomain"
|
||||
|
||||
|
@ -177,7 +177,7 @@
|
|||
- name: verify results of test delete a subdomain
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_subdomain"
|
||||
|
||||
|
@ -189,7 +189,7 @@
|
|||
- name: verify results of test delete a subdomain idempotence
|
||||
assert:
|
||||
that:
|
||||
- not dom|changed
|
||||
- dom is not changed
|
||||
|
||||
- name: test create a subdomain 2
|
||||
cs_domain:
|
||||
|
@ -198,7 +198,7 @@
|
|||
- name: verify results of test create a subdomain 2
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_subdomain"
|
||||
|
||||
|
@ -212,7 +212,7 @@
|
|||
- name: verify results of test delete a domain with clean up in check mode
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_domain"
|
||||
|
||||
|
@ -225,7 +225,7 @@
|
|||
- name: verify results of test delete a domain with clean up
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom is changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_domain"
|
||||
|
||||
|
@ -238,4 +238,4 @@
|
|||
- name: verify results of test delete a domain with clean up idempotence
|
||||
assert:
|
||||
that:
|
||||
- not dom|changed
|
||||
- dom is not changed
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: verify network setup
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
|
||||
- name: public ip address setup
|
||||
cs_ip_address:
|
||||
|
@ -19,7 +19,7 @@
|
|||
- name: verify public ip address setup
|
||||
assert:
|
||||
that:
|
||||
- ip_address|success
|
||||
- ip_address is successful
|
||||
|
||||
- name: set ip address as fact
|
||||
set_fact:
|
||||
|
@ -35,7 +35,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw is successful
|
||||
|
||||
- name: setup 5300
|
||||
cs_firewall:
|
||||
|
@ -52,7 +52,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw is successful
|
||||
|
||||
- name: setup all
|
||||
cs_firewall:
|
||||
|
@ -65,7 +65,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw is successful
|
||||
|
||||
- name: test fail if missing params
|
||||
action: cs_firewall
|
||||
|
@ -74,7 +74,7 @@
|
|||
- name: verify results of fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- fw|failed
|
||||
- fw is failed
|
||||
- "fw.msg == 'one of the following is required: ip_address, network'"
|
||||
|
||||
- name: test fail if missing params
|
||||
|
@ -86,7 +86,7 @@
|
|||
- name: verify results of fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- fw|failed
|
||||
- fw is failed
|
||||
- "fw.msg == \"missing required argument for protocol 'tcp': start_port or end_port\""
|
||||
|
||||
- name: test fail if missing params network egress
|
||||
|
@ -98,7 +98,7 @@
|
|||
- name: verify results of fail if missing params ip_address
|
||||
assert:
|
||||
that:
|
||||
- fw|failed
|
||||
- fw is failed
|
||||
- "fw.msg == 'one of the following is required: ip_address, network'"
|
||||
|
||||
- name: test present firewall rule ingress 80 in check mode
|
||||
|
@ -111,8 +111,8 @@
|
|||
- name: verify results of present firewall rule ingress 80 in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
|
||||
- name: test present firewall rule ingress 80
|
||||
cs_firewall:
|
||||
|
@ -123,8 +123,8 @@
|
|||
- name: verify results of present firewall rule ingress 80
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
|
@ -142,8 +142,8 @@
|
|||
- name: verify results of present firewall rule ingress 80 idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
|
@ -167,8 +167,8 @@
|
|||
- name: verify results of present firewall rule ingress 5300 in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
|
||||
- name: test present firewall rule ingress 5300
|
||||
cs_firewall:
|
||||
|
@ -184,8 +184,8 @@
|
|||
- name: verify results of present firewall rule ingress 5300
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "1.2.3.0/24,4.5.6.0/24"
|
||||
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
|
@ -208,8 +208,8 @@
|
|||
- name: verify results of present firewall rule ingress 5300 idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
- fw.cidr == "1.2.3.0/24,4.5.6.0/24"
|
||||
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
|
@ -229,8 +229,8 @@
|
|||
- name: verify results of present firewall rule egress all in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
|
||||
- name: test present firewall rule egress all
|
||||
cs_firewall:
|
||||
|
@ -242,8 +242,8 @@
|
|||
- name: verify results of present firewall rule egress all
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.network == "{{ cs_firewall_network }}"
|
||||
|
@ -260,8 +260,8 @@
|
|||
- name: verify results of present firewall rule egress all idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.network == "{{ cs_firewall_network }}"
|
||||
- fw.protocol == "all"
|
||||
|
@ -278,8 +278,8 @@
|
|||
- name: verify results of absent firewall rule ingress 80 in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
|
@ -298,8 +298,8 @@
|
|||
- name: verify results of absent firewall rule ingress 80
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
|
@ -318,8 +318,8 @@
|
|||
- name: verify results of absent firewall rule ingress 80 idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
|
||||
- name: test absent firewall rule ingress 5300 in check mode
|
||||
cs_firewall:
|
||||
|
@ -337,8 +337,8 @@
|
|||
- name: verify results of absent firewall rule ingress 5300 in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "1.2.3.0/24,4.5.6.0/24"
|
||||
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
|
@ -362,8 +362,8 @@
|
|||
- name: verify results of absent firewall rule ingress 5300
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "1.2.3.0/24,4.5.6.0/24"
|
||||
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
|
@ -387,8 +387,8 @@
|
|||
- name: verify results of absent firewall rule ingress 5300 idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
|
||||
- name: test absent firewall rule egress all in check mode
|
||||
cs_firewall:
|
||||
|
@ -402,8 +402,8 @@
|
|||
- name: verify results of absent firewall rule egress all in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.network == "{{ cs_firewall_network }}"
|
||||
|
@ -421,8 +421,8 @@
|
|||
- name: verify results of absent firewall rule egress all
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.network == "{{ cs_firewall_network }}"
|
||||
|
@ -440,8 +440,8 @@
|
|||
- name: verify results of absent firewall rule egress all idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
|
||||
- name: network cleanup
|
||||
cs_network:
|
||||
|
@ -452,4 +452,4 @@
|
|||
- name: verify network cleanup
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: verify test fail missing url if host is not existent
|
||||
assert:
|
||||
that:
|
||||
- host|failed
|
||||
- host is failed
|
||||
- 'host.msg == "missing required arguments: name"'
|
||||
|
||||
- name: test fail missing params if host is not existent
|
||||
|
@ -17,7 +17,7 @@
|
|||
- name: verify test fail missing params if host is not existent
|
||||
assert:
|
||||
that:
|
||||
- host|failed
|
||||
- host is failed
|
||||
- 'host.msg == "missing required arguments: password, username, hypervisor, pod"'
|
||||
|
||||
- name: test create a host in check mode
|
||||
|
@ -38,7 +38,7 @@
|
|||
- name: verify test create a host in check mode
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
|
||||
- name: test create a host
|
||||
cs_host:
|
||||
|
@ -57,7 +57,7 @@
|
|||
- name: verify test create a host
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -91,7 +91,7 @@
|
|||
- name: verify test create a host idempotence
|
||||
assert:
|
||||
that:
|
||||
- not host|changed
|
||||
- host is not changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -120,7 +120,7 @@
|
|||
- name: verify test update a host in check mode
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -148,7 +148,7 @@
|
|||
- name: verify test update a host in check mode
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -176,7 +176,7 @@
|
|||
- name: verify test update a host idempotence
|
||||
assert:
|
||||
that:
|
||||
- not host|changed
|
||||
- host is not changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -203,7 +203,7 @@
|
|||
- name: verify test update host remove host_tags
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
- host.host_tags|length == 0
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
|
@ -231,7 +231,7 @@
|
|||
- name: verify test update host remove host_tags idempotence
|
||||
assert:
|
||||
that:
|
||||
- not host|changed
|
||||
- host is not changed
|
||||
- len(host.host_tags) == 0
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
|
@ -254,7 +254,7 @@
|
|||
- name: verify test put host in maintenance in check mode
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -274,7 +274,7 @@
|
|||
- name: verify test put host in maintenance
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -294,7 +294,7 @@
|
|||
- name: verify test put host in maintenance idempotence
|
||||
assert:
|
||||
that:
|
||||
- not host|changed
|
||||
- host is not changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -315,7 +315,7 @@
|
|||
- name: verify test put host out of maintenance in check mode
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -335,7 +335,7 @@
|
|||
- name: verify test put host out of maintenance
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -355,7 +355,7 @@
|
|||
- name: verify test put host out of maintenance idempotence
|
||||
assert:
|
||||
that:
|
||||
- not host|changed
|
||||
- host is not changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -376,7 +376,7 @@
|
|||
- name: verify test remove a host in check mode
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -396,7 +396,7 @@
|
|||
- name: verify test remove a host
|
||||
assert:
|
||||
that:
|
||||
- host|changed
|
||||
- host is changed
|
||||
- host.cluster == 'C0-basic'
|
||||
- host.pod == 'POD0-basic'
|
||||
- host.hypervisor == 'Simulator'
|
||||
|
@ -416,4 +416,4 @@
|
|||
- name: verify test remove a host idempotenc
|
||||
assert:
|
||||
that:
|
||||
- not host|changed
|
||||
- host is not changed
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
- name: verify destroy instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state != "Destroyed"
|
||||
|
||||
- name: test destroy instance
|
||||
|
@ -20,8 +20,8 @@
|
|||
- name: verify destroy instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state == "Destroyed"
|
||||
|
||||
- name: test destroy instance idempotence
|
||||
|
@ -32,8 +32,8 @@
|
|||
- name: verify destroy instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
|
||||
- name: test recover to stopped state and update a deleted instance in check mode
|
||||
cs_instance:
|
||||
|
@ -45,8 +45,8 @@
|
|||
- name: verify test recover to stopped state and update a deleted instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
|
||||
- name: test recover to stopped state and update a deleted instance
|
||||
cs_instance:
|
||||
|
@ -57,8 +57,8 @@
|
|||
- name: verify test recover to stopped state and update a deleted instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state == "Stopped"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
||||
|
@ -71,8 +71,8 @@
|
|||
- name: verify test recover to stopped state and update a deleted instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.state == "Stopped"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
||||
|
@ -85,8 +85,8 @@
|
|||
- name: verify test expunge instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state == "Stopped"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
||||
|
@ -98,8 +98,8 @@
|
|||
- name: verify test expunge instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state == "Stopped"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
||||
|
@ -111,5 +111,5 @@
|
|||
- name: verify test expunge instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
- name: verify destroy instance with display_name
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state == "Destroyed"
|
||||
|
||||
- name: test destroy instance with display_name idempotence
|
||||
|
@ -19,8 +19,8 @@
|
|||
- name: verify destroy instance with display_name idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
|
||||
- name: test recover to stopped state and update a deleted instance with display_name
|
||||
cs_instance:
|
||||
|
@ -31,8 +31,8 @@
|
|||
- name: verify test recover to stopped state and update a deleted instance with display_name
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state == "Stopped"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
||||
|
|
|
@ -5,26 +5,26 @@
|
|||
- name: verify cleanup ssh key
|
||||
assert:
|
||||
that:
|
||||
- sshkey|success
|
||||
- sshkey is successful
|
||||
|
||||
- name: cleanup affinity group
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}-ag state=absent
|
||||
register: ag
|
||||
until: ag|success
|
||||
until: ag is successful
|
||||
retries: 20
|
||||
delay: 5
|
||||
- name: verify cleanup affinity group
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag is successful
|
||||
|
||||
- name: cleanup security group ...take a while unless instance is expunged
|
||||
cs_securitygroup: name={{ cs_resource_prefix }}-sg state=absent
|
||||
register: sg
|
||||
until: sg|success
|
||||
until: sg is successful
|
||||
retries: 100
|
||||
delay: 10
|
||||
- name: verify cleanup security group
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg is successful
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: verify instance to be absent
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: test create instance in check mode
|
||||
cs_instance:
|
||||
|
@ -21,8 +21,8 @@
|
|||
- name: verify create instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
|
||||
- name: test create instance
|
||||
cs_instance:
|
||||
|
@ -37,8 +37,8 @@
|
|||
- name: verify create instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
@ -59,8 +59,8 @@
|
|||
- name: verify create instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
@ -77,8 +77,8 @@
|
|||
- name: verify running instance not updated in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
@ -93,8 +93,8 @@
|
|||
- name: verify running instance not updated
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
@ -109,8 +109,8 @@
|
|||
- name: verify stopping instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
@ -124,8 +124,8 @@
|
|||
- name: verify stopping instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
@ -139,8 +139,8 @@
|
|||
- name: verify stopping instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.state == "Stopped"
|
||||
|
||||
- name: test updating stopped instance in check mode
|
||||
|
@ -153,8 +153,8 @@
|
|||
- name: verify updating stopped instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
@ -169,8 +169,8 @@
|
|||
- name: verify updating stopped instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_2 }}"
|
||||
|
@ -185,8 +185,8 @@
|
|||
- name: verify updating stopped instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_2 }}"
|
||||
|
@ -201,8 +201,8 @@
|
|||
- name: verify starting instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_2 }}"
|
||||
|
@ -216,8 +216,8 @@
|
|||
- name: verify starting instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_2 }}"
|
||||
|
@ -231,8 +231,8 @@
|
|||
- name: verify starting instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_2 }}"
|
||||
|
@ -248,8 +248,8 @@
|
|||
- name: verify force update running instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_2 }}"
|
||||
|
@ -264,8 +264,8 @@
|
|||
- name: verify force update running instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
@ -280,8 +280,8 @@
|
|||
- name: verify force update running instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
@ -297,8 +297,8 @@
|
|||
- name: verify restore instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
@ -312,8 +312,8 @@
|
|||
- name: verify restore instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: verify instance with display_name to be absent
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: test create instance with display_name
|
||||
cs_instance:
|
||||
|
@ -20,8 +20,8 @@
|
|||
- name: verify create instance with display_name
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
- instance.state == "Running"
|
||||
|
@ -41,8 +41,8 @@
|
|||
- name: verify create instance with display_name idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
- instance.state == "Running"
|
||||
|
@ -57,8 +57,8 @@
|
|||
- name: verify running instance with display_name not updated
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
- instance.state == "Running"
|
||||
|
@ -71,8 +71,8 @@
|
|||
- name: verify stopping instance with display_name
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
- instance.state == "Stopped"
|
||||
|
@ -85,8 +85,8 @@
|
|||
- name: verify stopping instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.state == "Stopped"
|
||||
|
||||
- name: test updating stopped instance with display_name
|
||||
|
@ -97,8 +97,8 @@
|
|||
- name: verify updating stopped instance with display_name
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_2 }}"
|
||||
- instance.state == "Stopped"
|
||||
|
@ -111,8 +111,8 @@
|
|||
- name: verify starting instance with display_name
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_2 }}"
|
||||
- instance.state == "Running"
|
||||
|
@ -125,8 +125,8 @@
|
|||
- name: verify starting instance with display_name idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_2 }}"
|
||||
- instance.state == "Running"
|
||||
|
@ -140,8 +140,8 @@
|
|||
- name: verify force update running instance with display_name
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
- instance.state == "Running"
|
||||
|
@ -155,8 +155,8 @@
|
|||
- name: verify force update running instance with display_name idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
- instance.state == "Running"
|
||||
|
@ -170,7 +170,7 @@
|
|||
- name: verify restore instance with display_name
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: verify test create project
|
||||
assert:
|
||||
that:
|
||||
- prj|success
|
||||
- prj is successful
|
||||
|
||||
- name: setup instance in project to be absent
|
||||
cs_instance:
|
||||
|
@ -17,7 +17,7 @@
|
|||
- name: verify instance in project to be absent
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: setup ssh key in project
|
||||
cs_sshkeypair:
|
||||
|
@ -27,7 +27,7 @@
|
|||
- name: verify setup ssh key in project
|
||||
assert:
|
||||
that:
|
||||
- sshkey|success
|
||||
- sshkey is successful
|
||||
|
||||
- name: setup affinity group in project
|
||||
cs_affinitygroup:
|
||||
|
@ -37,7 +37,7 @@
|
|||
- name: verify setup affinity group in project
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag is successful
|
||||
|
||||
- name: setup security group in project
|
||||
cs_securitygroup:
|
||||
|
@ -47,7 +47,7 @@
|
|||
- name: verify setup security group in project
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg is successful
|
||||
|
||||
- name: test create instance in project in check mode
|
||||
cs_instance:
|
||||
|
@ -64,8 +64,8 @@
|
|||
- name: verify create instance in project in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
|
||||
- name: test create instance in project
|
||||
cs_instance:
|
||||
|
@ -81,8 +81,8 @@
|
|||
- name: verify create instance in project
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
|
@ -105,8 +105,8 @@
|
|||
- name: verify create instance in project idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
|
@ -125,8 +125,8 @@
|
|||
- name: verify running instance in project not updated in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
|
@ -143,8 +143,8 @@
|
|||
- name: verify running instance in project not updated
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
|
@ -161,8 +161,8 @@
|
|||
- name: verify stopping instance in project in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
|
@ -178,8 +178,8 @@
|
|||
- name: verify stopping instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
|
@ -195,8 +195,8 @@
|
|||
- name: verify stopping instance in project idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.state == "Stopped"
|
||||
|
||||
- name: test updating stopped instance in project in check mode
|
||||
|
@ -210,8 +210,8 @@
|
|||
- name: verify updating stopped instance in project in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
|
@ -228,8 +228,8 @@
|
|||
- name: verify updating stopped instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
|
@ -246,8 +246,8 @@
|
|||
- name: verify updating stopped instance in project idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
|
@ -264,8 +264,8 @@
|
|||
- name: verify starting instance in project in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
|
@ -281,8 +281,8 @@
|
|||
- name: verify starting instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
|
@ -298,8 +298,8 @@
|
|||
- name: verify starting instance in project idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
|
@ -317,8 +317,8 @@
|
|||
- name: verify force update running instance in project in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
|
@ -335,8 +335,8 @@
|
|||
- name: verify force update running instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
|
@ -353,8 +353,8 @@
|
|||
- name: verify force update running instance in project idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
|
@ -372,8 +372,8 @@
|
|||
- name: verify restore instance in project in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
|
@ -389,8 +389,8 @@
|
|||
- name: verify restore instance in project
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||||
- instance.project == "{{ cs_resource_prefix }}-prj"
|
||||
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
|
||||
|
@ -406,8 +406,8 @@
|
|||
- name: verify destroy instance in project in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state != "Destroyed"
|
||||
|
||||
- name: test destroy instance in project
|
||||
|
@ -419,8 +419,8 @@
|
|||
- name: verify destroy instance in project
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state == "Destroyed"
|
||||
|
||||
- name: test destroy instance in project idempotence
|
||||
|
@ -432,8 +432,8 @@
|
|||
- name: verify destroy instance in project idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
|
||||
- name: test recover in project to stopped state and update a deleted instance in project in check mode
|
||||
cs_instance:
|
||||
|
@ -446,8 +446,8 @@
|
|||
- name: verify test recover to stopped state and update a deleted instance in project in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
|
||||
- name: test recover to stopped state and update a deleted instance in project
|
||||
cs_instance:
|
||||
|
@ -459,8 +459,8 @@
|
|||
- name: verify test recover to stopped state and update a deleted instance in project
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state == "Stopped"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
||||
|
@ -474,8 +474,8 @@
|
|||
- name: verify test recover to stopped state and update a deleted instance in project idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.state == "Stopped"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
||||
|
@ -489,8 +489,8 @@
|
|||
- name: verify test expunge instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state == "Stopped"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
||||
|
@ -503,8 +503,8 @@
|
|||
- name: verify test expunge instance in project
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.state == "Stopped"
|
||||
- instance.service_offering == "{{ test_cs_instance_offering_1 }}"
|
||||
|
||||
|
@ -517,8 +517,8 @@
|
|||
- name: verify test expunge instance in project idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
|
||||
- name: cleanup ssh key in project
|
||||
cs_sshkeypair:
|
||||
|
@ -529,7 +529,7 @@
|
|||
- name: verify cleanup ssh key in project
|
||||
assert:
|
||||
that:
|
||||
- sshkey|success
|
||||
- sshkey is successful
|
||||
|
||||
- name: cleanup affinity group in project
|
||||
cs_affinitygroup:
|
||||
|
@ -537,13 +537,13 @@
|
|||
project: "{{ cs_resource_prefix }}-prj"
|
||||
state: absent
|
||||
register: ag
|
||||
until: ag|success
|
||||
until: ag is successful
|
||||
retries: 20
|
||||
delay: 5
|
||||
- name: verify cleanup affinity group in project
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag is successful
|
||||
|
||||
- name: cleanup security group in project ...take a while unless instance in project is expunged
|
||||
cs_securitygroup:
|
||||
|
@ -551,10 +551,10 @@
|
|||
project: "{{ cs_resource_prefix }}-prj"
|
||||
state: absent
|
||||
register: sg
|
||||
until: sg|success
|
||||
until: sg is successful
|
||||
retries: 100
|
||||
delay: 10
|
||||
- name: verify cleanup security group in project
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg is successful
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: verify setup ssh key
|
||||
assert:
|
||||
that:
|
||||
- sshkey|success
|
||||
- sshkey is successful
|
||||
|
||||
- name: setup affinity group
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}-ag
|
||||
|
@ -13,7 +13,7 @@
|
|||
- name: verify setup affinity group
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag is successful
|
||||
|
||||
- name: setup security group
|
||||
cs_securitygroup: name={{ cs_resource_prefix }}-sg
|
||||
|
@ -21,4 +21,4 @@
|
|||
- name: verify setup security group
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg is successful
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
- name: verify update instance ssh key non existent
|
||||
assert:
|
||||
that:
|
||||
- instance|failed
|
||||
- instance is failed
|
||||
- 'instance.msg == "SSH key not found: {{ cs_resource_prefix }}-sshkey2"'
|
||||
|
||||
- name: test create instance without keypair in check mode
|
||||
|
@ -23,8 +23,8 @@
|
|||
- name: verify create instance without keypair in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
|
||||
- name: test create instance without keypair
|
||||
cs_instance:
|
||||
|
@ -35,8 +35,8 @@
|
|||
- name: verify create instance without keypair
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.ssh_key is not defined
|
||||
|
||||
- name: test create instance without keypair idempotence
|
||||
|
@ -48,8 +48,8 @@
|
|||
- name: verify create instance without keypair idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.ssh_key is not defined
|
||||
|
||||
- name: setup ssh key2
|
||||
|
@ -58,7 +58,7 @@
|
|||
- name: verify setup ssh key2
|
||||
assert:
|
||||
that:
|
||||
- sshkey|success
|
||||
- sshkey is successful
|
||||
|
||||
- name: test update instance ssh key2 in check mode
|
||||
cs_instance:
|
||||
|
@ -70,7 +70,7 @@
|
|||
- name: verify update instance ssh key2 in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|changed
|
||||
- instance is changed
|
||||
- instance.ssh_key is not defined
|
||||
|
||||
- name: test update instance ssh key2
|
||||
|
@ -82,7 +82,7 @@
|
|||
- name: verify update instance ssh key2
|
||||
assert:
|
||||
that:
|
||||
- instance|changed
|
||||
- instance is changed
|
||||
- instance.ssh_key == "{{ cs_resource_prefix }}-sshkey2"
|
||||
|
||||
- name: test update instance ssh key2 idempotence
|
||||
|
@ -94,7 +94,7 @@
|
|||
- name: verify update instance ssh key2 idempotence
|
||||
assert:
|
||||
that:
|
||||
- not instance|changed
|
||||
- instance is not changed
|
||||
- instance.ssh_key == "{{ cs_resource_prefix }}-sshkey2"
|
||||
|
||||
- name: cleanup ssh key2
|
||||
|
@ -105,7 +105,7 @@
|
|||
- name: verify cleanup ssh key2
|
||||
assert:
|
||||
that:
|
||||
- sshkey2|success
|
||||
- sshkey2 is successful
|
||||
|
||||
- name: test update instance ssh key2 idempotence2
|
||||
cs_instance:
|
||||
|
@ -117,7 +117,7 @@
|
|||
- name: verify update instance ssh key2 idempotence2
|
||||
assert:
|
||||
that:
|
||||
- instance|failed
|
||||
- instance is failed
|
||||
- 'instance.msg == "SSH key not found: {{ cs_resource_prefix }}-sshkey2"'
|
||||
|
||||
- name: test update instance ssh key in check mode
|
||||
|
@ -130,7 +130,7 @@
|
|||
- name: verify update instance ssh key in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|changed
|
||||
- instance is changed
|
||||
- instance.ssh_key is not defined
|
||||
|
||||
- name: test update instance ssh key
|
||||
|
@ -142,7 +142,7 @@
|
|||
- name: verify update instance ssh key
|
||||
assert:
|
||||
that:
|
||||
- instance|changed
|
||||
- instance is changed
|
||||
- instance.ssh_key == "{{ cs_resource_prefix }}-sshkey"
|
||||
|
||||
- name: test update instance ssh key idempotence
|
||||
|
@ -154,7 +154,7 @@
|
|||
- name: verify update instance ssh key idempotence
|
||||
assert:
|
||||
that:
|
||||
- not instance|changed
|
||||
- instance is not changed
|
||||
- instance.ssh_key == "{{ cs_resource_prefix }}-sshkey"
|
||||
|
||||
- name: cleanup expunge instance
|
||||
|
@ -165,4 +165,4 @@
|
|||
- name: verify cleanup expunge instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
- name: verify add tags to instance in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- not instance.tags
|
||||
|
||||
- name: test add tags to instance
|
||||
|
@ -28,8 +28,8 @@
|
|||
- name: verify add tags to instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.tags|length == 2
|
||||
- "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
|
||||
- "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
|
||||
|
@ -46,8 +46,8 @@
|
|||
- name: verify tags to instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.tags|length == 2
|
||||
- "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
|
||||
- "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
|
||||
|
@ -65,8 +65,8 @@
|
|||
- name: verify tags to instance idempotence in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.tags|length == 2
|
||||
- "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
|
||||
- "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
|
||||
|
@ -83,8 +83,8 @@
|
|||
- name: verify tags to instance idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.tags|length == 2
|
||||
- "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]"
|
||||
- "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]"
|
||||
|
@ -98,8 +98,8 @@
|
|||
- name: verify not touch tags of instance if no param tags
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.tags|length == 2
|
||||
- "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]"
|
||||
- "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]"
|
||||
|
@ -115,8 +115,8 @@
|
|||
- name: verify remove tags in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.tags|length != 0
|
||||
|
||||
- name: test remove tags
|
||||
|
@ -127,6 +127,6 @@
|
|||
- name: verify remove tags
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.tags|length == 0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: verify setup ssh key
|
||||
assert:
|
||||
that:
|
||||
- sshkey|success
|
||||
- sshkey is successful
|
||||
|
||||
- name: setup affinity group
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}-ag
|
||||
|
@ -13,7 +13,7 @@
|
|||
- name: verify setup affinity group
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag is successful
|
||||
|
||||
- name: setup security group
|
||||
cs_securitygroup: name={{ cs_resource_prefix }}-sg
|
||||
|
@ -21,7 +21,7 @@
|
|||
- name: verify setup security group
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg is successful
|
||||
|
||||
- name: setup instance
|
||||
cs_instance:
|
||||
|
@ -36,7 +36,7 @@
|
|||
- name: verify create instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: test instance facts in check mode
|
||||
cs_instance_facts:
|
||||
|
@ -46,8 +46,8 @@
|
|||
- name: verify test instance facts in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance_facts|success
|
||||
- not instance_facts|changed
|
||||
- instance_facts is successful
|
||||
- instance_facts is not changed
|
||||
- cloudstack_instance.id == instance.id
|
||||
- cloudstack_instance.domain == instance.domain
|
||||
- cloudstack_instance.account == instance.account
|
||||
|
@ -62,8 +62,8 @@
|
|||
- name: verify test instance facts
|
||||
assert:
|
||||
that:
|
||||
- instance_facts|success
|
||||
- not instance_facts|changed
|
||||
- instance_facts is successful
|
||||
- instance_facts is not changed
|
||||
- cloudstack_instance.id == instance.id
|
||||
- cloudstack_instance.domain == instance.domain
|
||||
- cloudstack_instance.account == instance.account
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
- name: verify setup network
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
- net.name == "net_nic"
|
||||
|
||||
- name: setup instance
|
||||
|
@ -29,7 +29,7 @@
|
|||
- name: verify setup instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
- instance.name == "instance-nic-vm"
|
||||
- instance.state == "Stopped"
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
- name: verify setup network 2
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
- net.name == "net_nic2"
|
||||
|
||||
- name: setup absent nic
|
||||
|
@ -61,7 +61,7 @@
|
|||
- name: verify setup absent nic
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- nic is successful
|
||||
|
||||
- name: test fail missing params
|
||||
cs_instance_nic:
|
||||
|
@ -70,7 +70,7 @@
|
|||
- name: verify test fail missing params
|
||||
assert:
|
||||
that:
|
||||
- nic|failed
|
||||
- nic is failed
|
||||
- "nic.msg.startswith('missing required arguments: ')"
|
||||
|
||||
- name: test create nic in check mode
|
||||
|
@ -83,8 +83,8 @@
|
|||
- name: verify test create nic in check mode
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- nic|changed
|
||||
- nic is successful
|
||||
- nic is changed
|
||||
- nic.network == "net_nic2"
|
||||
- nic.vm == "instance-nic-vm"
|
||||
- nic.zone == "{{ cs_common_zone_adv }}"
|
||||
|
@ -99,8 +99,8 @@
|
|||
- name: verify test create nic
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- nic|changed
|
||||
- nic is successful
|
||||
- nic is changed
|
||||
- nic.ip_address == "10.100.124.42"
|
||||
- nic.netmask == "255.255.255.0"
|
||||
- nic.network == "net_nic2"
|
||||
|
@ -118,8 +118,8 @@
|
|||
- name: verify test create nic idempotence
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- not nic|changed
|
||||
- nic is successful
|
||||
- nic is not changed
|
||||
- nic.ip_address == "10.100.124.42"
|
||||
- nic.netmask == "255.255.255.0"
|
||||
- nic.network == "net_nic2"
|
||||
|
@ -136,8 +136,8 @@
|
|||
- name: verify test create nic without ip address idempotence
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- not nic|changed
|
||||
- nic is successful
|
||||
- nic is not changed
|
||||
- nic.ip_address == "10.100.124.42"
|
||||
- nic.netmask == "255.255.255.0"
|
||||
- nic.network == "net_nic2"
|
||||
|
@ -156,8 +156,8 @@
|
|||
- name: verify test update nic in check mode
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- nic|changed
|
||||
- nic is successful
|
||||
- nic is changed
|
||||
- nic.ip_address == "10.100.124.42"
|
||||
- nic.netmask == "255.255.255.0"
|
||||
- nic.network == "net_nic2"
|
||||
|
@ -175,8 +175,8 @@
|
|||
- name: verify test update nic
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- nic|changed
|
||||
- nic is successful
|
||||
- nic is changed
|
||||
- nic.ip_address == "10.100.124.23"
|
||||
- nic.netmask == "255.255.255.0"
|
||||
- nic.network == "net_nic2"
|
||||
|
@ -194,8 +194,8 @@
|
|||
- name: verify test update nic idempotence
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- not nic|changed
|
||||
- nic is successful
|
||||
- nic is not changed
|
||||
- nic.ip_address == "10.100.124.23"
|
||||
- nic.netmask == "255.255.255.0"
|
||||
- nic.network == "net_nic2"
|
||||
|
@ -212,8 +212,8 @@
|
|||
- name: verify test update nic without ip address idempotence
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- not nic|changed
|
||||
- nic is successful
|
||||
- nic is not changed
|
||||
- nic.ip_address == "10.100.124.23"
|
||||
- nic.netmask == "255.255.255.0"
|
||||
- nic.network == "net_nic2"
|
||||
|
@ -232,8 +232,8 @@
|
|||
- name: verify test remove nic in check mode
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- nic|changed
|
||||
- nic is successful
|
||||
- nic is changed
|
||||
- nic.ip_address == "10.100.124.23"
|
||||
- nic.netmask == "255.255.255.0"
|
||||
- nic.network == "net_nic2"
|
||||
|
@ -251,8 +251,8 @@
|
|||
- name: verify test remove nic
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- nic|changed
|
||||
- nic is successful
|
||||
- nic is changed
|
||||
- nic.ip_address == "10.100.124.23"
|
||||
- nic.netmask == "255.255.255.0"
|
||||
- nic.network == "net_nic2"
|
||||
|
@ -270,8 +270,8 @@
|
|||
- name: verify test remove nic idempotence
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- not nic|changed
|
||||
- nic is successful
|
||||
- nic is not changed
|
||||
|
||||
- name: cleanup instance
|
||||
cs_instance:
|
||||
|
@ -281,7 +281,7 @@
|
|||
- name: verify cleanup instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: cleanup network
|
||||
cs_network:
|
||||
|
@ -292,7 +292,7 @@
|
|||
- name: verify cleanup network
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
|
||||
- name: cleanup network 2
|
||||
cs_network:
|
||||
|
@ -303,4 +303,4 @@
|
|||
- name: verify cleanup network 2
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
- name: verify setup network
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
- net.name == "net_nic"
|
||||
|
||||
- name: setup instance
|
||||
|
@ -29,7 +29,7 @@
|
|||
- name: verify setup instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
- instance.name == "instance-nic-vm"
|
||||
- instance.state == "Stopped"
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
- name: verify setup network 2
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
- net.name == "net_nic2"
|
||||
|
||||
- name: setup nic
|
||||
|
@ -61,7 +61,7 @@
|
|||
- name: verify test create nic
|
||||
assert:
|
||||
that:
|
||||
- nic|success
|
||||
- nic is successful
|
||||
- nic.ip_address == "10.100.124.42"
|
||||
- nic.netmask == "255.255.255.0"
|
||||
- nic.network == "net_nic2"
|
||||
|
@ -80,7 +80,7 @@
|
|||
- name: verify setup remove secondary ip
|
||||
assert:
|
||||
that:
|
||||
- sip|success
|
||||
- sip is successful
|
||||
|
||||
- name: test add secondary ip in check mode
|
||||
cs_instance_nic_secondaryip:
|
||||
|
@ -93,8 +93,8 @@
|
|||
- name: verify test add secondary ip in check mode
|
||||
assert:
|
||||
that:
|
||||
- sip|success
|
||||
- sip|changed
|
||||
- sip is successful
|
||||
- sip is changed
|
||||
- sip.network == "net_nic2"
|
||||
- sip.vm == "instance-nic-vm"
|
||||
- sip.zone == "{{ cs_common_zone_adv }}"
|
||||
|
@ -109,8 +109,8 @@
|
|||
- name: verify test add secondary ip
|
||||
assert:
|
||||
that:
|
||||
- sip|success
|
||||
- sip|changed
|
||||
- sip is successful
|
||||
- sip is changed
|
||||
- sip.vm_guest_ip == "10.100.124.43"
|
||||
- sip.network == "net_nic2"
|
||||
- sip.vm == "instance-nic-vm"
|
||||
|
@ -126,8 +126,8 @@
|
|||
- name: verify test add secondary ip idempotence
|
||||
assert:
|
||||
that:
|
||||
- sip|success
|
||||
- not sip|changed
|
||||
- sip is successful
|
||||
- sip is not changed
|
||||
- sip.vm_guest_ip == "10.100.124.43"
|
||||
- sip.network == "net_nic2"
|
||||
- sip.vm == "instance-nic-vm"
|
||||
|
@ -145,8 +145,8 @@
|
|||
- name: verify test remove secondary ip in check mode
|
||||
assert:
|
||||
that:
|
||||
- sip|success
|
||||
- sip|changed
|
||||
- sip is successful
|
||||
- sip is changed
|
||||
- sip.vm_guest_ip == "10.100.124.43"
|
||||
- sip.network == "net_nic2"
|
||||
- sip.vm == "instance-nic-vm"
|
||||
|
@ -163,8 +163,8 @@
|
|||
- name: verify test remove secondary ip
|
||||
assert:
|
||||
that:
|
||||
- sip|success
|
||||
- sip|changed
|
||||
- sip is successful
|
||||
- sip is changed
|
||||
- sip.vm_guest_ip == "10.100.124.43"
|
||||
- sip.network == "net_nic2"
|
||||
- sip.vm == "instance-nic-vm"
|
||||
|
@ -181,8 +181,8 @@
|
|||
- name: verify test remove secondary ip idempotence
|
||||
assert:
|
||||
that:
|
||||
- sip|success
|
||||
- not sip|changed
|
||||
- sip is successful
|
||||
- sip is not changed
|
||||
- sip.network == "net_nic2"
|
||||
- sip.vm == "instance-nic-vm"
|
||||
- sip.zone == "{{ cs_common_zone_adv }}"
|
||||
|
@ -195,7 +195,7 @@
|
|||
- name: verify cleanup instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: cleanup network
|
||||
cs_network:
|
||||
|
@ -206,7 +206,7 @@
|
|||
- name: verify cleanup network
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
|
||||
- name: cleanup network 2
|
||||
cs_network:
|
||||
|
@ -217,4 +217,4 @@
|
|||
- name: verify cleanup network 2
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- ig|success
|
||||
- ig is successful
|
||||
|
||||
- name: test fail if missing name
|
||||
action: cs_instancegroup
|
||||
|
@ -14,7 +14,7 @@
|
|||
- name: verify results of fail if missing name
|
||||
assert:
|
||||
that:
|
||||
- ig|failed
|
||||
- ig is failed
|
||||
- "ig.msg == 'missing required arguments: name'"
|
||||
|
||||
- name: test present instance group in check mode
|
||||
|
@ -24,8 +24,8 @@
|
|||
- name: verify results of create instance group in check mode
|
||||
assert:
|
||||
that:
|
||||
- ig|success
|
||||
- ig|changed
|
||||
- ig is successful
|
||||
- ig is changed
|
||||
|
||||
- name: test present instance group
|
||||
cs_instancegroup: name={{ cs_resource_prefix }}_ig
|
||||
|
@ -33,8 +33,8 @@
|
|||
- name: verify results of create instance group
|
||||
assert:
|
||||
that:
|
||||
- ig|success
|
||||
- ig|changed
|
||||
- ig is successful
|
||||
- ig is changed
|
||||
- ig.name == "{{ cs_resource_prefix }}_ig"
|
||||
|
||||
- name: test present instance group is idempotence
|
||||
|
@ -43,8 +43,8 @@
|
|||
- name: verify results present instance group is idempotence
|
||||
assert:
|
||||
that:
|
||||
- ig|success
|
||||
- not ig|changed
|
||||
- ig is successful
|
||||
- ig is not changed
|
||||
- ig.name == "{{ cs_resource_prefix }}_ig"
|
||||
|
||||
- name: test absent instance group in check mode
|
||||
|
@ -54,8 +54,8 @@
|
|||
- name: verify results of absent instance group in check mode
|
||||
assert:
|
||||
that:
|
||||
- ig|success
|
||||
- ig|changed
|
||||
- ig is successful
|
||||
- ig is changed
|
||||
- ig.name == "{{ cs_resource_prefix }}_ig"
|
||||
|
||||
- name: test absent instance group
|
||||
|
@ -64,8 +64,8 @@
|
|||
- name: verify results of absent instance group
|
||||
assert:
|
||||
that:
|
||||
- ig|success
|
||||
- ig|changed
|
||||
- ig is successful
|
||||
- ig is changed
|
||||
- ig.name == "{{ cs_resource_prefix }}_ig"
|
||||
|
||||
- name: test absent instance group is idempotence
|
||||
|
@ -74,6 +74,6 @@
|
|||
- name: verify results of absent instance group is idempotence
|
||||
assert:
|
||||
that:
|
||||
- ig|success
|
||||
- not ig|changed
|
||||
- ig is successful
|
||||
- ig is not changed
|
||||
- ig.name is undefined
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: verify setup iso
|
||||
assert:
|
||||
that:
|
||||
- iso|success
|
||||
- iso is successful
|
||||
|
||||
- name: test download iso in check mode
|
||||
cs_iso:
|
||||
|
@ -20,7 +20,7 @@
|
|||
- name: verify test download iso in check mode
|
||||
assert:
|
||||
that:
|
||||
- iso|changed
|
||||
- iso is changed
|
||||
|
||||
- name: test download iso
|
||||
cs_iso:
|
||||
|
@ -32,7 +32,7 @@
|
|||
- name: verify test download iso
|
||||
assert:
|
||||
that:
|
||||
- iso|changed
|
||||
- iso is changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
- iso.display_text == "{{ cs_resource_prefix }}-iso"
|
||||
- iso.cross_zones == true
|
||||
|
@ -47,7 +47,7 @@
|
|||
- name: verify test download iso idempotence
|
||||
assert:
|
||||
that:
|
||||
- not iso|changed
|
||||
- iso is not changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
- iso.display_text == "{{ cs_resource_prefix }}-iso"
|
||||
- iso.cross_zones == true
|
||||
|
@ -64,7 +64,7 @@
|
|||
- name: verify test update iso in check mode
|
||||
assert:
|
||||
that:
|
||||
- iso|changed
|
||||
- iso is changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
- iso.display_text == "{{ cs_resource_prefix }}-iso"
|
||||
- iso.cross_zones == true
|
||||
|
@ -80,7 +80,7 @@
|
|||
- name: verify test update iso
|
||||
assert:
|
||||
that:
|
||||
- iso|changed
|
||||
- iso is changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
||||
- iso.cross_zones == true
|
||||
|
@ -96,7 +96,7 @@
|
|||
- name: verify test update iso idempotence
|
||||
assert:
|
||||
that:
|
||||
- not iso|changed
|
||||
- iso is not changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
||||
- iso.cross_zones == true
|
||||
|
@ -111,7 +111,7 @@
|
|||
- name: verify test remove iso in check mode
|
||||
assert:
|
||||
that:
|
||||
- iso|changed
|
||||
- iso is changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
||||
- iso.cross_zones == true
|
||||
|
@ -125,7 +125,7 @@
|
|||
- name: verify test remove iso
|
||||
assert:
|
||||
that:
|
||||
- iso|changed
|
||||
- iso is changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
||||
- iso.cross_zones == true
|
||||
|
@ -139,4 +139,4 @@
|
|||
- name: verify test remove iso idempotence
|
||||
assert:
|
||||
that:
|
||||
- not iso|changed
|
||||
- iso is not changed
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
- name: verify test create network for lb
|
||||
assert:
|
||||
that:
|
||||
- lb_net|success
|
||||
- lb_net|changed
|
||||
- lb_net is successful
|
||||
- lb_net is changed
|
||||
- lb_net.name == "{{ cs_resource_prefix }}_net_lb"
|
||||
|
||||
- name: setup instance in lb
|
||||
|
@ -23,8 +23,8 @@
|
|||
- name: verify setup instance in lb
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-lb"
|
||||
- instance.state == "Running"
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
- name: verify setup instance in lb
|
||||
assert:
|
||||
that:
|
||||
- ip_address|success
|
||||
- ip_address is successful
|
||||
|
||||
- name: setup lb rule absent
|
||||
cs_loadbalancer_rule:
|
||||
|
@ -47,7 +47,7 @@
|
|||
- name: verify setup lb rule absent
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb is successful
|
||||
|
||||
- name: test rule requires params
|
||||
cs_loadbalancer_rule:
|
||||
|
@ -56,7 +56,7 @@
|
|||
- name: verify test rule requires params
|
||||
assert:
|
||||
that:
|
||||
- lb|failed
|
||||
- lb is failed
|
||||
- "lb.msg.startswith('missing required arguments: ')"
|
||||
|
||||
|
||||
|
@ -72,8 +72,8 @@
|
|||
- name: verify test create rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb|changed
|
||||
- lb is successful
|
||||
- lb is changed
|
||||
|
||||
- name: test create rule
|
||||
cs_loadbalancer_rule:
|
||||
|
@ -86,8 +86,8 @@
|
|||
- name: verify test create rule
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb|changed
|
||||
- lb is successful
|
||||
- lb is changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "roundrobin"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -105,8 +105,8 @@
|
|||
- name: verify test create rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- not lb|changed
|
||||
- lb is successful
|
||||
- lb is not changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "roundrobin"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -125,8 +125,8 @@
|
|||
- name: verify test update rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb|changed
|
||||
- lb is successful
|
||||
- lb is changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "roundrobin"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -144,8 +144,8 @@
|
|||
- name: verify test update rule
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb|changed
|
||||
- lb is successful
|
||||
- lb is changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "source"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -163,8 +163,8 @@
|
|||
- name: verify test update rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- not lb|changed
|
||||
- lb is successful
|
||||
- lb is not changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "source"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -178,7 +178,7 @@
|
|||
- name: verify test rule requires params
|
||||
assert:
|
||||
that:
|
||||
- lb|failed
|
||||
- lb is failed
|
||||
- "lb.msg.startswith('missing required arguments: ')"
|
||||
|
||||
- name: test add members to rule in check mode
|
||||
|
@ -190,8 +190,8 @@
|
|||
- name: verify add members to rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb|changed
|
||||
- lb is successful
|
||||
- lb is changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "source"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -207,8 +207,8 @@
|
|||
- name: verify add members to rule
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb|changed
|
||||
- lb is successful
|
||||
- lb is changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "source"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -224,8 +224,8 @@
|
|||
- name: verify add members to rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- not lb|changed
|
||||
- lb is successful
|
||||
- lb is not changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "source"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -243,8 +243,8 @@
|
|||
- name: verify remove members to rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb|changed
|
||||
- lb is successful
|
||||
- lb is changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "source"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -261,8 +261,8 @@
|
|||
- name: verify remove members to rule
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb|changed
|
||||
- lb is successful
|
||||
- lb is changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "source"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -279,8 +279,8 @@
|
|||
- name: verify remove members to rule
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- not lb|changed
|
||||
- lb is successful
|
||||
- lb is not changed
|
||||
|
||||
- name: test remove rule in check mode
|
||||
cs_loadbalancer_rule:
|
||||
|
@ -292,8 +292,8 @@
|
|||
- name: verify remove rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb|changed
|
||||
- lb is successful
|
||||
- lb is changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "source"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -309,8 +309,8 @@
|
|||
- name: verify remove rule
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- lb|changed
|
||||
- lb is successful
|
||||
- lb is changed
|
||||
- lb.name == "{{ cs_resource_prefix }}_lb"
|
||||
- lb.algorithm == "source"
|
||||
- lb.public_ip == "{{ ip_address.ip_address }}"
|
||||
|
@ -326,5 +326,5 @@
|
|||
- name: verify remove rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- lb|success
|
||||
- not lb|changed
|
||||
- lb is successful
|
||||
- lb is not changed
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: verify setup vpc
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc is successful
|
||||
|
||||
- name: setup network acl absent
|
||||
cs_network_acl:
|
||||
|
@ -21,7 +21,7 @@
|
|||
- name: verify setup network acl absent
|
||||
assert:
|
||||
that:
|
||||
- acl|success
|
||||
- acl is successful
|
||||
|
||||
- name: test fail missing param name and vpc for network acl
|
||||
cs_network_acl:
|
||||
|
@ -30,7 +30,7 @@
|
|||
- name: verify test fail missing param name and vpc for network acl
|
||||
assert:
|
||||
that:
|
||||
- acl|failed
|
||||
- acl is failed
|
||||
- "acl.msg.startswith('missing required arguments: ')"
|
||||
|
||||
- name: test create network acl in check mode
|
||||
|
@ -43,8 +43,8 @@
|
|||
- name: verify test create network acl in check mode
|
||||
assert:
|
||||
that:
|
||||
- acl|success
|
||||
- acl|changed
|
||||
- acl is successful
|
||||
- acl is changed
|
||||
|
||||
- name: test create network acl
|
||||
cs_network_acl:
|
||||
|
@ -55,8 +55,8 @@
|
|||
- name: verify test create network acl
|
||||
assert:
|
||||
that:
|
||||
- acl|success
|
||||
- acl|changed
|
||||
- acl is successful
|
||||
- acl is changed
|
||||
- acl.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl.name == "{{ cs_resource_prefix }}_acl"
|
||||
|
||||
|
@ -69,8 +69,8 @@
|
|||
- name: verify test create network acl idempotence
|
||||
assert:
|
||||
that:
|
||||
- acl|success
|
||||
- not acl|changed
|
||||
- acl is successful
|
||||
- acl is not changed
|
||||
- acl.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl.name == "{{ cs_resource_prefix }}_acl"
|
||||
|
||||
|
@ -85,8 +85,8 @@
|
|||
- name: verify test remove network acl in check mode
|
||||
assert:
|
||||
that:
|
||||
- acl|success
|
||||
- acl|changed
|
||||
- acl is successful
|
||||
- acl is changed
|
||||
- acl.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl.name == "{{ cs_resource_prefix }}_acl"
|
||||
|
||||
|
@ -100,8 +100,8 @@
|
|||
- name: verify test remove network acl
|
||||
assert:
|
||||
that:
|
||||
- acl|success
|
||||
- acl|changed
|
||||
- acl is successful
|
||||
- acl is changed
|
||||
- acl.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl.name == "{{ cs_resource_prefix }}_acl"
|
||||
|
||||
|
@ -115,5 +115,5 @@
|
|||
- name: verify test remove network acl idempotence
|
||||
assert:
|
||||
that:
|
||||
- acl|success
|
||||
- not acl|changed
|
||||
- acl is successful
|
||||
- acl is not changed
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: verify setup vpc
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc is successful
|
||||
|
||||
- name: setup network acl
|
||||
cs_network_acl:
|
||||
|
@ -20,7 +20,7 @@
|
|||
- name: verify setup network acl
|
||||
assert:
|
||||
that:
|
||||
- acl|success
|
||||
- acl is successful
|
||||
|
||||
- name: setup network acl rule
|
||||
cs_network_acl_rule:
|
||||
|
@ -33,7 +33,7 @@
|
|||
- name: verify setup network acl rule
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule is successful
|
||||
|
||||
- name: test fail missing params
|
||||
cs_network_acl_rule:
|
||||
|
@ -42,7 +42,7 @@
|
|||
- name: verify test fail missing param
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|failed
|
||||
- acl_rule is failed
|
||||
- "acl_rule.msg.startswith('missing required arguments: ')"
|
||||
|
||||
- name: test fail missing params for tcp
|
||||
|
@ -59,7 +59,7 @@
|
|||
- name: verify test fail missing param for tcp
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|failed
|
||||
- acl_rule is failed
|
||||
- "acl_rule.msg == 'protocol is tcp but the following are missing: start_port, end_port'"
|
||||
|
||||
- name: test fail missing params for icmp
|
||||
|
@ -77,7 +77,7 @@
|
|||
- name: verify test fail missing param for icmp
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|failed
|
||||
- acl_rule is failed
|
||||
- "acl_rule.msg == 'protocol is icmp but the following are missing: icmp_type, icmp_code'"
|
||||
|
||||
- name: test fail missing params for by number
|
||||
|
@ -95,7 +95,7 @@
|
|||
- name: verify test fail missing param for by number
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|failed
|
||||
- acl_rule is failed
|
||||
- "acl_rule.msg == 'protocol is by_number but the following are missing: protocol_number'"
|
||||
|
||||
- name: test create network acl rule in check mode
|
||||
|
@ -113,8 +113,8 @@
|
|||
- name: verify test create network acl rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
|
||||
- name: test create network acl rule
|
||||
cs_network_acl_rule:
|
||||
|
@ -130,8 +130,8 @@
|
|||
- name: verify test create network acl rule
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.start_port == 80
|
||||
|
@ -155,8 +155,8 @@
|
|||
- name: verify test create network acl idempotence
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- not acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is not changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.start_port == 80
|
||||
|
@ -181,8 +181,8 @@
|
|||
- name: verify test change network acl rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.start_port == 80
|
||||
|
@ -207,8 +207,8 @@
|
|||
- name: verify test change network acl rule
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.start_port == 81
|
||||
|
@ -234,8 +234,8 @@
|
|||
- name: verify test change network acl idempotence
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- not acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is not changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.start_port == 81
|
||||
|
@ -263,8 +263,8 @@
|
|||
- name: verify test change network acl by protocol number in check mode
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.start_port == 81
|
||||
|
@ -291,8 +291,8 @@
|
|||
- name: verify test change network acl by protocol number
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.start_port == 81
|
||||
|
@ -320,8 +320,8 @@
|
|||
- name: verify test change network acl by protocol number idempotence
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- not acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is not changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.start_port == 81
|
||||
|
@ -349,8 +349,8 @@
|
|||
- name: verify test create 2nd network acl rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
|
||||
- name: test create 2nd network acl rule
|
||||
cs_network_acl_rule:
|
||||
|
@ -366,8 +366,8 @@
|
|||
- name: verify test create 2nd network acl rule
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.action_policy == "allow"
|
||||
|
@ -390,8 +390,8 @@
|
|||
- name: verify test create 2nd network acl rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- not acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is not changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.action_policy == "allow"
|
||||
|
@ -416,8 +416,8 @@
|
|||
- name: verify test create 2nd network acl rule
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.action_policy == "allow"
|
||||
|
@ -444,8 +444,8 @@
|
|||
- name: verify test create 2nd network acl rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- not acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is not changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.action_policy == "allow"
|
||||
|
@ -468,8 +468,8 @@
|
|||
- name: verify test absent network acl rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.start_port == 81
|
||||
|
@ -490,8 +490,8 @@
|
|||
- name: verify test absent network acl rule
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.start_port == 81
|
||||
|
@ -512,8 +512,8 @@
|
|||
- name: verify test absent network acl rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- not acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is not changed
|
||||
|
||||
- name: test absent 2nd network acl rule
|
||||
cs_network_acl_rule:
|
||||
|
@ -526,8 +526,8 @@
|
|||
- name: verify test absent 2nd network acl rule
|
||||
assert:
|
||||
that:
|
||||
- acl_rule|success
|
||||
- acl_rule|changed
|
||||
- acl_rule is successful
|
||||
- acl_rule is changed
|
||||
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
|
||||
- acl_rule.action_policy == "allow"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: verify setup zone is present
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- zone is successful
|
||||
|
||||
- name: setup pod is absent
|
||||
cs_pod:
|
||||
|
@ -20,7 +20,7 @@
|
|||
- name: verify setup pod is absent
|
||||
assert:
|
||||
that:
|
||||
- pod|success
|
||||
- pod is successful
|
||||
|
||||
- name: test fail if missing name
|
||||
cs_pod:
|
||||
|
@ -29,7 +29,7 @@
|
|||
- name: verify results of fail if missing name
|
||||
assert:
|
||||
that:
|
||||
- pod|failed
|
||||
- pod is failed
|
||||
- "pod.msg == 'missing required arguments: name'"
|
||||
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
|||
- name: verify test create pod in check mode
|
||||
assert:
|
||||
that:
|
||||
- pod_origin|changed
|
||||
- pod_origin is changed
|
||||
- pod_origin.zone == "{{ cs_resource_prefix }}-zone"
|
||||
|
||||
- name: test create pod
|
||||
|
@ -59,7 +59,7 @@
|
|||
- name: verify test create pod
|
||||
assert:
|
||||
that:
|
||||
- pod_origin|changed
|
||||
- pod_origin is changed
|
||||
- pod_origin.allocation_state == "Enabled"
|
||||
- pod_origin.start_ip == "10.100.10.101"
|
||||
- pod_origin.end_ip == "10.100.10.254"
|
||||
|
@ -78,7 +78,7 @@
|
|||
- name: verify test create pod idempotence
|
||||
assert:
|
||||
that:
|
||||
- not pod|changed
|
||||
- pod is not changed
|
||||
- pod.allocation_state == "Enabled"
|
||||
- pod.start_ip == "10.100.10.101"
|
||||
- pod.end_ip == "10.100.10.254"
|
||||
|
@ -98,7 +98,7 @@
|
|||
- name: verify test update pod in check mode
|
||||
assert:
|
||||
that:
|
||||
- pod|changed
|
||||
- pod is changed
|
||||
- pod.allocation_state == "Enabled"
|
||||
- pod.start_ip == "10.100.10.101"
|
||||
- pod.end_ip == "10.100.10.254"
|
||||
|
@ -117,7 +117,7 @@
|
|||
- name: verify test update pod
|
||||
assert:
|
||||
that:
|
||||
- pod|changed
|
||||
- pod is changed
|
||||
- pod.allocation_state == "Enabled"
|
||||
- pod.start_ip == "10.100.10.102"
|
||||
- pod.end_ip == "10.100.10.254"
|
||||
|
@ -136,7 +136,7 @@
|
|||
- name: verify test update pod idempotence
|
||||
assert:
|
||||
that:
|
||||
- not pod|changed
|
||||
- pod is not changed
|
||||
- pod.allocation_state == "Enabled"
|
||||
- pod.start_ip == "10.100.10.102"
|
||||
- pod.end_ip == "10.100.10.254"
|
||||
|
@ -154,7 +154,7 @@
|
|||
- name: verify test enable pod in check mode
|
||||
assert:
|
||||
that:
|
||||
- pod|changed
|
||||
- pod is changed
|
||||
- pod.allocation_state == "Enabled"
|
||||
- pod.id == pod_origin.id
|
||||
- pod.start_ip == "10.100.10.102"
|
||||
|
@ -172,7 +172,7 @@
|
|||
- name: verify test enable pod
|
||||
assert:
|
||||
that:
|
||||
- pod|changed
|
||||
- pod is changed
|
||||
- pod.allocation_state == "Disabled"
|
||||
- pod.id == pod_origin.id
|
||||
- pod.start_ip == "10.100.10.102"
|
||||
|
@ -190,7 +190,7 @@
|
|||
- name: verify test enable pod idempotence
|
||||
assert:
|
||||
that:
|
||||
- not pod|changed
|
||||
- pod is not changed
|
||||
- pod.allocation_state == "Disabled"
|
||||
- pod.id == pod_origin.id
|
||||
- pod.start_ip == "10.100.10.102"
|
||||
|
@ -209,7 +209,7 @@
|
|||
- name: verify test disable pod in check mode
|
||||
assert:
|
||||
that:
|
||||
- pod|changed
|
||||
- pod is changed
|
||||
- pod.allocation_state == "Disabled"
|
||||
- pod.id == pod_origin.id
|
||||
- pod.start_ip == "10.100.10.102"
|
||||
|
@ -227,7 +227,7 @@
|
|||
- name: verify test disable pod
|
||||
assert:
|
||||
that:
|
||||
- pod|changed
|
||||
- pod is changed
|
||||
- pod.allocation_state == "Enabled"
|
||||
- pod.id == pod_origin.id
|
||||
- pod.start_ip == "10.100.10.102"
|
||||
|
@ -246,7 +246,7 @@
|
|||
- name: verify test enabled pod idempotence
|
||||
assert:
|
||||
that:
|
||||
- not pod|changed
|
||||
- pod is not changed
|
||||
- pod.allocation_state == "Enabled"
|
||||
- pod.id == pod_origin.id
|
||||
- pod.start_ip == "10.100.10.102"
|
||||
|
@ -265,7 +265,7 @@
|
|||
- name: verify test create pod in check mode
|
||||
assert:
|
||||
that:
|
||||
- pod|changed
|
||||
- pod is changed
|
||||
- pod.id == pod_origin.id
|
||||
- pod.allocation_state == "Enabled"
|
||||
- pod.start_ip == "10.100.10.102"
|
||||
|
@ -283,7 +283,7 @@
|
|||
- name: verify test create pod
|
||||
assert:
|
||||
that:
|
||||
- pod|changed
|
||||
- pod is changed
|
||||
- pod.id == pod_origin.id
|
||||
- pod.allocation_state == "Enabled"
|
||||
- pod.start_ip == "10.100.10.102"
|
||||
|
@ -301,4 +301,4 @@
|
|||
- name: verify test absent pod idempotence
|
||||
assert:
|
||||
that:
|
||||
- not pod|changed
|
||||
- pod is not changed
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: verify network setup
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
|
||||
- name: instance setup
|
||||
cs_instance:
|
||||
|
@ -22,7 +22,7 @@
|
|||
- name: verify instance setup
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: public ip address setup
|
||||
cs_ip_address:
|
||||
|
@ -32,7 +32,7 @@
|
|||
- name: verify public ip address setup
|
||||
assert:
|
||||
that:
|
||||
- ip_address|success
|
||||
- ip_address is successful
|
||||
|
||||
- name: set ip address as fact
|
||||
set_fact:
|
||||
|
@ -49,7 +49,7 @@
|
|||
- name: verify clear existing port forwarding
|
||||
assert:
|
||||
that:
|
||||
- pf|success
|
||||
- pf is successful
|
||||
|
||||
- name: test fail if missing params
|
||||
action: cs_portforward
|
||||
|
@ -58,7 +58,7 @@
|
|||
- name: verify results of fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- pf|failed
|
||||
- pf is failed
|
||||
- 'pf.msg.startswith("missing required arguments: ")'
|
||||
|
||||
- name: test present port forwarding in check mode
|
||||
|
@ -73,8 +73,8 @@
|
|||
- name: verify results of present port forwarding in check mode
|
||||
assert:
|
||||
that:
|
||||
- pf|success
|
||||
- pf|changed
|
||||
- pf is successful
|
||||
- pf is changed
|
||||
|
||||
- name: test present port forwarding
|
||||
cs_portforward:
|
||||
|
@ -87,8 +87,8 @@
|
|||
- name: verify results of present port forwarding
|
||||
assert:
|
||||
that:
|
||||
- pf|success
|
||||
- pf|changed
|
||||
- pf is successful
|
||||
- pf is changed
|
||||
- pf.vm_name == "{{ cs_portforward_vm }}"
|
||||
- pf.ip_address == "{{ cs_portforward_public_ip }}"
|
||||
- pf.public_port == 80
|
||||
|
@ -107,8 +107,8 @@
|
|||
- name: verify results of present port forwarding idempotence
|
||||
assert:
|
||||
that:
|
||||
- pf|success
|
||||
- not pf|changed
|
||||
- pf is successful
|
||||
- pf is not changed
|
||||
- pf.vm_name == "{{ cs_portforward_vm }}"
|
||||
- pf.ip_address == "{{ cs_portforward_public_ip }}"
|
||||
- pf.public_port == 80
|
||||
|
@ -128,8 +128,8 @@
|
|||
- name: verify results of change port forwarding in check mode
|
||||
assert:
|
||||
that:
|
||||
- pf|success
|
||||
- pf|changed
|
||||
- pf is successful
|
||||
- pf is changed
|
||||
- pf.vm_name == "{{ cs_portforward_vm }}"
|
||||
- pf.ip_address == "{{ cs_portforward_public_ip }}"
|
||||
- pf.public_port == 80
|
||||
|
@ -148,8 +148,8 @@
|
|||
- name: verify results of change port forwarding
|
||||
assert:
|
||||
that:
|
||||
- pf|success
|
||||
- pf|changed
|
||||
- pf is successful
|
||||
- pf is changed
|
||||
- pf.vm_name == "{{ cs_portforward_vm }}"
|
||||
- pf.ip_address == "{{ cs_portforward_public_ip }}"
|
||||
- pf.public_port == 80
|
||||
|
@ -168,8 +168,8 @@
|
|||
- name: verify results of change port forwarding idempotence
|
||||
assert:
|
||||
that:
|
||||
- pf|success
|
||||
- not pf|changed
|
||||
- pf is successful
|
||||
- pf is not changed
|
||||
- pf.vm_name == "{{ cs_portforward_vm }}"
|
||||
- pf.ip_address == "{{ cs_portforward_public_ip }}"
|
||||
- pf.public_port == 80
|
||||
|
@ -189,8 +189,8 @@
|
|||
- name: verify results of absent port forwarding in check mode
|
||||
assert:
|
||||
that:
|
||||
- pf|success
|
||||
- pf|changed
|
||||
- pf is successful
|
||||
- pf is changed
|
||||
- pf.vm_name == "{{ cs_portforward_vm }}"
|
||||
- pf.ip_address == "{{ cs_portforward_public_ip }}"
|
||||
- pf.public_port == 80
|
||||
|
@ -209,8 +209,8 @@
|
|||
- name: verify results of absent port forwarding
|
||||
assert:
|
||||
that:
|
||||
- pf|success
|
||||
- pf|changed
|
||||
- pf is successful
|
||||
- pf is changed
|
||||
- pf.vm_name == "{{ cs_portforward_vm }}"
|
||||
- pf.ip_address == "{{ cs_portforward_public_ip }}"
|
||||
- pf.public_port == 80
|
||||
|
@ -229,8 +229,8 @@
|
|||
- name: verify results of absent port forwarding idempotence
|
||||
assert:
|
||||
that:
|
||||
- pf|success
|
||||
- not pf|changed
|
||||
- pf is successful
|
||||
- pf is not changed
|
||||
|
||||
- name: instance cleanup
|
||||
cs_instance:
|
||||
|
@ -241,7 +241,7 @@
|
|||
- name: verify instance cleanup
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: network cleanup
|
||||
cs_network:
|
||||
|
@ -252,4 +252,4 @@
|
|||
- name: verify network cleanup
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: verify project did not exist
|
||||
assert:
|
||||
that:
|
||||
- prj|success
|
||||
- prj is successful
|
||||
|
||||
- name: test create project in check mode
|
||||
cs_project:
|
||||
|
@ -17,7 +17,7 @@
|
|||
- name: verify test create project in check mode
|
||||
assert:
|
||||
that:
|
||||
- prj|changed
|
||||
- prj is changed
|
||||
|
||||
- name: test create project
|
||||
cs_project:
|
||||
|
@ -26,7 +26,7 @@
|
|||
- name: verify test create project
|
||||
assert:
|
||||
that:
|
||||
- prj|changed
|
||||
- prj is changed
|
||||
- prj.name == "{{ cs_resource_prefix }}-prj"
|
||||
|
||||
- name: test create project idempotence
|
||||
|
@ -36,7 +36,7 @@
|
|||
- name: verify test create project idempotence
|
||||
assert:
|
||||
that:
|
||||
- not prj|changed
|
||||
- prj is not changed
|
||||
- prj.name == "{{ cs_resource_prefix }}-prj"
|
||||
|
||||
- name: test suspend project in check mode
|
||||
|
@ -48,7 +48,7 @@
|
|||
- name: verify test suspend project in check mode
|
||||
assert:
|
||||
that:
|
||||
- prj|changed
|
||||
- prj is changed
|
||||
- prj.name == "{{ cs_resource_prefix }}-prj"
|
||||
- prj.state != "Suspended"
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
|||
- name: verify test suspend project
|
||||
assert:
|
||||
that:
|
||||
- prj|changed
|
||||
- prj is changed
|
||||
- prj.name == "{{ cs_resource_prefix }}-prj"
|
||||
- prj.state == "Suspended"
|
||||
|
||||
|
@ -72,7 +72,7 @@
|
|||
- name: verify test suspend project idempotence
|
||||
assert:
|
||||
that:
|
||||
- not prj|changed
|
||||
- prj is not changed
|
||||
- prj.name == "{{ cs_resource_prefix }}-prj"
|
||||
- prj.state == "Suspended"
|
||||
|
||||
|
@ -85,7 +85,7 @@
|
|||
- name: verify test activate project in check mode
|
||||
assert:
|
||||
that:
|
||||
- prj|changed
|
||||
- prj is changed
|
||||
- prj.name == "{{ cs_resource_prefix }}-prj"
|
||||
- prj.state != "Active"
|
||||
|
||||
|
@ -97,7 +97,7 @@
|
|||
- name: verify test activate project
|
||||
assert:
|
||||
that:
|
||||
- prj|changed
|
||||
- prj is changed
|
||||
- prj.name == "{{ cs_resource_prefix }}-prj"
|
||||
- prj.state == "Active"
|
||||
|
||||
|
@ -109,7 +109,7 @@
|
|||
- name: verify test activate project idempotence
|
||||
assert:
|
||||
that:
|
||||
- not prj|changed
|
||||
- prj is not changed
|
||||
- prj.name == "{{ cs_resource_prefix }}-prj"
|
||||
- prj.state == "Active"
|
||||
|
||||
|
@ -122,7 +122,7 @@
|
|||
- name: verify test delete project in check mode
|
||||
assert:
|
||||
that:
|
||||
- prj|changed
|
||||
- prj is changed
|
||||
- prj.name == "{{ cs_resource_prefix }}-prj"
|
||||
- prj.state == "Active"
|
||||
|
||||
|
@ -134,7 +134,7 @@
|
|||
- name: verify test delete project
|
||||
assert:
|
||||
that:
|
||||
- prj|changed
|
||||
- prj is changed
|
||||
- prj.name == "{{ cs_resource_prefix }}-prj"
|
||||
- prj.state == "Active"
|
||||
|
||||
|
@ -146,4 +146,4 @@
|
|||
- name: verify test delete project idempotence
|
||||
assert:
|
||||
that:
|
||||
- not prj|changed
|
||||
- prj is not changed
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- region|success
|
||||
- region is successful
|
||||
|
||||
- name: test fail if missing params
|
||||
cs_region:
|
||||
|
@ -16,7 +16,7 @@
|
|||
- name: verify results of fail if missing name
|
||||
assert:
|
||||
that:
|
||||
- region|failed
|
||||
- region is failed
|
||||
- "region.msg.startswith('missing required arguments: ')"
|
||||
|
||||
- name: test create region in check mode
|
||||
|
@ -29,7 +29,7 @@
|
|||
- name: verify test create region in check mode
|
||||
assert:
|
||||
that:
|
||||
- region|changed
|
||||
- region is changed
|
||||
|
||||
- name: test create region in check mode
|
||||
cs_region:
|
||||
|
@ -40,7 +40,7 @@
|
|||
- name: verify test create region in check mode
|
||||
assert:
|
||||
that:
|
||||
- region|changed
|
||||
- region is changed
|
||||
- region.name == 'geneva'
|
||||
- region.id == 2
|
||||
- region.endpoint == 'https://cloud.gva.example.com'
|
||||
|
@ -56,7 +56,7 @@
|
|||
- name: verify test create region idempotence
|
||||
assert:
|
||||
that:
|
||||
- not region|changed
|
||||
- region is not changed
|
||||
- region.name == 'geneva'
|
||||
- region.id == 2
|
||||
- region.endpoint == 'https://cloud.gva.example.com'
|
||||
|
@ -73,7 +73,7 @@
|
|||
- name: verify test update region in check mode
|
||||
assert:
|
||||
that:
|
||||
- region|changed
|
||||
- region is changed
|
||||
- region.name == 'geneva'
|
||||
- region.id == 2
|
||||
- region.endpoint == 'https://cloud.gva.example.com'
|
||||
|
@ -89,7 +89,7 @@
|
|||
- name: verify test update region
|
||||
assert:
|
||||
that:
|
||||
- region|changed
|
||||
- region is changed
|
||||
- region.name == 'zuerich'
|
||||
- region.id == 2
|
||||
- region.endpoint == 'https://cloud.zrh.example.com'
|
||||
|
@ -105,7 +105,7 @@
|
|||
- name: verify test update region idempotence
|
||||
assert:
|
||||
that:
|
||||
- not region|changed
|
||||
- region is not changed
|
||||
- region.name == 'zuerich'
|
||||
- region.id == 2
|
||||
- region.endpoint == 'https://cloud.zrh.example.com'
|
||||
|
@ -121,7 +121,7 @@
|
|||
- name: verify test remove region in check mode
|
||||
assert:
|
||||
that:
|
||||
- region|changed
|
||||
- region is changed
|
||||
- region.name == 'zuerich'
|
||||
- region.id == 2
|
||||
- region.endpoint == 'https://cloud.zrh.example.com'
|
||||
|
@ -136,7 +136,7 @@
|
|||
- name: verify test remove region
|
||||
assert:
|
||||
that:
|
||||
- region|changed
|
||||
- region is changed
|
||||
- region.name == 'zuerich'
|
||||
- region.id == 2
|
||||
- region.endpoint == 'https://cloud.zrh.example.com'
|
||||
|
@ -151,4 +151,4 @@
|
|||
- name: verify test remove region idempotence
|
||||
assert:
|
||||
that:
|
||||
- not region|changed
|
||||
- region is not changed
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: verify setup cpu limits account
|
||||
assert:
|
||||
that:
|
||||
- rl|success
|
||||
- rl is successful
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.account == "{{ cs_resource_prefix }}_user"
|
||||
- rl.limit == 20
|
||||
|
@ -24,7 +24,7 @@
|
|||
- name: verify setup cpu limits for domain
|
||||
assert:
|
||||
that:
|
||||
- rl|success
|
||||
- rl is successful
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == -1
|
||||
- rl.resource_type == "cpu"
|
||||
|
@ -39,7 +39,7 @@
|
|||
- name: verify set cpu limits for domain in check mode
|
||||
assert:
|
||||
that:
|
||||
- rl|changed
|
||||
- rl is changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == -1
|
||||
- rl.resource_type == "cpu"
|
||||
|
@ -53,7 +53,7 @@
|
|||
- name: verify set cpu limits for domain
|
||||
assert:
|
||||
that:
|
||||
- rl|changed
|
||||
- rl is changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == 12
|
||||
- rl.resource_type == "cpu"
|
||||
|
@ -67,7 +67,7 @@
|
|||
- name: verify set cpu limits for domain
|
||||
assert:
|
||||
that:
|
||||
- not rl|changed
|
||||
- rl is not changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == 12
|
||||
- rl.resource_type == "cpu"
|
||||
|
@ -83,7 +83,7 @@
|
|||
- name: verify set cpu limits for account in check mode
|
||||
assert:
|
||||
that:
|
||||
- rl|changed
|
||||
- rl is changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.account == "{{ cs_resource_prefix }}_user"
|
||||
- rl.limit == 20
|
||||
|
@ -99,7 +99,7 @@
|
|||
- name: verify set cpu limits for account
|
||||
assert:
|
||||
that:
|
||||
- rl|changed
|
||||
- rl is changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.account == "{{ cs_resource_prefix }}_user"
|
||||
- rl.limit == 10
|
||||
|
@ -115,7 +115,7 @@
|
|||
- name: verify set cpu limits for account idempotence
|
||||
assert:
|
||||
that:
|
||||
- not rl|changed
|
||||
- rl is not changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.account == "{{ cs_resource_prefix }}_user"
|
||||
- rl.limit == 10
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: verify setup instance limits account
|
||||
assert:
|
||||
that:
|
||||
- rl|success
|
||||
- rl is successful
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.account == "{{ cs_resource_prefix }}_user"
|
||||
- rl.limit == 20
|
||||
|
@ -25,7 +25,7 @@
|
|||
- name: verify set instance limits for domain in check mode
|
||||
assert:
|
||||
that:
|
||||
- rl|changed
|
||||
- rl is changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == 20
|
||||
- rl.resource_type == "instance"
|
||||
|
@ -39,7 +39,7 @@
|
|||
- name: verify set instance limits for domain
|
||||
assert:
|
||||
that:
|
||||
- rl|changed
|
||||
- rl is changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == 12
|
||||
- rl.resource_type == "instance"
|
||||
|
@ -53,7 +53,7 @@
|
|||
- name: verify set instance limits for domain
|
||||
assert:
|
||||
that:
|
||||
- not rl|changed
|
||||
- rl is not changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == 12
|
||||
- rl.resource_type == "instance"
|
||||
|
@ -69,7 +69,7 @@
|
|||
- name: verify set instance limits for account in check mode
|
||||
assert:
|
||||
that:
|
||||
- rl|changed
|
||||
- rl is changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.account == "{{ cs_resource_prefix }}_user"
|
||||
- rl.limit != 10
|
||||
|
@ -85,7 +85,7 @@
|
|||
- name: verify set instance limits for account
|
||||
assert:
|
||||
that:
|
||||
- rl|changed
|
||||
- rl is changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.account == "{{ cs_resource_prefix }}_user"
|
||||
- rl.limit == 10
|
||||
|
@ -101,7 +101,7 @@
|
|||
- name: verify set instance limits for account idempotence
|
||||
assert:
|
||||
that:
|
||||
- not rl|changed
|
||||
- rl is not changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.account == "{{ cs_resource_prefix }}_user"
|
||||
- rl.limit == 10
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: verify setup domain
|
||||
assert:
|
||||
that:
|
||||
- dom|success
|
||||
- dom is successful
|
||||
|
||||
- name: setup account
|
||||
cs_account:
|
||||
|
@ -21,7 +21,7 @@
|
|||
- name: verify setup account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc is successful
|
||||
|
||||
- name: test failed unkonwn type
|
||||
cs_resourcelimit:
|
||||
|
@ -33,7 +33,7 @@
|
|||
- name: verify test failed unkonwn type
|
||||
assert:
|
||||
that:
|
||||
- rl|failed
|
||||
- rl is failed
|
||||
|
||||
- name: test failed missing type
|
||||
cs_resourcelimit:
|
||||
|
@ -42,7 +42,7 @@
|
|||
- name: verify test failed missing type
|
||||
assert:
|
||||
that:
|
||||
- rl|failed
|
||||
- rl is failed
|
||||
|
||||
- name: setup resource limits domain
|
||||
cs_resourcelimit:
|
||||
|
@ -53,7 +53,7 @@
|
|||
- name: verify setup resource limits domain
|
||||
assert:
|
||||
that:
|
||||
- rl|success
|
||||
- rl is successful
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == 10
|
||||
|
||||
|
@ -67,8 +67,8 @@
|
|||
- name: verify setup resource limits domain to 20 in check mode
|
||||
assert:
|
||||
that:
|
||||
- rl|success
|
||||
- rl|changed
|
||||
- rl is successful
|
||||
- rl is changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == 10
|
||||
|
||||
|
@ -81,8 +81,8 @@
|
|||
- name: verify setup resource limits domain to 20
|
||||
assert:
|
||||
that:
|
||||
- rl|success
|
||||
- rl|changed
|
||||
- rl is successful
|
||||
- rl is changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == 20
|
||||
|
||||
|
@ -95,8 +95,8 @@
|
|||
- name: verify setup resource limits domain to 20 idempotence
|
||||
assert:
|
||||
that:
|
||||
- rl|success
|
||||
- not rl|changed
|
||||
- rl is successful
|
||||
- rl is not changed
|
||||
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
||||
- rl.limit == 20
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- role|success
|
||||
- role is successful
|
||||
|
||||
- name: test fail if missing params
|
||||
cs_role:
|
||||
|
@ -16,7 +16,7 @@
|
|||
- name: verifytest fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- role|failed
|
||||
- role is failed
|
||||
- "role.msg.startswith('missing required arguments: ')"
|
||||
|
||||
- name: test create role in check mode
|
||||
|
@ -28,7 +28,7 @@
|
|||
- name: verify test create role in check mode
|
||||
assert:
|
||||
that:
|
||||
- role|changed
|
||||
- role is changed
|
||||
|
||||
- name: test create role
|
||||
cs_role:
|
||||
|
@ -38,7 +38,7 @@
|
|||
- name: verify test create role
|
||||
assert:
|
||||
that:
|
||||
- role|changed
|
||||
- role is changed
|
||||
- role.name == '{{ cs_resource_prefix }}-role'
|
||||
- role.role_type == 'DomainAdmin'
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
- name: verify test create role idempotence
|
||||
assert:
|
||||
that:
|
||||
- not role|changed
|
||||
- role is not changed
|
||||
- role.name == '{{ cs_resource_prefix }}-role'
|
||||
- role.role_type == 'DomainAdmin'
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
|||
- name: verify test update role in check mode
|
||||
assert:
|
||||
that:
|
||||
- role|changed
|
||||
- role is changed
|
||||
- role.name == '{{ cs_resource_prefix }}-role'
|
||||
- "role.description is not defined"
|
||||
- role.role_type == 'DomainAdmin'
|
||||
|
@ -78,7 +78,7 @@
|
|||
- name: verify test update role
|
||||
assert:
|
||||
that:
|
||||
- role|changed
|
||||
- role is changed
|
||||
- role.name == '{{ cs_resource_prefix }}-role'
|
||||
- role.description == '{{ cs_resource_prefix }}-role-description'
|
||||
- role.role_type == 'DomainAdmin'
|
||||
|
@ -91,7 +91,7 @@
|
|||
- name: verify test update role idempotence
|
||||
assert:
|
||||
that:
|
||||
- not role|changed
|
||||
- role is not changed
|
||||
- role.name == '{{ cs_resource_prefix }}-role'
|
||||
- role.description == '{{ cs_resource_prefix }}-role-description'
|
||||
- role.role_type == 'DomainAdmin'
|
||||
|
@ -105,7 +105,7 @@
|
|||
- name: verify test remove role in check mode
|
||||
assert:
|
||||
that:
|
||||
- role|changed
|
||||
- role is changed
|
||||
- role.name == '{{ cs_resource_prefix }}-role'
|
||||
- role.role_type == 'DomainAdmin'
|
||||
|
||||
|
@ -117,7 +117,7 @@
|
|||
- name: verify test remove role
|
||||
assert:
|
||||
that:
|
||||
- role|changed
|
||||
- role is changed
|
||||
|
||||
- name: test remove role idempotence
|
||||
cs_role:
|
||||
|
@ -127,4 +127,4 @@
|
|||
- name: verify test remove role idempotence
|
||||
assert:
|
||||
that:
|
||||
- not role|changed
|
||||
- role is not changed
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
- name: verify setup network
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
- net.name == "net_router"
|
||||
|
||||
- name: setup instance
|
||||
|
@ -29,7 +29,7 @@
|
|||
- name: verify setup instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
- instance.name == "instance-vm"
|
||||
- instance.state == "Running"
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
|||
- name: verify setup instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
- instance.name == "instance-vm"
|
||||
- instance.state == "Running"
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
|||
- name: verify test router started
|
||||
assert:
|
||||
that:
|
||||
- router|success
|
||||
- router is successful
|
||||
|
||||
- name: test stop router in check mode
|
||||
cs_router:
|
||||
|
@ -85,7 +85,7 @@
|
|||
- name: verify test stop router in check mode
|
||||
assert:
|
||||
that:
|
||||
- router|changed
|
||||
- router is changed
|
||||
- router.state == "Running"
|
||||
- router.service_offering == "System Offering For Software Router"
|
||||
|
||||
|
@ -98,7 +98,7 @@
|
|||
- name: verify test stop router
|
||||
assert:
|
||||
that:
|
||||
- router|changed
|
||||
- router is changed
|
||||
- router.state == "Stopped"
|
||||
- router.service_offering == "System Offering For Software Router"
|
||||
|
||||
|
@ -111,7 +111,7 @@
|
|||
- name: verify test stop router idempotence
|
||||
assert:
|
||||
that:
|
||||
- not router|changed
|
||||
- router is not changed
|
||||
- router.state == "Stopped"
|
||||
- router.service_offering == "System Offering For Software Router"
|
||||
|
||||
|
@ -125,7 +125,7 @@
|
|||
- name: verify test start router in check mode
|
||||
assert:
|
||||
that:
|
||||
- router|changed
|
||||
- router is changed
|
||||
- router.state == "Stopped"
|
||||
- router.service_offering == "System Offering For Software Router"
|
||||
|
||||
|
@ -138,7 +138,7 @@
|
|||
- name: verify test start router
|
||||
assert:
|
||||
that:
|
||||
- router|changed
|
||||
- router is changed
|
||||
- router.state == "Running"
|
||||
- router.service_offering == "System Offering For Software Router"
|
||||
|
||||
|
@ -151,7 +151,7 @@
|
|||
- name: verify test start router idempotence
|
||||
assert:
|
||||
that:
|
||||
- not router|changed
|
||||
- router is not changed
|
||||
- router.state == "Running"
|
||||
- router.service_offering == "System Offering For Software Router"
|
||||
|
||||
|
@ -165,7 +165,7 @@
|
|||
- name: verify test restart router in check mode
|
||||
assert:
|
||||
that:
|
||||
- router|changed
|
||||
- router is changed
|
||||
- router.state == "Running"
|
||||
- router.service_offering == "System Offering For Software Router"
|
||||
|
||||
|
@ -178,6 +178,6 @@
|
|||
- name: verify test restart router
|
||||
assert:
|
||||
that:
|
||||
- router|changed
|
||||
- router is changed
|
||||
- router.state == "Running"
|
||||
- router.service_offering == "System Offering For Software Router"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg is successful
|
||||
|
||||
- name: test fail if missing name
|
||||
action: cs_securitygroup
|
||||
|
@ -14,7 +14,7 @@
|
|||
- name: verify results of fail if missing name
|
||||
assert:
|
||||
that:
|
||||
- sg|failed
|
||||
- sg is failed
|
||||
- "sg.msg == 'missing required arguments: name'"
|
||||
|
||||
- name: test present security group in check mode
|
||||
|
@ -24,8 +24,8 @@
|
|||
- name: verify results of create security group in check mode
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg|changed
|
||||
- sg is successful
|
||||
- sg is changed
|
||||
|
||||
- name: test present security group
|
||||
cs_securitygroup: name={{ cs_resource_prefix }}_sg
|
||||
|
@ -33,8 +33,8 @@
|
|||
- name: verify results of create security group
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg|changed
|
||||
- sg is successful
|
||||
- sg is changed
|
||||
- sg.name == "{{ cs_resource_prefix }}_sg"
|
||||
|
||||
- name: test present security group is idempotence
|
||||
|
@ -43,8 +43,8 @@
|
|||
- name: verify results present security group is idempotence
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- not sg|changed
|
||||
- sg is successful
|
||||
- sg is not changed
|
||||
- sg.name == "{{ cs_resource_prefix }}_sg"
|
||||
|
||||
- name: test absent security group in check mode
|
||||
|
@ -54,8 +54,8 @@
|
|||
- name: verify results of absent security group in check mode
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg|changed
|
||||
- sg is successful
|
||||
- sg is changed
|
||||
- sg.name == "{{ cs_resource_prefix }}_sg"
|
||||
|
||||
- name: test absent security group
|
||||
|
@ -64,8 +64,8 @@
|
|||
- name: verify results of absent security group
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg|changed
|
||||
- sg is successful
|
||||
- sg is changed
|
||||
- sg.name == "{{ cs_resource_prefix }}_sg"
|
||||
|
||||
- name: test absent security group is idempotence
|
||||
|
@ -74,6 +74,6 @@
|
|||
- name: verify results of absent security group is idempotence
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- not sg|changed
|
||||
- sg is successful
|
||||
- sg is not changed
|
||||
- sg.name is undefined
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
- name: verify create http range rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
- sg_rule.type == 'ingress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.protocol == 'tcp'
|
||||
|
@ -31,8 +31,8 @@
|
|||
- name: verify create http range rule
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
- sg_rule.type == 'ingress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.protocol == 'tcp'
|
||||
|
@ -51,8 +51,8 @@
|
|||
- name: verify create http range rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- not sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is not changed
|
||||
|
||||
- name: test remove single port udp rule in check mode
|
||||
cs_securitygroup_rule:
|
||||
|
@ -67,8 +67,8 @@
|
|||
- name: verify remove single port udp rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
- sg_rule.type == 'egress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.protocol == 'udp'
|
||||
|
@ -88,8 +88,8 @@
|
|||
- name: verify remove single port udp rule
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
- sg_rule.type == 'egress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.protocol == 'udp'
|
||||
|
@ -109,8 +109,8 @@
|
|||
- name: verify remove single port udp rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- not sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is not changed
|
||||
|
||||
- name: test remove icmp rule in check mode
|
||||
cs_securitygroup_rule:
|
||||
|
@ -125,8 +125,8 @@
|
|||
- name: verify icmp rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
- sg_rule.type == 'ingress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.cidr == '0.0.0.0/0'
|
||||
|
@ -146,8 +146,8 @@
|
|||
- name: verify icmp rule
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
- sg_rule.type == 'ingress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.cidr == '0.0.0.0/0'
|
||||
|
@ -167,5 +167,5 @@
|
|||
- name: verify icmp rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- not sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is not changed
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg is successful
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
- name: verify create http range rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
|
||||
- name: test create http range rule
|
||||
cs_securitygroup_rule:
|
||||
|
@ -23,8 +23,8 @@
|
|||
- name: verify create http range rule
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
- sg_rule.type == 'ingress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.protocol == 'tcp'
|
||||
|
@ -42,8 +42,8 @@
|
|||
- name: verify create http range rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- not sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is not changed
|
||||
- sg_rule.type == 'ingress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.protocol == 'tcp'
|
||||
|
@ -63,8 +63,8 @@
|
|||
- name: verify create single port udp rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
|
||||
- name: test create single port udp rule
|
||||
cs_securitygroup_rule:
|
||||
|
@ -77,8 +77,8 @@
|
|||
- name: verify create single port udp rule
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
- sg_rule.type == 'egress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.protocol == 'udp'
|
||||
|
@ -98,8 +98,8 @@
|
|||
- name: verify single port udp rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- not sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is not changed
|
||||
- sg_rule.type == 'egress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.protocol == 'udp'
|
||||
|
@ -119,8 +119,8 @@
|
|||
- name: verify icmp rule in check mode
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
|
||||
- name: test icmp rule
|
||||
cs_securitygroup_rule:
|
||||
|
@ -133,8 +133,8 @@
|
|||
- name: verify icmp rule
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is changed
|
||||
- sg_rule.type == 'ingress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.cidr == '0.0.0.0/0'
|
||||
|
@ -153,8 +153,8 @@
|
|||
- name: verify icmp rule idempotence
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- not sg_rule|changed
|
||||
- sg_rule is successful
|
||||
- sg_rule is not changed
|
||||
- sg_rule.type == 'ingress'
|
||||
- sg_rule.security_group == 'default'
|
||||
- sg_rule.cidr == '0.0.0.0/0'
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg is successful
|
||||
|
||||
- name: setup default security group
|
||||
cs_securitygroup: name=default
|
||||
|
@ -12,7 +12,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- sg|success
|
||||
- sg is successful
|
||||
|
||||
- name: setup remove icmp rule
|
||||
cs_securitygroup_rule:
|
||||
|
@ -26,7 +26,7 @@
|
|||
- name: verify remove icmp rule
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule is successful
|
||||
|
||||
- name: setup remove http range rule
|
||||
cs_securitygroup_rule:
|
||||
|
@ -39,7 +39,7 @@
|
|||
- name: verify remove http range rule
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule is successful
|
||||
|
||||
- name: setup remove single port udp rule
|
||||
cs_securitygroup_rule:
|
||||
|
@ -53,4 +53,4 @@
|
|||
- name: verify remove single port udp rule
|
||||
assert:
|
||||
that:
|
||||
- sg_rule|success
|
||||
- sg_rule is successful
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: verify setup service offering
|
||||
assert:
|
||||
that:
|
||||
- so|success
|
||||
- so is successful
|
||||
|
||||
- name: create service offering in check mode
|
||||
cs_serviceoffer:
|
||||
|
@ -26,7 +26,7 @@
|
|||
- name: verify create service offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- so|changed
|
||||
- so is changed
|
||||
|
||||
- name: create service offering
|
||||
cs_serviceoffer:
|
||||
|
@ -44,7 +44,7 @@
|
|||
- name: verify create service offering
|
||||
assert:
|
||||
that:
|
||||
- so|changed
|
||||
- so is changed
|
||||
- so.name == "Micro"
|
||||
- so.display_text == "Micro 512mb 1cpu"
|
||||
- so.cpu_number == 1
|
||||
|
@ -70,7 +70,7 @@
|
|||
- name: verify create service offering idempotence
|
||||
assert:
|
||||
that:
|
||||
- not so|changed
|
||||
- so is not changed
|
||||
- so.name == "Micro"
|
||||
- so.display_text == "Micro 512mb 1cpu"
|
||||
- so.cpu_number == 1
|
||||
|
@ -89,7 +89,7 @@
|
|||
- name: verify create update offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- so|changed
|
||||
- so is changed
|
||||
- so.name == "Micro"
|
||||
- so.display_text == "Micro 512mb 1cpu"
|
||||
- so.cpu_number == 1
|
||||
|
@ -107,7 +107,7 @@
|
|||
- name: verify update service offerin
|
||||
assert:
|
||||
that:
|
||||
- so|changed
|
||||
- so is changed
|
||||
- so.name == "Micro"
|
||||
- so.display_text == "Micro RAM 512MB 1vCPU"
|
||||
- so.cpu_number == 1
|
||||
|
@ -125,7 +125,7 @@
|
|||
- name: verify update service offering idempotence
|
||||
assert:
|
||||
that:
|
||||
- not so|changed
|
||||
- so is not changed
|
||||
- so.name == "Micro"
|
||||
- so.display_text == "Micro RAM 512MB 1vCPU"
|
||||
- so.cpu_number == 1
|
||||
|
@ -144,7 +144,7 @@
|
|||
- name: verify remove service offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- so|changed
|
||||
- so is changed
|
||||
- so.name == "Micro"
|
||||
- so.display_text == "Micro RAM 512MB 1vCPU"
|
||||
- so.cpu_number == 1
|
||||
|
@ -162,7 +162,7 @@
|
|||
- name: verify remove service offering
|
||||
assert:
|
||||
that:
|
||||
- so|changed
|
||||
- so is changed
|
||||
- so.name == "Micro"
|
||||
- so.display_text == "Micro RAM 512MB 1vCPU"
|
||||
- so.cpu_number == 1
|
||||
|
@ -180,4 +180,4 @@
|
|||
- name: verify remove service offering idempotence
|
||||
assert:
|
||||
that:
|
||||
- not so|changed
|
||||
- so is not changed
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: verify setup system offering
|
||||
assert:
|
||||
that:
|
||||
- so|success
|
||||
- so is successful
|
||||
|
||||
- name: fail missing storage type and is_system
|
||||
cs_serviceoffer:
|
||||
|
@ -27,7 +27,7 @@
|
|||
- name: verify create system service offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- so|failed
|
||||
- so is failed
|
||||
- so.msg.startswith('missing required arguments:')
|
||||
|
||||
- name: create system service offering in check mode
|
||||
|
@ -48,7 +48,7 @@
|
|||
- name: verify create system service offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- so|changed
|
||||
- so is changed
|
||||
|
||||
- name: create system service offering
|
||||
cs_serviceoffer:
|
||||
|
@ -67,7 +67,7 @@
|
|||
- name: verify create system service offering
|
||||
assert:
|
||||
that:
|
||||
- so|changed
|
||||
- so is changed
|
||||
- so.name == "System Offering for Ansible"
|
||||
- so.display_text == "System Offering for Ansible"
|
||||
- so.cpu_number == 1
|
||||
|
@ -98,7 +98,7 @@
|
|||
- name: verify create system service offering idempotence
|
||||
assert:
|
||||
that:
|
||||
- not so|changed
|
||||
- so is not changed
|
||||
- so.name == "System Offering for Ansible"
|
||||
- so.display_text == "System Offering for Ansible"
|
||||
- so.cpu_number == 1
|
||||
|
@ -122,7 +122,7 @@
|
|||
- name: verify remove system service offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- so|changed
|
||||
- so is changed
|
||||
- so.name == "System Offering for Ansible"
|
||||
- so.is_system == true
|
||||
|
||||
|
@ -135,7 +135,7 @@
|
|||
- name: verify remove system service offering
|
||||
assert:
|
||||
that:
|
||||
- so|changed
|
||||
- so is changed
|
||||
- so.name == "System Offering for Ansible"
|
||||
- so.is_system == true
|
||||
|
||||
|
@ -148,4 +148,4 @@
|
|||
- name: verify remove system service offering idempotence
|
||||
assert:
|
||||
that:
|
||||
- not so|changed
|
||||
- so is not changed
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: verify setup instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: setup snapshot policy absent
|
||||
cs_snapshot_policy:
|
||||
|
@ -20,7 +20,7 @@
|
|||
- name: verify setup snapshot policy absent
|
||||
assert:
|
||||
that:
|
||||
- snapshot|success
|
||||
- snapshot is successful
|
||||
|
||||
- name: create snapshot policy in check mode
|
||||
cs_snapshot_policy:
|
||||
|
@ -32,7 +32,7 @@
|
|||
- name: verify create snapshot policy in check mode
|
||||
assert:
|
||||
that:
|
||||
- snapshot|changed
|
||||
- snapshot is changed
|
||||
|
||||
- name: create snapshot policy
|
||||
cs_snapshot_policy:
|
||||
|
@ -43,7 +43,7 @@
|
|||
- name: verify create snapshot policy
|
||||
assert:
|
||||
that:
|
||||
- snapshot|changed
|
||||
- snapshot is changed
|
||||
- snapshot.schedule == "5"
|
||||
- snapshot.interval_type == "hourly"
|
||||
- snapshot.volume != ""
|
||||
|
@ -57,7 +57,7 @@
|
|||
- name: verify create snapshot policy idempotence
|
||||
assert:
|
||||
that:
|
||||
- not snapshot|changed
|
||||
- snapshot is not changed
|
||||
- snapshot.schedule == "5"
|
||||
- snapshot.interval_type == "hourly"
|
||||
- snapshot.volume != ""
|
||||
|
@ -72,7 +72,7 @@
|
|||
- name: verify update snapshot policy
|
||||
assert:
|
||||
that:
|
||||
- snapshot|changed
|
||||
- snapshot is changed
|
||||
- snapshot.schedule == "5"
|
||||
- snapshot.interval_type == "hourly"
|
||||
- snapshot.volume != ""
|
||||
|
@ -89,7 +89,7 @@
|
|||
- name: verify update snapshot policy in check mode
|
||||
assert:
|
||||
that:
|
||||
- snapshot|changed
|
||||
- snapshot is changed
|
||||
- snapshot.schedule == "5"
|
||||
- snapshot.interval_type == "hourly"
|
||||
- snapshot.volume != ""
|
||||
|
@ -107,7 +107,7 @@
|
|||
- name: verify update snapshot policy
|
||||
assert:
|
||||
that:
|
||||
- snapshot|changed
|
||||
- snapshot is changed
|
||||
- snapshot.schedule == "6"
|
||||
- snapshot.interval_type == "hourly"
|
||||
- snapshot.volume != ""
|
||||
|
@ -125,7 +125,7 @@
|
|||
- name: verify update snapshot policy idempotence
|
||||
assert:
|
||||
that:
|
||||
- not snapshot|changed
|
||||
- snapshot is not changed
|
||||
- snapshot.schedule == "6"
|
||||
- snapshot.interval_type == "hourly"
|
||||
- snapshot.volume != ""
|
||||
|
@ -142,7 +142,7 @@
|
|||
- name: verify remove snapshot policy in check mode
|
||||
assert:
|
||||
that:
|
||||
- snapshot|changed
|
||||
- snapshot is changed
|
||||
- snapshot.schedule == "6"
|
||||
- snapshot.interval_type == "hourly"
|
||||
- snapshot.volume != ""
|
||||
|
@ -158,7 +158,7 @@
|
|||
- name: verify remove snapshot policy
|
||||
assert:
|
||||
that:
|
||||
- snapshot|changed
|
||||
- snapshot is changed
|
||||
- snapshot.schedule == "6"
|
||||
- snapshot.interval_type == "hourly"
|
||||
- snapshot.volume != ""
|
||||
|
@ -174,4 +174,4 @@
|
|||
- name: verify remove snapshot policy idempotence
|
||||
assert:
|
||||
that:
|
||||
- not snapshot|changed
|
||||
- snapshot is not changed
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
- name: verify results of fail on missing name
|
||||
assert:
|
||||
that:
|
||||
- sshkey|failed
|
||||
- sshkey is failed
|
||||
- "sshkey.msg == 'missing required arguments: name'"
|
||||
|
||||
- name: test ssh key creation in check mode
|
||||
|
@ -23,8 +23,8 @@
|
|||
- name: verify results of ssh key creation in check mode
|
||||
assert:
|
||||
that:
|
||||
- sshkey|success
|
||||
- sshkey|changed
|
||||
- sshkey is successful
|
||||
- sshkey is changed
|
||||
|
||||
- name: test ssh key creation
|
||||
cs_sshkeypair:
|
||||
|
@ -33,8 +33,8 @@
|
|||
- name: verify results of ssh key creation
|
||||
assert:
|
||||
that:
|
||||
- sshkey|success
|
||||
- sshkey|changed
|
||||
- sshkey is successful
|
||||
- sshkey is changed
|
||||
- sshkey.fingerprint is defined and sshkey.fingerprint != ""
|
||||
- sshkey.private_key is defined and sshkey.private_key != ""
|
||||
- sshkey.name == "first-sshkey"
|
||||
|
@ -46,8 +46,8 @@
|
|||
- name: verify results of ssh key creation idempotence
|
||||
assert:
|
||||
that:
|
||||
- sshkey2|success
|
||||
- not sshkey2|changed
|
||||
- sshkey2 is successful
|
||||
- sshkey2 is not changed
|
||||
- sshkey2.fingerprint is defined and sshkey2.fingerprint == sshkey.fingerprint
|
||||
- sshkey2.private_key is not defined
|
||||
- sshkey2.name == "first-sshkey"
|
||||
|
@ -61,8 +61,8 @@
|
|||
- name: verify results of replace ssh public key in check mode
|
||||
assert:
|
||||
that:
|
||||
- sshkey2|success
|
||||
- sshkey2|changed
|
||||
- sshkey2 is successful
|
||||
- sshkey2 is changed
|
||||
- sshkey2.fingerprint is defined and sshkey2.fingerprint == sshkey.fingerprint
|
||||
- sshkey2.private_key is not defined
|
||||
- sshkey2.name == "first-sshkey"
|
||||
|
@ -75,8 +75,8 @@
|
|||
- name: verify results of replace ssh public key
|
||||
assert:
|
||||
that:
|
||||
- sshkey3|success
|
||||
- sshkey3|changed
|
||||
- sshkey3 is successful
|
||||
- sshkey3 is changed
|
||||
- sshkey3.fingerprint is defined and sshkey3.fingerprint != sshkey2.fingerprint
|
||||
- sshkey3.private_key is not defined
|
||||
- sshkey3.name == "first-sshkey"
|
||||
|
@ -89,8 +89,8 @@
|
|||
- name: verify results of ssh public key idempotence
|
||||
assert:
|
||||
that:
|
||||
- sshkey4|success
|
||||
- not sshkey4|changed
|
||||
- sshkey4 is successful
|
||||
- sshkey4 is not changed
|
||||
- sshkey4.fingerprint is defined and sshkey4.fingerprint == sshkey3.fingerprint
|
||||
- sshkey4.private_key is not defined
|
||||
- sshkey4.name == "first-sshkey"
|
||||
|
@ -107,8 +107,8 @@
|
|||
- name: verify test different but exisitng name but same ssh public key as first-sshkey
|
||||
assert:
|
||||
that:
|
||||
- sshkey|success
|
||||
- sshkey|changed
|
||||
- sshkey is successful
|
||||
- sshkey is changed
|
||||
- sshkey.fingerprint is defined and sshkey.fingerprint == sshkey4.fingerprint
|
||||
- sshkey.private_key is not defined
|
||||
- sshkey.name == "second-sshkey"
|
||||
|
@ -120,8 +120,8 @@
|
|||
- name: verify result of key absent in check mode
|
||||
assert:
|
||||
that:
|
||||
- sshkey5|success
|
||||
- sshkey5|changed
|
||||
- sshkey5 is successful
|
||||
- sshkey5 is changed
|
||||
- sshkey5.fingerprint is defined and sshkey5.fingerprint == sshkey3.fingerprint
|
||||
- sshkey5.private_key is not defined
|
||||
- sshkey5.name == "second-sshkey"
|
||||
|
@ -132,8 +132,8 @@
|
|||
- name: verify result of key absent
|
||||
assert:
|
||||
that:
|
||||
- sshkey5|success
|
||||
- sshkey5|changed
|
||||
- sshkey5 is successful
|
||||
- sshkey5 is changed
|
||||
- sshkey5.fingerprint is defined and sshkey5.fingerprint == sshkey3.fingerprint
|
||||
- sshkey5.private_key is not defined
|
||||
- sshkey5.name == "second-sshkey"
|
||||
|
@ -144,8 +144,8 @@
|
|||
- name: verify result of ssh key absent idempotence
|
||||
assert:
|
||||
that:
|
||||
- sshkey6|success
|
||||
- not sshkey6|changed
|
||||
- sshkey6 is successful
|
||||
- sshkey6 is not changed
|
||||
- sshkey6.fingerprint is not defined
|
||||
- sshkey6.private_key is not defined
|
||||
- sshkey6.name is not defined
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
- name: verify setup host is present
|
||||
assert:
|
||||
that:
|
||||
- host|success
|
||||
- host is successful
|
||||
|
||||
- name: setup storage pool is absent
|
||||
cs_storage_pool:
|
||||
|
@ -25,7 +25,7 @@
|
|||
- name: verify setup storage pool is absent
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp is successful
|
||||
|
||||
- name: test fail if missing params
|
||||
cs_storage_pool:
|
||||
|
@ -34,7 +34,7 @@
|
|||
- name: verify results of fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- sp|failed
|
||||
- sp is failed
|
||||
- "sp.msg == 'missing required arguments: name'"
|
||||
|
||||
- name: test fail if provider unknown
|
||||
|
@ -51,7 +51,7 @@
|
|||
- name: verify test fail if provider unknown
|
||||
assert:
|
||||
that:
|
||||
- sp|failed
|
||||
- sp is failed
|
||||
- "sp.msg == 'Storage provider DNE not found'"
|
||||
|
||||
- name: test fail if cluster unknown
|
||||
|
@ -67,7 +67,7 @@
|
|||
- name: verify test fail if cluster unknown
|
||||
assert:
|
||||
that:
|
||||
- sp|failed
|
||||
- sp is failed
|
||||
- "sp.msg == 'Cluster DNE not found'"
|
||||
|
||||
- name: test fail if pod unknown
|
||||
|
@ -83,7 +83,7 @@
|
|||
- name: verify test fail if pod unknown
|
||||
assert:
|
||||
that:
|
||||
- sp|failed
|
||||
- sp is failed
|
||||
- "sp.msg == 'Pod DNE not found'"
|
||||
|
||||
- name: create storage pool in check mode
|
||||
|
@ -99,8 +99,8 @@
|
|||
- name: verify create storage pool in check mode
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
|
||||
- name: create storage pool
|
||||
cs_storage_pool:
|
||||
|
@ -114,8 +114,8 @@
|
|||
- name: verify create storage pool
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
- sp.storage_url == "RBD://ceph-mons.domain/poolname"
|
||||
|
@ -131,8 +131,8 @@
|
|||
- name: verify create storage pool idempotence
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- not sp|changed
|
||||
- sp is successful
|
||||
- sp is not changed
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
- sp.storage_url == "RBD://ceph-mons.domain/poolname"
|
||||
|
@ -150,8 +150,8 @@
|
|||
- name: verify disable storage pool in check mode
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'enabled'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
@ -170,8 +170,8 @@
|
|||
- name: verify disable storage pool
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'disabled'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
@ -190,8 +190,8 @@
|
|||
- name: verify disable storage pool idempotence
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- not sp|changed
|
||||
- sp is successful
|
||||
- sp is not changed
|
||||
- sp.allocation_state == 'disabled'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
@ -213,8 +213,8 @@
|
|||
- name: verify update while storage pool disabled in check mode
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'disabled'
|
||||
- sp.storage_tags == []
|
||||
- sp.cluster == "C0-adv"
|
||||
|
@ -236,8 +236,8 @@
|
|||
- name: verify update while storage pool disabled
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'disabled'
|
||||
- sp.storage_tags == ['eco', 'ssd']
|
||||
- sp.cluster == "C0-adv"
|
||||
|
@ -259,8 +259,8 @@
|
|||
- name: verify update while storage pool disabled idempotence
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- not sp|changed
|
||||
- sp is successful
|
||||
- sp is not changed
|
||||
- sp.allocation_state == 'disabled'
|
||||
- sp.storage_tags == ['eco', 'ssd']
|
||||
- sp.cluster == "C0-adv"
|
||||
|
@ -281,8 +281,8 @@
|
|||
- name: verify put storage in maintenance pool in check mode
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'disabled'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
@ -301,8 +301,8 @@
|
|||
- name: verify put storage in maintenance pool
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'maintenance'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
@ -321,8 +321,8 @@
|
|||
- name: verify put storage in maintenance pool idempotence
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- not sp|changed
|
||||
- sp is successful
|
||||
- sp is not changed
|
||||
- sp.allocation_state == 'maintenance'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
@ -341,8 +341,8 @@
|
|||
- name: verify update while in maintenance pool
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'maintenance'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
@ -359,8 +359,8 @@
|
|||
- name: verify remove storage pool in check mode
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
- sp.storage_url == "RBD://ceph-mons.domain/poolname"
|
||||
|
@ -374,8 +374,8 @@
|
|||
- name: verify remove storage pool
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
- sp.storage_url == "RBD://ceph-mons.domain/poolname"
|
||||
|
@ -389,8 +389,8 @@
|
|||
- name: verify remove storage pool idempotence
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- not sp|changed
|
||||
- sp is successful
|
||||
- sp is not changed
|
||||
|
||||
- name: create storage pool in maintenance
|
||||
cs_storage_pool:
|
||||
|
@ -405,8 +405,8 @@
|
|||
- name: verify create storage pool in maintenance
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'maintenance'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
@ -421,8 +421,8 @@
|
|||
- name: verify storage pool in maintenance
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'maintenance'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
@ -441,8 +441,8 @@
|
|||
- name: verify create storage pool in disabled
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'disabled'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
@ -457,8 +457,8 @@
|
|||
- name: verify remove disabled storage pool
|
||||
assert:
|
||||
that:
|
||||
- sp|success
|
||||
- sp|changed
|
||||
- sp is successful
|
||||
- sp is changed
|
||||
- sp.allocation_state == 'disabled'
|
||||
- sp.cluster == "C0-adv"
|
||||
- sp.pod == "POD0-adv"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user is successful
|
||||
|
||||
- name: test fail if missing username
|
||||
action: cs_user
|
||||
|
@ -14,7 +14,7 @@
|
|||
- name: verify results of fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- user|failed
|
||||
- user is failed
|
||||
- 'user.msg == "missing required arguments: username"'
|
||||
|
||||
- name: test fail if missing params if state=present
|
||||
|
@ -25,7 +25,7 @@
|
|||
- name: verify results of fail if missing params if state=present
|
||||
assert:
|
||||
that:
|
||||
- user|failed
|
||||
- user is failed
|
||||
- 'user.msg == "missing required arguments: account, email, password, first_name, last_name"'
|
||||
|
||||
- name: test create user in check mode
|
||||
|
@ -41,8 +41,8 @@
|
|||
- name: verify results of create user in check mode
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
|
||||
- name: test create user
|
||||
cs_user:
|
||||
|
@ -56,8 +56,8 @@
|
|||
- name: verify results of create user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.first_name == "{{ cs_resource_prefix }}_first_name"
|
||||
- user.last_name == "{{ cs_resource_prefix }}_last_name"
|
||||
|
@ -80,8 +80,8 @@
|
|||
- name: verify results of create user idempotence
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- not user|changed
|
||||
- user is successful
|
||||
- user is not changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.first_name == "{{ cs_resource_prefix }}_first_name"
|
||||
- user.last_name == "{{ cs_resource_prefix }}_last_name"
|
||||
|
@ -105,14 +105,14 @@
|
|||
- name: verify results of create account
|
||||
assert:
|
||||
that:
|
||||
- acc|success
|
||||
- acc|changed
|
||||
- acc is successful
|
||||
- acc is changed
|
||||
- acc.name == "{{ cs_resource_prefix }}_acc"
|
||||
- acc.network_domain == "example.com"
|
||||
- acc.account_type == "user"
|
||||
- acc.state == "enabled"
|
||||
- acc.domain == "ROOT"
|
||||
- acc|changed
|
||||
- acc is changed
|
||||
|
||||
- name: test create user2 in check mode
|
||||
cs_user:
|
||||
|
@ -128,8 +128,8 @@
|
|||
- name: verify results of create user idempotence
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
|
||||
- name: test create user2
|
||||
cs_user:
|
||||
|
@ -144,8 +144,8 @@
|
|||
- name: verify results of create user idempotence
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user2"
|
||||
- user.first_name == "{{ cs_resource_prefix }}_first_name2"
|
||||
- user.last_name == "{{ cs_resource_prefix }}_last_name2"
|
||||
|
@ -169,8 +169,8 @@
|
|||
- name: verify results of create user idempotence
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- not user|changed
|
||||
- user is successful
|
||||
- user is not changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user2"
|
||||
- user.first_name == "{{ cs_resource_prefix }}_first_name2"
|
||||
- user.last_name == "{{ cs_resource_prefix }}_last_name2"
|
||||
|
@ -195,8 +195,8 @@
|
|||
- name: verify results of update user in check mode
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.first_name == "{{ cs_resource_prefix }}_first_name"
|
||||
- user.last_name == "{{ cs_resource_prefix }}_last_name"
|
||||
|
@ -220,8 +220,8 @@
|
|||
- name: verify results of update user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.first_name == "{{ cs_resource_prefix }}_first_name1"
|
||||
- user.last_name == "{{ cs_resource_prefix }}_last_name1"
|
||||
|
@ -245,8 +245,8 @@
|
|||
- name: verify results of update user idempotence
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- not user|changed
|
||||
- user is successful
|
||||
- user is not changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.first_name == "{{ cs_resource_prefix }}_first_name1"
|
||||
- user.last_name == "{{ cs_resource_prefix }}_last_name1"
|
||||
|
@ -266,8 +266,8 @@
|
|||
- name: verify results of lock user in check mode
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -282,8 +282,8 @@
|
|||
- name: verify results of lock user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -298,8 +298,8 @@
|
|||
- name: verify results of lock user idempotence
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- not user|changed
|
||||
- user is successful
|
||||
- user is not changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -315,8 +315,8 @@
|
|||
- name: verify results of disable user in check mode
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -331,8 +331,8 @@
|
|||
- name: verify results of disable user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -347,8 +347,8 @@
|
|||
- name: verify results of disable user idempotence
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- not user|changed
|
||||
- user is successful
|
||||
- user is not changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -364,8 +364,8 @@
|
|||
- name: verify results of lock disabled user in check mode
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -380,8 +380,8 @@
|
|||
- name: verify results of lock disabled user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -396,8 +396,8 @@
|
|||
- name: verify results of lock disabled user idempotence
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- not user|changed
|
||||
- user is successful
|
||||
- user is not changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -413,8 +413,8 @@
|
|||
- name: verify results of enable user in check mode
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -429,8 +429,8 @@
|
|||
- name: verify results of enable user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -445,8 +445,8 @@
|
|||
- name: verify results of enable user idempotence
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- not user|changed
|
||||
- user is successful
|
||||
- user is not changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -462,8 +462,8 @@
|
|||
- name: verify results of remove user in check mode
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -478,8 +478,8 @@
|
|||
- name: verify results of remove user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -494,8 +494,8 @@
|
|||
- name: verify results of remove user idempotence
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- not user|changed
|
||||
- user is successful
|
||||
- user is not changed
|
||||
|
||||
- name: test create locked user
|
||||
cs_user:
|
||||
|
@ -510,8 +510,8 @@
|
|||
- name: verify results of create locked user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.first_name == "{{ cs_resource_prefix }}_first_name"
|
||||
- user.last_name == "{{ cs_resource_prefix }}_last_name"
|
||||
|
@ -529,8 +529,8 @@
|
|||
- name: verify results of remove locked user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -550,8 +550,8 @@
|
|||
- name: verify results of create disabled user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.first_name == "{{ cs_resource_prefix }}_first_name"
|
||||
- user.last_name == "{{ cs_resource_prefix }}_last_name"
|
||||
|
@ -569,8 +569,8 @@
|
|||
- name: verify results of remove disabled user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
@ -590,8 +590,8 @@
|
|||
- name: verify results of create enabled user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.first_name == "{{ cs_resource_prefix }}_first_name"
|
||||
- user.last_name == "{{ cs_resource_prefix }}_last_name"
|
||||
|
@ -609,8 +609,8 @@
|
|||
- name: verify results of remove enabled user
|
||||
assert:
|
||||
that:
|
||||
- user|success
|
||||
- user|changed
|
||||
- user is successful
|
||||
- user is changed
|
||||
- user.username == "{{ cs_resource_prefix }}_user"
|
||||
- user.account_type == "root_admin"
|
||||
- user.account == "admin"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: verify create instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: ensure no snapshot exists
|
||||
cs_vmsnapshot:
|
||||
|
@ -19,7 +19,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- snap|success
|
||||
- snap is successful
|
||||
|
||||
- name: test fail if missing name
|
||||
action: cs_vmsnapshot
|
||||
|
@ -28,7 +28,7 @@
|
|||
- name: verify results of fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- snap|failed
|
||||
- snap is failed
|
||||
- 'snap.msg.startswith("missing required arguments: ")'
|
||||
|
||||
- name: test create snapshot in check mode
|
||||
|
@ -41,7 +41,7 @@
|
|||
- name: verify test create snapshot in check mode
|
||||
assert:
|
||||
that:
|
||||
- snap|changed
|
||||
- snap is changed
|
||||
|
||||
- name: test create snapshot
|
||||
cs_vmsnapshot:
|
||||
|
@ -52,7 +52,7 @@
|
|||
- name: verify test create snapshot
|
||||
assert:
|
||||
that:
|
||||
- snap|changed
|
||||
- snap is changed
|
||||
- snap.display_name == "{{ cs_resource_prefix }}_snapshot"
|
||||
|
||||
- name: test create snapshot idempotence
|
||||
|
@ -64,7 +64,7 @@
|
|||
- name: verify test create snapshot idempotence
|
||||
assert:
|
||||
that:
|
||||
- not snap|changed
|
||||
- snap is not changed
|
||||
- snap.display_name == "{{ cs_resource_prefix }}_snapshot"
|
||||
|
||||
- name: test revert snapshot in check mode
|
||||
|
@ -77,7 +77,7 @@
|
|||
- name: verify test revert snapshot in check mode
|
||||
assert:
|
||||
that:
|
||||
- snap|changed
|
||||
- snap is changed
|
||||
- snap.display_name == "{{ cs_resource_prefix }}_snapshot"
|
||||
|
||||
- name: test fail revert unknown snapshot
|
||||
|
@ -90,7 +90,7 @@
|
|||
- name: verify test fail revert unknown snapshot
|
||||
assert:
|
||||
that:
|
||||
- snap|failed
|
||||
- snap is failed
|
||||
- snap.msg == "snapshot not found, could not revert VM"
|
||||
|
||||
- name: test revert snapshot
|
||||
|
@ -102,7 +102,7 @@
|
|||
- name: verify test revert snapshot
|
||||
assert:
|
||||
that:
|
||||
- snap|changed
|
||||
- snap is changed
|
||||
- snap.display_name == "{{ cs_resource_prefix }}_snapshot"
|
||||
|
||||
- name: test remove snapshot in check mode
|
||||
|
@ -115,7 +115,7 @@
|
|||
- name: verify test remove snapshot in check mode
|
||||
assert:
|
||||
that:
|
||||
- snap|changed
|
||||
- snap is changed
|
||||
- snap.display_name == "{{ cs_resource_prefix }}_snapshot"
|
||||
|
||||
- name: test remove snapshot
|
||||
|
@ -127,7 +127,7 @@
|
|||
- name: verify test remove snapshot
|
||||
assert:
|
||||
that:
|
||||
- snap|changed
|
||||
- snap is changed
|
||||
- snap.display_name == "{{ cs_resource_prefix }}_snapshot"
|
||||
|
||||
- name: test remove snapshot idempotence
|
||||
|
@ -139,7 +139,7 @@
|
|||
- name: verify test remove snapshot idempotence
|
||||
assert:
|
||||
that:
|
||||
- not snap|changed
|
||||
- snap is not changed
|
||||
|
||||
- name: cleanup instance
|
||||
cs_instance:
|
||||
|
@ -149,4 +149,4 @@
|
|||
- name: verify destroy instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- vol|success
|
||||
- vol is successful
|
||||
|
||||
- name: setup instance 1
|
||||
cs_instance:
|
||||
|
@ -16,7 +16,7 @@
|
|||
- name: verify create instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: setup instance 2
|
||||
cs_instance:
|
||||
|
@ -27,7 +27,7 @@
|
|||
- name: verify create instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: test fail if missing name
|
||||
action: cs_volume
|
||||
|
@ -36,7 +36,7 @@
|
|||
- name: verify results of fail if missing name
|
||||
assert:
|
||||
that:
|
||||
- vol|failed
|
||||
- vol is failed
|
||||
- "vol.msg == 'missing required arguments: name'"
|
||||
|
||||
- name: test create volume in check mode
|
||||
|
@ -49,7 +49,7 @@
|
|||
- name: verify results test create volume in check mode
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
|
||||
- name: test create volume
|
||||
cs_volume:
|
||||
|
@ -60,7 +60,7 @@
|
|||
- name: verify results test create volume
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.size == 20 * 1024 ** 3
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
|||
- name: verify results test create volume idempotence
|
||||
assert:
|
||||
that:
|
||||
- not vol|changed
|
||||
- vol is not changed
|
||||
- vol.size == 20 * 1024 ** 3
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
|||
- name: verify results test create volume in check mode
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.size == 20 * 1024 ** 3
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
|
||||
|
@ -102,7 +102,7 @@
|
|||
- name: verify results test create volume
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.size == 10 * 1024 ** 3
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
|
||||
|
@ -116,7 +116,7 @@
|
|||
- name: verify results test create volume
|
||||
assert:
|
||||
that:
|
||||
- not vol|changed
|
||||
- vol is not changed
|
||||
- vol.size == 10 * 1024 ** 3
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
|
||||
|
@ -130,7 +130,7 @@
|
|||
- name: verify results test attach volume in check mode
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
- vol.attached is not defined
|
||||
|
||||
|
@ -143,7 +143,7 @@
|
|||
- name: verify results test attach volume
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
- vol.vm == "{{ test_cs_instance_1 }}"
|
||||
- vol.attached is defined
|
||||
|
@ -157,7 +157,7 @@
|
|||
- name: verify results test attach volume idempotence
|
||||
assert:
|
||||
that:
|
||||
- not vol|changed
|
||||
- vol is not changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
- vol.vm == "{{ test_cs_instance_1 }}"
|
||||
- vol.attached is defined
|
||||
|
@ -172,7 +172,7 @@
|
|||
- name: verify results test attach attached volume to another vm in check mode
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
- vol.vm == "{{ test_cs_instance_1 }}"
|
||||
- vol.attached is defined
|
||||
|
@ -186,7 +186,7 @@
|
|||
- name: verify results test attach attached volume to another vm
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
- vol.vm == "{{ test_cs_instance_2 }}"
|
||||
- vol.attached is defined
|
||||
|
@ -200,7 +200,7 @@
|
|||
- name: verify results test attach attached volume to another vm idempotence
|
||||
assert:
|
||||
that:
|
||||
- not vol|changed
|
||||
- vol is not changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
- vol.vm == "{{ test_cs_instance_2 }}"
|
||||
- vol.attached is defined
|
||||
|
@ -214,7 +214,7 @@
|
|||
- name: verify results test detach volume in check mdoe
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
- vol.attached is defined
|
||||
|
||||
|
@ -226,7 +226,7 @@
|
|||
- name: verify results test detach volume
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
- vol.attached is undefined
|
||||
|
||||
|
@ -238,7 +238,7 @@
|
|||
- name: verify results test detach volume idempotence
|
||||
assert:
|
||||
that:
|
||||
- not vol|changed
|
||||
- vol is not changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
- vol.attached is undefined
|
||||
|
||||
|
@ -251,7 +251,7 @@
|
|||
- name: verify results test create volume in check mode
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
|
||||
- name: test delete volume
|
||||
|
@ -262,7 +262,7 @@
|
|||
- name: verify results test create volume
|
||||
assert:
|
||||
that:
|
||||
- vol|changed
|
||||
- vol is changed
|
||||
- vol.name == "{{ cs_resource_prefix }}_vol"
|
||||
|
||||
- name: test delete volume idempotence
|
||||
|
@ -273,7 +273,7 @@
|
|||
- name: verify results test delete volume idempotence
|
||||
assert:
|
||||
that:
|
||||
- not vol|changed
|
||||
- vol is not changed
|
||||
|
||||
- name: cleanup instance 1
|
||||
cs_instance:
|
||||
|
@ -283,7 +283,7 @@
|
|||
- name: verify create instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
||||
- name: cleanup instance 2
|
||||
cs_instance:
|
||||
|
@ -293,4 +293,4 @@
|
|||
- name: verify create instance
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance is successful
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc is successful
|
||||
|
||||
- name: test fail missing name of vpc
|
||||
cs_vpc:
|
||||
|
@ -18,7 +18,7 @@
|
|||
- name: verify test fail missing name of vpc
|
||||
assert:
|
||||
that:
|
||||
- vpc|failed
|
||||
- vpc is failed
|
||||
- "vpc.msg.startswith('missing required arguments: ')"
|
||||
|
||||
- name: test fail missing cidr for vpc
|
||||
|
@ -30,7 +30,7 @@
|
|||
- name: verify test fail missing cidr for vpc
|
||||
assert:
|
||||
that:
|
||||
- vpc|failed
|
||||
- vpc is failed
|
||||
- 'vpc.msg == "state is present but all of the following are missing: cidr"'
|
||||
|
||||
- name: test fail missing vpc offering not found
|
||||
|
@ -44,7 +44,7 @@
|
|||
- name: verify test fail missing cidr for vpc
|
||||
assert:
|
||||
that:
|
||||
- vpc|failed
|
||||
- vpc is failed
|
||||
- 'vpc.msg == "VPC offering not found: does_not_exist"'
|
||||
|
||||
- name: test create vpc with custom offering in check mode
|
||||
|
@ -59,8 +59,8 @@
|
|||
- name: verify test create vpc with custom offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
|
||||
- name: test create vpc with custom offering
|
||||
cs_vpc:
|
||||
|
@ -73,8 +73,8 @@
|
|||
- name: verify test create vpc with custom offering
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc_custom"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text_custom"
|
||||
- vpc.cidr == "10.10.1.0/16"
|
||||
|
@ -90,8 +90,8 @@
|
|||
- name: verify test create vpc with custom offering idempotence
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- not vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is not changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc_custom"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text_custom"
|
||||
- vpc.cidr == "10.10.1.0/16"
|
||||
|
@ -107,8 +107,8 @@
|
|||
- name: verify test create vpc with default offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
|
||||
- name: test create vpc with default offering
|
||||
cs_vpc:
|
||||
|
@ -120,8 +120,8 @@
|
|||
- name: verify test create vpc with default offering
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -136,8 +136,8 @@
|
|||
- name: verify test create vpc with default offering idempotence
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- not vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is not changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -151,8 +151,8 @@
|
|||
- name: verify test create vpc idempotence2
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- not vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is not changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -168,8 +168,8 @@
|
|||
- name: verify test update vpc with default offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -184,8 +184,8 @@
|
|||
- name: verify test update vpc with default offering
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -200,8 +200,8 @@
|
|||
- name: verify test update vpc idempotence
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- not vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is not changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -219,8 +219,8 @@
|
|||
- name: verify test restart vpc with default offering with clean up in check mode
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -237,8 +237,8 @@
|
|||
- name: verify test restart vpc with default offering with clean up
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -254,8 +254,8 @@
|
|||
- name: verify test restart vpc with default offering without clean up
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -273,8 +273,8 @@
|
|||
- name: verify test create network in vpc in check mode
|
||||
assert:
|
||||
that:
|
||||
- vpc_net|success
|
||||
- vpc_net|changed
|
||||
- vpc_net is successful
|
||||
- vpc_net is changed
|
||||
|
||||
- name: test create network in vpc
|
||||
cs_network:
|
||||
|
@ -288,8 +288,8 @@
|
|||
- name: verify test create network in vpc
|
||||
assert:
|
||||
that:
|
||||
- vpc_net|success
|
||||
- vpc_net|changed
|
||||
- vpc_net is successful
|
||||
- vpc_net is changed
|
||||
- vpc_net.name == "{{ cs_resource_prefix }}_net_vpc"
|
||||
|
||||
- name: test create network in vpc idempotence
|
||||
|
@ -304,8 +304,8 @@
|
|||
- name: verify test create network in vpc idempotence
|
||||
assert:
|
||||
that:
|
||||
- vpc_net|success
|
||||
- not vpc_net|changed
|
||||
- vpc_net is successful
|
||||
- vpc_net is not changed
|
||||
- vpc_net.name == "{{ cs_resource_prefix }}_net_vpc"
|
||||
|
||||
- name: test create instance in vpc in check mode
|
||||
|
@ -320,8 +320,8 @@
|
|||
- name: verify test create instance in vpc in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
|
||||
- name: test create instance in vpc
|
||||
cs_instance:
|
||||
|
@ -334,8 +334,8 @@
|
|||
- name: verify test create instance in vpc
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-vpc"
|
||||
- instance.state == "Running"
|
||||
|
||||
|
@ -350,8 +350,8 @@
|
|||
- name: verify test create instance in vpc idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-vpc"
|
||||
- instance.state == "Running"
|
||||
|
||||
|
@ -375,8 +375,8 @@
|
|||
- name: verify test static nat in vpc in check mode
|
||||
assert:
|
||||
that:
|
||||
- static_nat|success
|
||||
- static_nat|changed
|
||||
- static_nat is successful
|
||||
- static_nat is changed
|
||||
|
||||
- name: test static nat in vpc
|
||||
cs_staticnat:
|
||||
|
@ -389,8 +389,8 @@
|
|||
- name: verify test static nat in vpc
|
||||
assert:
|
||||
that:
|
||||
- static_nat|success
|
||||
- static_nat|changed
|
||||
- static_nat is successful
|
||||
- static_nat is changed
|
||||
|
||||
- name: test static nat in vpc idempotence
|
||||
cs_staticnat:
|
||||
|
@ -403,8 +403,8 @@
|
|||
- name: verify test static nat in vpc idempotence
|
||||
assert:
|
||||
that:
|
||||
- static_nat|success
|
||||
- not static_nat|changed
|
||||
- static_nat is successful
|
||||
- static_nat is not changed
|
||||
|
||||
- name: test remove static nat in vpc in check mode
|
||||
cs_staticnat:
|
||||
|
@ -419,8 +419,8 @@
|
|||
- name: verify test remove static nat in vpc in check mode
|
||||
assert:
|
||||
that:
|
||||
- static_nat|success
|
||||
- static_nat|changed
|
||||
- static_nat is successful
|
||||
- static_nat is changed
|
||||
|
||||
- name: test remove static nat in vpc
|
||||
cs_staticnat:
|
||||
|
@ -434,8 +434,8 @@
|
|||
- name: verify test remove static nat in vpc
|
||||
assert:
|
||||
that:
|
||||
- static_nat|success
|
||||
- static_nat|changed
|
||||
- static_nat is successful
|
||||
- static_nat is changed
|
||||
|
||||
- name: test remove static nat in vpc idempotence
|
||||
cs_staticnat:
|
||||
|
@ -449,8 +449,8 @@
|
|||
- name: verify test remove static nat in vpc idempotence
|
||||
assert:
|
||||
that:
|
||||
- static_nat|success
|
||||
- not static_nat|changed
|
||||
- static_nat is successful
|
||||
- static_nat is not changed
|
||||
|
||||
- name: test create port forwarding in vpc in check mode
|
||||
cs_portforward:
|
||||
|
@ -466,8 +466,8 @@
|
|||
- name: verify test create port forwarding in vpc in check mode
|
||||
assert:
|
||||
that:
|
||||
- port_forward|success
|
||||
- port_forward|changed
|
||||
- port_forward is successful
|
||||
- port_forward is changed
|
||||
|
||||
- name: test create port forwarding in vpc
|
||||
cs_portforward:
|
||||
|
@ -482,8 +482,8 @@
|
|||
- name: verify test create port forwarding in vpc
|
||||
assert:
|
||||
that:
|
||||
- port_forward|success
|
||||
- port_forward|changed
|
||||
- port_forward is successful
|
||||
- port_forward is changed
|
||||
|
||||
- name: test create port forwarding in vpc idempotence
|
||||
cs_portforward:
|
||||
|
@ -498,8 +498,8 @@
|
|||
- name: verify test create port forwarding in vpc idempotence
|
||||
assert:
|
||||
that:
|
||||
- port_forward|success
|
||||
- not port_forward|changed
|
||||
- port_forward is successful
|
||||
- port_forward is not changed
|
||||
|
||||
- name: test remove port forwarding in vpc in check mode
|
||||
cs_portforward:
|
||||
|
@ -516,8 +516,8 @@
|
|||
- name: verify test remove port forwarding in vpc in check mode
|
||||
assert:
|
||||
that:
|
||||
- port_forward|success
|
||||
- port_forward|changed
|
||||
- port_forward is successful
|
||||
- port_forward is changed
|
||||
|
||||
- name: test remove port forwarding in vpc
|
||||
cs_portforward:
|
||||
|
@ -533,8 +533,8 @@
|
|||
- name: verify test remove port forwarding in vpc
|
||||
assert:
|
||||
that:
|
||||
- port_forward|success
|
||||
- port_forward|changed
|
||||
- port_forward is successful
|
||||
- port_forward is changed
|
||||
|
||||
- name: test remove port forwarding in vpc idempotence
|
||||
cs_portforward:
|
||||
|
@ -550,8 +550,8 @@
|
|||
- name: verify test remove port forwarding in vpc idempotence
|
||||
assert:
|
||||
that:
|
||||
- port_forward|success
|
||||
- not port_forward|changed
|
||||
- port_forward is successful
|
||||
- port_forward is not changed
|
||||
|
||||
- name: test remove ip address from vpc
|
||||
cs_ip_address:
|
||||
|
@ -564,8 +564,8 @@
|
|||
- name: verify test remove ip address from vpc
|
||||
assert:
|
||||
that:
|
||||
- ip_address_removed|success
|
||||
- ip_address_removed|changed
|
||||
- ip_address_removed is successful
|
||||
- ip_address_removed is changed
|
||||
|
||||
- name: test remove instance in vpc in check mdoe
|
||||
cs_instance:
|
||||
|
@ -577,8 +577,8 @@
|
|||
- name: verify test remove instance in vpc in check mode
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-vpc"
|
||||
- instance.state == "Running"
|
||||
|
||||
|
@ -591,8 +591,8 @@
|
|||
- name: verify test remove instance in vpc
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- instance|changed
|
||||
- instance is successful
|
||||
- instance is changed
|
||||
- instance.name == "{{ cs_resource_prefix }}-vm-vpc"
|
||||
- instance.state == "Running"
|
||||
|
||||
|
@ -605,8 +605,8 @@
|
|||
- name: verify test remove instance in vpc idempotence
|
||||
assert:
|
||||
that:
|
||||
- instance|success
|
||||
- not instance|changed
|
||||
- instance is successful
|
||||
- instance is not changed
|
||||
|
||||
- name: test remove network in vpc in check mode
|
||||
cs_network:
|
||||
|
@ -619,8 +619,8 @@
|
|||
- name: verify test remove network in vpc in check mode
|
||||
assert:
|
||||
that:
|
||||
- vpc_net|success
|
||||
- vpc_net|changed
|
||||
- vpc_net is successful
|
||||
- vpc_net is changed
|
||||
- vpc_net.name == "{{ cs_resource_prefix }}_net_vpc"
|
||||
|
||||
- name: test remove network in vpc
|
||||
|
@ -633,8 +633,8 @@
|
|||
- name: verify test remove network in vpc
|
||||
assert:
|
||||
that:
|
||||
- vpc_net|success
|
||||
- vpc_net|changed
|
||||
- vpc_net is successful
|
||||
- vpc_net is changed
|
||||
- vpc_net.name == "{{ cs_resource_prefix }}_net_vpc"
|
||||
|
||||
- name: test remove network in vpc idempotence
|
||||
|
@ -647,8 +647,8 @@
|
|||
- name: verify test remove network in vpc idempotence
|
||||
assert:
|
||||
that:
|
||||
- vpc_net|success
|
||||
- not vpc_net|changed
|
||||
- vpc_net is successful
|
||||
- vpc_net is not changed
|
||||
|
||||
- name: test remove vpc with default offering in check mode
|
||||
cs_vpc:
|
||||
|
@ -660,8 +660,8 @@
|
|||
- name: verify test remove vpc with default offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -675,8 +675,8 @@
|
|||
- name: verify test remove vpc with default offering
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc"
|
||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
|
||||
- vpc.cidr == "10.10.0.0/16"
|
||||
|
@ -689,8 +689,8 @@
|
|||
- name: verify test remove vpc idempotence
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- not vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is not changed
|
||||
|
||||
- name: test remove vpc with custom offering
|
||||
cs_vpc:
|
||||
|
@ -701,7 +701,7 @@
|
|||
- name: verify test remove vpc with custom offering
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc|changed
|
||||
- vpc is successful
|
||||
- vpc is changed
|
||||
- vpc.name == "{{ cs_resource_prefix }}_vpc_custom"
|
||||
- vpc.cidr == "10.10.1.0/16"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: verify setup vpc
|
||||
assert:
|
||||
that:
|
||||
- vpc|success
|
||||
- vpc is successful
|
||||
|
||||
- name: setup vpn gateway absent
|
||||
cs_vpn_gateway:
|
||||
|
@ -20,7 +20,7 @@
|
|||
- name: verify setup vpn gateway absent
|
||||
assert:
|
||||
that:
|
||||
- vpn_gateway|success
|
||||
- vpn_gateway is successful
|
||||
|
||||
- name: test fail missing param vpc for vpn gateway
|
||||
cs_vpn_gateway:
|
||||
|
@ -29,7 +29,7 @@
|
|||
- name: verify test fail missing param vpc for vpn gateway
|
||||
assert:
|
||||
that:
|
||||
- vpn_gateway|failed
|
||||
- vpn_gateway is failed
|
||||
- "vpn_gateway.msg.startswith('missing required arguments: ')"
|
||||
|
||||
- name: test create vpn gateway in check mode
|
||||
|
@ -41,8 +41,8 @@
|
|||
- name: verify test create vpn gateway in check mode
|
||||
assert:
|
||||
that:
|
||||
- vpn_gateway|success
|
||||
- vpn_gateway|changed
|
||||
- vpn_gateway is successful
|
||||
- vpn_gateway is changed
|
||||
|
||||
- name: test create vpn gateway
|
||||
cs_vpn_gateway:
|
||||
|
@ -52,8 +52,8 @@
|
|||
- name: verify test create vpn gateway
|
||||
assert:
|
||||
that:
|
||||
- vpn_gateway|success
|
||||
- vpn_gateway|changed
|
||||
- vpn_gateway is successful
|
||||
- vpn_gateway is changed
|
||||
- vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
|
||||
- name: test create vpn gateway idempotence
|
||||
|
@ -64,8 +64,8 @@
|
|||
- name: verify test create vpn gateway idempotence
|
||||
assert:
|
||||
that:
|
||||
- vpn_gateway|success
|
||||
- not vpn_gateway|changed
|
||||
- vpn_gateway is successful
|
||||
- vpn_gateway is not changed
|
||||
- vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
|
||||
- name: test remove vpn gateway in check mode
|
||||
|
@ -78,8 +78,8 @@
|
|||
- name: verify test remove vpn gateway in check mode
|
||||
assert:
|
||||
that:
|
||||
- vpn_gateway|success
|
||||
- vpn_gateway|changed
|
||||
- vpn_gateway is successful
|
||||
- vpn_gateway is changed
|
||||
- vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
|
||||
- name: test remove vpn gateway
|
||||
|
@ -91,8 +91,8 @@
|
|||
- name: verify test remove vpn gateway
|
||||
assert:
|
||||
that:
|
||||
- vpn_gateway|success
|
||||
- vpn_gateway|changed
|
||||
- vpn_gateway is successful
|
||||
- vpn_gateway is changed
|
||||
- vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc"
|
||||
|
||||
- name: test remove vpn gateway idempotence
|
||||
|
@ -104,5 +104,5 @@
|
|||
- name: verify test remove vpn gateway idempotence
|
||||
assert:
|
||||
that:
|
||||
- vpn_gateway|success
|
||||
- not vpn_gateway|changed
|
||||
- vpn_gateway is successful
|
||||
- vpn_gateway is not changed
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: verify setup zone absent
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- zone is successful
|
||||
|
||||
- name: test fail missing param
|
||||
cs_zone:
|
||||
|
@ -17,7 +17,7 @@
|
|||
- name: verify test fail missing param
|
||||
assert:
|
||||
that:
|
||||
- zone|failed
|
||||
- zone is failed
|
||||
- "zone.msg == 'missing required arguments: dns1'"
|
||||
|
||||
- name: test create zone in check mode
|
||||
|
@ -31,8 +31,8 @@
|
|||
- name: verify test create zone in check mode
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- zone|changed
|
||||
- zone is successful
|
||||
- zone is changed
|
||||
|
||||
- name: test create zone
|
||||
cs_zone:
|
||||
|
@ -44,8 +44,8 @@
|
|||
- name: verify test create zone
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- zone|changed
|
||||
- zone is successful
|
||||
- zone is changed
|
||||
- zone.dns1 == "8.8.8.8"
|
||||
- zone.dns2 == "8.8.4.4"
|
||||
- zone.internal_dns1 == "8.8.8.8"
|
||||
|
@ -66,8 +66,8 @@
|
|||
- name: verify test create zone idempotency
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- not zone|changed
|
||||
- zone is successful
|
||||
- zone is not changed
|
||||
- zone.dns1 == "8.8.8.8"
|
||||
- zone.dns2 == "8.8.4.4"
|
||||
- zone.internal_dns1 == "8.8.8.8"
|
||||
|
@ -92,8 +92,8 @@
|
|||
- name: verify test update zone in check mode
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- zone|changed
|
||||
- zone is successful
|
||||
- zone is changed
|
||||
- zone.dns1 == "8.8.8.8"
|
||||
- zone.dns2 == "8.8.4.4"
|
||||
- zone.internal_dns1 == "8.8.8.8"
|
||||
|
@ -117,8 +117,8 @@
|
|||
- name: verify test update zone
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- zone|changed
|
||||
- zone is successful
|
||||
- zone is changed
|
||||
- zone.dns1 == "8.8.8.8"
|
||||
- zone.dns2 == "8.8.4.4"
|
||||
- zone.internal_dns1 == "10.10.1.100"
|
||||
|
@ -142,8 +142,8 @@
|
|||
- name: verify test update zone idempotency
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- not zone|changed
|
||||
- zone is successful
|
||||
- zone is not changed
|
||||
- zone.dns1 == "8.8.8.8"
|
||||
- zone.dns2 == "8.8.4.4"
|
||||
- zone.internal_dns1 == "10.10.1.100"
|
||||
|
@ -163,8 +163,8 @@
|
|||
- name: verify test absent zone in check mode
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- zone|changed
|
||||
- zone is successful
|
||||
- zone is changed
|
||||
- zone.dns1 == "8.8.8.8"
|
||||
- zone.dns2 == "8.8.4.4"
|
||||
- zone.internal_dns1 == "10.10.1.100"
|
||||
|
@ -182,8 +182,8 @@
|
|||
- name: verify test absent zone
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- zone|changed
|
||||
- zone is successful
|
||||
- zone is changed
|
||||
- zone.dns1 == "8.8.8.8"
|
||||
- zone.dns2 == "8.8.4.4"
|
||||
- zone.internal_dns1 == "10.10.1.100"
|
||||
|
@ -201,5 +201,5 @@
|
|||
- name: verify test absent zone idempotency
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- not zone|changed
|
||||
- zone is successful
|
||||
- zone is not changed
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: verify setup zone is present
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- zone is successful
|
||||
|
||||
- name: get facts from zone in check mode
|
||||
cs_zone_facts:
|
||||
|
@ -19,8 +19,8 @@
|
|||
- name: verify get facts from zone in check mode
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- not zone|changed
|
||||
- zone is successful
|
||||
- zone is not changed
|
||||
- cloudstack_zone.dns1 == "8.8.8.8"
|
||||
- cloudstack_zone.dns2 == "8.8.4.4"
|
||||
- cloudstack_zone.internal_dns1 == "8.8.8.8"
|
||||
|
@ -39,8 +39,8 @@
|
|||
- name: verify get facts from zone
|
||||
assert:
|
||||
that:
|
||||
- zone|success
|
||||
- not zone|changed
|
||||
- zone is successful
|
||||
- zone is not changed
|
||||
- cloudstack_zone.dns1 == "8.8.8.8"
|
||||
- cloudstack_zone.dns2 == "8.8.4.4"
|
||||
- cloudstack_zone.internal_dns1 == "8.8.8.8"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# some dnf python files after the package is uninstalled.
|
||||
- name: uninstall python2-dnf with shell
|
||||
shell: dnf -y remove python2-dnf
|
||||
when: rpm_result|success
|
||||
when: rpm_result is successful
|
||||
|
||||
# UNINSTALL
|
||||
# With 'python2-dnf' uninstalled, the first call to 'dnf' should install
|
||||
|
@ -203,7 +203,7 @@
|
|||
- name: check non-existent rpm install failed
|
||||
assert:
|
||||
that:
|
||||
- non_existent_rpm|failed
|
||||
- non_existent_rpm is failed
|
||||
|
||||
# Install in installroot='/'. This should be identical to default
|
||||
- name: install sos in /
|
||||
|
@ -345,7 +345,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "not dnf_result.changed"
|
||||
- "dnf_result|failed"
|
||||
- "dnf_result is failed"
|
||||
|
||||
- name: verify dnf module outputs
|
||||
assert:
|
||||
|
@ -363,7 +363,7 @@
|
|||
- name: verify installation failed
|
||||
assert:
|
||||
that:
|
||||
- "dnf_result|failed"
|
||||
- "dnf_result is failed"
|
||||
- "not dnf_result.changed"
|
||||
|
||||
- name: verify dnf module outputs
|
||||
|
@ -382,7 +382,7 @@
|
|||
- name: verify installation failed
|
||||
assert:
|
||||
that:
|
||||
- "dnf_result|failed"
|
||||
- "dnf_result is failed"
|
||||
- "not dnf_result.changed"
|
||||
|
||||
- name: verify dnf module outputs
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
package:
|
||||
state: present
|
||||
name: nmap-ncat
|
||||
when: ansible_distribution == 'Fedora' or (ansible_os_family == 'RedHat' and ansible_distribution_version|version_compare(7, '>='))
|
||||
when: ansible_distribution == 'Fedora' or (ansible_os_family == 'RedHat' and ansible_distribution_version is version(7, '>='))
|
||||
|
||||
- name: Install netcat (RHEL)
|
||||
package:
|
||||
state: present
|
||||
name: nc
|
||||
when: ansible_distribution != 'Fedora' and (ansible_os_family == 'RedHat' and ansible_distribution_version|version_compare(7, '<'))
|
||||
when: ansible_distribution != 'Fedora' and (ansible_os_family == 'RedHat' and ansible_distribution_version is version(7, '<'))
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
- name: it should skip, change and create
|
||||
assert:
|
||||
that:
|
||||
- result|skipped
|
||||
- result|changed
|
||||
- result is skipped
|
||||
- result is changed
|
||||
- result.created
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
- name: it should fail with an AccessDeniedException
|
||||
assert:
|
||||
that:
|
||||
- result|failed
|
||||
- result is failed
|
||||
- '"AccessDeniedException" in result.msg'
|
||||
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
|||
- name: it should change and create
|
||||
assert:
|
||||
that:
|
||||
- result|changed
|
||||
- result is changed
|
||||
- result.created
|
||||
|
||||
|
||||
|
@ -69,8 +69,8 @@
|
|||
- name: it should not skip, should not change
|
||||
assert:
|
||||
that:
|
||||
- not result|skipped
|
||||
- not result|changed
|
||||
- result is not skipped
|
||||
- result is not changed
|
||||
|
||||
|
||||
- name: When creating a repository that already exists
|
||||
|
@ -85,7 +85,7 @@
|
|||
- name: it should not change
|
||||
assert:
|
||||
that:
|
||||
- not result|changed
|
||||
- result is not changed
|
||||
|
||||
|
||||
- name: When in check mode, and deleting a policy that does not exists
|
||||
|
@ -102,8 +102,8 @@
|
|||
- name: it should not skip and not change
|
||||
assert:
|
||||
that:
|
||||
- not result|skipped
|
||||
- not result|changed
|
||||
- result is not skipped
|
||||
- result is not changed
|
||||
|
||||
|
||||
- name: When in check mode, setting policy on a repository that has no policy
|
||||
|
@ -120,8 +120,8 @@
|
|||
- name: it should skip, change and not create
|
||||
assert:
|
||||
that:
|
||||
- result|skipped
|
||||
- result|changed
|
||||
- result is skipped
|
||||
- result is changed
|
||||
- not result.created
|
||||
|
||||
|
||||
|
@ -138,7 +138,7 @@
|
|||
- name: it should change and not create
|
||||
assert:
|
||||
that:
|
||||
- result|changed
|
||||
- result is changed
|
||||
- not result.created
|
||||
|
||||
|
||||
|
@ -156,8 +156,8 @@
|
|||
- name: it should skip, change but not create
|
||||
assert:
|
||||
that:
|
||||
- result|skipped
|
||||
- result|changed
|
||||
- result is skipped
|
||||
- result is changed
|
||||
- not result.created
|
||||
|
||||
|
||||
|
@ -174,7 +174,7 @@
|
|||
- name: it should change and not create
|
||||
assert:
|
||||
that:
|
||||
- result|changed
|
||||
- result is changed
|
||||
- not result.created
|
||||
|
||||
|
||||
|
@ -191,7 +191,7 @@
|
|||
- name: it should change and not create
|
||||
assert:
|
||||
that:
|
||||
- result|changed
|
||||
- result is changed
|
||||
- not result.created
|
||||
|
||||
|
||||
|
@ -208,7 +208,7 @@
|
|||
- name: it should not change
|
||||
assert:
|
||||
that:
|
||||
- not result|changed
|
||||
- result is not changed
|
||||
|
||||
|
||||
- name: When omitting policy on a repository that has a policy
|
||||
|
@ -223,7 +223,7 @@
|
|||
- name: it should not change
|
||||
assert:
|
||||
that:
|
||||
- not result|changed
|
||||
- result is not changed
|
||||
|
||||
|
||||
- name: When specifying both policy and delete_policy
|
||||
|
@ -241,7 +241,7 @@
|
|||
- name: it should fail
|
||||
assert:
|
||||
that:
|
||||
- result|failed
|
||||
- result is failed
|
||||
|
||||
|
||||
- name: When specifying invalid JSON for policy
|
||||
|
@ -258,7 +258,7 @@
|
|||
- name: it should fail
|
||||
assert:
|
||||
that:
|
||||
- result|failed
|
||||
- result is failed
|
||||
|
||||
|
||||
- name: When in check mode, deleting a policy that exists
|
||||
|
@ -275,8 +275,8 @@
|
|||
- name: it should skip, change and not create
|
||||
assert:
|
||||
that:
|
||||
- result|skipped
|
||||
- result|changed
|
||||
- result is skipped
|
||||
- result is changed
|
||||
- not result.created
|
||||
|
||||
|
||||
|
@ -293,7 +293,7 @@
|
|||
- name: it should change
|
||||
assert:
|
||||
that:
|
||||
- result|changed
|
||||
- result is changed
|
||||
|
||||
|
||||
- name: When in check mode, deleting a policy that does not exist
|
||||
|
@ -310,8 +310,8 @@
|
|||
- name: it should not change
|
||||
assert:
|
||||
that:
|
||||
- not result|skipped
|
||||
- not result|changed
|
||||
- result is not skipped
|
||||
- result is not changed
|
||||
|
||||
|
||||
- name: When deleting a policy that does not exist
|
||||
|
@ -327,7 +327,7 @@
|
|||
- name: it should not change
|
||||
assert:
|
||||
that:
|
||||
- not result|changed
|
||||
- result is not changed
|
||||
|
||||
always:
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "fetch_missing_nofail.msg"
|
||||
- "not fetch_missing_nofail|changed"
|
||||
- "fetch_missing_nofail is not changed"
|
||||
|
||||
- name: attempt to fetch a non-existent file - fail on missing
|
||||
fetch: src={{ output_dir }}/doesnotexist dest={{ output_dir }}/fetched fail_on_missing=yes
|
||||
|
@ -73,9 +73,9 @@
|
|||
- name: check fetch missing with failure
|
||||
assert:
|
||||
that:
|
||||
- "fetch_missing|failed"
|
||||
- "fetch_missing is failed"
|
||||
- "fetch_missing.msg"
|
||||
- "not fetch_missing|changed"
|
||||
- "fetch_missing is not changed"
|
||||
|
||||
- name: attempt to fetch a directory - should not fail but return a message
|
||||
fetch: src={{ output_dir }} dest={{ output_dir }}/somedir fail_on_missing=False
|
||||
|
@ -84,7 +84,7 @@
|
|||
- name: check fetch directory result
|
||||
assert:
|
||||
that:
|
||||
- "not fetch_dir|changed"
|
||||
- "fetch_dir is not changed"
|
||||
- "fetch_dir.msg"
|
||||
|
||||
- name: attempt to fetch a directory - should fail
|
||||
|
@ -95,7 +95,7 @@
|
|||
- name: check fetch directory result
|
||||
assert:
|
||||
that:
|
||||
- "failed_fetch_dir|failed"
|
||||
- "failed_fetch_dir is failed"
|
||||
- "fetch_dir.msg"
|
||||
|
||||
- name: create symlink to a file that we can fetch
|
||||
|
@ -134,5 +134,5 @@
|
|||
- name: check that it indeed failed
|
||||
assert:
|
||||
that:
|
||||
- "failed_fetch_dest_dir|failed"
|
||||
- "failed_fetch_dest_dir is failed"
|
||||
- "failed_fetch_dest_dir.msg"
|
||||
|
|
|
@ -20,7 +20,7 @@ Dumping the same structure to YAML, but don't pretty print
|
|||
|
||||
|
||||
From a recorded task, the changed, failed, success, and skipped
|
||||
filters are shortcuts to ask if those tasks produced changes, failed,
|
||||
tests are shortcuts to ask if those tasks produced changes, failed,
|
||||
succeeded, or skipped (as one might guess).
|
||||
|
||||
Changed = True
|
||||
|
|
|
@ -124,8 +124,7 @@
|
|||
- "'local' == ['localhost']|map('extract',hostvars,'ansible_connection')|list|first"
|
||||
- "'local' == ['localhost']|map('extract',hostvars,['ansible_connection'])|list|first"
|
||||
# map was added to jinja2 in version 2.7
|
||||
when: "{{ ( lookup('pipe', '{{ ansible_python[\"executable\"] }} -c \"import jinja2; print(jinja2.__version__)\"') |
|
||||
version_compare('2.7', '>=') ) }}"
|
||||
when: "{{ ( lookup('pipe', '{{ ansible_python[\"executable\"] }} -c \"import jinja2; print(jinja2.__version__)\"') is version('2.7', '>=') ) }}"
|
||||
|
||||
- name: Test json_query filter
|
||||
assert:
|
||||
|
@ -167,5 +166,5 @@
|
|||
- name: Verify urlsplit filter showed an error message
|
||||
assert:
|
||||
that:
|
||||
- _bad_urlsplit_filter | failed
|
||||
- _bad_urlsplit_filter is failed
|
||||
- "'unknown URL component' in _bad_urlsplit_filter.msg"
|
||||
|
|
|
@ -14,13 +14,13 @@ Dumping the same structure to YAML, but don't pretty print
|
|||
{{ some_structure | to_yaml }}
|
||||
|
||||
From a recorded task, the changed, failed, success, and skipped
|
||||
filters are shortcuts to ask if those tasks produced changes, failed,
|
||||
tests are shortcuts to ask if those tasks produced changes, failed,
|
||||
succeeded, or skipped (as one might guess).
|
||||
|
||||
Changed = {{ some_registered_var | changed }}
|
||||
Failed = {{ some_registered_var | failed }}
|
||||
Success = {{ some_registered_var | success }}
|
||||
Skipped = {{ some_registered_var | skipped }}
|
||||
Changed = {{ some_registered_var is changed }}
|
||||
Failed = {{ some_registered_var is failed }}
|
||||
Success = {{ some_registered_var is successful }}
|
||||
Skipped = {{ some_registered_var is skipped }}
|
||||
|
||||
The mandatory filter fails if a variable is not defined and returns the value.
|
||||
To avoid breaking this test, this variable is already defined.
|
||||
|
|
|
@ -111,8 +111,8 @@
|
|||
- name: Assert that the file was not downloaded
|
||||
assert:
|
||||
that:
|
||||
- "result|failed"
|
||||
- "'Failed to validate the SSL certificate' in result.msg or (result.msg | match('hostname .* doesn.t match .*'))"
|
||||
- "result is failed"
|
||||
- "'Failed to validate the SSL certificate' in result.msg or ( result.msg is match('hostname .* doesn.t match .*'))"
|
||||
- "stat_result.stat.exists == false"
|
||||
|
||||
- name: test https fetch to a site with mismatched hostname and certificate and validate_certs=no
|
||||
|
@ -156,7 +156,7 @@
|
|||
- name: Assert that hostname verification failed because SNI is not supported on this version of python
|
||||
assert:
|
||||
that:
|
||||
- 'get_url_result|failed'
|
||||
- 'get_url_result is failed'
|
||||
when: "{{ not python_has_ssl_context }}"
|
||||
|
||||
# These tests are just side effects of how the site is hosted. It's not
|
||||
|
@ -177,14 +177,14 @@
|
|||
assert:
|
||||
that:
|
||||
- 'data_result.rc == 0'
|
||||
- 'not get_url_result|failed'
|
||||
- 'get_url_result is not failed'
|
||||
when: "{{ python_has_ssl_context }}"
|
||||
|
||||
# If the client doesn't support SNI then get_url should have failed with a certificate mismatch
|
||||
- name: Assert that hostname verification failed because SNI is not supported on this version of python
|
||||
assert:
|
||||
that:
|
||||
- 'get_url_result|failed'
|
||||
- 'get_url_result is failed'
|
||||
when: "{{ not python_has_ssl_context }}"
|
||||
# End hacky SNI test section
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
that: (git_archive.results | map(attribute='changed') | unique | list)[0]
|
||||
when:
|
||||
- "ansible_os_family == 'RedHat'"
|
||||
- ansible_distribution_major_version | version_compare('7', '>=')
|
||||
- ansible_distribution_major_version is version('7', '>=')
|
||||
|
||||
- name: ARCHIVE | Check if archive file is created or not
|
||||
stat:
|
||||
|
@ -31,7 +31,7 @@
|
|||
that: (archive_check.results | map(attribute='stat.exists') | unique | list)[0]
|
||||
when:
|
||||
- "ansible_os_family == 'RedHat'"
|
||||
- ansible_distribution_major_version | version_compare('7', '>=')
|
||||
- ansible_distribution_major_version is version('7', '>=')
|
||||
|
||||
- name: ARCHIVE | Clear checkout_dir
|
||||
file:
|
||||
|
@ -60,7 +60,7 @@
|
|||
that: (git_archive.results | map(attribute='changed') | unique | list)[0]
|
||||
when:
|
||||
- "ansible_os_family == 'RedHat'"
|
||||
- ansible_distribution_major_version | version_compare('7', '>=')
|
||||
- ansible_distribution_major_version is version('7', '>=')
|
||||
|
||||
- name: ARCHIVE | Check if archive file is created or not
|
||||
stat:
|
||||
|
@ -73,4 +73,4 @@
|
|||
that: (archive_check.results | map(attribute='stat.exists') | unique | list)[0]
|
||||
when:
|
||||
- "ansible_os_family == 'RedHat'"
|
||||
- ansible_distribution_major_version | version_compare('7', '>=')
|
||||
- ansible_distribution_major_version is version('7', '>=')
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
register: clone2
|
||||
|
||||
- assert:
|
||||
that: "clone2|success"
|
||||
that: "clone2 is successful"
|
||||
|
||||
- name: CHANGE-REPO-URL | check url updated
|
||||
shell: git remote show origin | grep Fetch
|
||||
|
@ -63,7 +63,7 @@
|
|||
- name: CHANGE-REPO-URL | check repo not changed
|
||||
assert:
|
||||
that:
|
||||
- not checkout_same_url|changed
|
||||
- checkout_same_url is not changed
|
||||
|
||||
|
||||
- name: CHANGE-REPO-URL | clone repo with new url to same destination
|
||||
|
@ -75,7 +75,7 @@
|
|||
- name: CHANGE-REPO-URL | check repo changed
|
||||
assert:
|
||||
that:
|
||||
- checkout_new_url|changed
|
||||
- checkout_new_url is changed
|
||||
|
||||
|
||||
- name: CHANGE-REPO-URL | clone repo with new url in check mode
|
||||
|
@ -88,8 +88,8 @@
|
|||
- name: CHANGE-REPO-URL | check repo reported changed in check mode
|
||||
assert:
|
||||
that:
|
||||
- checkout_new_url_check_mode | changed
|
||||
when: git_version.stdout | version_compare(git_version_supporting_ls_remote, '>=')
|
||||
- checkout_new_url_check_mode is changed
|
||||
when: git_version.stdout is version(git_version_supporting_ls_remote, '>=')
|
||||
|
||||
- name: CHANGE-REPO-URL | clone repo with new url after check mode
|
||||
git:
|
||||
|
@ -100,7 +100,7 @@
|
|||
- name: CHANGE-REPO-URL | check repo still changed after check mode
|
||||
assert:
|
||||
that:
|
||||
- checkout_new_url_after_check_mode|changed
|
||||
- checkout_new_url_after_check_mode is changed
|
||||
|
||||
|
||||
# Test that checkout by branch works when the branch is not in our current repo but the sha is
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
- name: check new head
|
||||
assert:
|
||||
that:
|
||||
- not update_new_tag|changed
|
||||
- update_new_tag is not changed
|
||||
- "'newtag' in listoftags.stdout_lines"
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
- name: DEPTH | make sure the old commit was not fetched
|
||||
assert:
|
||||
that: 'checkout_early.rc != 0'
|
||||
when: git_version.stdout | version_compare(git_version_supporting_depth, '>=')
|
||||
when: git_version.stdout is version(git_version_supporting_depth, '>=')
|
||||
|
||||
# tests https://github.com/ansible/ansible/issues/14954
|
||||
- name: DEPTH | fetch repo again with depth=1
|
||||
|
@ -32,8 +32,8 @@
|
|||
register: checkout2
|
||||
|
||||
- assert:
|
||||
that: "not checkout2|changed"
|
||||
when: git_version.stdout | version_compare(git_version_supporting_depth, '>=')
|
||||
that: "checkout2 is not changed"
|
||||
when: git_version.stdout is version(git_version_supporting_depth, '>=')
|
||||
|
||||
- name: DEPTH | again try to access earlier commit
|
||||
shell: "git checkout {{git_shallow_head_1.stdout}}"
|
||||
|
@ -45,7 +45,7 @@
|
|||
- name: DEPTH | again make sure the old commit was not fetched
|
||||
assert:
|
||||
that: 'checkout_early.rc != 0'
|
||||
when: git_version.stdout | version_compare(git_version_supporting_depth, '>=')
|
||||
when: git_version.stdout is version(git_version_supporting_depth, '>=')
|
||||
|
||||
# make sure we are still able to fetch other versions
|
||||
- name: DEPTH | Clone same repo with older version
|
||||
|
@ -57,7 +57,7 @@
|
|||
register: cloneold
|
||||
|
||||
- assert:
|
||||
that: cloneold | success
|
||||
that: cloneold is successful
|
||||
|
||||
- name: DEPTH | try to access earlier commit
|
||||
shell: "git checkout {{git_shallow_head_1.stdout}}"
|
||||
|
@ -79,7 +79,7 @@
|
|||
register: cloneold
|
||||
|
||||
- assert:
|
||||
that: cloneold | success
|
||||
that: cloneold is successful
|
||||
|
||||
- name: DEPTH | clear checkout_dir
|
||||
file:
|
||||
|
@ -107,7 +107,7 @@
|
|||
|
||||
- name: DEPTH | ensure the fetch succeeded
|
||||
assert:
|
||||
that: git_fetch | success
|
||||
that: git_fetch is successful
|
||||
|
||||
|
||||
- name: DEPTH | clear checkout_dir
|
||||
|
@ -132,7 +132,7 @@
|
|||
|
||||
- name: DEPTH | ensure the fetch succeeded
|
||||
assert:
|
||||
that: git_fetch | success
|
||||
that: git_fetch is successful
|
||||
|
||||
- name: DEPTH | clear checkout_dir
|
||||
file:
|
||||
|
@ -165,7 +165,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "{{ lookup('file', checkout_dir+'/a' )}} == 3"
|
||||
- git_fetch | changed
|
||||
- git_fetch is changed
|
||||
|
||||
- name: DEPTH | clear checkout_dir
|
||||
file:
|
||||
|
|
|
@ -99,8 +99,8 @@
|
|||
- name: GPG-VERIFICATION | Check that unsigned lightweight tag verification failed
|
||||
assert:
|
||||
that:
|
||||
- git_verify|failed
|
||||
- git_verify.msg|match("Failed to verify GPG signature of commit/tag.+")
|
||||
- git_verify is failed
|
||||
- git_verify.msg is match("Failed to verify GPG signature of commit/tag.+")
|
||||
|
||||
- name: GPG-VERIFICATION | Clone repo and verify a signed commit
|
||||
environment:
|
||||
|
@ -125,8 +125,8 @@
|
|||
- name: GPG-VERIFICATION | Check that unsigned commit verification failed
|
||||
assert:
|
||||
that:
|
||||
- git_verify|failed
|
||||
- git_verify.msg|match("Failed to verify GPG signature of commit/tag.+")
|
||||
- git_verify is failed
|
||||
- git_verify.msg is match("Failed to verify GPG signature of commit/tag.+")
|
||||
|
||||
- name: GPG-VERIFICATION | Clone repo and verify a signed annotated tag
|
||||
environment:
|
||||
|
@ -151,8 +151,8 @@
|
|||
- name: GPG-VERIFICATION | Check that unsigned annotated tag verification failed
|
||||
assert:
|
||||
that:
|
||||
- git_verify|failed
|
||||
- git_verify.msg|match("Failed to verify GPG signature of commit/tag.+")
|
||||
- git_verify is failed
|
||||
- git_verify.msg is match("Failed to verify GPG signature of commit/tag.+")
|
||||
|
||||
- name: GPG-VERIFICATION | Clone repo and verify a signed branch
|
||||
environment:
|
||||
|
@ -177,8 +177,8 @@
|
|||
- name: GPG-VERIFICATION | Check that unsigned branch verification failed
|
||||
assert:
|
||||
that:
|
||||
- git_verify|failed
|
||||
- git_verify.msg|match("Failed to verify GPG signature of commit/tag.+")
|
||||
- git_verify is failed
|
||||
- git_verify.msg is match("Failed to verify GPG signature of commit/tag.+")
|
||||
|
||||
- name: GPG-VERIFICATION | Remove GnuPG verification workdir
|
||||
file:
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
- name: LOCALMODS | check fetch with localmods failed
|
||||
assert:
|
||||
that:
|
||||
- git_fetch|failed
|
||||
- git_fetch is failed
|
||||
|
||||
- name: LOCALMODS | fetch with local mods with force
|
||||
git:
|
||||
|
@ -43,7 +43,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "{{ lookup('file', checkout_dir+'/a' )}} == 2"
|
||||
- git_fetch_force|changed
|
||||
- git_fetch_force is changed
|
||||
|
||||
- name: LOCALMODS | clear checkout_dir
|
||||
file: state=absent path={{ checkout_dir }}
|
||||
|
@ -81,7 +81,7 @@
|
|||
- name: LOCALMODS | check fetch with localmods failed
|
||||
assert:
|
||||
that:
|
||||
- git_fetch|failed
|
||||
- git_fetch is failed
|
||||
|
||||
- name: LOCALMODS | fetch with local mods with force
|
||||
git:
|
||||
|
@ -96,7 +96,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "{{ lookup('file', checkout_dir+'/a' )}} == 2"
|
||||
- git_fetch_force|changed
|
||||
- git_fetch_force is changed
|
||||
|
||||
- name: LOCALMODS | clear checkout_dir
|
||||
file: state=absent path={{ checkout_dir }}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
when:
|
||||
- not gpg_version.stderr
|
||||
- gpg_version.stdout
|
||||
- git_version.stdout | version_compare("2.1.0", '>=')
|
||||
- git_version.stdout is version("2.1.0", '>=')
|
||||
- include_tasks: localmods.yml
|
||||
- include_tasks: reset-origin.yml
|
||||
- include_tasks: ambiguous-ref.yml
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- git_result | failed
|
||||
- git_result is failed
|
||||
|
||||
- name: MISSING-HOSTKEY | checkout git@github.com repo with accept_hostkey (expected pass)
|
||||
git:
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- git_result | changed
|
||||
- git_result is changed
|
||||
when: github_ssh_private_key is defined
|
||||
|
||||
- name: MISSING-HOSTKEY | clear checkout_dir
|
||||
|
@ -44,5 +44,5 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- git_result | changed
|
||||
- git_result is changed
|
||||
when: github_ssh_private_key is defined
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- git_result | changed
|
||||
- git_result is changed
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- git_result | changed
|
||||
- git_result is changed
|
||||
|
||||
- name: SPECIFIC-REVISION | check HEAD after update to revision
|
||||
command: git rev-parse HEAD
|
||||
|
@ -54,7 +54,7 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- git_result | failed
|
||||
- git_result is failed
|
||||
|
||||
# Same as the previous test, but this time we specify which ref
|
||||
# contains the SHA1
|
||||
|
@ -110,8 +110,8 @@
|
|||
assert:
|
||||
that:
|
||||
- checkout_shallow.rc != 0
|
||||
- checkout_shallow | success
|
||||
when: git_version.stdout | version_compare(git_version_supporting_depth, '>=')
|
||||
- checkout_shallow is successful
|
||||
when: git_version.stdout is version(git_version_supporting_depth, '>=')
|
||||
|
||||
- name: SPECIFIC-REVISION | clear checkout_dir
|
||||
file:
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
that:
|
||||
- "group_test1.results|map(attribute='changed')|unique|list == [False]"
|
||||
- "group_test1.results|map(attribute='state')|unique|list == ['present']"
|
||||
when: "jinja2_version.stdout|version_compare('2.6', '>=')"
|
||||
when: "jinja2_version.stdout is version('2.6', '>=')"
|
||||
|
||||
- name: validate change results for testcase 1 (jinja2 < 2.6)
|
||||
assert:
|
||||
|
@ -76,7 +76,7 @@
|
|||
- "not group_test1.results[2]['changed']"
|
||||
- "not group_test1.results[3]['changed']"
|
||||
- "not group_test1.results[4]['changed']"
|
||||
when: "jinja2_version.stdout|version_compare('2.6', '<')"
|
||||
when: "jinja2_version.stdout is version('2.6', '<')"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- iso_extract_test0|changed == true
|
||||
- iso_extract_test0 is changed == true
|
||||
|
||||
- name: Extract the iso again
|
||||
iso_extract:
|
||||
|
@ -42,11 +42,11 @@
|
|||
- name: Test iso_extract_test0_again (normal mode)
|
||||
assert:
|
||||
that:
|
||||
- iso_extract_test0_again|changed == false
|
||||
- iso_extract_test0_again is changed == false
|
||||
when: not in_check_mode
|
||||
|
||||
- name: Test iso_extract_test0_again (check-mode)
|
||||
assert:
|
||||
that:
|
||||
- iso_extract_test0_again|changed == true
|
||||
- iso_extract_test0_again is changed == true
|
||||
when: in_check_mode
|
||||
|
|
|
@ -93,9 +93,9 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- not start_equal_end| skipped
|
||||
- count_of_zero | skipped
|
||||
- not count_of_one | skipped
|
||||
- start_equal_end is not skipped
|
||||
- count_of_zero is skipped
|
||||
- count_of_one is not skipped
|
||||
|
||||
- name: test with_sequence shortcut syntax (end)
|
||||
set_fact: "{{ 'ws_z_' + item }}={{ item }}"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
- name: verify success
|
||||
assert:
|
||||
that:
|
||||
- result_success|success
|
||||
- result_success is successful
|
||||
|
||||
- name: import pkcs12 with wrong password
|
||||
local_action:
|
||||
|
@ -36,7 +36,7 @@
|
|||
- name: verify fail with wrong import password
|
||||
assert:
|
||||
that:
|
||||
- result_wrong_pass|failed
|
||||
- result_wrong_pass is failed
|
||||
|
||||
- name: test fail on mutually exclusive params
|
||||
local_action:
|
||||
|
@ -53,4 +53,4 @@
|
|||
- name: verify failed exclusive params
|
||||
assert:
|
||||
that:
|
||||
- result_excl_params|failed
|
||||
- result_excl_params is failed
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\+ *file test1")
|
||||
- result.diff.prepared | search("\+ *any any")
|
||||
- result.diff.prepared is search("\+ *file test1")
|
||||
- result.diff.prepared is search("\+ *any any")
|
||||
|
||||
- name: Rollback junos config
|
||||
junos_config:
|
||||
|
@ -69,8 +69,8 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\+ *file test1")
|
||||
- result.diff.prepared | search("\+ *any any")
|
||||
- result.diff.prepared is search("\+ *file test1")
|
||||
- result.diff.prepared is search("\+ *any any")
|
||||
|
||||
- name: teardown
|
||||
junos_config:
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\+ *disable")
|
||||
- result.diff.prepared is search("\+ *disable")
|
||||
|
||||
- name: Enable interface
|
||||
junos_interface:
|
||||
|
@ -131,7 +131,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\- *disable")
|
||||
- result.diff.prepared is search("\- *disable")
|
||||
|
||||
- name: Delete interface
|
||||
junos_interface:
|
||||
|
@ -178,15 +178,15 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("\+ *ge-0/0/1")
|
||||
- result.diff.prepared | search("\+ *description test-interface-1")
|
||||
- result.diff.prepared | search("\+ *speed 1g")
|
||||
- result.diff.prepared | search("\+ *mtu 512")
|
||||
- result.diff.prepared | search("\+ *link-mode full-duplex")
|
||||
- result.diff.prepared | search("\+ *description test-interface-2")
|
||||
- result.diff.prepared | search("\+ *speed 10m")
|
||||
- result.diff.prepared | search("\+ * mtu 256")
|
||||
- result.diff.prepared | search("\+ *link-mode full-duplex")
|
||||
- result.diff.prepared is search("\+ *ge-0/0/1")
|
||||
- result.diff.prepared is search("\+ *description test-interface-1")
|
||||
- result.diff.prepared is search("\+ *speed 1g")
|
||||
- result.diff.prepared is search("\+ *mtu 512")
|
||||
- result.diff.prepared is search("\+ *link-mode full-duplex")
|
||||
- result.diff.prepared is search("\+ *description test-interface-2")
|
||||
- result.diff.prepared is search("\+ *speed 10m")
|
||||
- result.diff.prepared is search("\+ * mtu 256")
|
||||
- result.diff.prepared is search("\+ *link-mode full-duplex")
|
||||
|
||||
- name: Set interface on aggregate (idempotent)
|
||||
junos_interface:
|
||||
|
@ -213,7 +213,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("\+ *disable")
|
||||
- result.diff.prepared is search("\+ *disable")
|
||||
|
||||
- name: Enable interface on aggregate
|
||||
junos_interface:
|
||||
|
@ -227,7 +227,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("\- *disable")
|
||||
- result.diff.prepared is search("\- *disable")
|
||||
|
||||
- name: Deactivate interface configuration on aggregate
|
||||
junos_interface:
|
||||
|
@ -242,8 +242,8 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("! *inactive[:] ge-0/0/1")
|
||||
- result.diff.prepared | search("! *inactive[:] ge-0/0/2")
|
||||
- result.diff.prepared is search("! *inactive[:] ge-0/0/1")
|
||||
- result.diff.prepared is search("! *inactive[:] ge-0/0/2")
|
||||
|
||||
- name: Activate interface configuration on aggregate
|
||||
junos_interface:
|
||||
|
@ -258,8 +258,8 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("! *active[:] ge-0/0/1")
|
||||
- result.diff.prepared | search("! *active[:] ge-0/0/2")
|
||||
- result.diff.prepared is search("! *active[:] ge-0/0/1")
|
||||
- result.diff.prepared is search("! *active[:] ge-0/0/2")
|
||||
|
||||
- name: Delete interface on aggregate
|
||||
junos_interface:
|
||||
|
@ -273,15 +273,15 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("\- *ge-0/0/1")
|
||||
- result.diff.prepared | search("\- *description test-interface-1")
|
||||
- result.diff.prepared | search("\- *speed 1g")
|
||||
- result.diff.prepared | search("\- *mtu 512")
|
||||
- result.diff.prepared | search("\- *link-mode full-duplex")
|
||||
- result.diff.prepared | search("\- *description test-interface-2")
|
||||
- result.diff.prepared | search("\- *speed 10m")
|
||||
- result.diff.prepared | search("\- * mtu 256")
|
||||
- result.diff.prepared | search("\- *link-mode full-duplex")
|
||||
- result.diff.prepared is search("\- *ge-0/0/1")
|
||||
- result.diff.prepared is search("\- *description test-interface-1")
|
||||
- result.diff.prepared is search("\- *speed 1g")
|
||||
- result.diff.prepared is search("\- *mtu 512")
|
||||
- result.diff.prepared is search("\- *link-mode full-duplex")
|
||||
- result.diff.prepared is search("\- *description test-interface-2")
|
||||
- result.diff.prepared is search("\- *speed 10m")
|
||||
- result.diff.prepared is search("\- * mtu 256")
|
||||
- result.diff.prepared is search("\- *link-mode full-duplex")
|
||||
|
||||
- name: Delete interface on aggregate (idempotent)
|
||||
junos_interface:
|
||||
|
|
|
@ -10,17 +10,17 @@
|
|||
- name: Define interface name for vSRX
|
||||
set_fact:
|
||||
intf_name: pp0
|
||||
when: result['ansible_facts']['ansible_net_model'] | search("vSRX*")
|
||||
when: result['ansible_facts']['ansible_net_model'] is search("vSRX*")
|
||||
|
||||
- name: Define interface name for vsrx
|
||||
set_fact:
|
||||
intf_name: pp0
|
||||
when: result['ansible_facts']['ansible_net_model'] | search("vsrx")
|
||||
when: result['ansible_facts']['ansible_net_model'] is search("vsrx")
|
||||
|
||||
- name: Define interface name for vQFX
|
||||
set_fact:
|
||||
intf_name: gr-0/0/0
|
||||
when: result['ansible_facts']['ansible_net_model'] | search("vqfx*")
|
||||
when: result['ansible_facts']['ansible_net_model'] is search("vqfx*")
|
||||
|
||||
- name: Check intent arguments
|
||||
junos_interface:
|
||||
|
@ -63,7 +63,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.failed == false"
|
||||
- result.diff.prepared | search("\+ *disable")
|
||||
- result.diff.prepared is search("\+ *disable")
|
||||
|
||||
- name: Config + intent (fail)
|
||||
junos_interface:
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
- "result.changed == true"
|
||||
- "'<name>1.1.1.1/32</name>' in config.xml"
|
||||
- "'<name>fd5d:12c9:2201:1::1/128</name>' in config.xml"
|
||||
- result.diff.prepared | search("\+ *address 1.1.1.1/32")
|
||||
- result.diff.prepared | search("\+ *address fd5d:12c9:2201:1::1/128")
|
||||
- result.diff.prepared is search("\+ *address 1.1.1.1/32")
|
||||
- result.diff.prepared is search("\+ *address fd5d:12c9:2201:1::1/128")
|
||||
|
||||
- name: Configure interface address (idempotent)
|
||||
junos_l3_interface:
|
||||
|
@ -65,8 +65,8 @@
|
|||
that:
|
||||
- "result.changed == true"
|
||||
- "'<address inactive=\"inactive\">' in config.xml"
|
||||
- result.diff.prepared | search("! *inactive[:] address 1.1.1.1/32")
|
||||
- result.diff.prepared | search("! *inactive[:] address fd5d:12c9:2201:1::1/128")
|
||||
- result.diff.prepared is search("! *inactive[:] address 1.1.1.1/32")
|
||||
- result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:1::1/128")
|
||||
|
||||
- name: Activate interface address
|
||||
junos_l3_interface:
|
||||
|
@ -81,8 +81,8 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("! *active[:] address 1.1.1.1/32")
|
||||
- result.diff.prepared | search("! *active[:] address fd5d:12c9:2201:1::1/128")
|
||||
- result.diff.prepared is search("! *active[:] address 1.1.1.1/32")
|
||||
- result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:1::1/128")
|
||||
|
||||
- name: Delete interface address
|
||||
junos_l3_interface:
|
||||
|
@ -95,8 +95,8 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- result.diff.prepared | search("\- *address 1.1.1.1/32")
|
||||
- result.diff.prepared | search("\- *address fd5d:12c9:2201:1::1/128")
|
||||
- result.diff.prepared is search("\- *address 1.1.1.1/32")
|
||||
- result.diff.prepared is search("\- *address fd5d:12c9:2201:1::1/128")
|
||||
|
||||
- name: Delete interface address (idempotent)
|
||||
junos_l3_interface:
|
||||
|
@ -145,13 +145,13 @@
|
|||
that:
|
||||
- 'result.changed == true'
|
||||
- "'edit interfaces ge-0/0/1 unit 0 family inet' in result.diff.prepared"
|
||||
- result.diff.prepared | search("\+ *address 1.1.1.1/32")
|
||||
- result.diff.prepared is search("\+ *address 1.1.1.1/32")
|
||||
- "'edit interfaces ge-0/0/1 unit 0 family inet6' in result.diff.prepared"
|
||||
- result.diff.prepared | search("\+ *address fd5d:12c9:2201:1::1/128")
|
||||
- result.diff.prepared is search("\+ *address fd5d:12c9:2201:1::1/128")
|
||||
- "'edit interfaces ge-0/0/2 unit 0 family inet' in result.diff.prepared"
|
||||
- result.diff.prepared | search("\+ *address 2.2.2.2/32")
|
||||
- result.diff.prepared is search("\+ *address 2.2.2.2/32")
|
||||
- "'edit interfaces ge-0/0/2 unit 0 family inet6' in result.diff.prepared"
|
||||
- result.diff.prepared | search("\+ *address fd5d:12c9:2201:2::2/128")
|
||||
- result.diff.prepared is search("\+ *address fd5d:12c9:2201:2::2/128")
|
||||
|
||||
- name: Configure l3 interface in aggregate (idempotent)
|
||||
junos_l3_interface:
|
||||
|
@ -186,10 +186,10 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("! *inactive[:] address 1.1.1.1/32")
|
||||
- result.diff.prepared | search("! *inactive[:] address fd5d:12c9:2201:1::1/128")
|
||||
- result.diff.prepared | search("! *inactive[:] address 2.2.2.2/32")
|
||||
- result.diff.prepared | search("! *inactive[:] address fd5d:12c9:2201:2::2/128")
|
||||
- result.diff.prepared is search("! *inactive[:] address 1.1.1.1/32")
|
||||
- result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:1::1/128")
|
||||
- result.diff.prepared is search("! *inactive[:] address 2.2.2.2/32")
|
||||
- result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:2::2/128")
|
||||
|
||||
- name: Activate l3 interface configuration
|
||||
junos_l3_interface:
|
||||
|
@ -207,10 +207,10 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("! *active[:] address 1.1.1.1/32")
|
||||
- result.diff.prepared | search("! *active[:] address fd5d:12c9:2201:1::1/128")
|
||||
- result.diff.prepared | search("! *active[:] address 2.2.2.2/32")
|
||||
- result.diff.prepared | search("! *active[:] address fd5d:12c9:2201:2::2/128")
|
||||
- result.diff.prepared is search("! *active[:] address 1.1.1.1/32")
|
||||
- result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:1::1/128")
|
||||
- result.diff.prepared is search("! *active[:] address 2.2.2.2/32")
|
||||
- result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:2::2/128")
|
||||
|
||||
- name: Delete l3 interface configuration
|
||||
junos_l3_interface:
|
||||
|
@ -229,13 +229,13 @@
|
|||
that:
|
||||
- 'result.changed == true'
|
||||
- "'edit interfaces ge-0/0/1 unit 0 family inet' in result.diff.prepared"
|
||||
- result.diff.prepared | search("\- *address 1.1.1.1/32")
|
||||
- result.diff.prepared is search("\- *address 1.1.1.1/32")
|
||||
- "'edit interfaces ge-0/0/1 unit 0 family inet6' in result.diff.prepared"
|
||||
- result.diff.prepared | search("\- *address fd5d:12c9:2201:1::1/128")
|
||||
- result.diff.prepared is search("\- *address fd5d:12c9:2201:1::1/128")
|
||||
- "'edit interfaces ge-0/0/2 unit 0 family inet' in result.diff.prepared"
|
||||
- result.diff.prepared | search("\- *address 2.2.2.2/32")
|
||||
- result.diff.prepared is search("\- *address 2.2.2.2/32")
|
||||
- "'edit interfaces ge-0/0/2 unit 0 family inet6' in result.diff.prepared"
|
||||
- result.diff.prepared | search("\- *address fd5d:12c9:2201:2::2/128")
|
||||
- result.diff.prepared is search("\- *address fd5d:12c9:2201:2::2/128")
|
||||
|
||||
- name: Delete l3 interface configuration (idempotent)
|
||||
junos_l3_interface:
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\+ *disable")
|
||||
- result.diff.prepared is search("\+ *disable")
|
||||
|
||||
- name: Enable linkagg interface
|
||||
junos_linkagg:
|
||||
|
@ -140,7 +140,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\- *disable")
|
||||
- result.diff.prepared is search("\- *disable")
|
||||
|
||||
- name: Deactivate linkagg
|
||||
junos_linkagg:
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\+ *advertisement-interval 10")
|
||||
- result.diff.prepared | search("\+ *transmit-delay 2")
|
||||
- result.diff.prepared | search("\+ *hold-multiplier 5")
|
||||
- result.diff.prepared is search("\+ *advertisement-interval 10")
|
||||
- result.diff.prepared is search("\+ *transmit-delay 2")
|
||||
- result.diff.prepared is search("\+ *hold-multiplier 5")
|
||||
|
||||
- name: configure lldp parameters and enable lldp(idempotent)
|
||||
junos_lldp:
|
||||
|
@ -67,7 +67,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\+ *disable")
|
||||
- result.diff.prepared is search("\+ *disable")
|
||||
- "'advertisement-interval 10;' not in result.diff.prepared"
|
||||
- "'transmit-delay 2;' not in result.diff.prepared"
|
||||
- "'hold-multiplier 5;' not in result.diff.prepared"
|
||||
|
@ -84,7 +84,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\- *disable")
|
||||
- result.diff.prepared is search("\- *disable")
|
||||
- "'advertisement-interval 10;' not in result.diff.prepared"
|
||||
- "'transmit-delay 2;' not in result.diff.prepared"
|
||||
- "'hold-multiplier 5;' not in result.diff.prepared"
|
||||
|
@ -101,10 +101,10 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\+ *disable")
|
||||
- result.diff.prepared | search("\- *advertisement-interval 10")
|
||||
- result.diff.prepared | search("\- *transmit-delay 2")
|
||||
- result.diff.prepared | search("\- *hold-multiplier 5")
|
||||
- result.diff.prepared is search("\+ *disable")
|
||||
- result.diff.prepared is search("\- *advertisement-interval 10")
|
||||
- result.diff.prepared is search("\- *transmit-delay 2")
|
||||
- result.diff.prepared is search("\- *hold-multiplier 5")
|
||||
|
||||
- name: Remove lldp (idempotent)
|
||||
junos_lldp:
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\+ *interface ge-0/0/5")
|
||||
- result.diff.prepared is search("\+ *interface ge-0/0/5")
|
||||
|
||||
- name: lldp interface configuration (idempotent)
|
||||
junos_lldp_interface:
|
||||
|
@ -41,7 +41,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("! *inactive[:] interface ge-0/0/5")
|
||||
- result.diff.prepared is search("! *inactive[:] interface ge-0/0/5")
|
||||
|
||||
- name: Activate lldp interface configuration
|
||||
junos_lldp_interface:
|
||||
|
@ -54,7 +54,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("! *active[:] interface ge-0/0/5")
|
||||
- result.diff.prepared is search("! *active[:] interface ge-0/0/5")
|
||||
|
||||
- name: Disable lldp on particular interface
|
||||
junos_lldp_interface:
|
||||
|
@ -66,7 +66,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\+ *disable")
|
||||
- result.diff.prepared is search("\+ *disable")
|
||||
|
||||
- name: Enable lldp on particular interface
|
||||
junos_lldp_interface:
|
||||
|
@ -78,7 +78,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\- *disable")
|
||||
- result.diff.prepared is search("\- *disable")
|
||||
|
||||
- name: Delete lldp on particular interface
|
||||
junos_lldp_interface:
|
||||
|
@ -90,7 +90,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result.diff.prepared | search("\- *interface ge-0/0/5")
|
||||
- result.diff.prepared is search("\- *interface ge-0/0/5")
|
||||
|
||||
- name: Delete lldp on particular interface (idempotent)
|
||||
junos_lldp_interface:
|
||||
|
|
|
@ -316,10 +316,10 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("\+ *file test-1")
|
||||
- result.diff.prepared | search("\+ *pfe critical")
|
||||
- result.diff.prepared | search("\+ *file test-2")
|
||||
- result.diff.prepared | search("\+ *kernel emergency")
|
||||
- result.diff.prepared is search("\+ *file test-1")
|
||||
- result.diff.prepared is search("\+ *pfe critical")
|
||||
- result.diff.prepared is search("\+ *file test-2")
|
||||
- result.diff.prepared is search("\+ *kernel emergency")
|
||||
|
||||
- name: Deactivate file logging configuration using aggregate
|
||||
junos_logging:
|
||||
|
@ -339,10 +339,10 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("! *inactive[:] file test-1")
|
||||
- result.diff.prepared | search("! *inactive[:] pfe")
|
||||
- result.diff.prepared | search("! *inactive[:] file test-2")
|
||||
- result.diff.prepared | search("! *inactive[:] kernel")
|
||||
- result.diff.prepared is search("! *inactive[:] file test-1")
|
||||
- result.diff.prepared is search("! *inactive[:] pfe")
|
||||
- result.diff.prepared is search("! *inactive[:] file test-2")
|
||||
- result.diff.prepared is search("! *inactive[:] kernel")
|
||||
|
||||
- name: activate file logging configuration using aggregate
|
||||
junos_logging:
|
||||
|
@ -356,10 +356,10 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("! *active[:] file test-1")
|
||||
- result.diff.prepared | search("! *active[:] pfe")
|
||||
- result.diff.prepared | search("! *active[:] file test-2")
|
||||
- result.diff.prepared | search("! *active[:] kernel")
|
||||
- result.diff.prepared is search("! *active[:] file test-1")
|
||||
- result.diff.prepared is search("! *active[:] pfe")
|
||||
- result.diff.prepared is search("! *active[:] file test-2")
|
||||
- result.diff.prepared is search("! *active[:] kernel")
|
||||
|
||||
- name: Delete file logging using aggregate
|
||||
junos_logging:
|
||||
|
@ -373,10 +373,10 @@
|
|||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- result.diff.prepared | search("\- *file test-1")
|
||||
- result.diff.prepared | search("\- *pfe critical")
|
||||
- result.diff.prepared | search("\- *file test-2")
|
||||
- result.diff.prepared | search("\- *kernel emergency")
|
||||
- result.diff.prepared is search("\- *file test-1")
|
||||
- result.diff.prepared is search("\- *pfe critical")
|
||||
- result.diff.prepared is search("\- *file test-2")
|
||||
- result.diff.prepared is search("\- *kernel emergency")
|
||||
|
||||
- name: Delete file logging using aggregate (idempotent)
|
||||
junos_logging:
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue