[ovirt-users] Re: Creating snapshot of a subset of disks

2018-06-21 Thread Benny Zlotnik
I can refer again to what we do in the ovirt-system-tests: testlib.assert_true_within_long( lambda: vm1_snapshots_service.list()[-1].snapshot_status == types.SnapshotStatus.OK ) Which tests whether the status change to desirable one within a given period of time (I think

[ovirt-users] Re: Creating snapshot of a subset of disks

2018-06-21 Thread Gianluca Cecchi
On Thu, Jun 21, 2018 at 3:06 PM, Gianluca Cecchi wrote: > > bootdisk = None > for disk_attachment in disk_attachments: > disk = connection.follow_link(disk_attachment.disk) > if disk_attachment.bootable == True: > bootdisk = connection.follow_link(disk_attachment.disk) >

[ovirt-users] Re: Creating snapshot of a subset of disks

2018-06-21 Thread Gianluca Cecchi
On Thu, Jun 21, 2018 at 2:00 PM, Benny Zlotnik wrote: > You could something like this (IIUC): > dead_snap1_params = types.Snapshot( > description=SNAPSHOT_DESC_1, > persist_memorystate=False, > disk_attachments=[ > types.DiskAttachment( >

[ovirt-users] Re: Creating snapshot of a subset of disks

2018-06-21 Thread Benny Zlotnik
You could something like this (IIUC): dead_snap1_params = types.Snapshot( description=SNAPSHOT_DESC_1, persist_memorystate=False, disk_attachments=[ types.DiskAttachment( disk=types.Disk( id=disk.id )