summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-07-26 13:34:35 +0200
committerMichal Minar <miminar@redhat.com>2013-07-26 14:37:06 +0200
commite301ba6898d08004977639b25205c8e1ba12e5ad (patch)
tree3ff83be87dde21a6a23811ced8689c758364e1ec
parent7f56b4dacb45f397d3b95a67453252e9c6755501 (diff)
downloadopenlmi-providers-e301ba6898d08004977639b25205c8e1ba12e5ad.tar.gz
openlmi-providers-e301ba6898d08004977639b25205c8e1ba12e5ad.tar.xz
openlmi-providers-e301ba6898d08004977639b25205c8e1ba12e5ad.zip
software: disable enumeration of software identities
There are too many packages available to enumerate them. Let's avoid cimom crashes, memory exhaustions and boundless awaiting of clients.
-rw-r--r--src/software/lmi/software/LMI_SoftwareIdentity.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/software/lmi/software/LMI_SoftwareIdentity.py b/src/software/lmi/software/LMI_SoftwareIdentity.py
index bb1a395..c532e82 100644
--- a/src/software/lmi/software/LMI_SoftwareIdentity.py
+++ b/src/software/lmi/software/LMI_SoftwareIdentity.py
@@ -121,16 +121,9 @@ class LMI_SoftwareIdentity(CIMProvider2):
CIM_ERR_FAILED (some other unspecified error occurred)
"""
- # Prime model.path with knowledge of the keys, so key values on
- # the CIMInstanceName (model.path) will automatically be set when
- # we set property values on the model.
- model.path.update({'InstanceID': None})
-
- with YumDB.get_instance() as ydb:
- pkglist = ydb.get_package_list(
- 'all', allow_duplicates=True, sort=True)
- for pkg_info in pkglist:
- yield Identity.pkg2model(pkg_info, keys_only=keys_only, model=model)
+ # too many available packages to enumerate them
+ raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED,
+ "Enumeration of instances is not supported.")
@cmpi_logging.trace_method
def set_instance(self, env, instance, modify_existing):