configuration

Module for Configuration class.

class lmi.scripts.common.configuration.Configuration(user_config_file_path='~/.lmirc', **kwargs)[source]

Configuration class specific to software providers. OpenLMI configuration file should reside in:

/etc/openlmi/scripts/lmi.conf
Parameters:user_config_file_path (string) – Path to the user configuration options.
classmethod default_options()[source]
Returns:Dictionary of default values.
Return type:dictionary
history_file[source]

Path to a file with history of interactive mode.

history_max_length[source]

Maximum number of lines kept in history file.

human_friendly[source]

Whether to print human-friendly values.

lister_format[source]
Output format used for lister commands. Returns one of
  • LISTER_FORMAT_CSV
  • LISTER_FORMAT_TABLE
Return type:integer
load()[source]

Read additional user configuration file if it exists.

log_file[source]

Path to a file, where logging messages shall be written.

no_headings[source]

Whether to print headings of tables.

silent[source]

Whether to suppress all output messages except for errors.

trace[source]

Whether the tracebacks shall be printed upon errors.

verbose[source]

Whether to output more details.

verbosity[source]

Return integer indicating verbosity level of output to console.

verify_server_cert[source]

Return boolean saying, whether the server-side certificate should be checked.

lmi.scripts.common.configuration.DEFAULT_FORMAT_STRING = '%(cseq)s%(levelname_)-8s:%(creset)s %(message)s'

Default format string to use in stderr handlers.