-
Notifications
You must be signed in to change notification settings - Fork 135
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
Introduce storage volume snapshots #584
Introduce storage volume snapshots #584
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for providing access to this early PR. I provided a few comments in this quick first glance.
@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. |
02b1177
to
d6feb45
Compare
82cb2df
to
d8cf378
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ 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 ☔ View full report in Codecov by Sentry. |
316e94d
to
f23163a
Compare
f60412f
to
d5b7f52
Compare
@simondeziel @markylaing This is ready for review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"integration/test_storage: Remove unused imports" should be folded with integration: Move storage helper functions to testing
d5b7f52
to
444abde
Compare
integration/test_storage.py
Outdated
new_description = "first snapshot" | ||
first_snapshot.description = new_description | ||
first_snapshot.save(wait=True) | ||
self.assertEquals(volume.snapshots.get("first").description, new_description) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.assertEquals(volume.snapshots.get("first").description, new_description) | |
self.assertEqual(volume.snapshots.get("first").description, new_description) |
This should address the following warning:
integration/test_storage.py::TestStorageVolumeSnapshot::test_create_get_restore_delete_volume_snapshot
/home/runner/work/pylxd/pylxd/integration/test_storage.py:207: DeprecationWarning: Please use assertEqual instead.
self.assertEquals(volume.snapshots.get("first").description, new_description)
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
…ume` Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
This class adds support for creating snapshots, restoring a volume from a snapshot, retrieving snapshot information and deleting a snapshot. Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
This method returns True when two models are of the same class and have the same attributes with the same values. This is needed for the StorageVolumeSnapshot tests. Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
444abde
to
f9da9c1
Compare
This add a few features related to custom storage volumes snapshots to pyLXD:
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.