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
nx-feature module uses incorrect feature name for "port-security" #25608
Comments
Verified this behavior by commenting out 2 lines with "eth_port_sec" in them in file /usr/lib/python2.7/dist-packages/ansible/modules/network/nxos/nxos_feature.py and re-running playbook, which completes successfully. |
other option is to switch the order of the mapping so both "eth_port_sec" and "port-security" both get mapped to "port-security" when the command is actually sent to the device. That may have been the original intent. |
@patbdti I am unable to reproduce the issue. |
@trishnaguha - I have verified the issue this morning using a Cisco MDS9148S switch running NX-OS 8.1(1) and ansible 2.3.1.0. If I try to enable feature "port-security" using the nxos_feature module, ansible tries to enable the "eth_port_sec" feature, which doesn't exist on the switch. I don't know if that feature exists on other nx-os devices, but if definitely does not on my switches. |
@patbdti
Maybe the Documentation needs to updated in this case. |
Target Date: 02/01/2018 |
resolved_by_pr #34020 |
ISSUE TYPE
COMPONENT NAME
nx-feature
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE
EXPECTED RESULTS
I expected to get something similar to below, confirming that the settings was completed successfully. Example below is for "sftp-server" feature.
ACTUAL RESULTS
Received a failed message along with a list of available features that can be enabled/disabled on the device. "port-security" is listed as one of the features, and it can be enabled/disabled on the device via command line. Error indicates that the features is interpreted and sent as "eth_port_sec" instead of "port-security".
Looking at /usr/lib/python2.7/dist-packages/ansible/modules/network/nxos/nxos_feature.py, it looks like "port-security" gets mapped to "eth_port_sec" for some reason. This may have changed names in nx-os, but it should be literally interpreted as "port-security".
The text was updated successfully, but these errors were encountered: