Download Volume Snapshots
Description
This PR adds the API extractSnapshot so one can download volume snapshots that are backed up on secondary storage.
It checks if extraction is disabled and, if caller has access and the snapshot was found, it returns the download url, in the same way as Template/ISO extraction.
It adds the download_url and download_url_created columns to snapshot_store_ref table and adds a download button to the GUI volume snapshot page.
It also extracts duplicate code of Template/ISO and Volume Extraction around ExtractResponse.
Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] build/CI
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [ ] Major
- [X] Minor
Screenshots (if appropriate):
How Has This Been Tested?
I deployed a ubuntu VM, took a volume snapshot and downloaded it through the UI.
I then uploaded the volume to ACS, deployed a new VM, attached the uploaded volume to it so it becomes READY, stopped the VM, detached both volumes, and attached the uploaded volume again, this time as ROOT.
Next, I started the second VM and verified that it was running and that I could access it through the console.
@gpordeus, could you create a PR to add yourself as collaborator (i.e. #8003)? With this, GitHub Actions will run without needing to manually approve the checks for each PR you create.
Codecov Report
Attention: Patch coverage is 38.46154% with 72 lines in your changes missing coverage. Please review.
Project coverage is 15.56%. Comparing base (
ee39104) to head (5a083b6). Report is 252 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #8878 +/- ##
============================================
+ Coverage 15.32% 15.56% +0.24%
- Complexity 11653 12011 +358
============================================
Files 5452 5491 +39
Lines 476525 481038 +4513
Branches 61192 61735 +543
============================================
+ Hits 73010 74895 +1885
- Misses 395447 397858 +2411
- Partials 8068 8285 +217
| Flag | Coverage Δ | |
|---|---|---|
| uitests | 4.20% <ø> (-0.01%) |
:arrow_down: |
| unittests | 16.32% <38.46%> (+0.25%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@blueorangutan package
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9150
@blueorangutan test
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
[SF] Trillian Build Failed (tid-9694)
@blueorangutan test
@sureshanaparti a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
[SF] Trillian test result (tid-9733) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 52117 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8878-t9733-kvm-centos7.zip Smoke tests completed. 129 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|
Can you add unit tests for the new method added?
@RodrigoDLopez Added them, what do you think?
@blueorangutan package
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9660
@blueorangutan test
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
[SF] Trillian test result (tid-10253) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 45717 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8878-t10253-kvm-centos7.zip Smoke tests completed. 130 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|---|---|---|
| test_01_events_resource | Error |
417.67 | test_events_resource.py |
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@blueorangutan package
@JoaoJandre a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9850
@DaanHoogland @sureshanaparti @rohityadavcloud could we run the CI here?
@JoaoJandre , our lab is very busy atm, can it wait till 4.19 is out?
@blueorangutan package
@JoaoJandre a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10343
@DaanHoogland could we run the CI here?
@blueorangutan test