fixes issue with setting transport to nxapi (#21811)

The nxos action handler did not map the nxapi value to the provider
argument properly.  There as an additional fix in the nxos shared lib
to properly detect nxapi being set
pull/21812/head
Peter Sprygada 8 years ago committed by GitHub
parent 4554e8d769
commit 0e7ebf6391

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

@ -87,6 +87,7 @@ class ActionModule(_ActionModule):
else:
provider_arg = {
'transport': 'nxapi',
'host': self._play_context.remote_addr,
'port': provider.get('port'),
'username': provider.get('username') or self._play_context.connection_user,

Loading…
Cancel
Save