lib Package¶
applist
Module¶
Listing and importing applications
-
stoq.lib.applist.
N_
(s)¶
-
stoq.lib.applist.
get_application_names
()[source]¶ Get a list of application names, useful for launcher programs
@returns: application names
dependencies
Module¶
Check Stoq dependencies
options
Module¶
Command line configuration options
startup
Module¶
Database startup routines
-
stoq.lib.startup.
setup
(config=None, options=None, register_station=True, check_schema=True, load_plugins=True)[source]¶ Loads the configuration from arguments and configuration file.
@param config: a StoqConfig instance @param options: a Optionparser instance @param register_station: if we should register the branch station. @param check_schema: if we should check the schema @param load_plugins: if we should load plugins for the system
status
Module¶
-
class
stoq.lib.status.
ResourceStatus
[source]¶ Bases:
gobject._gobject.GObject
The status of a given resource
-
status_label
= {0: 'N/A', 1: 'OK', 2: 'WARNING', 3: 'ERROR'}¶
-
name
= None¶
-
label
= None¶
-
priority
= 0¶
-
status_str
¶
-
refresh
()[source]¶ Refresh the resource status
Subclasses should override this and update
status
andreason
Note that this will not be running on the main thread, so be cautelous with non thread-safe operations.
-
STATUS_ERROR
= 3¶
-
STATUS_NA
= 0¶
-
STATUS_OK
= 1¶
-
STATUS_WARNING
= 2¶
-
-
class
stoq.lib.status.
ResourceStatusAction
(resource, name, label, callback, threaded=True, admin_only=True)[source]¶ Bases:
object