Statistics
| Branch: | Tag: | Revision:

root / lib / http @ 1a2eb2dc

# Date Author Comment
bfbd12f7 11/14/2012 12:07 pm Michael Hanselmann

Warn on invalid lines in HTTP user files

Without this change, invalid lines or values would be silently ignored.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

8af734f8 11/08/2012 04:15 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    http/__init__.py: Remove extraneous argument
    rapi.testutils: Add utility to format HTTP headers
    rapi.testutils: Return headers from mock utility
    http: Add wrapper for mimetools.Message
    Add missing tests for commit f0d2286...
e080072c 11/08/2012 03:53 pm Michael Hanselmann

http/__init__.py: Remove extraneous argument

pylint complained, I fixed it, and unfortunately pushed too early.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

0e632cbd 11/08/2012 03:19 pm Michael Hanselmann

http: Add wrapper for mimetools.Message

A newly added piece of code will also have to parse headers, so having
this wrapper saves us from copying this part of code.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

46c1f828 11/06/2012 06:26 pm Guido Trotter

Merge branch 'devel-2.6'

  • devel-2.6:
    Disable E1101 on ganeti/http/server.py:424
    Fix live migration under xl
    Don't check for xend port when using xl

Conflicts:
lib/hypervisor/hv_xen.py: trivial

Signed-off-by: Guido Trotter <>...

57a6042e 11/06/2012 05:47 pm Guido Trotter

Disable E1101 on ganeti/http/server.py:424

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

2cbe9af3 10/04/2012 04:42 pm Michael Hanselmann

Factorize removing comments and empty lines from string

This will also be used for verifying the file storage directory.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

5ae4945a 08/23/2012 02:41 pm Iustin Pop

Bump pep8 version to 1.2

Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:

- bump version in the docs
- silence some new checks that are wrong due to our indent=2 instead of 4
- fix lots of errors in the code where the indentation was wrong by 1...

352e1a26 04/26/2012 10:33 pm Michael Hanselmann

errors: Add exception for RAPI testing utilities

This exception is raised to abort before actually sending a LUXI call
(there is no LUXI server involved in the test). The testing utilities
catch the exception to report a success (i.e. the code didn't throw...

d859a2cf 02/22/2012 03:13 pm Michael Hanselmann

http.server: Factorize request handling even more

This splits even more parts of the request handling code into a separate
class. Doing so allows us to reuse this part of the code for tests (e.g.
mocks). Unlike before now the error handling can also be reused....

377ae13e 02/22/2012 03:12 pm Michael Hanselmann

http.server: Move error message formatting to handler class

Like before this patch moves more functionality from the actual server
class into a separate handler class. At the same time the function is
changed to return both content-type and body instead of relying on a...

e0003509 02/22/2012 03:12 pm Michael Hanselmann

Split handling HTTP requests into separate class

Until now HTTP requests were handled in the same class as incoming
connections (http.server.HttpServer). With this change the request
handling is delegated to a separate class which can be re-used in tests...

c81f452f 02/22/2012 03:12 pm Michael Hanselmann

http.server: Factorize request handling

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

bac6ea51 10/21/2011 01:58 pm Michael Hanselmann

http.client: Remove use of PycURL's “reset” function

We don't re-use cURL objects anymore, so there's no need to reset them.
PycURL 7.19.0 has a reference counting bug leading to a crash after
a certain number of performed requests.

Since a unittest depended on this function for a test, it is replaced...

abbf2cd9 10/13/2011 03:22 pm Michael Hanselmann

http.client: Remove HTTP client pool code

This patch removes all remains of the HTTP client pool. Newly added unittests
provide 96% coverage on http.client.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

90b2eeb0 09/28/2011 01:15 pm Michael Hanselmann

http.client: Show pending requests as “owner”

In the context of the lock monitor a “pending” item does not yet own the
requested resource. Since these HTTP requests are already undergoing
they should be shown as owners.

Signed-off-by: Michael Hanselmann <>...

7cb2d205 09/28/2011 01:15 pm Michael Hanselmann

http.client: Add nice name to requests

With this change a node name instead of the IP address can be shown for
pending RPC requests:
Name Pending
rpc/node18.example.com/test_delay thread:Jq1/Job692/TEST_DELAY

Signed-off-by: Michael Hanselmann <>...

aea5caef 09/28/2011 01:15 pm Michael Hanselmann

rpc/http: Show pending RPC requests in lock monitor

Not all requests use an instance of RpcRunner yet and therefore won't
show up (only instances have access to the global Ganeti context).
Currently only the IP address is accessible. Another patch will add a...

ecd61b4e 09/28/2011 01:06 pm Michael Hanselmann

http.client: Factorize code interacting with cURL

This simplifies HttpClientPool.ProcessRequests significantly and will be
handy for showing pending RPC requests in the lock monitor.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

a3c10d31 09/27/2011 02:47 pm Michael Hanselmann

http.client: Reduce performance impact by assertion

Call dict.values once instead of N times.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

b459a848 08/30/2011 11:24 am Andrea Spadaccini

DeprecationWarning fixes for pylint

In version 0.21, pylint unified all the disable-* (and enable-*)
directives to disable (resp. enable). This leads to a lot of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst)....

