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

Redfish: Added handling for trailing slashes in URIs when extracting member identifiers #9057

Merged

Conversation

mraineri
Copy link
Contributor

SUMMARY

Some implementations have trailing slashes in their URIs. While most of this module's code does not rely on exact URIs, some places will take the last URI segment using the split function when determining identifiers for collection members. In these cases, it'll be an empty string. Specifically for volume management, the split function was assuming trailing slashes were always present.

The change here always removes trailing slashes before trying to extract member identifiers.

Fix #9047

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

redfish_utils

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module_utils module_utils plugins plugin (any type) labels Oct 25, 2024
Copy link
Collaborator

@russoz russoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mraineri , thanks for your contribution! :-)

Just a minor adjustment on the changelog fragment, for the sake of consistency, other than that it LGTM

changelogs/fragments/9047-redfish-uri-parsing.yml Outdated Show resolved Hide resolved
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-9 Automatically create a backport for the stable-9 branch labels Oct 26, 2024
@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Oct 28, 2024
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, only spotted that now.

changelogs/fragments/9047-redfish-uri-parsing.yml Outdated Show resolved Hide resolved
@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Oct 28, 2024
@felixfontein felixfontein merged commit c71f662 into ansible-collections:main Oct 29, 2024
126 checks passed
Copy link

patchback bot commented Oct 29, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/c71f662d55d5fb931ab3817a2e627fd357f76ce2/pr-9057

Backported as #9078

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Oct 29, 2024
patchback bot pushed a commit that referenced this pull request Oct 29, 2024
…member identifiers (#9057)

Signed-off-by: Mike Raineri <[email protected]>
(cherry picked from commit c71f662)
@felixfontein
Copy link
Collaborator

@mraineri thanks for fixing this!
@russoz thanks for reviewing!

felixfontein pushed a commit that referenced this pull request Oct 29, 2024
…ailing slashes in URIs when extracting member identifiers (#9078)

Redfish: Added handling for trailing slashes in URIs when extracting member identifiers (#9057)

Signed-off-by: Mike Raineri <[email protected]>
(cherry picked from commit c71f662)

Co-authored-by: Mike Raineri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch bug This issue/PR relates to a bug module_utils module_utils plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RAID creation and deletion on Lenovo not working
4 participants