Fixes #23388 Network provider masks too much (#23418)

* Fixes #23388 Network provider masks too much

* Fix trailing whitespace
This commit is contained in:
Chris Alfonso 2017-04-07 14:34:47 -06:00 committed by GitHub
parent 0cf1e8e061
commit d4bd54d3b8
14 changed files with 75 additions and 13 deletions

View file

@ -53,7 +53,7 @@ eos_argument_spec = {
'validate_certs': dict(type='bool', default=True),
'timeout': dict(type='int'),
'provider': dict(type='dict', no_log=True),
'provider': dict(type='dict'),
'transport': dict(choices=['cli', 'eapi'])
}

View file

@ -40,7 +40,7 @@ ios_argument_spec = {
'authorize': dict(fallback=(env_fallback, ['ANSIBLE_NET_AUTHORIZE']), type='bool'),
'auth_pass': dict(fallback=(env_fallback, ['ANSIBLE_NET_AUTH_PASS']), no_log=True),
'timeout': dict(type='int'),
'provider': dict(type='dict', no_log=True),
'provider': dict(type='dict'),
}
def check_args(module, warnings):

View file

@ -39,7 +39,7 @@ iosxr_argument_spec = {
'password': dict(fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD']), no_log=True),
'ssh_keyfile': dict(fallback=(env_fallback, ['ANSIBLE_NET_SSH_KEYFILE']), type='path'),
'timeout': dict(type='int'),
'provider': dict(type='dict', no_log=True)
'provider': dict(type='dict')
}
def check_args(module, warnings):

View file

@ -37,7 +37,7 @@ junos_argument_spec = {
'password': dict(fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD']), no_log=True),
'ssh_keyfile': dict(fallback=(env_fallback, ['ANSIBLE_NET_SSH_KEYFILE']), type='path'),
'timeout': dict(type='int', default=10),
'provider': dict(type='dict', no_log=True),
'provider': dict(type='dict'),
'transport': dict()
}

View file

@ -40,7 +40,7 @@ vyos_argument_spec = {
'ssh_keyfile': dict(fallback=(env_fallback, ['ANSIBLE_NET_SSH_KEYFILE']), type='path'),
'timeout': dict(type='int'),
'provider': dict(type='dict', no_log=True),
'provider': dict(type='dict'),
}
def check_args(module, warnings):

View file

@ -92,7 +92,14 @@ class ActionModule(_ActionModule):
self._play_context.become = False
self._play_context.become_method = None
return super(ActionModule, self).run(tmp, task_vars)
result = super(ActionModule, self).run(tmp, task_vars)
try:
del result['invocation']['module_args']['provider']
except KeyError:
pass
return result
def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)

View file

@ -87,7 +87,15 @@ class ActionModule(_ActionModule):
if self._play_context.become_method == 'enable':
self._play_context.become = False
self._play_context.become_method = None
return super(ActionModule, self).run(tmp, task_vars)
result = super(ActionModule, self).run(tmp, task_vars)
try:
del result['invocation']['module_args']['provider']
except KeyError:
pass
return result
def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)

View file

@ -92,7 +92,14 @@ class ActionModule(_ActionModule):
self._play_context.become = False
self._play_context.become_method = None
return super(ActionModule, self).run(tmp, task_vars)
result = super(ActionModule, self).run(tmp, task_vars)
try:
del result['invocation']['module_args']['provider']
except KeyError:
pass
return result
def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)

View file

@ -117,7 +117,14 @@ class ActionModule(_ActionModule):
self._task.args['provider'] = provider
return super(ActionModule, self).run(tmp, task_vars)
result = super(ActionModule, self).run(tmp, task_vars)
try:
del result['invocation']['module_args']['provider']
except KeyError:
pass
return result
def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)

View file

@ -87,7 +87,14 @@ class ActionModule(_ActionModule):
self._play_context.become = False
self._play_context.become_method = None
return super(ActionModule, self).run(tmp, task_vars)
result = super(ActionModule, self).run(tmp, task_vars)
try:
del result['invocation']['module_args']['provider']
except KeyError:
pass
return result
def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)

View file

@ -84,6 +84,11 @@ class ActionModule(_ActionModule):
result = super(ActionModule, self).run(tmp, task_vars)
try:
del result['invocation']['module_args']['provider']
except KeyError:
pass
return result
def _get_socket_path(self, play_context):

View file

@ -102,7 +102,14 @@ class ActionModule(_ActionModule):
task_vars['ansible_socket'] = socket_path
return super(ActionModule, self).run(tmp, task_vars)
result = super(ActionModule, self).run(tmp, task_vars)
try:
del result['invocation']['module_args']['provider']
except KeyError:
pass
return result
def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)

View file

@ -78,7 +78,14 @@ class ActionModule(_ActionModule):
task_vars['ansible_socket'] = socket_path
return super(ActionModule, self).run(tmp, task_vars)
result = super(ActionModule, self).run(tmp, task_vars)
try:
del result['invocation']['module_args']['provider']
except KeyError:
pass
return result
def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)

View file

@ -80,7 +80,14 @@ class ActionModule(_ActionModule):
task_vars['ansible_socket'] = socket_path
return super(ActionModule, self).run(tmp, task_vars)
result = super(ActionModule, self).run(tmp, task_vars)
try:
del result['invocation']['module_args']['provider']
except KeyError:
pass
return result
def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)