Statistics
| Branch: | Tag: | Revision:

root / test / mocks.py @ 8dc76d54

History | View | Annotate | Download (2.7 kB)

# Date Author Comment
e8906f7d 08/04/2011 05:26 pm Iustin Pop

Fix unittest failure after list_owned changes

We just need an object that has a list_owned method.

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

2d91e6ae 05/10/2011 02:03 pm Michael Hanselmann

Re-indent test/mocks.py using two spaces

No idea where those four spaces came from, but they must've been there
for a while.

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

0d5a0b96 05/10/2011 02:03 pm Michael Hanselmann

cmdlib: Remove acquired_locks attribute from LUs

The “acquired_locks” attribute in LUs is used to keep a list of acquired
locks at each lock level. This information is already known in the lock
manager, which also happens to be the authoritative source. Removing the...

e60c73a1 09/07/2010 02:26 pm René Nussbaumer

The config now should also belong to confd group and readable by it

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

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

7b4c1cb9 07/12/2010 05:32 pm Michael Hanselmann

Provide feedback function for all LU methods

By exposing mcpu's _Feedback function (now renamed to “Log”) to LU's,
methods like ExpandNames can also write to the job execution log.

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

a744b676 07/09/2010 04:37 pm Manuel Franceschini

Introduce lib/netutils.py

This patch moves network utility functions to a dedicated module.

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

bd5f214b 07/08/2010 04:45 pm Apollon Oikonomopoulos

_CheckIAllocatorOrNode unit tests

Add unit tests to check the function of _CheckIAllocatorOrNode

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

c071c5b3 07/20/2009 06:54 pm Michael Hanselmann

Fix unittests broken by commit 2bb5c9115f

File "../test/ganeti.hooks_unittest.py", line 239, in setUp
self.lu = FakeLU(FakeProc(), self.op, self.context, None)
File "…/ganeti/cmdlib.py", line 92, in init
self.LogStep = processor.LogStep
AttributeError: FakeProc instance has no attribute 'LogStep'...

3fb4f740 06/15/2009 08:08 pm Iustin Pop

Convert hooks_runner rpc to new style result

This also converts (and fixes) unittests and mock objects to deal with
this change, and the custom hook verifier in cmdlib.LUClusterVerify.

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

4a89c54a 01/23/2009 02:36 pm Iustin Pop

Introduce more configuration consistency checks

This patch enhances the duplicate DRBD minors checks (currently just a
few) and adds automatic checks of configuration consistency at
configuration file writing time.

In order to do so and show meaningful error messages, the...

c259ce64 10/01/2008 08:37 pm Michael Hanselmann

Get rid of ssconf

Remove leftovers from ssconf.

Reviewed-by: iustinp

7688d0d3 10/01/2008 08:35 pm Michael Hanselmann

Convert ssh.py

Get rid of ssconf and convert to configuration instead.

Reviewed-by: iustinp

437138c9 10/01/2008 08:34 pm Michael Hanselmann

Convert mcpu.py

Replacing ssconf with configuration.

Reviewed-by: iustinp

f4555db2 07/08/2008 11:49 am Guido Trotter

mocks: create a FakeContext object

This will be passed to FakeLUs

Reviewed-by: iustinp

75a5f456 03/18/2008 03:02 pm Michael Hanselmann

Add function to write cluster SSH key to known_hosts file

The whole Ganeti cluster has a single SSH key. Its fingerprint is
written to Ganeti's known_hosts file, together with an alias. This
allows us to always use that alias instead of the real hostname,...

2395c322 11/09/2007 10:13 pm Iustin Pop

Soften the requirements for hooks execution

Currently, an unreachable node (or one that return undetermined failure)
in the hooks pre-phase will abort the curren operation. This is not
good, as a down node could prevent many operation on the cluster.

This patch changes a RPC-level failure (and not a hook execution...

2f31098c 10/10/2007 01:00 pm Iustin Pop

Remove the shebang from modules

Since modules are not directly executables, remove the shebang from
them. This helps with lintian warnings.

Also make the autogenerated _autoconf.py contain two comment lines at
the beginning, like the other modules.

Reviewed-by: ultrotter

89e1fc26 09/21/2007 04:37 pm Iustin Pop

Remove requirement that host names are FQDN

We currently require that hostnames are FQDN not short names
(node1.example.com instead of node1). We can allow short names as long
as:
- we always resolve the names as returned by socket.gethostname()
- we rely on having a working resolver...

5ca84bdd 09/12/2007 06:54 pm Michael Hanselmann

Fix typo in last commit.