canonical / pylxd

Python module for LXD
https://pylxd.readthedocs.io/en/latest/
Apache License 2.0
251 stars 133 forks source link

Introduce storage volume snapshots #584

Open hamistao opened 3 weeks ago

hamistao commented 3 weeks ago

This add a few features related to custom storage volumes snapshots to pyLXD:

  1. Custom volume snapshot creation
  2. Custom volume edition (including renaming)
  3. Restoring a custom volume from a snapshot
  4. Custom volume snapshot deletion

The unit tests will be added in a later PR if necessary. Scheduling was already supported since it is done through config key settings on the StorageVolume object. This also does some refactoring on previously existing code and some other changes made necessary by the new features and tests.

hamistao commented 3 weeks ago

@simondeziel For now I ask to focus the comments on the functions' behaviors. I still have some work to do on comments, docstrings and user messages.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 51.16279% with 42 lines in your changes missing coverage. Please review.

Project coverage is 96.51%. Comparing base (afb1b84) to head (04b6680). Report is 12 commits behind head on main.

:exclamation: Current head 04b6680 differs from pull request most recent head d5b7f52

Please upload reports for the commit d5b7f52 to get more accurate results.

Files Patch % Lines
pylxd/models/storage_pool.py 44.77% 37 Missing :warning:
pylxd/models/_model.py 58.33% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #584 +/- ## ========================================== - Coverage 97.81% 96.51% -1.31% ========================================== Files 32 32 Lines 3073 3153 +80 ========================================== + Hits 3006 3043 +37 - Misses 67 110 +43 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

hamistao commented 2 weeks ago

@simondeziel @markylaing This is (finally) oficially ready for review

hamistao commented 7 hours ago

@simondeziel @markylaing This is ready for review again.