Change in vdsm[master]: hsm: add uploaded image verification

nsoffer at redhat.com nsoffer at redhat.com
Wed Apr 6 21:52:32 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: hsm: add uploaded image verification
......................................................................


Patch Set 2:

(5 comments)

https://gerrit.ovirt.org/#/c/55746/2/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 8504:           'postZero': 'bool', 'force': 'bool'},
Line 8505:  'returns': 'UUID'}
Line 8506: 
Line 8507: ##
Line 8508: # @Volume.verify_upload:
We need a more generic name, something about verifying unsafe image.
Line 8509: #
Line 8510: # Verify an uploaded image's volume. The verification includes comparing
Line 8511: # the uploaded image's format with the format that is specified in the
Line 8512: # image's volume's metadata, and if the format is QCOW, verifying that


Line 8506: 
Line 8507: ##
Line 8508: # @Volume.verify_upload:
Line 8509: #
Line 8510: # Verify an uploaded image's volume. The verification includes comparing
Upload is only one use case.
Line 8511: # the uploaded image's format with the format that is specified in the
Line 8512: # image's volume's metadata, and if the format is QCOW, verifying that
Line 8513: # it has no backingfile. if one of the verifications above fails, an
Line 8514: # error will be raised.


Line 8512: # image's volume's metadata, and if the format is QCOW, verifying that
Line 8513: # it has no backingfile. if one of the verifications above fails, an
Line 8514: # error will be raised.
Line 8515: #
Line 8516: # @volumeID:         The UUID of the Volume
The volume id typically appear last (PDIV - pool, domain, image, volume). The code does not care about the order (we send a map), so the order is only for readers, which like to see the same order in all verbs.
Line 8517: #
Line 8518: # @storagepoolID:    The Storage Pool associated with the Volume
Line 8519: #
Line 8520: # @storagedomainID:  The Storage Domain associated with the Volume


https://gerrit.ovirt.org/#/c/55746/2/vdsm/API.py
File vdsm/API.py:

Line 826:         return self._irs.deleteVolume(self._sdUUID, self._spUUID,
Line 827:                                       self._imgUUID, [self._UUID], postZero,
Line 828:                                       force)
Line 829: 
Line 830:     def verify_upload(self):
Lets keep the new style (verify_upload) all the way down, or the old style, but not mix (verb using new style, code old style).
Line 831:         return self._irs.verifyUpload(self._sdUUID, self._spUUID,
Line 832:                                       self._imgUUID, self._UUID)
Line 833: 
Line 834:     def extendSize(self, newSize):


Line 828:                                       force)
Line 829: 
Line 830:     def verify_upload(self):
Line 831:         return self._irs.verifyUpload(self._sdUUID, self._spUUID,
Line 832:                                       self._imgUUID, self._UUID)
Keep the argument in the same order both in the schema and here (PDIV).
Line 833: 
Line 834:     def extendSize(self, newSize):
Line 835:         return self._irs.extendVolumeSize(
Line 836:             self._spUUID, self._sdUUID, self._imgUUID, self._UUID, newSize)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadgett at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list