Remove deprecation for username/password eos_user, nxos_user and Doc update (#24880)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
pull/24896/head
Trishna Guha 8 years ago committed by GitHub
parent d96195131f
commit 9fb9c00092

@ -67,9 +67,15 @@ ARGS_DEFAULT_VALUE = {
def check_args(module, warnings): def check_args(module, warnings):
provider = module.params['provider'] or {} provider = module.params['provider'] or {}
for key in eos_argument_spec: for key in eos_argument_spec:
if key not in ['provider', 'transport', 'authorize'] and module.params[key]: if module._name == 'eos_user':
warnings.append('argument %s has been deprecated and will be ' if (key not in ['username', 'password', 'provider', 'transport', 'authorize'] and
'removed in a future version' % key) module.params[key]):
warnings.append('argument %s has been deprecated and will be '
'removed in a future version' % key)
else:
if key not in ['provider', 'authorize'] and module.params[key]:
warnings.append('argument %s has been deprecated and will be '
'removed in a future version' % key)
# set argument's default value if not provided in input # set argument's default value if not provided in input
# This is done to avoid unwanted argument deprecation warning # This is done to avoid unwanted argument deprecation warning

@ -65,8 +65,12 @@ ARGS_DEFAULT_VALUE = {
def check_args(module, warnings): def check_args(module, warnings):
provider = module.params['provider'] or {} provider = module.params['provider'] or {}
for key in nxos_argument_spec: for key in nxos_argument_spec:
if key not in ['provider', 'transport'] and module.params[key]: if module._name == 'nxos_user':
warnings.append('argument %s has been deprecated and will be removed in a future version' % key) if key not in ['password', 'provider', 'transport'] and module.params[key]:
warnings.append('argument %s has been deprecated and will be in a future version' % key)
else:
if key not in ['provider', 'transport'] and module.params[key]:
warnings.append('argument %s has been deprecated and will be removed in a future version' % key)
# set argument's default value if not provided in input # set argument's default value if not provided in input
# This is done to avoid unwanted argument deprecation warning # This is done to avoid unwanted argument deprecation warning

@ -46,6 +46,7 @@ options:
- The username to be configured on the remote Arista EOS - The username to be configured on the remote Arista EOS
device. This argument accepts a stringv value and is mutually device. This argument accepts a stringv value and is mutually
exclusive with the C(users) argument. exclusive with the C(users) argument.
Please note that this option is not same as C(provider username).
update_password: update_password:
description: description:
- Since passwords are encrypted in the device running config, this - Since passwords are encrypted in the device running config, this

Loading…
Cancel
Save