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

Fix nxos_ospf_vrf python3 compatibility issue #58885

Closed
wants to merge 1 commit into from

Conversation

jlothian
Copy link
Contributor

@jlothian jlothian commented Jul 9, 2019

Make sure division results in an integer since NXOS can't
handle a floating point value for the auto-cost reference-bandwidth

SUMMARY

In python 3, the / operator yields a float even when both operands are ints. When python3 is used as the interpreter, the module will fail when trying to set the auto-cost reference bandwidth:

fatal: [switchname]: FAILED! => {"changed": false, "msg": "auto-cost reference-bandwidth 100.0 Gbps\r\r\n ^\r\n% Invalid number at '^' marker.\r\n\switchname(config-router)# "}

This patch implements the python3 '//' operator for integer floor division

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

nxos

ADDITIONAL INFORMATION

Make sure division results in an integer since NXOS can't
handle a floating point value for the auto-cost reference-bandwidth
@jlothian jlothian closed this Jul 9, 2019
@ansible ansible locked and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant