<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Fri, Dec 7, 2018, 10:34 Richard W.M. Jones <<a href="mailto:rjones@redhat.com">rjones@redhat.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Dec 07, 2018 at 02:44:21AM +0200, Nir Soffer wrote:<br>
> Fix rhv-cafile option access, broken by commit 6694028f9827 (v2v: -o<br>
> rhv-upload: Only set SSL context for https connections).<br>
<br>
Ugh yes indeed.  Strong typing FTW _again_ </blockquote></div></div><div dir="auto"><br></div><div dir="auto">"pylint -E" may detect such issues.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">...<br>
<br>
Will apply shortly, thanks.<br>
<br>
Rich.<br>
<br>
>  .gnulib                  | 2 +-<br>
>  v2v/rhv-upload-plugin.py | 2 +-<br>
>  2 files changed, 2 insertions(+), 2 deletions(-)<br>
> <br>
> diff --git a/.gnulib b/.gnulib<br>
> index 6ccfbb4ce..646a44e1b 160000<br>
> --- a/.gnulib<br>
> +++ b/.gnulib<br>
> @@ -1 +1 @@<br>
> -Subproject commit 6ccfbb4ce5d4fa79f7afb48f3648f2e0401523c3<br>
> +Subproject commit 646a44e1b190c4a7f6a9f32c63230c619e38d251<br>
> diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py<br>
> index 1a217b6dc..3272c3ce3 100644<br>
> --- a/v2v/rhv-upload-plugin.py<br>
> +++ b/v2v/rhv-upload-plugin.py<br>
> @@ -193,41 +193,41 @@ def open(readonly):<br>
>          if transfer.phase != types.ImageTransferPhase.INITIALIZING:<br>
>              break<br>
>          if time.time() > endt:<br>
>              raise RuntimeError("timed out waiting for transfer status "<br>
>                                 "!= INITIALIZING")<br>
>  <br>
>      # Now we have permission to start the transfer.<br>
>      if params['rhv_direct']:<br>
>          if transfer.transfer_url is None:<br>
>              raise RuntimeError("direct upload to host not supported, "<br>
>                                 "requires ovirt-engine >= 4.2 and only works "<br>
>                                 "when virt-v2v is run within the oVirt/RHV "<br>
>                                 "environment, eg. on an oVirt node.")<br>
>          destination_url = urlparse(transfer.transfer_url)<br>
>      else:<br>
>          destination_url = urlparse(transfer.proxy_url)<br>
>  <br>
>      if destination_url.scheme == "https":<br>
>          context = \<br>
>              ssl.create_default_context(purpose = ssl.Purpose.SERVER_AUTH,<br>
> -                                       cafile = cafile)<br>
> +                                       cafile = params['rhv_cafile'])<br>
>          if params['insecure']:<br>
>              context.check_hostname = False<br>
>              context.verify_mode = ssl.CERT_NONE<br>
>          http = HTTPSConnection(<br>
>              destination_url.hostname,<br>
>              destination_url.port,<br>
>              context = context<br>
>          )<br>
>      elif destination_url.scheme == "http":<br>
>          http = HTTPConnection(<br>
>              destination_url.hostname,<br>
>              destination_url.port,<br>
>          )<br>
>      else:<br>
>          raise RuntimeError("unknown URL scheme (%s)" % destination_url.scheme)<br>
>  <br>
>      # The first request is to fetch the features of the server.<br>
>  <br>
>      # Authentication was needed only for GET and PUT requests when<br>
>      # communicating with old imageio-proxy.<br>
> -- <br>
> 2.17.2<br>
<br>
-- <br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" rel="noreferrer noreferrer" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer noreferrer" target="_blank">http://rwmj.wordpress.com</a><br>
virt-top is 'top' for virtual machines.  Tiny program with many<br>
powerful monitoring features, net stats, disk stats, logging, etc.<br>
<a href="http://people.redhat.com/~rjones/virt-top" rel="noreferrer noreferrer" target="_blank">http://people.redhat.com/~rjones/virt-top</a><br>
</blockquote></div></div></div>