e687ec01 08/25/2011 01:53 pm Michael Hanselmann

PEP8 style fixes

Identified using the “pep8” utility.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

d0c8c01d 07/25/2011 04:55 pm Iustin Pop

Most boring patch ever

s/'/"/ in (hopefully) the right places.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

85061b9a 06/01/2011 08:14 pm Michael Hanselmann

http.client: Make debug log less noisy

The HTTP client code generates quite a lot of debug log messages. With
this patch they're hidden unless explicitely enabled in the code.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

7b70d7a8 10/15/2010 06:13 pm Apollon Oikonomopoulos

http.client: Disable SSL session ID cache

This patch disables the SSL session ID cache for all cURL operations.
This is needed because http.HttpBase's PyOpenSSL implementation does not
currently set a context using SSL_set_session_id_context(3SSL), cURL
tries to re-use the session ID and, according to...

c6e7edb8 10/15/2010 05:24 pm Michael Hanselmann

http.auth: Fix docstring error

This was missing from commit 2287b920.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

744061f3 10/14/2010 03:44 pm Iustin Pop

Merge branch 'stable-2.2'

  • stable-2.2:
    Release 2.2.1~rc1
    Require aclocal 1.11.1 or above for devel/release
    Revert "Require aclocal 1.11.1 or above for autogen.sh"
    Add mising --units in gnt-instance list man page
    Set list of trusted SSL CAs for client to verify...
2287b920 10/13/2010 03:18 pm Michael Hanselmann

http.auth.ReadPasswordFile: Don't read file directly

Reading the file before this function allows for better error
reporting.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

2d93a6a7 10/12/2010 07:09 pm Apollon Oikonomopoulos

Set list of trusted SSL CAs for client to verify

As per SSL_CTX_set_client_CA_list(3SSL), set the list of acceptable CAs
advertised to SSL clients to include the server's own certificate. This
evidently fixes the pycurl/gnutls RPC client.

During the TLS Handshake, when client verification is requested, the...

a68fe106 09/10/2010 03:11 pm Michael Hanselmann

Merge branch 'devel-2.2'

  • devel-2.2:
    Fix pylint warning in http/__init__.py
    Allow SSL ciphers to be overridden in HTTP server
    jqueue: Resume jobs from “waitlock” status
    jqueue: Move queue inspection into separate function
    jqueue: Don't update file in MarkUnfinishedOps...
5117f822 09/10/2010 02:54 pm Michael Hanselmann

Fix pylint warning in http/__init__.py

My bad for not seeing this before:
R0201:614:HttpBase.GetSslCiphers: Method could be a function

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

