Skip to content

Implement volume, snapshot and thin clone - #45

Merged
RayLiu7 merged 2 commits into
mainfrom
usr/RayLiu7/snap-thin-volume
Aug 5, 2025
Merged

Implement volume, snapshot and thin clone#45
RayLiu7 merged 2 commits into
mainfrom
usr/RayLiu7/snap-thin-volume

Conversation

@RayLiu7

@RayLiu7 RayLiu7 commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

Implement volume, snapshot and thin clone

@codecov-commenter

codecov-commenter commented Aug 4, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.63%. Comparing base (0b1bcd5) to head (30a017f).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
+ Coverage   95.26%   95.63%   +0.36%     
==========================================
  Files          62       67       +5     
  Lines        3739     4052     +313     
==========================================
+ Hits         3562     3875     +313     
  Misses        177      177              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RayLiu7
RayLiu7 force-pushed the usr/RayLiu7/snap-thin-volume branch 2 times, most recently from 8c28fea to 5013c15 Compare August 4, 2025 08:12
Base automatically changed from baoy1/powerflex_gen2 to main August 4, 2025 08:37
@RayLiu7
RayLiu7 force-pushed the usr/RayLiu7/snap-thin-volume branch from 51978a6 to 347f90a Compare August 5, 2025 04:46
@RayLiu7
RayLiu7 force-pushed the usr/RayLiu7/snap-thin-volume branch from 347f90a to 81ef6dd Compare August 5, 2025 05:34
:param metrics: list
:return: dict
"""
metrics = metrics or VolumeConstantsGen2.DEFAULT_STATISTICS_METRICS

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.

When reviewing Tao's PR, I just realized that passing empty metrics will return all metrics, but it is fine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, this design looks convenient.

Comment thread PyPowerFlex/objects/gen2/volume.py Outdated
LOG.error(msg)
raise exceptions.PowerFlexClientException(msg)

return self.get(entity_id=snap_id)

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.

I am thinking self.get is unnecessary for sdk side, since ansible will call get at least. If updating many times, get will be called many times.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It looks like a reserved returned value in case the consumer need the actual result of the modification. Do you think we should return none or true instead?

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.

I think we don't need to return anything. If it failed, exception will be thrown; otherwise it should be considered as successful, just like an ordinary update method.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, I can remove the returns

@RayLiu7
RayLiu7 merged commit 2e77e47 into main Aug 5, 2025
6 of 9 checks passed
@RayLiu7
RayLiu7 deleted the usr/RayLiu7/snap-thin-volume branch August 5, 2025 07:14
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.

4 participants