I've checked the victoria patch and the changes are similar to what oslo.utils does.
Here's the code change in the victoria patch:
+ if not hasattr(info, 'format_specific'): + qemu_info = json.loads(out) + info.format_specific = qemu_info.get('format-specific')
We are loading it from the qemu-img output which looks like this,
"format-specific": { "type": "qcow2", "data": { "compat": "1.1", "lazy-refcounts": false, "refcount-bits": 16, "corrupt": false }
Same thing oslo.utils copies into the QemuImgInfo object here
https://github.com/openstack/oslo.utils/blob/d49d5944824f15d00e04e1b9c7f8c3b03b440c95/oslo_utils/imageutils.py#L68
We also have a test added which removes the 'format_specific' attribute to check the compatibility of oslo.utils < 4.1.0.
Overall, the changes in the victoria patch looks good to me.
I've checked the victoria patch and the changes are similar to what oslo.utils does.
Here's the code change in the victoria patch:
+ if not hasattr(info, 'format_specific'): specific = qemu_info. get('format- specific' )
+ qemu_info = json.loads(out)
+ info.format_
We are loading it from the qemu-img output which looks like this,
"format-specific": {
"lazy- refcounts" : false,
"refcount- bits": 16,
"type": "qcow2",
"data": {
"compat": "1.1",
"corrupt": false
}
Same thing oslo.utils copies into the QemuImgInfo object here
https:/ /github. com/openstack/ oslo.utils/ blob/d49d594482 4f15d00e04e1b9c 7f8c3b03b440c95 /oslo_utils/ imageutils. py#L68
We also have a test added which removes the 'format_specific' attribute to check the compatibility of oslo.utils < 4.1.0.
Overall, the changes in the victoria patch looks good to me.