summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-10-03 14:06:39 +0200
committerMichal Minar <miminar@redhat.com>2013-10-04 09:53:38 +0200
commitc993c8df72319a73383f76192425561227caaafd (patch)
tree0458ea6404a46cfbc37a2d0c3bfab75283caacb6
parent26c4d6f44baddde9c3451eeec448e9b4ac8084c4 (diff)
downloadopenlmi-providers-c993c8df72319a73383f76192425561227caaafd.tar.gz
openlmi-providers-c993c8df72319a73383f76192425561227caaafd.tar.xz
openlmi-providers-c993c8df72319a73383f76192425561227caaafd.zip
software: docstrings update
-rw-r--r--src/software/lmi/software/cimom_entry.py70
1 files changed, 40 insertions, 30 deletions
diff --git a/src/software/lmi/software/cimom_entry.py b/src/software/lmi/software/cimom_entry.py
index ffac501..9d7c71a 100644
--- a/src/software/lmi/software/cimom_entry.py
+++ b/src/software/lmi/software/cimom_entry.py
@@ -74,7 +74,10 @@ from lmi.software.yumdb import YumDB
def get_providers(env):
"""
- @return mapping of provider names to corresponding provider instances.
+ *CIMOM* callback.
+
+ :returns: Mapping of provider names to corresponding provider instances.
+ :rtype: dictionary
"""
# first let's setup logging
cmpi_logging.setup(env, util.Configuration.get_instance())
@@ -134,62 +137,64 @@ def get_providers(env):
def authorize_filter(env, fltr, class_name, op, owner):
"""
- CIMOM callback.
+ *CIMOM* callback.
It asks us to verify whether this filter is allowed.
- :param fltr: (``String``) Contains the filter that must be authorized.
- :param class_name: (``String``) Contains the class name extracted
- from the filter FROM clause.
+ :param string fltr: Contains the filter that must be authorized.
+ :param string class_name: Contains the class name extracted out of the
+ filter's ``FROM`` clause.
:param op: The name of the class for which monitoring is required.
- Only the namespace part is set if className is a process indication.
- :param owner The owner argument is the destination owner.
+ Only the namespace part is set if *class_name* is a process indication.
+ :type op: :py:class:`pywbem.CIMInstanceName`
+ :param owner: Destination owner.
"""
IndicationManager.get_instance().authorize_filter(
env, fltr, class_name, op, owner)
def activate_filter(env, fltr, class_name, class_path, first_activation):
"""
- CIMOM callback.
+ *CIMOM* callback.
It ask us to begin monitoring a resource. The function shall begin
monitoring the resource according to the filter express only.
- :param fltr: (``String``) The filter argument contains the filter
- specification for this subscription to become active.
- :param class_name: (``String``) The class name extracted from the filter
- FROM clause.
- :param class_path: (``CIMInstanceName``) The name of the class for which
- monitoring is required. Only the namespace part is set if eventType
- is a process indication.
- :param first_activation: (``bool``) Set to true if this is the first
- filter for className.
+ :param string fltr: The filter argument contains the filter specification
+ for this subscription to become active.
+ :param string class_name: The class name extracted out of the filter's
+ ``FROM`` clause.
+ :param class_path: The name of the class for which monitoring is required.
+ Only the namespace part is set if *class_name* is a process indication.
+ :type class_path: :py:class:`pywbem.CIMInstanceName`
+ :param boolean first_activation: Set to ``True`` if this is the first
+ filter for *class_name*.
"""
IndicationManager.get_instance().activate_filter(
env, fltr, class_name, class_path, first_activation)
def deactivate_filter(env, fltr, class_name, class_path, last_activation):
"""
- CIMOM callback.
+ *CIMOM* callback.
Informs us that monitoring using this filter should stop.
- :param fltr: (``String``) The filter argument contains the filter
- specification for this subscription to become active.
- :param class_name: (``String``) The class name extracted from the filter
- FROM clause.
- :param class_path: (``CIMInstanceName``) class_path The name of the class
- for which monitoring is required. Only the namespace part is set
- if className is a process indication.
- :last_activation: (``bool``) Set to true if this is the last filter for
- className.
+ :param string fltr: The filter argument containing specification
+ for a subscription becoming deactivated.
+ :param string class_name: The class name extracted out the filter's
+ ``FROM`` clause.
+ :param class_path: The name of the class for which monitoring is
+ required. Only the namespace part is set if className is a process
+ indication.
+ :type class_path: :py:class:`pywbem.CIMInstanceName`
+ :param boolean last_activation: Set to ``True`` if this is the last filter
+ for *class_name*.
"""
IndicationManager.get_instance().deactivate_filter(
env, fltr, class_name, class_path, last_activation)
def enable_indications(env):
"""
- CIMOM callback.
+ *CIMOM* callback.
Tells us that indications can now be generated. The MB is now prepared
to process indications. The function is normally called by the MB after
@@ -200,7 +205,7 @@ def enable_indications(env):
def disable_indications(env):
"""
- CIMOM callback.
+ *CIMOM* callback.
Tells us that we should stop generating indications. MB will not accept any
indications until enabled again. The function is normally called when the
@@ -210,12 +215,17 @@ def disable_indications(env):
def can_unload(_env):
"""
- Says, whether providers can be unloaded.
+ *CIMOM* callback.
+
+ :returns: Whether providers can be unloaded.
+ :rtype: boolean
"""
return True
def shutdown(_env):
"""
+ *CIMOM* callback.
+
Release resources upon cleanup.
"""
if YumDB.isInstantiated():