meraki_config_template - Check for HTTP status code (#42145)

* Check for HTTP status code

- All requests now check returned status code
- Fail if status code isn’t what is expected

* Fix blank line error

* Change HTTP check logic and improve integration tests
- Set HTTP status code check so default path is accept
- Added create and delete network for integration test
- Remove a few comments to clean up code
This commit is contained in:
Kevin Breit 2018-07-02 21:26:56 -05:00 committed by Dag Wieers
commit 08ddd202fb
2 changed files with 29 additions and 7 deletions

View file

@ -47,6 +47,15 @@
that:
- '"No configuration template named" in deleted.msg'
- name: Create a network
meraki_network:
auth_key: '{{auth_key}}'
state: present
org_name: '{{ test_org_name }}'
net_name: '{{ test_net_name }}'
type: appliance
delegate_to: localhost
- name: Bind a template to a network
meraki_config_template:
auth_key: '{{auth_key}}'
@ -102,3 +111,11 @@
- assert:
that:
unbind_invalid.changed == False
- name: Delete network
meraki_network:
auth_key: '{{auth_key}}'
state: absent
org_name: '{{ test_org_name }}'
net_name: '{{ test_net_name }}'
delegate_to: localhost