module documentation
Module implementing configuration details at runtime.
Class |
|
Resolves Ganeti uids and gids by name. |
Function |
|
Returns previsouly initialized architecture information. |
Function |
|
Connects to the a luxi socket and returns a client. |
Function |
|
Singleton wrapper around resolver instance. |
Function |
|
Retrieve the gid from the database. |
Function |
|
Retrieve the uid from the database. |
Function |
|
Initialize architecture information. |
Variable | _arch |
Undocumented |
Variable | _priv |
Undocumented |
Variable | _priv |
Undocumented |
Singleton wrapper around resolver instance.
As this method is accessed by multiple threads at the same time we need to take thread-safety carefully.
Retrieve the gid from the database.
Parameters | |
group:string | The group name to retrieve |
_getgrnam | Undocumented |
Returns | |
The resolved gid |
Retrieve the uid from the database.
Parameters | |
user:string | The username to retrieve |
_getpwnam | Undocumented |
Returns | |
The resolved uid |
Initialize architecture information.
We can assume this information never changes during the lifetime of a process, therefore the information can easily be cached.
Note | |
This function uses platform.architecture to retrieve the Python binary architecture and does so by forking to run file (see Python documentation for more information). Therefore it must not be used in a multi-threaded environment. |