Fixes to support python3 and made initiators more flexible #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On the
dellemc_powermax_host
module you used thecmp
method. It is no longer available in Python3, and that is the default moving forward for Ansible.If the input was a list of strings, I just used a quick comparison after conversion to sets to obtain the same result. For a complex dictionary, I found a function someone wrote and changed it to our use case of returning a bool value.
As an additional user usability feature, I created a method to get the user provided WWPN's that normalizes it to the input the VMAX is looking for. AKA strip out the colons, and force everything to lowercase. This makes it so we don't have to do that in Jinja outside of the module. Most OEM API's return the WWPN in all caps, and with the colon.