mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
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:
parent
529cd19ca5
commit
d8ba8c03f3
105 changed files with 1236 additions and 1052 deletions
|
@ -70,7 +70,8 @@
|
|||
- name: Verify add_binding
|
||||
assert:
|
||||
that:
|
||||
- cm_add_binding.changed == nm_add_binding.changed == true
|
||||
- cm_add_binding is changed
|
||||
- nm_add_binding is changed
|
||||
- 'cm_add_binding.sent == nm_add_binding.sent == {"infraRsDomP": {"attributes": {"tDn": "uni/phys-phys_dom"}}}'
|
||||
- 'cm_add_binding.proposed == nm_add_binding.proposed == {"infraRsDomP": {"attributes": {"tDn": "uni/phys-phys_dom"}}}'
|
||||
- cm_add_binding.current == cm_add_binding.previous == nm_add_binding.previous == []
|
||||
|
@ -88,7 +89,8 @@
|
|||
- name: Verify add_binding_again
|
||||
assert:
|
||||
that:
|
||||
- cm_add_binding_again.changed == nm_add_binding_again.changed == false
|
||||
- cm_add_binding_again is not changed
|
||||
- nm_add_binding_again is not changed
|
||||
|
||||
|
||||
# QUERY ALL BINDINGS
|
||||
|
@ -112,7 +114,8 @@
|
|||
- name: Verify query_all_bindings
|
||||
assert:
|
||||
that:
|
||||
- cm_query_all_bindings.changed == nm_query_all_bindings.changed == false
|
||||
- cm_query_all_bindings is not changed
|
||||
- nm_query_all_bindings is not changed
|
||||
- cm_query_all_bindings == nm_query_all_bindings
|
||||
- nm_query_all_bindings.current|length >= 1
|
||||
|
||||
|
@ -138,7 +141,8 @@
|
|||
- name: Verify query_binding
|
||||
assert:
|
||||
that:
|
||||
- cm_query_binding.changed == nm_query_binding.changed == false
|
||||
- cm_query_binding is not changed
|
||||
- nm_query_binding is not changed
|
||||
- cm_query_binding == nm_query_binding
|
||||
- nm_query_binding.current.0.infraRsDomP.attributes.dn == 'uni/infra/attentp-test_aep/rsdomP-[uni/phys-phys_dom]'
|
||||
- nm_query_binding.current.0.infraRsDomP.attributes.tCl == 'physDomP'
|
||||
|
@ -158,7 +162,8 @@
|
|||
- name: Verify remove_binding
|
||||
assert:
|
||||
that:
|
||||
- cm_remove_binding.changed == nm_remove_binding.changed == true
|
||||
- cm_remove_binding is changed
|
||||
- nm_remove_binding is changed
|
||||
- 'cm_remove_binding.current == cm_remove_binding.previous == nm_remove_binding.previous == [{"infraRsDomP": {"attributes": {"dn": "uni/infra/attentp-test_aep/rsdomP-[uni/phys-phys_dom]", "tDn": "uni/phys-phys_dom"}}}]'
|
||||
- nm_remove_binding.current == []
|
||||
|
||||
|
@ -174,7 +179,8 @@
|
|||
- name: Verify remove_binding_again
|
||||
assert:
|
||||
that:
|
||||
- cm_remove_binding_again.changed == nm_remove_binding_again.changed == false
|
||||
- cm_remove_binding_again is not changed
|
||||
- nm_remove_binding_again is not changed
|
||||
|
||||
|
||||
# QUERY NON-EXISTING BINDING
|
||||
|
@ -198,6 +204,7 @@
|
|||
- name: Verify query_non_binding
|
||||
assert:
|
||||
that:
|
||||
- cm_query_non_binding.changed == nm_query_non_binding.changed == false
|
||||
- cm_query_non_binding is not changed
|
||||
- nm_query_non_binding is not changed
|
||||
- cm_query_non_binding == nm_query_non_binding
|
||||
- nm_query_non_binding.current == []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue