-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Qcow2BitmapInfo data to GetQemuImageInfo
Extend the GetQemuImageInfoVDSCommand command to also provide information about the bitmaps. This data will only be valid when the hypervisor has the qemu_image_info_bitmaps capability. The bitmap information can be used to validate the engine's bitmap data with the qemu-img info. VDSM PR: oVirt/vdsm#394 Signed-off-by: Jean-Louis Dupond <[email protected]>
- Loading branch information
1 parent
1e10b6e
commit 2c818d8
Showing
15 changed files
with
180 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
.../src/main/java/org/ovirt/engine/core/common/businessentities/storage/Qcow2BitmapInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.ovirt.engine.core.common.businessentities.storage; | ||
|
||
import java.util.List; | ||
|
||
import org.ovirt.engine.core.compat.Guid; | ||
|
||
public class Qcow2BitmapInfo { | ||
|
||
private Guid name; | ||
private long granularity; | ||
private List<Qcow2BitmapInfoFlags> flags; | ||
|
||
|
||
public Guid getName() { | ||
return name; | ||
} | ||
|
||
public void setName(Guid name) { | ||
this.name = name; | ||
} | ||
|
||
public long getGranularity() { | ||
return granularity; | ||
} | ||
|
||
public void setGranularity(long granularity) { | ||
this.granularity = granularity; | ||
} | ||
|
||
public List<Qcow2BitmapInfoFlags> getFlags() { | ||
return flags; | ||
} | ||
|
||
public void setFlags(List<Qcow2BitmapInfoFlags> flags) { | ||
this.flags = flags; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...main/java/org/ovirt/engine/core/common/businessentities/storage/Qcow2BitmapInfoFlags.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.ovirt.engine.core.common.businessentities.storage; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public enum Qcow2BitmapInfoFlags { | ||
IN_USE("in-use"), | ||
AUTO("auto"); | ||
|
||
private String value; | ||
private static Map<String, Qcow2BitmapInfoFlags> mappings; | ||
|
||
static { | ||
mappings = new HashMap<>(); | ||
for (Qcow2BitmapInfoFlags error : values()) { | ||
mappings.put(error.getValue(), error); | ||
} | ||
} | ||
|
||
Qcow2BitmapInfoFlags(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
public static Qcow2BitmapInfoFlags forValue(String value) { | ||
return mappings.get(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packaging/dbscripts/upgrade/04_05_0310_add_qemu_image_info_bitmaps_to_vdsdynamic.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
select fn_db_add_column('vds_dynamic', 'qemu_image_info_bitmaps', 'BOOLEAN NOT NULL DEFAULT FALSE'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters