1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Remove repetition of code nxos (#23908)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2017-04-25 08:37:22 +05:30 committed by GitHub
parent 45252b79be
commit 47edac6ebd

View file

@ -89,9 +89,7 @@ def get_connection(module):
global _DEVICE_CONNECTION
if not _DEVICE_CONNECTION:
load_params(module)
transport = module.params['transport']
provider_transport = (module.params['provider'] or {}).get('transport')
if 'nxapi' in (transport, provider_transport):
if is_nxapi(module):
conn = Nxapi(module)
else:
conn = Cli(module)