Statistics
| Branch: | Tag: | Revision:

root / lib / utils @ ed6d006b

Name Size
__init__.py 23.9 kB
algo.py 7.3 kB
filelock.py 5 kB
hash.py 2.4 kB
io.py 29.9 kB
log.py 9.5 kB
lvm.py 2.8 kB
mlock.py 2.3 kB
nodesetup.py 3.4 kB
process.py 29.8 kB
retry.py 6.2 kB
text.py 17.1 kB
wrapper.py 5.3 kB
x509.py 12.3 kB

Latest revisions

# Date Author Comment
34098a73 09/20/2013 03:21 pm Klaus Aehlig

Fix corner-case in handling of remaining retry time

Consider a remaining time of 0 as already timed out. Otherwise,
there is no guarantee that calling utils.Retry with timeout 0
will call the function precisely once; it might run in time
shorter than the resolution of timer....

fc84ef94 07/09/2013 07:41 pm Michele Tartara

Add function for checking file access permissions

The CanRead function checks whether a user of the local machine (specified
by name) can access a given file.

IsUserInGroup is a helper function for CanRead, but might also be used
independently, so its name does not begin with an underscore....

c28911dd 04/22/2013 02:11 pm Michele Tartara

Add function for getting the timestamp in nanoseconds

The timestamp is returned as an integer number of nanoseconds since the Unix
epoch.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

651cc3e2 04/17/2013 05:49 pm Christos Stavrakakis

Check that device names are unique and valid

Extend the CheckArguments phase of LUInstanceCreate and CheckPrereq
phase of LUInstanceSetParams to also check if the name parameters of
disks and NICs are unique and valid.

Signed-off-by: Christos Stavrakakis <>...

aeb6ba44 01/30/2013 07:39 pm Dato Simó

Document that OpTestDelay/TestDelay take duration in seconds

Also, fix @rtype and @return elements of utils.TestDelay(), which now
returns a tuple but this wasn't being indicated.

Signed-off-by: Dato Simó <>
Reviewed-by: Helga Velroyen <>

11064155 01/16/2013 07:09 pm Bernardo Dal Seno

utils.LvmExclusiveCheckNodePvs() returns more info

utils.LvmExclusiveCheckNodePvs() now returns the size of the smallest and
biggest PVs of a node. They will be used for cross-node consistency checks.

Signed-off-by: Bernardo Dal Seno <>...

63c73073 12/21/2012 01:40 pm Bernardo Dal Seno

LVM disk creation uses dedicated PVs

When exclusive_storage is set, PVs are allocated according to the
design-partitioned design doc.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>

59726e15 12/21/2012 01:40 pm Bernardo Dal Seno

Added class to contain information about a PV

This makes the code more readable and easier to upgrade.
bdev.LogicalVolume.GetPVInfo and the code that depends on it have been
refactored to use the new class.

utils.CheckVolumeGroupSize() has been moved to lib/utils/lvm.py, where more...

80a0546b 12/20/2012 06:16 pm Michele Tartara

Add function for generating UUIDs in the Haskell codebase

Its first use will be to generate the salt for ConfD requests of the Haskell
client, as in the Python client.

Unit test added as well.

Signed-off-by: Michele Tartara <>
Reviewed-by: Iustin Pop <>

eac9b7b8 12/20/2012 05:08 pm Michael Hanselmann

Add utility to format dictionary as key=value strings

This will be used in QA to format network interface parameters.

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

View revisions

Also available in: Atom