91c69613 09/10/2010 02:43 pm Michael Hanselmann

Allow SSL ciphers to be overridden in HTTP server

Users of this class, such as the RAPI server, might want to override or adjust
the default SSL cipher defined in a constant.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

981732fb 08/23/2010 01:31 pm Manuel Franceschini

Make family argument in FormatAddress optional

By doing this we delegate the task of finding the correct address family
to the FormatAddress method.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

1a8337f2 08/18/2010 11:28 am Manuel Franceschini

rapi.client, http.client: Format url correctly when using IPv6

This patch moves the FormatAddress helper function from daemon.py to
netutils.py. This enables its use in http.client as well as in
rapi.client. Furthermore this adds functionality to format IPv6...

db4e138b 08/18/2010 11:27 am Manuel Franceschini

Support IPv6 in lib/http/server.py

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Michael Hanselmann <>

33231500 07/16/2010 06:18 pm Michael Hanselmann

Convert RPC client to PycURL

Instead of using our custom HTTP client, using PycURL's multi
interface allows us to get rid of the HTTP client threadpool.
The majority of the code is still in the ganeti.http.client
module.

A simple per-thread HTTP client pool gives cURL a chance to...

971bbd84 06/14/2010 07:58 pm Michael Hanselmann

Disallow DES for SSL connections

Older OpenSSL versions include DES-CBC3-* ciphers when specifying the
HIGH group of ciphers. Removing potentially weak ciphers from the list
of allowed ciphers ensures only strong ciphers are considered for SSL
connections....

e0036155 06/04/2010 05:26 pm Iustin Pop

http client: support per-request read timeout

Currently, the read timeout is hardcoded in the
HttpClientRequestExecutor class. The patch changes the timeout so that
it's a per-request property, and makes the rpc.Client class pass one
explicitly in. Furthermore, we modify the rpc.RpcRunner class to support...

716a32cb 06/01/2010 11:34 am Guido Trotter

Move hash functions to the compat module

Since the hash functions' changed their module name between python 2.4
and 2.6, and we have to do an try/import/except trick, we'll do it just
once, for both hash functions, and in compat.py. This also fixes a use...

791f317d 03/18/2010 03:56 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    burnin: implement basic confd testing
    AsyncUDPSocket.process_next_packet
    WaitForSocketCondition: rename, handle EINTR
    move http.WaitForSocketCondition to utils
    ConfdCountingCallback
    ConfdClient: add synchronous features...
dcd511c8 03/18/2010 01:39 pm Guido Trotter

move http.WaitForSocketCondition to utils

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

dfdc4060 03/18/2010 01:39 pm Guido Trotter

WaitForSocketCondition: rename, handle EINTR

- Rename WaitForSocketCondition to SingleWaitForFdCondition
- Avoid potentially infinite loop, if we continue to get interrupted
- Handle eintr correctly
- Avoid the poller try/finally, as the poller object gets destroyed...

bb3776b4 03/15/2010 04:25 pm Michael Hanselmann

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1: (116 commits)
    Implement replacing cluster certs and keys via “gnt-cluster renew-crypto”
    cli: Add helper function to stop and start whole cluster
    cfgupgrade: Use new bootstrap function for certs and keys...
6873a52a 03/10/2010 04:02 pm Michael Hanselmann

http.auth: Disable pylint warnings

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

d44ea6a3 03/10/2010 12:18 pm Michael Hanselmann

http.server: Improve request logging in debug mode

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

a8950eb7 03/10/2010 12:17 pm Michael Hanselmann

Provide unittests for http.auth

To simplify writing unittests, one data structure class in http.server is
also changed. According to the coverage utility, this provides 95%
coverage.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

23ccba04 03/10/2010 12:17 pm Michael Hanselmann

http.auth: Fix bug with checking hashed passwords

