Trees | Indices | Help |
|
---|
|
Ganeti utility module.
This module holds functions that can be used in both daemons (all) and the command line scripts.
|
|||
|
|
|||
FdConditionWaiterHelper Retry helper for WaitForFdCondition. |
|||
SignalWakeupFd | |||
SignalHandler Generic signal handler class. |
|||
FieldSet A simple field set. |
|
|||
|
|||
|
|||
dict |
|
||
boolean |
|
||
|
|||
list of int |
|
||
|
|||
int |
|
||
int or None |
|
||
int or None |
|
||
|
|||
|
|||
None or str |
|
||
|
|||
|
|||
tuple; (value in dictionary, matched groups as list) |
|
||
list of tuples |
|
||
|
|
|||
_VALID_SERVICE_NAME_RE = re.compile("^[-_.a-zA-Z0-9]{1,128}$")
|
|||
UUID_RE = re.compile('^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-' '
|
Imports: os, re, errno, pwd, itertools, select, logging, signal, errors, constants, compat
|
Force the values of a dict to have certain types.
|
Validate the given service name.
|
List volume groups and their size
|
Check whether the given bridge exists in the system
|
Try to convert a value ignoring errors. This function tries to apply function fn to val. If no
|
Parse a CPU mask definition and return the list of CPU IDs. CPU mask format: comma-separated list of CPU IDs or dash-separated ID ranges Example: "0-2,5" -> "0,1,2,5"
|
Try to get the homedir of the given user. The user can be passed either as a string (denoting the name) or as an integer (denoting the user id). If the user is not found, the 'default' argument is returned, which defaults to None. |
Returns the first non-existing integer from seq. The seq argument should be a sorted list of positive integers. The first time the index of an element is smaller than the element value, the index will be returned. The base argument is used to start at a different offset, i.e.
Example:
|
Waits for a condition to occur on the socket. Immediately returns at the first interruption.
|
Waits for a condition to occur on the socket. Retries until the timeout is expired, even if interrupted.
|
Checks if the volume group list is valid. The function will check if a given volume group is in the list of volume groups and has a minimum size.
|
Splits time as floating point number into a tuple.
|
Merges a tuple into time as a floating point number.
|
Tries to find an item in a dictionary matching a name. Callers have to ensure the data names aren't contradictory (e.g. a regexp that matches a string). If the name isn't a direct key, all regular expression objects in the dictionary are matched against it.
|
Returns the list of mounted filesystems. This function is Linux-specific.
|
Signal Handled decoration. This special decorator installs a signal handler and then calls the target function. The function must accept a 'signal_handlers' keyword argument, which will contain a dict indexed by signal number, with SignalHandler objects as values. The decorator can be safely stacked with iself, to handle multiple signals with different handlers.
|
|
UUID_RE
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Oct 27 14:18:49 2011 | http://epydoc.sourceforge.net |