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:
parent
45252b79be
commit
47edac6ebd
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue