summaryrefslogtreecommitdiff
path: root/test/integration/targets/aci_switch_leaf_selector
diff options
context:
space:
mode:
authorDag Wieers <dag@wieers.com>2018-02-03 00:41:56 +0100
committerGitHub <noreply@github.com>2018-02-03 00:41:56 +0100
commitbee765fa6b065b7a85a73057415cb3264592c2e4 (patch)
tree701a2c858790c4344de1563f0bb49c7800dde8cc /test/integration/targets/aci_switch_leaf_selector
parent685dd5e8b4f0462571e2a8eabf367da694935178 (diff)
downloadansible-bee765fa6b065b7a85a73057415cb3264592c2e4.tar.gz
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
Diffstat (limited to 'test/integration/targets/aci_switch_leaf_selector')
-rw-r--r--test/integration/targets/aci_switch_leaf_selector/tasks/main.yml17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/integration/targets/aci_switch_leaf_selector/tasks/main.yml b/test/integration/targets/aci_switch_leaf_selector/tasks/main.yml
index 4240489766..0fd5596bc8 100644
--- a/test/integration/targets/aci_switch_leaf_selector/tasks/main.yml
+++ b/test/integration/targets/aci_switch_leaf_selector/tasks/main.yml
@@ -27,6 +27,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
leaf_profile: sw_name_test
state: present
register: leaf_profile_present
@@ -65,12 +66,12 @@
that:
- sw_leaf_selec_check_mode_present.changed == true
- sw_leaf_selec_present.changed == true
- - sw_leaf_selec_present.existing == []
- - 'sw_leaf_selec_present.config == {"infraLeafS": {"attributes": {"name": "leaf_selector_name"}, "children": [{"infraNodeBlk": {"attributes": {"from_": "1011", "name": "node_blk_name", "to_": "1011"}}},{"infraRsAccNodePGrp": {"attributes": {"tDn": "uni/infra/funcprof/accnodepgrp-None"}}}]}}'
+ - sw_leaf_selec_present.previous == []
+ - 'sw_leaf_selec_present.sent == {"infraLeafS": {"attributes": {"name": "leaf_selector_name"}, "children": [{"infraNodeBlk": {"attributes": {"from_": "1011", "name": "node_blk_name", "to_": "1011"}}},{"infraRsAccNodePGrp": {"attributes": {"tDn": "uni/infra/funcprof/accnodepgrp-None"}}}]}}'
- sw_leaf_selec_idempotent.changed == false
- - sw_leaf_selec_idempotent.config == {}
+ - sw_leaf_selec_idempotent.sent == {}
- sw_leaf_selec_update.changed == true
- - 'sw_leaf_selec_update.config == {"infraLeafS": {"attributes": {},"children": [{"infraRsAccNodePGrp": {"attributes": {"tDn": "uni/infra/funcprof/accnodepgrp-anstest_policygroupname"}}}]}}'
+ - 'sw_leaf_selec_update.sent == {"infraLeafS": {"attributes": {},"children": [{"infraRsAccNodePGrp": {"attributes": {"tDn": "uni/infra/funcprof/accnodepgrp-anstest_policygroupname"}}}]}}'
- name: Query Specific switch policy leaf profile selector
aci_switch_leaf_selector:
@@ -83,7 +84,7 @@
assert:
that:
- binding_query.changed == false
- - binding_query.existing | length >= 1
+ - binding_query.previous | length >= 1
- '"api/mo/uni/infra/nprof-sw_name_test/leaves-leaf_selector_name-typ-range.json" in binding_query.url'
- name: Remove binding of interface access port selector and Interface Policy Leaf Profile - check mode
@@ -116,11 +117,11 @@
assert:
that:
- sw_leaf_selec_check_mode_absent.changed == true
- - sw_leaf_selec_check_mode_absent.existing != []
+ - sw_leaf_selec_check_mode_absent.previous != []
- sw_leaf_selec_absent.changed == true
- - sw_leaf_selec_absent.existing == sw_leaf_selec_check_mode_absent.existing
+ - sw_leaf_selec_absent.previous == sw_leaf_selec_check_mode_absent.previous
- sw_leaf_selec_absent_idempotent.changed == false
- - sw_leaf_selec_absent_idempotent.existing == []
+ - sw_leaf_selec_absent_idempotent.previous == []
- sw_leaf_selec_absent_missing_param.failed == true
- 'sw_leaf_selec_absent_missing_param.msg == "state is absent but all of the following are missing: leaf"'