fixes import statement in nxos_facts module (#21834)

trying to import from the wrong shared lib, this patch changes
network_common to connection.  Also fixes a bug found in the nxos
action plugin to detect transport

fixes #21829
pull/21843/head
Peter Sprygada 8 years ago committed by John R Barker
parent 551a765ea5
commit ab0f992b3a

@ -181,7 +181,7 @@ import re
from ansible.module_utils.nxos import run_commands
from ansible.module_utils.nxos import nxos_argument_spec, check_args
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network_common import exec_command
from ansible.module_utils.connection import exec_command
from ansible.module_utils.six import iteritems

@ -99,7 +99,9 @@ class ActionModule(_ActionModule):
self._task.args['provider'] = provider_arg
# make sure a transport value is set in args
if self._task.args.get('transport') is None and self._task.args.get('provider').get('transport') is None:
transport = self._task.args.get('transport')
provider_transport = (self._task.args.get('provider') or {}).get('transport')
if all((transport is None, provider_transport is None)):
self._task.args['transport'] = 'cli'
return super(ActionModule, self).run(tmp, task_vars)

Loading…
Cancel
Save