When username and password were sent for a resource not requiring
authentication, it wouldn't be accepted if the user in question had a
hashed password. The reason was that the function GetAuthRealm used to...

7b8f3fcd 02/26/2010 03:37 pm Michael Hanselmann

Merge remote branch 'origin/devel-2.0' into devel-2.1

  • origin/devel-2.0:
    Fix two potentially endless loops in http library
    Update NEWS file and bump version to 2.0.6
    ganeti-cleaner: does 'echo 0' instead of 'exit 0'

Conflicts:
NEWS: Trivial
configure.ac: Trivial...

0be13136 02/26/2010 02:39 pm Michael Hanselmann

Fix two potentially endless loops in http library

The first can be problematic if poll(2) returns POLLHUP|POLLERR on a
socket. Before it would be only be respected for SOCKOP_RECV, but since
they can also occur on other socket operations, esp. in combination with...

69ca2f0b 02/18/2010 02:40 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    Reset tempfile module after fork where useful
    Move RunInSeparateProcess to ganeti.utils
    Add function to reset tempfile module after fork
    Fix ssh host key checking with no-key-check
    Simplify a bit _GetWantedNodes...
82869978 02/18/2010 02:21 pm Michael Hanselmann

Reset tempfile module after fork where useful

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

e7307f08 02/01/2010 03:01 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    Bump version to 2.1.0~rc5
    Makefile.am: Targets used directly should depend on BUILT_SOURCES
    Make the snapshot decision based on disk type
    Three small typos in man pages
    Fix missing bridge for xen instances
    Fix flipping MC flag bug...
4c1a504b 01/26/2010 02:58 pm Iustin Pop

Merge branch 'devel-2.0' into devel-2.1

  • devel-2.0:
    Fix the mocks.py for 2.0 unittests
    LURemoveNode safety in face of wrong node list
    Fix an unsafe formatting bug
    Ensure all int/float conversions are handled right

Conflicts:
lib/backend.py - trivial merge...

691744c4 01/25/2010 06:16 pm Iustin Pop

Ensure all int/float conversions are handled right

int()/float() can raise either ValueError (in case of int("a")), or
TypeError (in case of int(None)). We had many bugs over time due to
this, and a recent one was just diagnosed, so we go over the codebase...

b9f8d18f 01/22/2010 06:38 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1: (38 commits)
    Bump version to 2.1.0~rc4
    Update man page of gnt-instance
    KVM: fix pylint warning
    KVM: be more resilient on broken migration answers
    Allow filtering for (node-)tags
    Add unittests for cli.GenerateTable...
16b037a9 01/22/2010 04:36 pm Michael Hanselmann

Remove http.HttpJsonConverter

With the move of the content-type handling to the various users of the HTTP
layer, this class isn't really useful anymore.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

ab221ddf 01/22/2010 04:17 pm Michael Hanselmann

http.server: No longer enfore JSON encoding for body

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 <>...

200e38ac 01/22/2010 04:17 pm Michael Hanselmann

http.server: Refuse HTTP/1.1 request without Host header

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

580558a3 01/22/2010 04:17 pm Michael Hanselmann

http: Add two new exceptions, one constant

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...

231db3a5 01/22/2010 04:17 pm Michael Hanselmann

Factorize LUXI parsing and handling code

Also fix a typo in http/__init__.py and add unittests
for the LUXI parsing and formatting functions.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

9fa2e150 01/13/2010 03:03 pm Michael Hanselmann

Improve logging for workerpool tasks by providing repr

Before it would log something like “starting task
(<ganeti.http.client._HttpClientPendingRequest object at 0x2aaaad176790>,)”,
which isn't really useful for debugging. Now it'll log “[…]
<ganeti.http.client._HttpClientPendingRequest...

89e2b4d2 01/13/2010 03:02 pm Michael Hanselmann

workerpool: Make worker ID alphanumeric

Having a proper name instead of just a number makes debugging
easier.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

