Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] nxos_file_copy parameter deprecation notice #54691

Open
wants to merge 1 commit into
base: devel
from

Conversation

4 participants
@mikewiebe
Copy link
Contributor

mikewiebe commented Apr 1, 2019

SUMMARY

Handle the following deprecation notices for nxos_file_copy module.

TASK [Copy NX-OS image] *****************************************************************************
[DEPRECATION WARNING]: Param 'username' is deprecated. See the module docs for more information.
This feature will be removed in version 2.9. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Param 'host' is deprecated. See the module docs for more information. This
feature will be removed in version 2.9. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Param 'password' is deprecated. See the module docs for more information.
This feature will be removed in version 2.9. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

nxos_file_copy

ADDITIONAL INFORMATION

The nxos_file_copy uses parameters from the nxos_argument_spec that gets added to every nxos module that are being deprecated in the 2.9 release.

See: https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/network/nxos/nxos.py#L69

The nxos_file_copy module still needs credential information to copy files to the device so this update creates new parameters nxos_host, nxos_username and nxos_password that are specific to the nxos_file_copy module but they are not set in the playbook task but instead use the existing logic in the action plugin to get these from the controller environment.

Not sure if there is a better way to solve this problem but we can use this as a starting point.

Update: It appears that validate-modules check wants me to document the parameters. I would prefer not to expose these as user configurable parameters in the module since the information is being provided in group_vars or ansible env. Is there any way around this problem?

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Apr 1, 2019

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/network/nxos/nxos_file_copy.py:395:5: E303 too many blank lines (2)

The test ansible-test sanity --test validate-modules [explain] failed with 3 errors:

lib/ansible/modules/network/nxos/nxos_file_copy.py:0:0: E322 Argument 'nxos_host' is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/network/nxos/nxos_file_copy.py:0:0: E322 Argument 'nxos_password' is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/network/nxos/nxos_file_copy.py:0:0: E322 Argument 'nxos_username' is listed in the argument_spec, but not documented in the module documentation

click here for bot help

@justjais

This comment has been minimized.

Copy link
Contributor

justjais commented Apr 3, 2019

@mikewiebe tagging this tho Ansible 2.9 milestone

@ansibot ansibot removed the needs_triage label Apr 3, 2019

@trishnaguha trishnaguha added this to Needs Triage in Networking via automation Apr 3, 2019

@mikewiebe mikewiebe changed the title nxos_file_copy parameter deprecation notice [WIP] nxos_file_copy parameter deprecation notice Apr 8, 2019

@ansibot ansibot added the WIP label Apr 8, 2019

@ansibot ansibot added the stale_ci label Apr 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.