Nxos fixes (#40117)

* Alter nxos_nxapi tests to test the right thing

* Defend #40027
This commit is contained in:
Nathaniel Case 2018-05-15 11:55:47 -04:00 committed by GitHub
parent caddf863df
commit f04c876ecd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 43 additions and 8 deletions

View file

@ -43,6 +43,9 @@ class ActionModule(_ActionModule):
socket_path = None
if self._task.args.get('provider', {}).get('transport') == 'nxapi' and self._task.action == 'nxos_nxapi':
return {'failed': True, 'msg': "Transport type 'nxapi' is not valid for '%s' module." % (self._task.action)}
if self._play_context.connection == 'network_cli':
provider = self._task.args.get('provider', {})
if any(provider.values()):