search for: _global_default_timeout

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

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 Jun 26
2
Re: [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...license. > +# (https://pypi.org/project/uhttplib/) > +# Ported to Python 3 by Irit Goihman. > + > +class UnsupportedError(Exception): > + pass > Yes this is unneeded now. > + > +class UnixHTTPConnection(HTTPConnection): > + def __init__(self, path, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): > + self.path = path > + HTTPConnection.__init__(self, "localhost", timeout=timeout) > + > + def connect(self): > + self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) > + if self.timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: &...
2018 Jun 21
0
[PATCH 2/2] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...UnsupportedError(Exception): + pass + +class _UnixMixin(object): + def set_tunnel(self, host, port=None, headers=None): + raise UnsupportedError("tunneling is not supported") + +class UnixHTTPConnection(_UnixMixin, HTTPConnection): + def __init__(self, path, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): + self.path = path + HTTPConnection.__init__(self, "localhost", timeout=timeout) + + def connect(self): + self.sock = _create_unix_socket(self.timeout) + self.sock.connect(self.path) + +def _create_unix_socket(timeout): + sock = socket.socket(socket.AF_...
2018 Jun 26
0
[PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...n socket. +# Derived from uhttplib written by Erik van Zijst under an MIT license. +# (https://pypi.org/project/uhttplib/) +# Ported to Python 3 by Irit Goihman. + +class UnsupportedError(Exception): + pass + +class UnixHTTPConnection(HTTPConnection): + def __init__(self, path, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): + self.path = path + HTTPConnection.__init__(self, "localhost", timeout=timeout) + + def connect(self): + self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + if self.timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: + self.sock.settimeo...
2018 Jun 22
0
[PATCH v2 2/2] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...UnsupportedError(Exception): + pass + +class _UnixMixin(object): + def set_tunnel(self, host, port=None, headers=None): + raise UnsupportedError("tunneling is not supported") + +class UnixHTTPConnection(_UnixMixin, HTTPConnection): + def __init__(self, path, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): + self.path = path + HTTPConnection.__init__(self, "localhost", timeout=timeout) + + def connect(self): + self.sock = _create_unix_socket(self.timeout) + self.sock.connect(self.path) + +def _create_unix_socket(timeout): + sock = socket.socket(socket.AF_...
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 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 Jun 27
0
Re: [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...ib/) >> +# Ported to Python 3 by Irit Goihman. >> + >> +class UnsupportedError(Exception): >> + pass >> > > Yes this is unneeded now. > > >> + >> +class UnixHTTPConnection(HTTPConnection): >> + def __init__(self, path, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): >> + self.path = path >> + HTTPConnection.__init__(self, "localhost", timeout=timeout) >> + >> + def connect(self): >> + self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) >> + if self.timeout is not socket._G...
2018 Jun 25
1
Re: [PATCH v2 2/2] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...and the error, I don't know why I complicated things in this way when I wrote this :-). Since this is not a library and you are not using set_tunnel, there is no need for this. > + > +class UnixHTTPConnection(_UnixMixin, HTTPConnection): > + def __init__(self, path, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): > + self.path = path > + HTTPConnection.__init__(self, "localhost", timeout=timeout) > + > + def connect(self): > + self.sock = _create_unix_socket(self.timeout) > + self.sock.connect(self.path) > + > +def _create_unix_socket(timeou...
2019 Nov 17
0
[PATCH 01/18] rhv-upload: Remove unused exception class
...-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -565,9 +565,6 @@ def close(h): # (https://pypi.org/project/uhttplib/) # Ported to Python 3 by Irit Goihman. -class UnsupportedError(Exception): - pass - class UnixHTTPConnection(HTTPConnection): def __init__(self, path, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): self.path = path -- 2.21.0
2020 Jul 08
2
[PATCH] RFC: rhv-upload-plugin: Use imageio client
...lient.HTTPConnection to work over a Unix domain socket. -# Derived from uhttplib written by Erik van Zijst under an MIT license. -# (https://pypi.org/project/uhttplib/) -# Ported to Python 3 by Irit Goihman. - - -class UnixHTTPConnection(HTTPConnection): - def __init__(self, path, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): - self.path = path - HTTPConnection.__init__(self, "localhost", timeout=timeout) - - def connect(self): - self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) - if self.timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: - self.sock.settimeo...
2019 Nov 17
23
[PATCH 00/18] rvh-upload: Various fixes and cleanups
This series extract oVirt SDK and imageio code to make it eaiser to follow the code and improve error handing in open() and close(). The first small patches can be consider as fixes for downstream. Tested based on libguestfs v1.41.5, since I had trouble building virt-v2v and libguestfs from master. Nir Soffer (18): rhv-upload: Remove unused exception class rhv-upload: Check status more
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