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

Validate required prefix variable is not empty #58195

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@v1tal3
Copy link

commented Jun 21, 2019

SUMMARY

This fixes a validation bug with the nxos_static_route module, where it accepts an empty prefix variable passed, even though it's required.

Currently, if an empty string is passed as the prefix, this module attempts to configure the following line on NX-OS switches:

ip route /32 x.x.x.x

where x.x.x.x is the next_hop passed. This throws an invalid command error on the switch.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

nxos_static_route

ADDITIONAL INFORMATION

To recreate the issue, call the following function:

- nxos_static_route:
    state: present
    prefix: ''
    next_hop: '10.0.0.1'

Error output:

"msg": "ip route /32 10.0.0.1\r\r\n                                ^\r\n% Invalid ip address at '^' marker.\r\n\rswitch-hostname(config)# "
@ansibot

This comment has been minimized.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jun 21, 2019

@v1tal3, just so you are aware we have a dedicated Working Group for network.
You can find other people interested in this in #ansible-network on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

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.