From e46237d705623587b117e20931efb683906dcb08 Mon Sep 17 00:00:00 2001 From: Trishna Guha Date: Mon, 5 Aug 2019 18:01:29 +0530 Subject: [PATCH] Fix nxos_facts httpapi (#60055) Signed-off-by: Trishna Guha --- lib/ansible/module_utils/network/common/network.py | 2 +- test/integration/targets/nxos_facts/tasks/nxapi.yaml | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/ansible/module_utils/network/common/network.py b/lib/ansible/module_utils/network/common/network.py index c8eb5308c4..d3abdb7819 100644 --- a/lib/ansible/module_utils/network/common/network.py +++ b/lib/ansible/module_utils/network/common/network.py @@ -212,7 +212,7 @@ def get_resource_connection(module): capabilities = get_capabilities(module) network_api = capabilities.get('network_api') - if network_api == 'cliconf': + if network_api in ('cliconf', 'nxapi', 'eapi'): module._connection = Connection(module._socket_path) elif network_api == 'netconf': module._connection = NetconfConnection(module._socket_path) diff --git a/test/integration/targets/nxos_facts/tasks/nxapi.yaml b/test/integration/targets/nxos_facts/tasks/nxapi.yaml index 04c99602e6..cbf41b9294 100644 --- a/test/integration/targets/nxos_facts/tasks/nxapi.yaml +++ b/test/integration/targets/nxos_facts/tasks/nxapi.yaml @@ -25,9 +25,3 @@ with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - -- name: run test cases (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}" - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run