summaryrefslogtreecommitdiffstats
path: root/src/software/openlmi/software/cimom_entry.py
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-04-18 22:04:03 +0200
committerMichal Minar <miminar@redhat.com>2013-04-26 10:18:18 +0200
commit272c051e8453d0a98771d8741e08478f18bbf638 (patch)
treea56724b4537491217700576678b1b93d68dd7292 /src/software/openlmi/software/cimom_entry.py
parent59e8bf604c382b9269b4448f10223de631b40036 (diff)
downloadopenlmi-providers-272c051e8453d0a98771d8741e08478f18bbf638.tar.gz
openlmi-providers-272c051e8453d0a98771d8741e08478f18bbf638.tar.xz
openlmi-providers-272c051e8453d0a98771d8741e08478f18bbf638.zip
modified indication filters
And moved software static filters to shared JobManager. Indication filters now reflect the name of indication class, which is instrumented by particular provider. This ensures, that cimom knows, which provider to call and does not bother the others. So instead of selecting indication instances from general class CIM_InstModification, it will be LMI_SoftwareInstModification. This is a common pattern for indication queries. Avoided another shortcoming of sfcbmof parser: /* comment */ something useful is also ignored :-( Static filters of JobManager made more generic for any provider to use. Software jobmanager is now using them. This reduces redundation of code.
Diffstat (limited to 'src/software/openlmi/software/cimom_entry.py')
-rw-r--r--src/software/openlmi/software/cimom_entry.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/software/openlmi/software/cimom_entry.py b/src/software/openlmi/software/cimom_entry.py
index ad944c8..d507a01 100644
--- a/src/software/openlmi/software/cimom_entry.py
+++ b/src/software/openlmi/software/cimom_entry.py
@@ -26,6 +26,7 @@ Entry module for OpenLMI Software providers.
from multiprocessing import Queue
from openlmi.common import cmpi_logging
+from openlmi.common import JobManager
from openlmi.common.IndicationManager import IndicationManager
from openlmi.software.core import InstallationJob
from openlmi.software.LMI_SoftwareIdentity import LMI_SoftwareIdentity
@@ -113,7 +114,7 @@ def get_providers(env):
# daemon. That means it does not have to be cleaned up.
im = IndicationManager.get_instance(
env, "Software", "root/cimv2", queue=Queue())
- jobmanager.register_filters(im)
+ JobManager.register_filters("LMI_SoftwareInstallationJob", im)
return providers
@@ -123,11 +124,11 @@ def authorize_filter(env, fltr, ns, classes, owner):
def activate_filter (env, fltr, ns, classes, first_activation):
IndicationManager.get_instance().activate_filter(
- env, fltr, ns, classes, first_activation)
+ env, fltr, class_name, class_path, first_activation)
def deactivate_filter(env, fltr, ns, classes, last_activation):
IndicationManager.get_instance().deactivate_filter(
- env, fltr, ns, classes, last_activation)
+ env, fltr, class_name, class_path, last_activation)
def enable_indications(env):
IndicationManager.get_instance().enable_indications(env)