mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
ACI: Change RETURN output as discussed (#35617)
* ACI: Change result output as discussed * Update all modules to use new aci.exit_json() * Update output_level spec and docs * Fix integration tests * Small PEP8 fix * Asorted fixes to tests and aci_rest * More test fixes and support for ANSIBLE_DEBUG * Fix another PEP8 issues * Move response handling inside ACI module * Reform of ACI error handling and error output * Diff multiline json output * Fix a few more tests * Revert aci_bd tests * Small correction * UI change: existing->current, original->previous * UI change: config->sent * Update all modules with RETURN values * Fix a few more tests * Improve docstring and add 'raw' return value * Fix thinko * Fix sanity/pep8 issues * Rewrite unit tests to comply with new design
This commit is contained in:
parent
685dd5e8b4
commit
bee765fa6b
73 changed files with 5733 additions and 747 deletions
|
@ -16,6 +16,7 @@
|
|||
validate_certs: '{{ aci_validate_certs | default(false) }}'
|
||||
use_ssl: '{{ aci_use_ssl | default(true) }}'
|
||||
use_proxy: '{{ aci_use_proxy | default(true) }}'
|
||||
output_level: debug
|
||||
state: present
|
||||
tenant: anstest
|
||||
register: tenant_present
|
||||
|
@ -94,15 +95,15 @@
|
|||
assert:
|
||||
that:
|
||||
- provide_present_check_mode.changed == true
|
||||
- 'provide_present_check_mode.config == {"fvRsProv": {"attributes": {"tnVzBrCPName": "anstest_http"}}}'
|
||||
- 'provide_present_check_mode.sent == {"fvRsProv": {"attributes": {"tnVzBrCPName": "anstest_http"}}}'
|
||||
- provide_present.changed == true
|
||||
- provide_present.config == provide_present_check_mode.config
|
||||
- provide_present.existing == []
|
||||
- provide_present.sent == provide_present_check_mode.sent
|
||||
- provide_present.previous == []
|
||||
- consume_present.changed == true
|
||||
- consume_present.existing == []
|
||||
- 'consume_present.config == {"fvRsCons": {"attributes": {"tnVzBrCPName": "anstest_db"}}}'
|
||||
- consume_present.previous == []
|
||||
- 'consume_present.sent == {"fvRsCons": {"attributes": {"tnVzBrCPName": "anstest_db"}}}'
|
||||
- provide_present2.changed == true
|
||||
- provide_present2.existing == []
|
||||
- provide_present2.previous == []
|
||||
- missing_param_present.failed == true
|
||||
- 'missing_param_present.msg == "state is present but all of the following are missing: ap, contract, epg"'
|
||||
- missing_required_present.failed == true
|
||||
|
@ -141,10 +142,10 @@
|
|||
assert:
|
||||
that:
|
||||
- query_provide_contract.changed == false
|
||||
- query_provide_contract.existing != []
|
||||
- query_provide_contract.previous != []
|
||||
- '"class/fvRsProv.json" in query_provide_contract.url'
|
||||
- query_consume_contract.changed == false
|
||||
- query_consume_contract.existing != []
|
||||
- query_consume_contract.previous != []
|
||||
- '"class/fvRsCons.json" in query_consume_contract.url'
|
||||
- query_all.changed == false
|
||||
- '"class/fvRsProv.json" in query_all.url'
|
||||
|
@ -198,14 +199,14 @@
|
|||
assert:
|
||||
that:
|
||||
- consume_absent_check_mode.changed == true
|
||||
- consume_absent_check_mode.existing.0.fvRsCons is defined
|
||||
- consume_absent_check_mode.previous.0.fvRsCons is defined
|
||||
- consume_absent.changed == true
|
||||
- consume_absent.existing == consume_absent_check_mode.existing
|
||||
- consume_absent.previous == consume_absent_check_mode.previous
|
||||
- provide_absent.changed == true
|
||||
- provide_absent.existing.0.fvRsProv is defined
|
||||
- provide_absent.previous.0.fvRsProv is defined
|
||||
- provide_absent2.changed == true
|
||||
- consume_absent_idempotent.changed == false
|
||||
- consume_absent_idempotent.existing == []
|
||||
- consume_absent_idempotent.previous == []
|
||||
- missing_param_absent.failed == true
|
||||
- 'missing_param_absent.msg == "state is absent but all of the following are missing: contract"'
|
||||
- missing_required_absent.failed == true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue