From e301ba6898d08004977639b25205c8e1ba12e5ad Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Fri, 26 Jul 2013 13:34:35 +0200 Subject: 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. --- src/software/lmi/software/LMI_SoftwareIdentity.py | 13 +++---------- 1 file 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): -- cgit