Statistics
| Branch: | Tag: | Revision:

root / lib / utils.py @ c6997f21

History | View | Annotate | Download (59.7 kB)

# Date Author Comment
3a541d90 09/22/2009 05:01 pm Iustin Pop

Fix utils.MatchNameComponent for full matches

While ‘test1’ matches both ‘test1’ and ‘test1.example’, it has a full,
exact match and we should return it if that is the case.

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

e948770c 09/10/2009 07:01 pm Michael Hanselmann

Move LoadModule function to ganeti.build

It should only be used at build-time.

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

016d04b3 09/03/2009 08:32 pm Michael Hanselmann

Even more style fixes

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

d6f5892b 09/03/2009 06:44 pm Michael Hanselmann

Move LoadModule function to utils

It can be used by unittests for daemons/* or scripts/*.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

2a887df9 09/03/2009 06:44 pm Michael Hanselmann

utils.CalculateDirectorySize: Don't redefine builtin

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

13998ef2 09/03/2009 06:43 pm Michael Hanselmann

Use ReadFile/WriteFile in more places

This survived QA, burnin and unittests.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

5cbe43a5 08/26/2009 08:05 pm Michael Hanselmann

Remove watcher pause file 1h past end time

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

05e50653 08/26/2009 07:09 pm Michael Hanselmann

Add file to pause watcher for a certain duration

This can be used during maintenance work.

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

ec2c2bc4 08/26/2009 03:46 pm Luca Bigliardi

GenerateSecret: specify the length of the secret

Add a parameter to specify the length of the bytes sequence represented by the
returned hex string. Defaulting to 20 so it's compatible with previous SHA1
hash.

Signed-off-by: Luca Bigliardi <>...

451575de 08/20/2009 12:28 pm Guido Trotter

Add a new SignalHandled decorator

This decorator can be used to call a function holding with protection
from a given signal. The function should accept a dict of
utils.SignalHandler, indexed by signal number, and make use of it.

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

6c52849e 08/20/2009 11:43 am Guido Trotter

SignalHandler, only accept list of signals

utils.SignalHandler can accept either a list of signals or a single
signal, but it's always called with a list. Removing the single signal
option.

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

3b813dd2 08/17/2009 05:46 pm Iustin Pop

Add utils.FormatTime and a simple unittest

We don't format with subsecond-precision.

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

3f6a47a8 07/29/2009 03:09 pm Michael Hanselmann

utils: Add functions to calc directory size and free space on filesystem

These will be used by the new storage unit framework.

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

cd50653c 07/24/2009 03:04 pm Guido Trotter

Change GetNodeDaemonPort to GetDaemonPort in utils

GetNodeDaemonPort is used to lookup the node daemon port in the services
file, and if not found to return the default one. We make it a generic
function, which accepts the daemon name in input, so that it can be used...

2f7140ba 07/08/2009 12:28 pm Guido Trotter

Merge branch 'next' into branch-2.1

  • next:
    Create a new --no-voting option for masterfailover
    ganeti-masterd: allow non-interactive --no-voting
    Fix pylint warnings
    Add custom pylintrc
    bootstrap: Don't leak file descriptor when generating SSL certificate...
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 <>

8b46606c 06/29/2009 05:26 pm Guido Trotter

check_ident_key_val, handle no_ and - prefixes

If an ident member of an IdentKeyVal relationship starts with no_ or -,
handle it the same way we do for a key. Some unittests are added to
check that check_ident_key_val behaves as expected.

This patch also changes ForceDictType to, for now, fail on such an...

29921401 06/18/2009 01:49 pm Iustin Pop

Fix various pylint warnings

There were multiple issues:
- copy-paste resulted in wrong indentation
- wrong function name
- missing spaces around assignment
- overriding built-in names (type, dir) or already defines ones
(errors, hypervisor)

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

af0413bb 06/16/2009 02:28 pm Guido Trotter

Merge branch 'next' into branch-2.1

  • next: (22 commits)
    Update NEWS and version for 2.0.1 release
    gnt-{instance,backup}(8) --nic is actually --net
    Fix a wrong function name in backend.DrbdAttachNet
    GNT-CLUSTER fix search-tags example
    Enable stripped LVs...
38ea42a1 06/15/2009 08:08 pm Iustin Pop

Convert test_delay rpc to new style result

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

31e22135 06/15/2009 08:08 pm Iustin Pop

Remove utils.CheckDict since it's no longer used

Only the custom handling in rpc.py for call_node_info used this, so now
it can be removed.

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

17c61836 05/22/2009 06:03 pm Guido Trotter

IsNormAbsPath and users, use "normalized" term

We used to refer to normalized paths as "normal" which might be
confusing. This fixes the syntax in all current IsNormAbsPath users and
in the docstring.

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

da961187 05/22/2009 03:58 pm Guido Trotter

Add utils.IsNormAbsPath function

Currently most of the time we check for absolute path, but that doesn't
protect us from some invalid paths. In some places we should be more
strict, and this function should help us to.

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

d392fa34 05/19/2009 08:44 pm Iustin Pop

Fix the SafeEncoding behaviour

Currently we have bad behaviour in SafeEncode:
- binary strings are actually not handled correctly (ahem)
- the encoding is not stable, due to use of string_escape

For this reason, we replace the use of string_escape with part of the...

835528af 05/19/2009 04:21 pm Iustin Pop

Move more hypervisor strings into constants

This patch adds constants for the mouse and boot order strings; while
there are still some issues remaining, we're trying to cleanup hardcoded
strings from the hypervisors.

Since the formatting of frozensets is currently wrong, we also add an...

7ffe8fba 05/05/2009 06:06 pm Carlos Valiente

Avoid DeprecationWarning on Python >= 2.6

Python 2.6 complains about module 'sha' being deprecated. It makes
execution of Ganeti commands a bit annoying, and when you run
'ganeti-watcher' in cron jobs, you get a mail message after every
execution.

Tests pass under under Python 2.6 and Python 2.4....

c803b052 05/05/2009 02:00 pm Iustin Pop

RunCmd: log command line for missing cmd case

In case of missing programs, currently utils.RunCmd doesn't show any
information to help debugging, only 'No such file or directory'. This
patch adds error handling for the ENOENT case such that at least we have...

81b7354c 05/04/2009 04:51 pm Iustin Pop

Small optimisation in utils.WriteFile

Currently we always try to remove the new file, even if the rename
succeeded. This patch tracks the existence of the new file and doesn't
try to remove it if we managed to rename it.

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

1b2c8f85 03/02/2009 02:18 pm Iustin Pop

Fix a bug in utils.EnsureDirs

This fixes a bug introduced in rev 2562 and also fixes the indentation.

Reviewed-by: ultrotter

9dae41ad 02/27/2009 07:08 pm Guido Trotter

Create runtime dir in bootstrap

Some hypervisors (KVM) need RUN_GANETI_DIR to exist even at cluster init
time. This patch creates it in InitCluster just before hv parameter
checking. Since the code to make list of directories is already repeated
twice in the code, and this would be the third time, we abstract it into...

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

69efe319 02/26/2009 02:32 pm Michael Hanselmann

Fix typos in utils.WriteFile's docstring

Reviewed-by: iustinp

9b977740 02/12/2009 11:15 am Guido Trotter

Apply the right permissions to /etc/hosts

In the current Ganeti version when modifying /etc/hosts we mistakenly
give it the permissions of the temporary file we create to define its
content, which is by default 0600. This breaks most non-root
applications, and thus must be corrected. This patch forces the mode to...

a5728081 02/10/2009 05:06 pm Guido Trotter

Instance parameters: force typing

We want all the hv/be parameters to have a known type, rather than a
random mix of empty string, boolean values, and None, so we declare the
type of each variable and we enforce/convert it.

- Add some new constants for enforceable value types...

1de62f37 02/03/2009 06:04 pm Guido Trotter

Correct a typo in ReadPidFile's docstring

Reviewed-by: iustinp

26f15862 02/03/2009 04:45 pm Iustin Pop

An attempt at fixing some encoding issues

This patch unifies the hardcoded re-encoding attempts into a single
function in utils.py. This function is used to take either an unicode or
str object and convert it to a ASCII-only str object which can be safely...

9939547b 01/23/2009 03:33 pm Iustin Pop

Fix batcher for 2.0-style disks and nics

This patch fixes the gnt-instance batch-create command, and in doing so
also slightly changes two other functions:
- we change utils.ParseUnit so that it accepts integer values also
(both ParseUnit(5) and ParseUnit("5") return the same value)...

d21d09d6 01/20/2009 07:19 pm Iustin Pop

Update the logging output of job processing

(this is related to the master daemon log)

Currently it's not possible to follow (in the non-debug runs) the
logical execution thread of jobs. This is due to the fact that we don't
log the thread name (so we lose the association of log messages to jobs)...

ae59efea 01/20/2009 06:47 pm Michael Hanselmann

.gitignore: Don't exclude whole /autotools/ dir, but only files

This way newly added files will be not be excluded by default. Fixes
also a small whitespace error in utils.py.

Reviewed-by: iustinp

f65f63ef 01/20/2009 01:18 pm Iustin Pop

Add a TailFile function

This patch adds a tail file function, to be used for parsing and returning in
the job log OS installation failures.

Reviewed-by: ultrotter

7d88772a 01/09/2009 02:52 pm Iustin Pop

Rework the daemonization sequence

The current fork+close fds sequence has deficiencies which are hard to
work around:
- logging can start logging before we fork (e.g. if we need to emit
messages related to master checking), and thus use FDs which we...

6e797216 12/18/2008 06:23 pm Michael Hanselmann

Add rename function automatically creating directories if needed

Unfortunately, os.makedirs in Python 2.4 is not safe against multiple
processes creating the same directory tree at the same time. This is
only fixed in Python 2.5 and up. Adding more checks in our code doesn't...

7167159a 12/17/2008 01:24 pm Michael Hanselmann

utils.KillProcess: Use waitpid() to wait for child processes

Sometimes the proc filesystem doesn't reflect the current status of
a process. By calling waitpid(), we make sure to get the current
information, at least for child processes. The timeout is still...

bf988c29 12/16/2008 06:24 pm Guido Trotter

_RunCmdPipe: handle EINTR in poller.poll()

poll() can be interrupted. rather than failing we retry until it
returns.

Reviewed-by: iustinp

0b5ad33e 12/14/2008 02:03 pm Iustin Pop

cleanup: TcpPing, wrong variable name

The default value of 'False' wasn't initialized properly. It doesn't
require initialization, but it's cleaner this way.

Reviewed-by: amishchenko

cd34e7bf 12/14/2008 02:03 pm Iustin Pop

cleanup: SetEtcHostsEntry unused var

Reviewed-by: amishchenko

90eb468c 12/03/2008 01:12 pm Guido Trotter

CheckBEParams handle a bool BE_AUTO_BALANCE

This only happens at cluster init, if the value is not user-specified.

Reviewed-by: imsnah

42ce2e13 12/02/2008 12:53 pm Guido Trotter

Add utils.CheckBEParams

This function will be used in LUCreateInstance, LUSetInstanceParams,
LUSetClusterParams and InitCluster to check the backend parameters
validity and convert the relevant values to integer, without duplicating
code. It lives in utils as bootstrap.py is calling it too....

9fbfbb7b 11/23/2008 05:34 pm Iustin Pop

Enable auto-unit formatting in script output

This patch enables by default the old 'human-readable' option, but in a
slightly different model.

The option is now called "units" and takes either:
- 'h' for automatic formatting
- 'm', 'g' or 't' for mebi/gibi/tebibytes...

a2d2e1a7 11/21/2008 05:35 pm Iustin Pop

Move FieldSet class to utils.py

Since we can use the FieldSet class in cli.py to nicely format disk
sizes and such, we move it to utils.py and also move its associated
unittest. I didn't remove the cmdlib.py unittest file as that's not the
good direction :)...

ec17d09c 11/21/2008 12:46 pm Michael Hanselmann

Get rid of node daemon password

With the new SSL client certificate stuff it's no longer needed.

Reviewed-by: iustinp

6346a9e5 11/12/2008 02:51 pm Michael Hanselmann

utils.SetupLogging: Remove previously setup handlers

If a logging function is called before the logging module is setup
using utils.SetupLogging, it calls logging.basicConfig, which adds
a StreamHandler, on its own. If we leave it in, all log output will...

e1bd0072 11/12/2008 05:43 am Iustin Pop

Fix utils.KillProcess

Rev 1978 introduced a breakage on the SIGKILL finall signal to the
process, due to mistyped variable.

Reviewed-by: francis.perron

44bf25ff 11/11/2008 12:58 pm Iustin Pop

Remove zombie special case from IsProcessAlive

Based on the discussion on the mailing list, we remove the special
casing of zombie processes.

Note we don't use kill -0 since that has a different meaning than "check
process is alive", so this function is still linux-specific....

ff5251bc 11/11/2008 12:58 pm Iustin Pop

Add cleanup of processes to utils.KillProcess

In case the process we want to signal is our own process, and the signal
we send is a deadly one, we should also cleanup after the process.

This patch adds a new parameter waitpid to this function that does this,...

8797df43 11/11/2008 05:12 am Iustin Pop

Implement working directory for utils.RunCmd

In order to replace usage of the shell just for 'cd %s; ...' we need to
be able to specify the working directory for childs.

The patch also changes the default working directory (when not
specified) to "/", as opposed to the current dir; since the daemos run...

58885d79 10/28/2008 01:20 am Iustin Pop

Documentation updates for utils.py

Reviewed-by: imsnah

36117c2b 10/24/2008 05:43 pm Iustin Pop

Modify utils.RunCmd to write output to file

Currently we launch processes via the shell in a few places only to
redirect standard output and error to a log file ("&> $file"). It is
better to do such redirection from within RunCmd itself.

This patch splits RunCmd in two parts, the setup and the execution part,...

82d9caef 10/20/2008 03:50 pm Iustin Pop

Remove the logger.py module

Since now we use only one function from the logger module
(SetupLogging), we move it to utils.py (which is already imported by all
users of this function), and we remove the module.

Reviewed-by: imsnah

caad16e2 10/12/2008 11:40 pm Iustin Pop

Abstract checking own address into a function

Currently, we check if we have a given ip address (i.e. it's alive on
one of our interfaces) but manually calling TcpPing(source=localhost).
This works, but having it spread all over the code makes it hard to...

4a8b186a 10/01/2008 08:33 pm Michael Hanselmann

Move functions from ssconf.py elsewhere

These functions will be used to access config values instead of using
ssconf.

Reviewed-by: iustinp

33081d90 09/28/2008 05:44 pm Iustin Pop

Move the pseudo-secret generation to utils.py

The bootstrap code needs a pseudo-secret and this is currently generated
inside the InitGanetiServerSetup function. Since more users will need
this, move it to utils.py

Reviewed-by: ultrotter

ca0aa6d0 09/17/2008 07:07 pm Michael Hanselmann

Add utils.ReadFile function

It abstracts exception handling and is like a complement to
utils.WriteFile.

Reviewed-by: iustinp

aa74b828 09/05/2008 06:38 pm Michael Hanselmann

utils.FileLock: Implement timeout

The timeout can be used in ganeti-noded to be more robust against
deadlocks.

Reviewed-by: iustinp

45bc5e4a 09/05/2008 01:57 pm Michael Hanselmann

utils.SplitTime: More rounding fixes

SplitTime didn't round the same on different platforms. This patch changes
it to use microseconds and not care about rounding.

Reviewed-by: iustinp

b77ba978 08/29/2008 06:04 pm Michael Hanselmann

utils.SplitTime: Fix rounding of milliseconds

Reported by Iustin.

It used to return this:

utils.SplitTime(1234.999999999999)

(1234, 1000)

while it should've returned this:

utils.SplitTime(1234.999999999999)

(1235, 0)

Reviewed-by: ultrotter

e67bd559 08/26/2008 06:44 pm Michael Hanselmann

Add simple lock debug output

Currently it can only be enabled by modifying utils.py, but we can
add a command line parameter later if needed.

Reviewed-by: schreiberal

2557ff82 08/14/2008 01:26 pm Guido Trotter

RunCmd: add optional environment overriding

If the user passes an env dict to RunCmd we'll override the environment
passed to the to-be-executed command with the values in the dict. This
allows us to pass arbitrary environment values to commands we run.
...

e326d4e5 08/13/2008 05:23 pm Guido Trotter

Convert RunCmd to an epydoc docstring

Reviewed-by: imsnah

739be818 08/11/2008 07:26 pm Michael Hanselmann

Add functions to split time into tuple and merge it back

These will be used for job logs.

Reviewed-by: ultrotter

aa65ed72 08/08/2008 01:02 pm Michael Hanselmann

Log only unexpected errors in utils.FileLock

Otherwise users might be confused by errors in log files.

Reviewed-by: iustinp

a87b4824 07/31/2008 05:33 pm Michael Hanselmann

Add FileLock utility class

This class is a wrapper around fcntl.flock and abstracts opening and
closing the lockfile. It'll used for the job queue.

(The patch also removes a duplicate import of tempfile into the unittest)

Reviewed-by: iustinp

8161a646 07/30/2008 06:00 pm Iustin Pop

Fix a misuse of exc_info in logging.info

This is my fault, sorry.

Reviewed-by: imsnah

38206f3c 07/30/2008 05:04 pm Iustin Pop

Fix pylint-detected issues

This is mostly:
- whitespace fix (space at EOL in some files, not all, broken
indentation, etc)
- variable names overriding others (one is a real bug in there)
- too-long-lines
- cleanup of most unused imports (not all)...

53beffbb 07/30/2008 11:34 am Iustin Pop

Expose utils.DaemonPidFileName

Since we need to compute this from outside utils.py, we change this to a
public function.

Reviewed-by: ultrotter

b2a1f511 07/29/2008 11:49 am Iustin Pop

Add a KillProcess function

We cannot depend on all environments to have a start-stop-daemon or
similar tool. We instead implement a KillProcess function that behaves
similar to “start-stop-daemon --retry”.

Note that the attached unittest can hang in foreground if the child...

d9f311d7 07/29/2008 11:49 am Iustin Pop

Change IsPidFileAlive into ReadPidFile

We already have a function to test if a PID is alive, so it makes more
sense to use function composition that force calling (since we need to
read PIDs from files in other places too). Now IsProcessAlive returns
False for PIDs <= 0, since this is the error return from ReadPidFile....

533bb4b1 07/28/2008 12:16 pm Michael Hanselmann

Fix exception class name in utils.WritePidFile

Reviewed-by: iustinp

b330ac0b 07/23/2008 05:23 pm Guido Trotter

Add utils.{Write,Remove}PidFile

WritePidFile is a helper function that writes the current pid in a
pidfile within the ganeti run directory. RemovePidFile tries to delete
it.

Reviewed-by: iustinp

fee80e90 07/23/2008 05:23 pm Guido Trotter

Add utils.IsPidFileAlive function

This helper function reads a pid from a file containing it and checks
whether it refers to a live process.

Reviewed-by: iustinp

de499029 07/21/2008 06:32 pm Michael Hanselmann

Add signal handler class

This signal handler class abstracts some of the code previously
used in other places. It also uninstalls its handler when Reset()
is called or the class is destructed, thereby restoring the
previous behaviour.

Reviewed-by: iustinp

eb0f0ce0 07/10/2008 03:38 pm Michael Hanselmann

Move watcher's LockFile function to utils

Reviewed-by: iustinp

7996a135 07/10/2008 03:17 pm Iustin Pop

Add a simple decorator for instance methods

This is just a simple, hardcoded decorator for object methods needing
synchronization on the _lock instance attribute.

Reviewed-by: ultrotter

bb698c1f 07/09/2008 01:41 pm Iustin Pop

Convert utils.py to the logging module

The patch also logs all commands executed from RunCmd when we are at
debug level.

Reviewed-by: imsnah

d4fa5c23 07/09/2008 01:41 pm Iustin Pop

Remove the old locking functions

This removes (hopefully) all traces of the old locking functions and
uses.

Reviewed-by: imsnah

7b4126b7 07/01/2008 02:44 pm Iustin Pop

Add a FirstFree function to utils.py

This function will return the first unused integer based on a list of
used integers (e.g. [0, 1, 3] will return 2).

Reviewed-by: imsnah

04a8d789 06/23/2008 12:52 pm Michael Hanselmann

utils.WriteFile: Remove optional check_abspath parameter

cfgupgrade will not work with relative paths at all, but rather get them
from constants.py.

Reviewed-by: iustinp

71714516 06/18/2008 03:30 pm Michael Hanselmann

Add more parameters to utils.WriteFile

- Make closing file optional: Required by ganeti-watcher to keep
file open after writing it. Changes return value of utils.WriteFile
if "close" parameter evaluates to True.
- Pre- and post-write functions: Can be used to lock files. This...

8d1a2a64 06/12/2008 04:04 pm Michael Hanselmann

Move cmdlib._HasValidVG to utils.CheckVolumeGroupSize

This is required for splitting the cluster initialization code.

Reviewed-by: iustinp

d9c02ca6 06/12/2008 04:04 pm Michael Hanselmann

Move {Set,Remove}EtcHostsEntry wrappers to utils.py

This is required for the split of the cluster initialization code.

Reviewed-by: iustinp, ultrotter

e3e66f02 05/09/2008 01:12 pm Michael Hanselmann

Remove utils.CheckDaemonAlive and use “xm info” instead

There are a couple of reasons for doing so:
- /proc is not OS independent, it's only supported by Linux (there are
emulations on other systems, but those might differ from the way
Linux represents data)....

b74159ee 04/29/2008 10:37 am Iustin Pop

Disable forking in the master daemon

This patch adds a mechanism to disable utils.RunCmd in selected
programs. This is needed in the master daemon unless we confirm
threading doesn't pose any problems.

This makes cluster init fail, but creating new trunk clusters is anyway...

70f4497c 04/25/2008 04:37 pm Michael Hanselmann

Extend utils.WriteFile

Add parameters to not check the path for absoluteness, implement a dry
run mode and automatically create a backup if requested. This will be
used by the cfgupgrade utility.

Reviewed-by: schreiberal

57c177af 04/10/2008 04:41 pm Iustin Pop

Move the OS search code into an abstract function

Based on the previous OS search code changes, we can now move the OS
search code into a generic look-for-file function in utils.py. This
means that the allocator code can use the same function.

Reviewed-by: ultrotter

8ff612c2 04/04/2008 06:29 pm Iustin Pop

Allow utils.Daemonize() to not close some fds

This patch implements an optional parameter to utils.Daemonize() which
allows that function to not close some file descriptors.

This will allow the master daemon to open the listening socket before
fork - in order to be able to notify errors and return a meaningful exit...

8f765069 04/04/2008 03:02 pm Iustin Pop

Move the daemonize function to utils.py

Currently, in ganeti-noded we have the createDaemon function. Since
we'll need the same in other daemons, we move this function to utils.py

With the move, a few changes were also done:
- change the name to Daemonize()...

b15d625f 03/11/2008 09:44 am Iustin Pop

Modify utils.TcpPing to make source address optional

This patch modifies TcpPing and its callers to make the source address
selection optional. Usually, the kernel will know better what
source address to use, just in some cases we want to enforce a given...

7c0d6283 03/05/2008 04:39 pm Michael Hanselmann

Codestyle fixes: adding a few empty lines

Reviewed-by: ultrotter

06009e27 02/05/2008 04:12 pm Iustin Pop

Add a test opcode that sleeps for a given duration

This can be used for testing purposes.

Reviewed-by: ultrotter,imsnah