- Jan 22, 2010
-
-
Michael Hanselmann authored
The HTTP layer shouldn't care about the contents of the request data or responses. This requires further changes in the RAPI code to handle client requests correctly. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
It was never used as intended. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
These will be useful in the future in case we don't enfore JSON encoding anymore in the http.server module. The HTTP 1.1 RFC recommends error 415 (Unsupported Media Type) to be returned in case the client requests an unsupported content-type. If the client doesn't send a “Content-Type” in the request, a content-type of “application/octet-stream” is implied. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Also fix a typo in http/__init__.py and add unittests for the LUXI parsing and formatting functions. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Having only one exception hierarchy makes catching them simpler. Before ProtocolError would derive directly from Exception, but with this patch it'll also be in the hierarchy defined by the ganeti.errors module. Separating encoding and decoding errors is not necessary at this point as they're never handled separately, and merging them removes a few lines from the code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 04, 2010
-
-
Iustin Pop authored
* devel-2.1: (40 commits) Fix unused imports or add silences where needed bdev: Add a TODO and a pylint silence confd: add a TODO and a pylint disable pylint: Temporarily disable W0201 Disable R0922 in pylint Further pylint disables, mostly for Unused args pylint: disable the similarities checker LUDiagnoseOS._DiagnoseByOS: remove unused arg daemons: handle arguments correctly and uniformly hv_xen/_GetConfigFileDiskData: remove unused arg jqueue/_CheckRpcResult: log the whole operation Optparse extenders have to obey a given API backend._OSOndiskAPIVersion: remove obsolete arg pylint cleanups: dangerous initializers Convert to static methods (where appropriate) Remove more unused variables Add targeted pylint disables burnin: move decorators out of classes Rename an ConfdInotifyEventHandler init argument Introduce a makefile lint rule ... Conflicts: daemons/ganeti-confd - removed imports daemons/ganeti-noded - fixed new GenericMain
-
Iustin Pop authored
In some cases pylint doesn't parse the import correctly, so we add silences; but there are also many cases of unused imports, which we simply remove. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
A piece of old code in bdev.py uses a for loop over a single variable because we can 'break' out of the loop or exit on the 'else' path. This is not a nice usage of the for loop, it should be converted to a standard if...elif...else structure. In the meantime we silence a warning from pylint (it is actually invalid, IMHO) and add a TODO. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Two variables are used in a strange way in ExecConfd. Until that is clarified, add a TODO and a silence for the unused variable warning. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
There seems to be a bug in pylint relating to W0201 (“Attribute '%r' defined outside __init__”) being re-enabled by simple comments and not being able to be disabled again. Until that is fixed, we disable this warning. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
R0922, “Abstract class is only referenced 1 times”, cannot be disabled in the source code, and thus lib/http/auth.py:HttpServerRequestAuthentication gives this warning (it's actually also referenced from the tests, but we do not include them). Therefore we need to disable it at pylintrc level. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Many of our functions have to follow a given API, and thus we have to keep a given signature, but pylint doesn't understand this. Therefore, we silence this warning. The patch does a few other cleanups. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
This is a very slow checker, estimated to be O(n²) by its author; so using it all the time is not good. It can be re-enabled on the command line via “--disable-checker=”. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
The node_list argument to _DiagnoseByOS is not used, and is obsoleted by the fact that the rlist argument already has the valid nodes as keys (assuming RPC behaviour didn't change). Thus, we remove it and silence the warning. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Of all daemons, only rapi did abort when given argument. None of our daemons use any arguments, but they accepted them blindly. This is a very bad experience for the user. This patch adds checking and exiting in all daemons, in a uniform way. One other option would have been to add a flag to GenericMain (noargs=True). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
The disk template is not needed, all that's used is the disk data. As such, remove this parameter from the function. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Currently only the rpc call, but not its description (which also shows the argument) is logged. We change this to log failmsg too, and this also silences a warning. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
So we just silence the warning. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
The 'name' argument is not used anymore, probably since before 2.0. Since this is an internal function, we can just remove it (from its caller too). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Plus a silence for a wrong "uninitialized var". Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Many methods are simple pure functions, and not depending on the object state. We convert these to staticmethods. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
This removes unused variables in the rest of the code (outside lib/). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
This patch should have only: - pylint disables - docstring changes - whitespace changes Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Similar to commit c881c5, we move the decorators out of classes, such that they become simple functions instead of methods. This more clean, since only the wrapped functions need to be methods/have access to ‘self’. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
'file' is a builtin keyword/type. Like many others, it should not be used as a variable/argument name. No code is actually passing in this argument so renaming it is simple. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
This runs pylint over all the python files. Yes, it takes a long while, but it's the only way to properly analyze the source codes as only in this way pylint can see all uses of the various modules/classes/etc. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
The chroot and fake hypervisors were missing: - the powercycle node functionality - proper handling of migration requests The powercycle was just used as in the other hypervisors (use the standard linux powercycle). The migration for chroot was disabled explicitly, whereas for the fake one it was implemented to simulate correctly. This required some work on the fake hypervisor, but now the implementation of start/stop/etc. is much more clean. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
This adds targeted pylint disables, but since _autoconf.py is autogenerated we need to do this in Makefile.am (hence the separate patch). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
We don't get any useful out of this - a git grep is as effective, and these only pollute the pylint output. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
This patch adds explicit errors (instead of notimplemented) in FileStorage (and the associated TODOs). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Wrong argument name and wrong number of arguments in string formatting. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
This patch abstract the check "is instance stopped" into a separate function, and thus simplifies a couple of higher-level functions. It also moves from manual read of the pidfile to use the (correct abstraction of) _InstancePidAlive. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
In some cases we only need the pidfile, but not the pid or the alive status. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Detected by an 'Unused variable' warning. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Note there are some cases left which need extra cleanup. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
The logging functions expand the arguments themselves, thus it's safer to let them do it rather than manual string formatting. Also re-wraps one comment. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
- Dec 28, 2009
-
-
Iustin Pop authored
* devel-2.0: Fix indentation in hv_kvm Implement BuildHooksEnv for NoHooksLU Clarifiy some more wide pylint disables Fix two bugs in seldom-used codepaths Update pylintrc Add targetted pylint disables Partial cherry-pick of 6c881c52 from the 2.1 branch Add a release script Fix a typo in the doc string Conflicts: lib/cli.py lib/cmdlib.py lib/hypervisor/hv_kvm.py lib/jstore.py lib/locking.py lib/mcpu.py lib/rapi/rlib2.py Many of the conflicts were on code removed from 2.1, so the resolving was trivial.
-
Iustin Pop authored
Per pylint warnings. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-