Maor Lipchuk has posted comments on this change.

Change subject: [QCOW1.1]qemuimg: Add kwargs optional parameter for qcow.
......................................................................


Patch Set 4:

(5 comments)

https://gerrit.ovirt.org/#/c/64169/4//COMMIT_MSG
Commit Message:

Line 3: AuthorDate: 2016-09-20 01:41:01 +0300
Line 4: Commit:     Maor Lipchuk <mlipc...@redhat.com>
Line 5: CommitDate: 2016-09-20 03:56:54 +0300
Line 6: 
Line 7: [QCOW1.1]qemuimg: Add kwargs optional parameter for qcow.
> The version in qcow head is the compat, this is how we detect the image for
ok, I think I got confused with qcow2 version 3 vs version 2.

The version it self can only be 2 or 3, I assume that version 2 implies it 
supports compat level 0.10 and version 3 supports compat level 1.1
Line 8: 
Line 9: Add kwargs of storage domain metadata to indicate the
Line 10: appropriate qcow level to use for create and convert operations.
Line 11: 


https://gerrit.ovirt.org/#/c/64169/4/lib/vdsm/qemuimg.py
File lib/vdsm/qemuimg.py:

Line 45:     RAW = "raw"
Line 46:     VMDK = "vmdk"
Line 47: 
Line 48: _QCOW2_COMPAT_SUPPORTED = ("0.10", "1.1")
Line 49: _QCOW2_1_1 = "1.1"
> Way too long, using the strings "0.10" and "1.1" is the best way.
Done
Line 50: 
Line 51: 
Line 52: def supports_compat(compat):
Line 53:     return compat in _QCOW2_COMPAT_SUPPORTED


Line 102:     return info
Line 103: 
Line 104: 
Line 105: def create(image, size=None, format=None, backing=None,
Line 106:            backingFormat=None, **kwargs):
> Because this module does not or care about storage domains and version. It 
done
Line 107:     cmd = [_qemuimg.cmd, "create"]
Line 108:     cwdPath = None
Line 109: 
Line 110:     if format:


PS4, Line 311: _qcow2_co
ok, I think I got it now, this method should not be changed (only its name) 
since this will be used only once the user did not specify the compat version.


Line 310: 
Line 311: def _qcow2_compat(**kwargs):
Line 312:     sd_version = kwargs.get('version')
Line 313:     if sd_version == '4':
Line 314:         return _QCOW2_1_1
> The place for this is in StorageDomain class:
ok, I think I got it now, this method should not be changed (only its name) 
since this will be used only once the user did not specify the compat version.
Line 315:     value = config.get('irs', 'qcow2_compat')
Line 316:     if value not in _QCOW2_COMPAT_SUPPORTED:
Line 317:         raise exception.InvalidConfiguration(
Line 318:             "Unsupported value for irs:qcow2_compat: %r" % value)


-- 
To view, visit https://gerrit.ovirt.org/64169
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8bbf8a60d0af1f99b3fae2c30ac06b36d5986180
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Yaniv Kaul <yk...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to