ACI: Avoid using 'previous' with query operations (#36181)

When ACI modules are being used for querying MOs, we should not return
the previous state, as there is no previous state, there's only the
current state.

This impacts a lot of tests that were used to testing the current state
as 'previous'.
This commit is contained in:
Dag Wieers 2018-02-14 23:07:07 +01:00 committed by GitHub
commit dba561efa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 142 additions and 140 deletions

View file

@ -158,7 +158,7 @@
that:
- get_all_pools.changed == false
- get_all_pools.method == "GET"
- get_all_pools.previous | length > 1
- get_all_pools.current | length > 1
- name: get created static vlan pool - get mo works
aci_encap_pool:
@ -171,9 +171,9 @@
that:
- get_static_pool.changed == false
- get_static_pool.method == "GET"
- get_static_pool.previous | length == 1
- get_static_pool.previous.0.fvnsVlanInstP.attributes.allocMode == "static"
- get_static_pool.previous.0.fvnsVlanInstP.attributes.name == "anstest"
- get_static_pool.current | length == 1
- get_static_pool.current.0.fvnsVlanInstP.attributes.allocMode == "static"
- get_static_pool.current.0.fvnsVlanInstP.attributes.name == "anstest"
- name: get created dynamic vlan pool - get mo works
aci_encap_pool:
@ -186,9 +186,9 @@
that:
- get_dynamic_pool.changed == false
- get_dynamic_pool.method == "GET"
- get_dynamic_pool.previous | length == 1
- get_dynamic_pool.previous.0.fvnsVlanInstP.attributes.allocMode == "dynamic"
- get_dynamic_pool.previous.0.fvnsVlanInstP.attributes.name == "anstest"
- get_dynamic_pool.current | length == 1
- get_dynamic_pool.current.0.fvnsVlanInstP.attributes.allocMode == "dynamic"
- get_dynamic_pool.current.0.fvnsVlanInstP.attributes.name == "anstest"
- name: get created dynamic vlan pool - get mo works
aci_encap_pool:

View file

@ -97,7 +97,7 @@
assert:
that:
- query_vxlan.changed == false
- query_vxlan.previous | length == 1
- query_vxlan.current | length == 1
- '"infra/vxlanns-anstest.json" in query_vxlan.url'
- name: get created static vlan pool - get class works
@ -110,7 +110,7 @@
assert:
that:
- query_vxlan_all.changed == false
- query_vxlan_all.previous | length > 1
- query_vxlan_all.current | length > 1
- '"class/fvnsVxlanInstP.json" in query_vxlan_all.url'
- name: delete vxlan pool - check mode works