24cd3744 01/04/2010 12:55 pm Iustin Pop

Merge remote branch 'devel-2.1'

  • 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...
30e4e741 01/04/2010 11:20 am Iustin Pop

Fix unused imports or add silences where needed

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 <>
Reviewed-by: Olivier Tharan <>

2d54e29c 01/04/2010 11:17 am Iustin Pop

Further pylint disables, mostly for Unused args

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 <>...

7e950d31 01/04/2010 11:16 am Iustin Pop

Convert to static methods (where appropriate)

Many methods are simple pure functions, and not depending on the object
state. We convert these to staticmethods.

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

7260cfbe 01/04/2010 11:15 am Iustin Pop

Add targeted pylint disables

This patch should have only:

- pylint disables
- docstring changes
- whitespace changes

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

1122eb25 01/04/2010 11:10 am Iustin Pop

Remove many 'Unused variable' warnings

Note there are some cases left which need extra cleanup.

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

d984846d 12/28/2009 02:05 pm Iustin Pop

Merge branch 'devel-2.0' into devel-2.1

  • 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 6c881c5 from the 2.1 branch...
fe267188 12/28/2009 12:43 pm Iustin Pop

Add targetted pylint disables

This patch adds targeted pylint disables, where it makes sense (either
due to limitations in pylint or due to historical usage), and also a few
blanket ones in rapi where all the names are… “different”.

Signed-off-by: Iustin Pop <>...

57fd6d0b 11/30/2009 04:43 pm Michael Hanselmann

A few style updates

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

8d0a4f99 11/25/2009 01:08 pm Michael Hanselmann

Add check for OpenSSL entropy status

By checking for this explicitly, the errors (SSLEAY_RAND_BYTES, “PRNG
not seeded”) will happen in the start-up phase of the daemon and not
only when executing remote procedure calls.

Signed-off-by: Michael Hanselmann <>...

6c881c52 11/06/2009 03:48 pm Iustin Pop

Fix pylint 'E' (error) codes

This patch adds some silences and tweaks the code slightly so that
“pylint --rcfile pylintrc -e ganeti” doesn't give any errors.

The biggest change is in jqueue.py, the move of _RequireOpenQueue out of
the JobQueue class. Since that is actually a function and not a method...

23057d29 11/02/2009 02:05 pm Michael Hanselmann

Epydoc fixes

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

bf9bd8dd 10/29/2009 11:33 am Michael Hanselmann

http.auth: Add new function to verify passwords

This new function supports two schemes for passwords:
- Old-style cleartext passwords
- Hashed passwords according to RFC2617 (H(A1))

Schemes are differentiated by their prefix, a concept also
used in OpenLDAP. Cleartext passwords can no longer start...

bcb1a39e 08/25/2009 06:53 pm Michael Hanselmann

ganeti-noded: Close listening socket in child

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

112d240d 08/20/2009 05:04 pm Guido Trotter

Convert the http server/mainloop to asyncore

We can avoid most of the Mainloop.Run() code if we use asyncore
for delivering I/O events, and just concentrate on what's missing in
asyncore: singnal handling and timers. This way confd can be ported to
use Mainloop as well....

7c4d6c7b 07/07/2009 03:54 pm Michael Hanselmann

Fix pylint warnings

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

5bbd3f7f 07/07/2009 03:51 pm Michael Hanselmann

Fix some typos

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

81b59aaf 06/23/2009 03:19 pm Iustin Pop

Fix HTTP server library handling of credentials

Currently the http library only checks credentials when authentication
is required. This means that any credentials are accepted on the root
resource, for example, which makes problems hard to diagnose - the...

8a088b79 03/20/2009 03:07 pm Guido Trotter

Fix _NOQUOTE regexp

Allow expressions longer than one character to match.

Reviewed-by: imsnah

5fcc718f 02/27/2009 03:06 pm Iustin Pop

Fix some epydoc style issues

