ansible_modules
ansible_modules copied to clipboard
Improve Name-to-Slug parsing to better align with Netbox UI
Related Issue
#808
New Behavior
- Remove all non-ASCII characters (such as german umlauts)
- Strip / Trim before replacing spaces with dashes so that trailing dashes are eliminated
Contrast to Current Behavior
The generated slug names will align better with what the Netbox UI would auto-suggest / use and errors due to umlauts in site names are prevented.
Discussion: Benefits and Drawbacks
- I believe this will help international (non-US) users of the module with more easily creating their sites or other assets in Netbox without having to do any custom pre-processing to pre-create the slug themselves in Jinja2
- I cannot think of any drawbacks but I am not a fluent Python programmer so I may have missed something
Changes to the Documentation
I updated the test, but cannot think of anz Wiki or Docs changes required.
Proposed Release Note Entry
Improve Name-to-Slug parsing to better align with Netbox UI
Double Check
- [X] I have read the comments and followed the CONTRIBUTING.md.
- [X] I have explained my PR according to the information in the comments or in a linked issue.
- [X] My PR targets the
develbranch.
I don't think stripping out any non-ASCII characters is good for i18n.