diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/software/config/software.conf | 76 | ||||
-rw-r--r-- | src/software/config/yum_worker_logging.conf | 30 | ||||
-rw-r--r-- | src/software/setup.py | 2 |
3 files changed, 108 insertions, 0 deletions
diff --git a/src/software/config/software.conf b/src/software/config/software.conf new file mode 100644 index 0000000..0332ecd --- /dev/null +++ b/src/software/config/software.conf @@ -0,0 +1,76 @@ +# Sample configuration file for OpenLMI software provider. + +[CIM] +# To override default CIM Namespace, uncomment the line below. +#Namespace = root/cimv2 + +# To change the CIM class of ComputerSystem, which is associated to many +# software classes, uncomment the line below. +#SystemClassName = Linux_ComputerSystem + +[Yum] +# Number of seconds to wait before next try to lock yum package database. This +# applies, when yum database is locked by another process. +#LockWaitInterval = 0.5 + +# Number of seconds to keep package cache in memory after the last use (caused +# by user request). Package cache takes up a lot of memory. +#FreeDatabaseTimeout = 60 + +[Jobs] +# Minimum time interval in seconds the asynchronous job is kept in cache after +# completion. This applies only if DeleteOnCompletion is True for asynchronous +# job. +#MinimumTimeBeforeRemoval = 10 + +# Number of seconds to keep asynchronous job after its completion. It applies +# only to jobs with DeleteOnCompletion is True. +#DefaultTimeBeforeRemoval = 300 + +# Maximum time in seconds to wait for a job to accomplish. If timeout +# expires, spawned process is checked (it might be possibly killed) and is +# respawned in case it's dead. +#WaitCompleteTimeout = 30 + +# Default asynchronous job priority. This can be changed for particular +# LMI_SoftwareJob by calling ModifyInstance() on it with Priority attribute +# modified. The higher value, the higher precedence over the other jobs. +#DefaultPriority = 10 + +[Log] +# These options modify logging configuration of the main process spawned +# by CIMOM. + +# Level can be set to following values: +# DEBUG, TRACE_INFO, TRACE_WARNING, INFO, WARNING, ERROR, CRITICAL +# It does not have any effect, if file_config option is set. +#Level = ERROR + +# If logging to stderr is desired, set this option to True. This option won't +# apply if file_config option is set. +#Stderr = False + +# This option overrides every other logging option. It provides complete +# control over what is logged, when and where. It's a path to a logging +# configuration file with format specified in: +# http://docs.python.org/2/library/logging.config.html#configuration-file-format +# Path can be absolute or relative. In the latter case it's relative to +# directory of this configuration file. +#FileConfig = software_logging.conf + +[YumWorkerLog] +# These options modify logging configuration of the separated process of +# YumWorker. These should be modified only for debugging purposes. +# Default configuration turns logging off completely. This configuration +# won't have any effect on the main process's logging, which is configured in +# the [Log] section above. + +# Enable logging to a file given with this option. +#OutputFile = /var/tmp/YumWorker.log + +# Change the minimum level of messages logged to the file. +#Level = DEBUG + +# Similar to the previous FileConfig in the [Log] section. It overrides the +# other options in this section. +#FileConfig = yum_worker_logging.conf diff --git a/src/software/config/yum_worker_logging.conf b/src/software/config/yum_worker_logging.conf new file mode 100644 index 0000000..027ba75 --- /dev/null +++ b/src/software/config/yum_worker_logging.conf @@ -0,0 +1,30 @@ +# Sample configuration file for OpenLMI software provider. It configures +# logging of YumWorker process, that implicitly logs nothing. In order for +# these options to apply, the option "[YumWorkerLog] file_config" in +# software.conf configuration file must be uncommented and point to this file. +# For more information on logging setup, please refer to the python's standard +# library documentation: +# http://docs.python.org/2/library/logging.config.html#configuration-file-format + +[loggers] +keys=root + +[handlers] +keys=file + +[formatters] +keys=default + +[logger_root] +level=DEBUG +handlers=file + +[handler_file] +class=FileHandler +level=DEBUG +formatter=default +args=("/var/tmp/YumWorker.log", 'w') + +[formatter_default] +format=%(asctime)s %(levelname)s:%(module)s:%(funcName)s:%(lineno)d - %(message)s +datefmt: '%Y-%m-%d %H:%M:%S' diff --git a/src/software/setup.py b/src/software/setup.py index 96e8f2b..31cf29a 100644 --- a/src/software/setup.py +++ b/src/software/setup.py @@ -12,6 +12,8 @@ setup( 'lmi.software.core', 'lmi.software.util', 'lmi.software.yumdb'], + data_files=[('/etc/openlmi/software', + ['config/software.conf', 'config/yum_worker_logging.conf'])], install_requires=['lmi'], license="LGPLv2+", classifiers=[ |