summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-07-10 14:21:49 +0200
committerMichal Minar <miminar@redhat.com>2013-07-23 13:52:34 +0200
commitf882972d9ac5cf87584c164953baa964c24caaff (patch)
tree9b6f7beda4baecdcb861c03cf86020461bbf3790 /src
parent81c8ccb5cb9dc4dd556307930650fc9479d51edb (diff)
downloadopenlmi-providers-f882972d9ac5cf87584c164953baa964c24caaff.tar.gz
openlmi-providers-f882972d9ac5cf87584c164953baa964c24caaff.tar.xz
openlmi-providers-f882972d9ac5cf87584c164953baa964c24caaff.zip
moved logging level option to BaseConfiguration
Diffstat (limited to 'src')
-rw-r--r--src/python/lmi/common/BaseConfiguration.py9
-rw-r--r--src/software/lmi/software/util/SoftwareConfiguration.py14
2 files changed, 16 insertions, 7 deletions
diff --git a/src/python/lmi/common/BaseConfiguration.py b/src/python/lmi/common/BaseConfiguration.py
index 639a2f5..f54de03 100644
--- a/src/python/lmi/common/BaseConfiguration.py
+++ b/src/python/lmi/common/BaseConfiguration.py
@@ -81,7 +81,8 @@ class BaseConfiguration(Singleton):
DEFAULT_OPTIONS = {
'Namespace' : 'root/cimv2',
'SystemClassName' : 'Linux_ComputerSystem',
- 'Debug' : 'false',
+ # Default logging level
+ "Level" : "ERROR",
'DebugBlivet' : 'false',
'Stderr' : 'false',
}
@@ -186,9 +187,9 @@ class BaseConfiguration(Singleton):
return socket.getfqdn()
@property
- def tracing(self):
- """ Return True if tracing is enabled. """
- return self.config.getboolean('Log', 'Debug')
+ def logging_level(self):
+ """ Return name of logging level in lower case. """
+ return self.config.get('Log', 'Level').lower()
@property
def stderr(self):
diff --git a/src/software/lmi/software/util/SoftwareConfiguration.py b/src/software/lmi/software/util/SoftwareConfiguration.py
index 99e2257..85e10da 100644
--- a/src/software/lmi/software/util/SoftwareConfiguration.py
+++ b/src/software/lmi/software/util/SoftwareConfiguration.py
@@ -47,14 +47,22 @@ class SoftwareConfiguration(BaseConfiguration):
# 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.
- defaults["wait_complete_timeout" ] = "30"
+ defaults["WaitCompleteTimeout" ] = "30"
# Number of seconds to wait before next try to lock yum package
# database. This applies, when yum database is locked by another
# process.
- defaults["lock_wait_interval"] = "0.5"
+ defaults["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.
- defaults["free_database_timeout"] = "60"
+ defaults["FreeDatabaseTimeout"] = "60"
+ # Minimum time to keep asynchronous job in cache after completion. In
+ # seconds.
+ defaults["MinimumTimeBeforeRemoval"] = "10"
+ # Number of seconds to keep asynchronous job after its completion.
+ # It applies only to jobs with DeleteOnCompletion == True.
+ defaults["DefaultTimeBeforeRemoval"] = "300"
+ # Default asynchronous job priority.
+ defaults["DefaultPriority"] = "10"
# Default logging level.
defaults["Level"] = "ERROR"
return defaults