Bug 1767347

Summary: Refactor download and upload disk-snapshots python sdk code for consistency
Product: [oVirt] ovirt-engine-sdk-python Reporter: Yosi Ben Shimon <ybenshim>
Component: GeneralAssignee: Daniel Erez <derez>
Status: CLOSED WONTFIX QA Contact: Avihai <aefrat>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: bugs, eshenitz, juan.hernandez, tnisan
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-29 09:27:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yosi Ben Shimon 2019-10-31 09:04:52 UTC
Description of problem:
Download [1] and upload [2] disk-snapshot should be more consistency as they are related to backup and restore operations.

Now, to be more specific:
1. download_disk_snapshots.py:
- Doesn't save the disks under "disks/" directory as appears in upload_disk_snapshots.py
- Doesn't save the OVF file required for the upload_disk_snapshots.py

2, upload_disk_snapshots.py:
- In this example, the disk_path (line 290) should be only "disks/".
- Doesn't work correctly when the VM has only one snapshot (missing parent) as the "Active_VM" is not being downloaded


[1] https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/download_disk_snapshots.py
[2] https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_disk_snapshots.py

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
We need to modify the download_disk_snapshots.py so it will save the disks under "disks/" dir as well as save the OVF file.
We also need to modify the upload_disk_snapshots.py and set disk_path='disks/'


Expected results:


Additional info:

Comment 1 Eyal Shenitzky 2021-08-29 09:27:13 UTC
Python SDK examples shouldn't be treated as a product and consistency between two different examples is irrelevant.
Patches for changing the current behavior are welcome.

Closing this bug as WONTFIX.