| Branch: | Tag: | Revision:

root / lib @ cfa79a23

Name Size
  watcher 1.2 kB 6.1 kB 120.9 kB 90.6 kB 34.2 kB 121 kB 583.7 kB 4.3 kB 84.9 kB 56.2 kB 26.7 kB 10.8 kB 10.7 kB 79.2 kB 5.9 kB 61.1 kB 16.4 kB 25.9 kB 18.6 kB 6.2 kB 58 kB 2.5 kB 66.2 kB 66 kB 5.3 kB 9.6 kB 77.5 kB 25.1 kB 23.2 kB 6.3 kB 4.5 kB 11.5 kB 10.2 kB 13.2 kB 11.7 kB 7.4 kB 18.3 kB

Latest revisions

# Date Author Comment
cfa79a23 12/20/2012 11:57 am Michael Hanselmann

cmdlib: Additional opportunistic locking check

If opportunistic locking is requested in the opcode, but no iallocator
is used (not specified or no default), an error will be raised.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

4a6fce31 12/19/2012 07:44 pm Michael Hanselmann

Detect wrong Python module structure

If, for one reason or another, a module named "ganeti.ganeti" can be
succesfully imported (e.g. through a symlink in the wrong place), error
which are diffcult to debug can occur. This piece of code tests for the
unlikely case of that happening....

ff0c9604 12/19/2012 07:26 pm Guido Trotter

One more offline+shutdown fix

Currently gnt-instance shutdown --force of an offline instance
resets the offline status. Which of course is bad and completely
unintended. Fix. (caught by the new qa tests)

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

13659147 12/19/2012 07:15 pm Iustin Pop

Fix network LUs use of error code in OpPrereqError

Currently, most network LUs simply use EINVAL instead of correct error
codes; this patch tries to adjust the obvious cases.

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

572a277b 12/19/2012 06:55 pm Michael Hanselmann

_NetworkQuery: Simplify statistics computation

The code can loop directly over “self.wanted”, saving a lookup. An
explicit loop is also replaced with a generator.

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

892b5258 12/19/2012 06:55 pm Michael Hanselmann

cmdlib: Factorize network conflict detection

LUNetworkConnect and LUNetworkDisconnect had very similar code to detect
conflicts between instance's network interfaces and networks. This code
factorizes the common part and does some cleanup:

- Remove single-letter variable for lambda (“l”)...

84e110aa 12/19/2012 06:55 pm Michael Hanselmann

gnt-network: Fix import for textwrap

The style guide says to use “import foo”-style imports, not “from foo
import bar” unless it's a Ganeti module. There are some places with
exceptions, but this one certainly isn't warranted. Also fix the import

b34864e8 12/19/2012 06:55 pm Michael Hanselmann

gnt-network add: "--network" is required

Also do some minor code re-formatting.

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

0f5c7770 12/19/2012 06:54 pm Michael Hanselmann

cmdlib: Replace period with colon in error message

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

b4600d4f 12/19/2012 06:54 pm Michael Hanselmann

query: Factorize code for getting statistics value

This was not only copied for the networking fields in commit 306bed0e,
but commit cfcea7ef fixed wrongly ordered parameters and didn't fix the
original. Either way, this patch merges the two cases again. The newly...

View revisions

Also available in: Atom