Skip to content

Enhance Snapshot struct and add ListDetail function in V3 blockstorage#3305

Merged
mandre merged 1 commit intogophercloud:mainfrom
shiftstack:ISSUE_#2403
Mar 15, 2025
Merged

Enhance Snapshot struct and add ListDetail function in V3 blockstorage#3305
mandre merged 1 commit intogophercloud:mainfrom
shiftstack:ISSUE_#2403

Conversation

@dkokkino
Copy link
Copy Markdown

  • Extended Snapshot struct to include additional fields: Progress, ProjectID, GroupSnapshotID, UserID, ConsumesQuota
  • Implemented ListDetail function to retrieve detailed snapshot information from the snapshots/detail endpoint
  • Added new test to validate the inclusion of additional fields and the functionality of ListDetails

Fixes #2403

Links to the line numbers/files in the OpenStack source code that support the
code in this PR:

Documentation: https://docs.openstack.org/api-ref/block-storage/v3/#list-snapshots-and-details

@github-actions github-actions bot added edit:blockstorage This PR updates blockstorage code semver:minor Backwards-compatible change labels Feb 20, 2025
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for submitting your first PR! Be sure that we will be looking at it but keep in mind
this sometimes takes a while.
Please let the maintainers know if your PR has not got enough attention after a few days.
If any doubt, please consult our PR tutorial.

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 20, 2025

Coverage Status

coverage: 77.492% (-1.2%) from 78.686%
when pulling 07c8148 on shiftstack:ISSUE_#2403
into 1031a87 on gophercloud:main.

Copy link
Copy Markdown
Contributor

@mandre mandre left a comment

Choose a reason for hiding this comment

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

This looks great. We can merge after you address the missing assert and squash your commits.

@@ -74,6 +74,23 @@ func TestSnapshots(t *testing.T) {
return true, nil
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We're missing an th.AssertNoErr(t, err) here, to validate that the previous call didn't return an error.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added the missing line of code and squashed my commits

- Extended Snapshot struct to include additional fields: Progress, ProjectID, GroupSnapshotID, UserID, ConsumesQuota
- Implemented ListDetail function to retrieve detailed snapshot information from the snapshots/detail endpoint
- Added new test to validate the inclusion of additional fields and the functionality of the ListDetails function

Fixes: gophercloud#2403
@mandre mandre merged commit 9e4535f into gophercloud:main Mar 15, 2025
21 of 22 checks passed
@mandre mandre deleted the ISSUE_#2403 branch March 15, 2025 08:07
@mandre mandre added the backport-v2 This PR will be backported to v2 label Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v2 This PR will be backported to v2 edit:blockstorage This PR updates blockstorage code semver:minor Backwards-compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V3 blockstorage snapshot list is using the wrong endpoint

3 participants