aci_encap_pool: Standardize on 'pool_allocation_mode' (#36215)

This commit is contained in:
Dag Wieers 2018-02-15 02:59:54 +01:00 committed by GitHub
commit e431d578da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 28 deletions

View file

@ -9,10 +9,10 @@
when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
- include_tasks: vlan.yml
when: "vlan is not defined or (vlan is defined and vlan == 'True')"
when: vlan is not defined or vlan
- include_tasks: vxlan.yml
when: "vxlan is not defined or (vxlan is defined and vxlan == 'True')"
when: vxlan is not defined or vxlan
- include_tasks: vsan.yml
when: "vsan is not defined or (vsan is defined and vsan == 'True')"
when: vsan is not defined or vsan

View file

@ -11,12 +11,12 @@
state: absent
pool: anstest
pool_type: vlan
allocation_mode: static
pool_allocation_mode: static
- name: ensure vlan pool does not exist for tests to kick off
aci_encap_pool: &aci_pool_absent_dynamic
<<: *aci_pool_absent_static
allocation_mode: dynamic
pool_allocation_mode: dynamic
- name: create static vlan pool - check mode works
aci_encap_pool: &aci_pool_present_static
@ -109,7 +109,7 @@
- name: missing param - failure message works
aci_encap_pool:
<<: *aci_pool_present_dynamic
allocation_mode: "{{ fake_var | default(omit) }}"
pool_allocation_mode: "{{ fake_var | default(omit) }}"
ignore_errors: yes
register: vlan_alloc_fail
@ -117,7 +117,7 @@
assert:
that:
- vlan_alloc_fail.failed == true
- 'vlan_alloc_fail.msg == "ACI requires the \"allocation_mode\" for \"pool_type\" of \"vlan\" and \"vsan\" when the \"pool\" is provided"'
- "vlan_alloc_fail.msg == 'ACI requires parameter \\'pool_allocation_mode\\' for \\'pool_type\\' of \\'vlan\\' and \\'vsan\\' when parameter \\'pool\\' is provided'"
- name: missing param - failure message works
aci_encap_pool:
@ -150,7 +150,7 @@
<<: *aci_pool_absent_static
state: query
pool: "{{ fake_var | default(omit) }}"
allocation_mode: "{{ fake_var | default(omit) }}"
pool_allocation_mode: "{{ fake_var | default(omit) }}"
register: get_all_pools
- name: assertion test - query

View file

@ -10,4 +10,4 @@
state: absent
pool: anstest
pool_type: vsan
allocation_mode: static
pool_allocation_mode: static

View file

@ -73,11 +73,11 @@
that:
- create_vxlan_2.changed == true
- name: create vxlan pool with allocation mode - failure message works
- name: create vxlan pool with pool allocation mode - failure message works
aci_encap_pool:
<<: *aci_vxlan_present
name: anstest_3
allocation_mode: dynamic
pool_allocation_mode: dynamic
ignore_errors: yes
register: create_vxlan_alloc_mode
@ -85,7 +85,7 @@
assert:
that:
- create_vxlan_alloc_mode.failed == true
- 'create_vxlan_alloc_mode.msg == "vxlan pools do not support setting the allocation_mode; please remove this parameter from the task"'
- 'create_vxlan_alloc_mode.msg == "vxlan pools do not support setting the pool_allocation_mode; please remove this parameter from the task"'
- name: get vxlan pool - get object works
aci_encap_pool: &aci_vxlan_query