Nir Soffer has posted comments on this change.

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


Patch Set 4:

(1 comment)

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

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:

    def qcow2_compat(self):
        if int(self.getVersion()) >= 4:
            return "1.1"
        return qcowimg.default_format()

Keeping this is storage domain will allow easy export to the correct format, 
using the destination storage domain qcow_format. This is another example why 
this module cannot decide on the format.

default_format() can be useful to set the default value in this module, if it 
is called not from storage layer.
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