Change in vdsm[master]: core: introducing uploadImageToStream

laravot at redhat.com laravot at redhat.com
Wed May 28 14:25:40 UTC 2014


Liron Ar has posted comments on this change.

Change subject: core: introducing uploadImageToStream
......................................................................


Patch Set 10:

(3 comments)

http://gerrit.ovirt.org/#/c/26741/10/vdsm/BindingXMLRPC.py
File vdsm/BindingXMLRPC.py:

Line 119:             HEADER_VOLUME = 'Volume-Id'
Line 120:             HEADER_TASK_ID = 'Task-Id'
Line 121:             HEADER_CODE = 'Status-Code'
Line 122:             HEADER_MESSAGE = 'Status-Message'
Line 123:             HEADER_SIZE = 'Size'
> This should be "Range" to be coherent with HTTP.
i agree about changing it to Range (and we can also add a "true" range support) but it requires some other changes around here and in the returned response/errors, i'll handle it soon in a separate patch that'll be on top of that one.
Line 124:             HEADER_CONTENT_LENGTH = 'content-length'
Line 125:             HEADER_CONTENT_TYPE = 'content-type'
Line 126: 
Line 127:             class RequestException():


Line 146:                     uploadFinishedEvent, operationEndCallback = \
Line 147:                         self._createEventWithCallback()
Line 148: 
Line 149:                     # Optional header
Line 150:                     volUUID = self.headers.getheader(self.HEADER_VOLUME)
> An empty line before calling im.uploadToStream would help reading this.
Done
Line 151:                     response = img.uploadToStream(methodArgs,
Line 152:                                                   operationEndCallback,
Line 153:                                                   startEvent, volUUID)
Line 154: 


Line 170:                         startEvent.set()
Line 171:                         self._waitForEvent(uploadFinishedEvent)
Line 172: 
Line 173:                 except self.RequestException as e:
Line 174:                     # This is an expected exception, so tranceback is unneeded
> tranceback -> traceback
Done
Line 175:                     self.send_error(e.httpStatusCode, e.errorMessage)
Line 176:                 except Exception:
Line 177:                     self.send_error(httplib.INTERNAL_SERVER_ERROR,
Line 178:                                     "error during execution",


-- 
To view, visit http://gerrit.ovirt.org/26741
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If2df4d3a16f39bf80281d7669ed31fd8369bada5
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yoav Kleinberger <ykleinbe at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list