99% of the epydoc return tags are "@return:", but each of the modified files
had one "@returns:" line. We fix this for consistency.

Reviewed-by: imsnah

1f8588f6 02/13/2009 01:38 pm Iustin Pop

RAPI: format error messages as JSON

This patch changes the format of the HTTP error messages from text/html, which
is hard to parse from RAPI clients, to JSON which can be automatically parsed.

The error message is an object, which contains always three keys:...

77e1d753 02/13/2009 01:38 pm Iustin Pop

Make RAPI return 502/504 errors for luxi errors

This changes the RAPI error codes for luxi errors; a timeout error is
now reported properly as 504, while any other luxi error is reported as
502.

It would be good to convert even more errors into proper return codes in...

85414b69 02/04/2009 05:11 pm Iustin Pop

rapi: fix authentication and queries

For queries, we don't want to require authentication. We fix this by adding an
override GetAuthRealm in the rapi daemon.

We also fix a method name.

Reviewed-by: imsnah

25e7b43f 01/15/2009 12:00 pm Iustin Pop

Some docstring updates

This patch rewraps some comments to shorter lengths, changes
double-quotes to single-quotes inside triple-quoted docstrings for
better editor handling.

It also fixes some epydoc errors, namely invalid crossreferences (after
method rename), documentation for inexistent (removed) parameters, etc....

14d57a8b 01/15/2009 12:00 pm Iustin Pop

ganeti-noded: reduce log noise

The source port/addr is currently logged three times for each
connection, and this is unnecessary. We change two log entries to debug,
since they are useful for precise timing, and we keep only one at INFO
level.

Reviewed-by: imsnah

e09fdcfa 01/06/2009 11:57 am Iustin Pop

Fix some pylint-detected issues

Two bad indentation cases and a missing variable.

Reviewed-by: imsnah

e6e94655 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Function to read password file

Lines in the password file are of the following format:

&lt;username&gt; &lt;password&gt; [options]

Fields are separated by whitespace. Username and password are
mandatory, options are optional and separated by comma (",")....

68fa9caf 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Add support for private data in HTTP requests

Reviewed-by: amishchenko

be500c29 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Add support for basic HTTP authentication

As per RFC2617.

Reviewed-by: amishchenko

f8bd7df3 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Prepare authentication for HTTP server

The authentication class will override PreHandleRequest.

Reviewed-by: amishchenko

aea0ed67 12/18/2008 06:21 pm Michael Hanselmann

ganeti.http: Don't pass poller object around

They're cheap to instantiate and doing this changes makes the code
a bit simpler.

Reviewed-by: ultrotter

79589f25 12/18/2008 03:45 pm Michael Hanselmann

Rename http.HttpInternalError to HttpInternalServerError

All other exceptions are named after the error name in RFC2616 (HTTP/1.1).

Reviewed-by: amishchenko

b3660886 12/18/2008 03:45 pm Michael Hanselmann

ganeti.http: Add more constants and errors

Reviewed-by: amishchenko

45eac583 12/18/2008 03:45 pm Michael Hanselmann

ganeti.http: Ignore ENOTCONN when shutting down the connection

Reviewed-by: amishchenko

a8e01e9f 12/18/2008 03:44 pm Michael Hanselmann

Implement support for additional headers with HTTP errors

Reviewed-by: amishchenko

f30ca1e6 12/17/2008 04:30 pm Michael Hanselmann

Add simple unittests for ganeti.http

More complex unittests will need some refactoring in the HTTP code.

Reviewed-by: amishchenko

f088165d 12/15/2008 12:06 pm Michael Hanselmann

ganeti.http: Add three TODOs for improvements

Reviewed-by: iustinp

f2e13d55 12/15/2008 11:48 am Michael Hanselmann

ganeti.http: Explicitly initiate handshake

Otherwise it would be done on the first read/write operation, making
error handling more difficult (such as EOF during handshake).

Reviewed-by: iustinp