mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
Remove repetition of code nxos (#23908)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user