search for: imageio_port

Displaying 13 results from an estimated 13 matches for "imageio_port".

2018 Sep 26
1
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
On Thursday, 20 September 2018 10:50:14 CEST Richard W.M. Jones wrote: > +# Choose a random port number in range [50000,59999] > +imageio_port = random.randint(50000,60000) > + > [...] > + > +def server(): > + server_address = ("", imageio_port) > + httpd = HTTPServer(server_address, RequestHandler) > + httpd.serve_forever() The random port can be chosen directly by the OS, using the special port 0...
2018 Sep 20
7
[PATCH v2 0/3] v2v: -o rhv-upload: Add a test.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-September/msg00121.html v2: - Rewrote patch 2 from scratch so it incorporates Nir's suggestions. - Add fake module to EXTRA_DIST. - Retested. Unfortunately I am no longer able to test the ordinary conversion path because ovirtsdk4 is incompatible with Fedora 29 / Python 3.7:
2018 Oct 09
2
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...d from the fake SDK module, since it is not part of the SDK, and may be replaced by real imageio server later. > + > +from http.server import HTTPServer, BaseHTTPRequestHandler > +import random > +import threading > + > +# Choose a random port number in range [50000,59999] > +imageio_port = random.randint(50000,60000) > + > +class RequestHandler(BaseHTTPRequestHandler): > This request handler is using HTTP/1.0, and will close the connection after every request. This is not a good implementation of the imageio server, and also hides bugs in this code. Should be fixed by ad...
2018 Sep 20
0
[PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...def list(self, search=None): + return [] + +# Create a background thread running a web server which is +# simulating the imageio server. + +from http.server import HTTPServer, BaseHTTPRequestHandler +import random +import threading + +# Choose a random port number in range [50000,59999] +imageio_port = random.randint(50000,60000) + +class RequestHandler(BaseHTTPRequestHandler): + def do_OPTIONS(self): + self.send_response(200) + self.send_header("Content-type", "application/json; charset=UTF-8") + self.end_headers() + # Advertize only zero supp...
2019 Aug 12
1
[PATCH] v2v: -o rhv-upload: fix the phony ovirtsdk4 module
...id = "123" status = DiskStatus.OK class ImageTransferPhase(Enum): @@ -104,7 +104,7 @@ class ImageTransfer(object): ): pass - id = 456 + id = "456" phase = ImageTransferPhase.TRANSFERRING transfer_url = "http://localhost:" + str(imageio_port) + "/" -- 2.21.0
2018 Sep 19
4
[PATCH 0/3] v2v: -o rhv-upload: Add a test.
This adds a test of -o rhv-upload. Obviously for an upstream test we cannot require a working oVirt server. This test works by faking the ovirtsdk4 Python module, setting PYTHONPATH so that the fake module is picked up instead of the real module (if installed). However it's more complex than that because the nbdkit plugin also expects to talk to a working imageio HTTPS server. Therefore
2019 Sep 19
2
[PATCH] v2v: -o rhv-upload: adapt phony ovirtsdk4 module to recent changes
...load-module/ovirtsdk4/types.py b/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py index 60ba541cd..0b165c242 100644 --- a/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py +++ b/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py @@ -22,12 +22,13 @@ from enum import Enum from ovirtsdk4 import imageio_port class Cluster(object): - def __init__(self, name): - pass + id = "2e97537b-a783-4706-af9e-75cb2e032dcd" + name = "Default" class Configuration(object): def __init__(self, type=None, data=None): pass + class ConfigurationType(Enum): OVA =...
2020 Jan 10
7
[v2v PATCH 0/6] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python scripts, and fix the existing test-v2v-python-syntax.sh to use pycodestyle to actually perform style checks. Pino Toscano (6): PEP 8: adapt whitespaces in lines PEP 8: move imports at the top PEP 8: adapt empty lines tests: find all the Python scripts for syntax checks -o rhv-upload: remove unused Python imports Revamp check
2018 Oct 15
0
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...n by the fact that this server close the connection at > the end > of the request. Also this is covered by the attached patch. > > + self.send_response(200) > > + self.end_headers() > > + > > +def server(): > > + server_address = ("", imageio_port) > > + httpd = HTTPServer(server_address, RequestHandler) > > + httpd.serve_forever() > > > > Using HTTP instead of HTTPS is not a good idea. We are not testing > the same code on the client side. > > It is easy to run HTTPS server using pre-created certificat...
2020 Jan 28
0
[v2v PATCH 2/2] -o rhv-upload: check guest arch with cluster
...d-module/ovirtsdk4/types.py b/tests/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py index b8d4a728..732887aa 100644 --- a/tests/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py +++ b/tests/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py @@ -22,9 +22,25 @@ from enum import Enum from ovirtsdk4 import imageio_port +class Architecture(Enum): + UNDEFINED = "undefined" + X86_64 = "x86_64" + + def __init__(self, arch): + self._arch = arch + + def __str__(self): + return self._arch + + +class Cpu(object): + architecture = Architecture.X86_64 + + class Cluster(...
2020 Jan 28
2
[v2v PATCH 1/2] Add back guestcaps as parameter of output#prepare_targets
It will be used to do extra checks in the output before copying the disks. Partially revert commit 3bafec4e693a25ef1c84abc0fd1bc3251862c7de. --- v2v/output_glance.ml | 2 +- v2v/output_json.ml | 2 +- v2v/output_libvirt.ml | 2 +- v2v/output_local.ml | 2 +- v2v/output_null.ml | 2 +- v2v/output_openstack.ml | 2 +- v2v/output_qemu.ml | 2 +- v2v/output_rhv.ml
2018 Dec 07
1
Re: [PATCH] v2v: -o rhv-upload: Fix upload when using https
On Fri, Dec 7, 2018, 10:34 Richard W.M. Jones <rjones@redhat.com wrote: > On Fri, Dec 07, 2018 at 02:44:21AM +0200, Nir Soffer wrote: > > Fix rhv-cafile option access, broken by commit 6694028f9827 (v2v: -o > > rhv-upload: Only set SSL context for https connections). > > Ugh yes indeed. Strong typing FTW _again_ "pylint -E" may detect such issues. ... >
2018 Oct 15
3
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...ion at > > the end > > of the request. > > Also this is covered by the attached patch. > > > > + self.send_response(200) > > > + self.end_headers() > > > + > > > +def server(): > > > + server_address = ("", imageio_port) > > > + httpd = HTTPServer(server_address, RequestHandler) > > > + httpd.serve_forever() > > > > > > > Using HTTP instead of HTTPS is not a good idea. We are not testing > > the same code on the client side. > > > > It is easy to run H...