Change in vdsm[master]: introducing downloadFromStream verb

laravot at redhat.com laravot at redhat.com
Wed Jan 22 12:45:37 UTC 2014


Liron Ar has posted comments on this change.

Change subject: introducing downloadFromStream verb
......................................................................


Patch Set 4:

(3 comments)

http://gerrit.ovirt.org/#/c/23281/4//COMMIT_MSG
Commit Message:

Line 7: introducing downloadFromStream verb
Line 8: 
Line 9: This patch introduces the downloadFromStream verb in vdsm which
Line 10: allows to upload using streaming content to vdsm images.
Line 11: XML-RPC spec doesn't support streaming, as we don't want to use HTTP
> We are sending the whole payload in the request, just like xml rpc. The dif
sending in XMLRPC will automatically read the whole message body, opposed to the streaming which is implemented here - that's the motivation, not the size of one request.
Line 12: server in addition to the current XML-RPC server (to not use another
Line 13: port) we will threat some requests as http requests instead of xml-rpc
Line 14: requests.
Line 15: 


http://gerrit.ovirt.org/#/c/23281/4/vdsm/storage/imageSharing.py
File vdsm/storage/imageSharing.py:

Line 28: 
Line 29: 
Line 30: log = logging.getLogger("Storage.ImageSharing")
Line 31: WAIT_TIMEOUT = 30
Line 32: BUFFER_READ_SIZE = 65536
> What we read from the socket, we write to the pipe, don't we?
depends on the length of what we got.
Line 33: 
Line 34: 
Line 35: def httpGetSize(methodArgs):
Line 36:     headers = curlImgWrap.head(methodArgs.get('url'),


Line 90:                           total_size - bytes_left, total_size)
Line 91:                 raise se.MiscFileReadException()
Line 92: 
Line 93:             p.stdin.write(data)
Line 94:             p.stdin.flush()
> This:
Done
Line 95:             bytes_left = bytes_left - len(data)
Line 96: 
Line 97:         p.stdin.close()
Line 98:         if not p.wait(WAIT_TIMEOUT):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I768b84799ed9fb2769c6d4240519d036f8988b99
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken 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: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list