diff options
author | Michal Minar <miminar@redhat.com> | 2013-07-09 13:02:59 +0200 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2013-07-23 13:55:28 +0200 |
commit | a3bdd8957936ebd586a8ca8504f03df537728ee1 (patch) | |
tree | 37837309b54e4481a75d78a05034091275fc9928 | |
parent | 56610bea26c18d6aae110724b450f8f894595714 (diff) | |
download | openlmi-providers-a3bdd8957936ebd586a8ca8504f03df537728ee1.tar.gz openlmi-providers-a3bdd8957936ebd586a8ca8504f03df537728ee1.tar.xz openlmi-providers-a3bdd8957936ebd586a8ca8504f03df537728ee1.zip |
software: added sample configuration
install software configs in spec
-rw-r--r-- | openlmi-providers.spec | 8 | ||||
-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 |
4 files changed, 114 insertions, 2 deletions
diff --git a/openlmi-providers.spec b/openlmi-providers.spec index 7722059..27e5769 100644 --- a/openlmi-providers.spec +++ b/openlmi-providers.spec @@ -1,6 +1,6 @@ Name: openlmi-providers Version: 0.0.25 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Set of basic CIM providers License: LGPLv2+ @@ -316,6 +316,8 @@ mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/%{name} %files -n openlmi-software %doc README COPYING %dir %{python_sitelib}/lmi/software +%config(noreplace) %{_sysconfdir}/openlmi/software/software.conf +%config(noreplace) %{_sysconfdir}/openlmi/software/yum_worker_logging.conf %{python_sitelib}/lmi/software/* %{python_sitelib}/lmi_software-* %{_libexecdir}/pegasus/pycmpiLMI_Software-cimprovagt @@ -651,7 +653,6 @@ if [ "$1" -gt 1 ]; then > /dev/null 2>&1 || :; fi - %preun -n openlmi-hardware if [ "$1" -gt 1 ]; then %{_bindir}/openlmi-mof-register unregister \ @@ -670,6 +671,9 @@ if [ "$1" -gt 1 ]; then fi %changelog +* Tue Jul 23 2013 Michal Minar <miminar@redhat.com> 0.0.25-7 +- Added configuration files for software. + * Thu Jul 18 2013 Frank Ch. Eigler <fche@redhat.com> 0.0.25-6 - Added PCP provider in optional openlmi-pcp subrpm. 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=[ |