roll up of fixes from nxos integration tests (#21948)

* now fails nxos_nxapi if the transport=nxapi
* fixes typos in nxos_nxapi integration tests cases
This commit is contained in:
Peter Sprygada 2017-02-25 08:17:04 -05:00 committed by John R Barker
parent d26c57f938
commit 01ac1bc6e5
3 changed files with 7 additions and 2 deletions

View file

@ -134,6 +134,11 @@ from ansible.module_utils.netcfg import NetworkConfig
from ansible.module_utils.six import iteritems from ansible.module_utils.six import iteritems
def check_args(module, warnings): def check_args(module, warnings):
transport = module.params['transport']
provider_transport = (module.params['provider'] or {}).get('transport')
if 'nxapi' in (transport, provider_transport):
module.fail_json(msg='transport=nxapi is not supporting when configuring nxapi')
nxos_check_args(module, warnings) nxos_check_args(module, warnings)
state = module.params['state'] state = module.params['state']

View file

@ -82,6 +82,6 @@
that: that:
- "config.changed == false" - "config.changed == false"
# FIXME: https://github.com/ansible/ansible-modules-core/issues/4955 # FIXME: https://github.com/ansible/ansible-modules-core/issues/4955
ignore_erros: yes ignore_errors: yes
- debug: msg="END cli/config.yaml" - debug: msg="END cli/config.yaml"

View file

@ -22,7 +22,7 @@
- name: Assert NXAPI is enabled - name: Assert NXAPI is enabled
assert: assert:
that: result.result[0] | search('enabled') that: result.stdout[0] | search('enabled')
- name: Enable NXAPI again - name: Enable NXAPI again
nxos_nxapi: nxos_nxapi: