Statistics
| Branch: | Tag: | Revision:

root / test / ganeti.rpc_unittest.py @ 415feb2e

History | View | Annotate | Download (29.5 kB)

# Date Author Comment
7e6b6f1f 01/09/2012 02:34 pm Michael Hanselmann

rpc: More unittests

- Fix: Don't check st_atime for temporary file for upload tests
- Add tests for five encoders

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

c2dc025a 01/06/2012 02:36 pm Michael Hanselmann

rpc.ConfigRunner: Fix uploading file

Commit 601dfcb made some changes to the default encoders. This made
“ConfigRunner.call_upload_file” fail due to a missing encoder. This
patch applies the necessary changes to ConfigRunner and updates the
unittest for “call_upload_file”....

601dfcbb 01/06/2012 01:34 pm Michael Hanselmann

Add unittest for uploading file via RPC

After some preparing patches this unittest can finally be added.

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

065be3f0 01/06/2012 01:34 pm Michael Hanselmann

Add unittests for RPC client

This patch adds a number of unittests for the RPC client base class.
Some small changes were necessary in “rpc.py” to allow for better
testing.

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

120e7e77 01/06/2012 01:34 pm Michael Hanselmann

Add unittest for RPC compression

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

890ea4ce 01/05/2012 05:30 pm Michael Hanselmann

rpc._NodeConfigResolver: Support resolving offline nodes

This is needed to powercycle a node marked offline.

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

f863d7aa 01/05/2012 05:30 pm Michael Hanselmann

rpc._RpcProcessor: Make read timeout a non-keyword argument

It is always used and can be set to “None” if intended.

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

fce5efd1 01/05/2012 05:30 pm Michael Hanselmann

rpc: Pass resolver options to actual resolver

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

d9de612c 12/21/2011 06:02 pm Iustin Pop

Change internal RPC client body values

Currently, all RPC payloads sent by the client to the remote node
daemons must be identical, due to how the data is passed
internally. This is deficient in both use (from the programmer's point
of view) and from the network traffic (cluster verify/disk data...

5c3ee7b2 10/26/2011 06:13 pm Michael Hanselmann

Fix RPC unittest

Add missing “read_timeout” value.

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

db04ce5d 10/26/2011 11:53 am Michael Hanselmann

Move bootstrap-related RPC to generated wrappers

With this patch, only 6 RPC are left as old-style code.

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

83e7af18 10/26/2011 11:51 am Michael Hanselmann

rpc: Disable timeout check

This is in preparation for the definition-based RPC model, where
the timeout will be stored within the definition.

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

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

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

00267bfe 09/27/2011 02:47 pm Michael Hanselmann

rpc: Overhaul client structure

- Clearly separate node name to IP address resolution into separate
functions
- Simplified code structure (one code path instead of several)
- Fully unittested
- Preparation for more RPC improvements

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

b43dcc5a 08/19/2010 12:44 pm Manuel Franceschini

Support IPv6 node add

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

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

Support for resolving hostnames to IPv6 addresses

This patch enables IPv6 name resolution by using socket.getaddrinfo
instead of socket.gethostbyname_ex.

It renames the HostInfo class to Hostname and unifies its use throughout
the code. This is achieved by using static calls where no object is...

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

Always use address instead of hostname in rpc.Client

In light of the upcoming IPv6 support, this patch enables the rpc.Client
to always use a node's address to connect to it. This is necessary as we
do not want to rely on name resolution to connect to the correct IP...

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