ACI: Make querying links and nodes possible (#43441)

This functionality was not considered when the module was written, but
there's no reason why it shouldn't be supported.

We had to rework the query string construction and object filtering.
This new functionality allows to filter on arbitrary keys and supports
None values.

This PR fixes various issues with the existing framework, including
querying specific objects using construct_url_4 (i.e.
aci_epg_to_contract and aci_static_binding_to_epg)
This commit is contained in:
Dag Wieers 2018-08-07 23:54:54 +02:00 committed by GitHub
commit d8ba8c03f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
105 changed files with 1236 additions and 1052 deletions

View file

@ -65,13 +65,13 @@
- name: present assertions
assert:
that:
- sw_leaf_selec_check_mode_present.changed == true
- sw_leaf_selec_present.changed == true
- sw_leaf_selec_check_mode_present is changed
- sw_leaf_selec_present is changed
- 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 is not changed
- sw_leaf_selec_idempotent.sent == {}
- sw_leaf_selec_update.changed == true
- sw_leaf_selec_update is changed
- '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
@ -84,7 +84,7 @@
- name: present assertions
assert:
that:
- binding_query.changed == false
- binding_query is not changed
- binding_query.current | length >= 1
- '"api/mo/uni/infra/nprof-sw_name_test/leaves-leaf_selector_name-typ-range.json" in binding_query.url'
@ -117,13 +117,13 @@
- name: absent assertions
assert:
that:
- sw_leaf_selec_check_mode_absent.changed == true
- sw_leaf_selec_check_mode_absent is changed
- sw_leaf_selec_check_mode_absent.previous != []
- sw_leaf_selec_absent.changed == true
- sw_leaf_selec_absent is changed
- sw_leaf_selec_absent.previous == sw_leaf_selec_check_mode_absent.previous
- sw_leaf_selec_absent_idempotent.changed == false
- sw_leaf_selec_absent_idempotent is not changed
- sw_leaf_selec_absent_idempotent.previous == []
- sw_leaf_selec_absent_missing_param.failed == true
- sw_leaf_selec_absent_missing_param is failed
- 'sw_leaf_selec_absent_missing_param.msg == "state is absent but all of the following are missing: leaf"'