On Thu, Mar 31, 2016 at 11:11:39AM +0100, 'Viktor Bachraty' via ganeti-devel
wrote:
> ConfigWriter class (3000 lines!) has to be refactored into multiple
> subclasses and files, but for now only ignore the maximum line count
> as set by pylintrc.
>
> Signed-off-by: Viktor Bachraty <[email protected]>
> ---
> lib/config/__init__.py | 3 +++
> lib/rpc/client.py | 12 ++++++------
> 2 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/lib/config/__init__.py b/lib/config/__init__.py
> index 98bb772..6f9c9dd 100644
> --- a/lib/config/__init__.py
> +++ b/lib/config/__init__.py
> @@ -40,6 +40,9 @@ much memory.
>
> """
>
> +# TODO: Break up this file into mutiple chunks - Wconfd RPC calls, local
> config
s/mutiple/multiple/
> +# manipulations, grouped by object they operate on (cluster/instance/disk)
> +# pylint: disable=C0302
> # pylint: disable=R0904
> # R0904: Too many public methods
>
> diff --git a/lib/rpc/client.py b/lib/rpc/client.py
> index 0ac56d0..267353b 100644
> --- a/lib/rpc/client.py
> +++ b/lib/rpc/client.py
> @@ -138,16 +138,16 @@ def CallRPCMethod(transport_cb, method, args,
> version=None):
>
> """
> assert callable(transport_cb)
> - t1 = time.time()*1000
> + t1 = time.time() * 1000
> request_msg = FormatRequest(method, args, version=version)
> - t2 = time.time()*1000
> + t2 = time.time() * 1000
> # Send request and wait for response
> response_msg = transport_cb(request_msg)
> - t3 = time.time()*1000
> + t3 = time.time() * 1000
> (success, result, resp_version) = ParseResponse(response_msg)
> - t4 = time.time()*1000
> - logging.info("CallRPCMethod %s: format: %dms, sock: %dms, "
> - "parse: %dms", method, int(t2-t1), int(t3-t2), int(t4-t3))
> + t4 = time.time() * 1000
> + logging.info("CallRPCMethod %s: format: %dms, sock: %dms, parse: %dms",
> + method, int(t2 - t1), int(t3 - t2), int(t4 - t3))
> # Verify version if there was one in the response
> if resp_version is not None and resp_version != version:
> raise LuxiError("RPC version mismatch, client %s, response %s" %
> --
> 2.8.0.rc3.226.g39d4020
>