Configuration

LMI metacommand has the main configuration file located in:

/etc/openlmi/scripts/lmi.conf

User can have his own configuration file taking precedence over anything in global one above:

$HOME/.lmirc

Configuration is written in INI-like configuration files. Please refer to ConfigParser‘s documentation for details.

Follows a list of sections with their list of options. Most of the options listed here can be overridden with command line parameters.

See also

configuration

Section [Main]

CommandNamespace : string

Python namespace, where command entry points will be searched for.

Defaults to lmi.scripts.cmd.

Trace : boolean

Whether the exceptions should be logged with tracebacks.

Defaults to False.

Can be overridden with --trace and --notrace options on command-line.

Note

For most exceptions generated by scripts a Verbosity option needs to be highest as well for tracebacks to be printed.

Verbosity: integer

A number within range -1 to 2 saying, how verbose the output shall be. This differs from log_level, which controls the logging messages written to file. If logging to console is enabled it sets the minimum severity level. -1 Suppresses all messages except for errors. 0 shows warnings, 1 info messages and 2 enables debug messages. This option also affects the verbosity of commands, making them print more information to stdout.

Defaults to 0.

Can be overridden with -v and -q flags on command-line.

Section [CIM]

Namespace : string

Allows to override default CIM namespace, which will be passed to script library functions.

Defaults to root/cimv2.

Section [SSL]

VerifyServerCertificate : boolean

Whether to verify server-side certificate, when making secured connection over https.

Defaults to True.

Can be overridden with -n | --noverify flag on command-line.

Section [Format]

HumanFriendly : boolean

Whether to print values in human readable forms (e.g. with units).

Defaults to False.

Can be overridden with -H | --human-frienly flag on command-line.

ListerFormat : one of {csv, table}

What format to use, when listing tabular data. csv format allows for easy machine parsing, the second one is more human friendly.

Defaults to table.

Can be overridden with -L | --lister-format option on command line.

NoHeadings : boolean

Whether to suppress headings (column names) when printing tables.

Defaults to False.

Can be overridden with -N | --no-headings option on command line.

Section [Log]

Level : one of {DEBUG, INFO, WARNING, ERROR, CRITICAL}

Minimal severity level of messages to log. Affects only logging to a file. See the main_verbosity option controlling console logging level.

Defaults to ERROR.

LogToConsole : boolean

Whether the logging to console is enabled.

Defaults to True

On command-line the same could be achieved by redirecting stderr to /dev/null.

ConsoleFormat : string

Format string used when logging to a console. This applies to warnings and more severe messages. Refer to Format String in python’s documentation for details.

Defaults to %(levelname)s: %(message)s.

ConsoleInfoFormat : string

Format string used when logging to a console. Applies to info and debug messages. Refer to Format String in python’s documentation for details.

Defaults to %(message)s.

FileFormat : string

Format string used, when logging to a console. This applies only when OutputFile is set (see below). Refer to Format String in python’s documentation for details.

Defaults to
%(asctime)s:%(levelname)-8s:%(name)s:%(lineno)d - %(message)s
OutputFile : string

Allows to set a path to file, where messages will be logged. No log file is written at default.

Defaults to empty string.

Can be overridden on command line with --log-file option.