Skip to content

fix snapshot API response#1113

Open
boddumanohar wants to merge 1 commit into
mainfrom
fix-snapshot-api-response
Open

fix snapshot API response#1113
boddumanohar wants to merge 1 commit into
mainfrom
fix-snapshot-api-response

Conversation

@boddumanohar

Copy link
Copy Markdown
Member

Fixes responses for snapshot API

  • return created_at in RFC 3339 format
  • In the pool-level listing volume_id is None, so None == model.lvol.get_id() is always False. meaning lvol would be None in every pool-level response even when the snapshot has a source volume.

@boddumanohar boddumanohar requested a review from mxsrc June 19, 2026 12:37
@mxsrc

mxsrc commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

I'm not sure I totally understand, a bit confused about the reasoning for passing the volume_id in in the first place. Shouldn't we just always use model.lvol.uuid?

@boddumanohar

Copy link
Copy Markdown
Member Author

The SnapshotDTO is used at 2 places:

  1. clusters:storage-pools:snapshots:list --> volume_id is empty
  2. clusters:storage-pools:volumes:snapshots:list --> volume_id is passed. And that line checks if the passed in the volume_id is same as the current context which is in model.lvol.get_uuid()

At the moment, lvol is returned empty for pool level snapshots API. To prevent that, I added this extra check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants