search for: signed_ticket

Displaying 20 results from an estimated 46 matches for "signed_ticket".

2018 Jun 29
2
[PATCH] v2v: rhv-upload-plugin: Remove unneeded auth
...unicating with old imageio-proxy. needs_auth = not params['rhv_direct'] + can_flush = False can_trim = False can_zero = False unix_socket = None - http.putrequest("OPTIONS", destination_url.path) - http.putheader("Authorization", transfer.signed_ticket) - http.endheaders() - + http.request("OPTIONS", destination_url.path) r = http.getresponse() data = r.read() @@ -298,7 +299,6 @@ def pread(h, count, offset): transfer = h['transfer'] headers = {"Range", "bytes=%d-%d" % (offset, of...
2018 Jun 29
0
Re: [PATCH] v2v: rhv-upload-plugin: Remove unneeded auth
...eeds_auth = not params['rhv_direct'] > + > can_flush = False > can_trim = False > can_zero = False > unix_socket = None > > - http.putrequest("OPTIONS", destination_url.path) > - http.putheader("Authorization", transfer.signed_ticket) > - http.endheaders() > - > + http.request("OPTIONS", destination_url.path) > r = http.getresponse() > data = r.read() > > @@ -298,7 +299,6 @@ def pread(h, count, offset): > transfer = h['transfer'] > > headers = {"...
2018 Jun 14
5
[PATCH] v2v: -o rhv-upload: Optimize http request sending
...e'] - http.putrequest("GET", h['path']) + headers = {"Range", "bytes=%d-%d" % (offset, offset+count-1)} # Authorization is only needed for old imageio. if h['needs_auth']: - http.putheader("Authorization", transfer.signed_ticket) - http.putheader("Range", "bytes=%d-%d" % (offset, offset+count-1)) - http.endheaders() + headers["Authorization"] = transfer.signed_ticket + + http.request("GET", h['path'], headers=headers) r = http.getresponse() # 206 =...
2018 Mar 12
2
[PATCH] v2v: -o rhv-upload: Support zero requests.
Only compile tested. I'm keeping this as a separate patch for the moment until the relevant change on the oVirt side goes upstream. Rich.
2018 Jun 25
1
Re: [PATCH v2 1/2] v2v: -o rhv-upload: Always fetch server options when opening the connection.
...features of the server. > + needs_auth = not params['rhv_direct'] > + can_flush = False > + can_trim = False > + can_zero = False > + > + http.putrequest("OPTIONS", destination_url.path) > + http.putheader("Authorization", transfer.signed_ticket) + http.endheaders() > + > + r = http.getresponse() > We should read the response data here to make sure we consume the entire response before sending hte nex > + if r.status == 200: > + # New imageio never needs authentication. > + needs_auth = False &g...
2018 Jun 22
4
v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
v1 was here: https://www.redhat.com/archives/libguestfs/2018-June/msg00099.html v2: - Just fixes the two problems noted in the review of the previous version. Rich.
2018 Mar 12
0
[PATCH] v2v: -o rhv-upload: Support zero requests.
...te(h, buf, offset, count) - -def do_pwrite(h, buf, offset, count): - http = h['http'] - transfer=h['transfer'] - transfer_service=h['transfer_service'] http.putrequest("PUT", h['path']) http.putheader("Authorization", transfer.signed_ticket) @@ -214,19 +209,28 @@ def do_pwrite(h, buf, offset, count): raise RuntimeError("could not write sector (%d, %d): %d: %s" % (offset, count, r.status, r.reason)) -# qemu-img convert starts by trying to zero/trim the whole device. -# Since we've ju...
2018 Mar 24
4
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...;got_options']: > + return > + h['got_options'] = True > + > + http = h['http'] > + transfer=h['transfer'] > + > + http.putrequest("OPTIONS", h['path']) > + http.putheader("Authorization", transfer.signed_ticket) > + http.endheaders() > + > + r = http.getresponse() > + if r.status == 200: > + j = json.loads(r.read()) > + h['can_zero'] = "zero" in j['features'] > + h['can_trim'] = "trim" in j['features'] &...
2018 Jun 14
0
Re: [PATCH] v2v: -o rhv-upload: Optimize http request sending
...putrequest("GET", h['path']) > + headers = {"Range", "bytes=%d-%d" % (offset, offset+count-1)} > # Authorization is only needed for old imageio. > if h['needs_auth']: > - http.putheader("Authorization", transfer.signed_ticket) > - http.putheader("Range", "bytes=%d-%d" % (offset, offset+count-1)) > - http.endheaders() > + headers["Authorization"] = transfer.signed_ticket > + > + http.request("GET", h['path'], headers=headers) > > r...
2018 Jun 14
0
Re: [PATCH] v2v: -o rhv-upload: Optimize http request sending
...putrequest("GET", h['path']) > + headers = {"Range", "bytes=%d-%d" % (offset, offset+count-1)} > # Authorization is only needed for old imageio. > if h['needs_auth']: > - http.putheader("Authorization", transfer.signed_ticket) > - http.putheader("Range", "bytes=%d-%d" % (offset, offset+count-1)) > - http.endheaders() > + headers["Authorization"] = transfer.signed_ticket > + > + http.request("GET", h['path'], headers=headers) > >...
2018 Jun 21
0
[PATCH 1/2] v2v: -o rhv-upload: Always fetch server options when opening the connection.
...# The first request is to fetch the features of the server. + needs_auth = not params['rhv_direct'] + can_flush = False + can_trim = False + can_zero = False + + http.putrequest("OPTIONS", destination_url.path) + http.putheader("Authorization", transfer.signed_ticket) + http.endheaders() + + r = http.getresponse() + if r.status == 200: + # New imageio never needs authentication. + needs_auth = False + + j = json.loads(r.read()) + can_flush = "flush" in j['features'] + can_trim = "trim" in j...
2018 Jun 22
0
[PATCH v2 1/2] v2v: -o rhv-upload: Always fetch server options when opening the connection.
...# The first request is to fetch the features of the server. + needs_auth = not params['rhv_direct'] + can_flush = False + can_trim = False + can_zero = False + + http.putrequest("OPTIONS", destination_url.path) + http.putheader("Authorization", transfer.signed_ticket) + http.endheaders() + + r = http.getresponse() + if r.status == 200: + # New imageio never needs authentication. + needs_auth = False + + j = json.loads(r.read()) + can_flush = "flush" in j['features'] + can_trim = "trim" in j...
2018 Dec 07
2
[PATCH] v2v: -o rhv-upload: Fix emulated zero
...ler than the highest write seen. # After that we must emulate them with writes. if offset+count < h['highestwrite']: http.putrequest("PUT", h['path']) if h['needs_auth']: http.putheader("Authorization", transfer.signed_ticket) http.putheader("Content-Range", "bytes %d-%d/*" % (offset, offset+count-1)) http.putheader("Content-Length", str(count)) http.endheaders() try: buf = bytearray(128*1024) while coun...
2018 Jun 21
6
v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
These two patches add support for using a Unix domain socket to directly access imageio in the case where imageio is running on the conversion host (usually that means virt-v2v is running on the RHV node and something else -- eg. CFME scripts -- arranges that the RHV node is the same one running imageio). Conversions in the normal case are not affected - they happen over TCP as usual. This was
2018 Mar 25
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...eturn > > + h['got_options'] = True > > + > > + http = h['http'] > > + transfer=h['transfer'] > > + > > + http.putrequest("OPTIONS", h['path']) > > + http.putheader("Authorization", transfer.signed_ticket) > > + http.endheaders() > > + > > + r = http.getresponse() > > + if r.status == 200: > > + j = json.loads(r.read()) > > + h['can_zero'] = "zero" in j['features'] > > + h['can_trim'] = "tr...
2018 Jun 26
2
[PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
v2 was here: https://www.redhat.com/archives/libguestfs/2018-June/msg00109.html v3: - Added/fixed all suggestions from Nir in previous review. Q: I wasn't sure if we still need the "UnsupportedError" class so I left it in. Q: Does the Unix socket always have the same name? What happens if there's more than one transfer happening? I tested this both ways, and it worked both
2018 Mar 25
6
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...t_options'] = True > > > + > > > + http = h['http'] > > > + transfer=h['transfer'] > > > + > > > + http.putrequest("OPTIONS", h['path']) > > > + http.putheader("Authorization", transfer.signed_ticket) > > > + http.endheaders() > > > + > > > + r = http.getresponse() > > > + if r.status == 200: > > > + j = json.loads(r.read()) > > + h['can_zero'] = "zero" in j['features'] > > > + h...
2018 Mar 26
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...gt;> > > + >> > > + http = h['http'] >> > > + transfer=h['transfer'] >> > > + >> > > + http.putrequest("OPTIONS", h['path']) >> > > + http.putheader("Authorization", transfer.signed_ticket) >> > > + http.endheaders() >> > > + >> > > + r = http.getresponse() >> > > + if r.status == 200: >> > > + j = json.loads(r.read()) > > > > + h['can_zero'] = "zero" in j['features...
2018 Dec 07
0
[PATCH] v2v: -o rhv-upload: Fix request headers in pread
...transfer = h['transfer'] - headers = {"Range", "bytes=%d-%d" % (offset, offset+count-1)} + headers = {"Range": "bytes=%d-%d" % (offset, offset+count-1)} if h['needs_auth']: headers["Authorization"] = transfer.signed_ticket http.request("GET", h['path'], headers=headers) r = http.getresponse() # 206 = HTTP Partial Content. if r.status != 206: request_failed(h, r, "could not read sector offset %d size %d" % (off...
2018 Dec 07
0
Re: [PATCH] v2v: -o rhv-upload: Fix emulated zero
...e seen. > # After that we must emulate them with writes. > if offset+count < h['highestwrite']: > http.putrequest("PUT", h['path']) > if h['needs_auth']: > http.putheader("Authorization", transfer.signed_ticket) > http.putheader("Content-Range", > "bytes %d-%d/*" % (offset, offset+count-1)) > http.putheader("Content-Length", str(count)) > http.endheaders() > > try: > buf = bytearra...