Cert requirements - #1028
Merged
Merged
Conversation
Two related fixes to the hosts subset of purefa_info:
- Add logged_in_ports to each host, built from get_ports_initiators,
mapping every host WWN/IQN/NQN to the array target ports (e.g. CT0.FC1)
it is currently logged into. An empty list means the identifier is not
logged in anywhere and can be safely removed. WWNs are matched case- and
separator-insensitively.
- Fix a TypeError ("list indices must be integers or slices, not Reference")
raised whenever a host had preferred arrays set. preferred_arrays is a
list of Reference objects, but the code indexed the list by the iterated
Reference; iterate and use each element's .name instead.
Tests: added logged_in_ports coverage and a preferred_arrays regression
test (the existing test only used an empty preferred_arrays, which never
exercised the crash).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Removing a single WWN, IQN or NQN from a host was not possible: the module only ever sent the full desired list in the patch_hosts wwns/ iqns/nqns fields, which *replace* the whole associated list, so it could not drop one initiator while keeping the rest. Treat the supplied list as the complete desired set and reconcile to it using the add_*/remove_* fields (--addwwnlist/--remwwnlist), not the replacing wwns/iqns/nqns fields (--wwnlist): add only the missing initiators and remove only the unwanted ones in a single patch. An unused WWN can now be removed simply by omitting it, and the initiators that stay are left untouched instead of being removed and re-added. Signed-off-by: Simon Dodsley <simon@everpuredata.com>
- README: sync Requirements section with requirements.txt (py-pure-client >= 1.82.0, fix pytz typo, drop packaging) - galaxy.yml: add build_ignore to exclude non-content dirs from tarball - add .ansible-lint (production profile, no-log-password warn_list) Signed-off-by: Simon Dodsley <simon@purestorage.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
SUMMARY
Changes to enhance the certification workflow
ISSUE TYPE