LMIShellCache Package

class LMIShellCache.LMIShellCache(active=True, classname_list=None, class_dict=None, class_superclass_dict=None)[source]

Class representing a LMIShell cache.

Parameters:
  • active (bool) – specifies, if the cache is active
  • classname_list (list) – list of strings of cached class names
  • class_dict (dictionary) – cached CIMClass objects, where the key is the class name and value is CIMClass object
  • class_superclass_dict (dictionary) – dictionary, where the key is namespace and value is dictionary of classname:superclass
active[source]
Returns:True, if the cache is active; False otherwise
add_class(cim_class)[source]

Stores a new CIMClass object into the cache.

Parameters:cim_class (CIMClass) – CIMClass object
add_superclass(classname, superclass, namespace)[source]

Stores a new pair classname : superclassname into the cache.

Parameters:
  • classname (string) – class name to be stored
  • superclass (string) – super class name to be stored
  • namespace (string) – namespace name of the classname
clear()[source]

Clears the cache.

get_class(classname)[source]
Parameters:classname (string) – cached class name
Returns:cached CIMClass object, if proper class name provided, None otherwise
get_classes()[source]
Returns:list of cached class names
get_superclass(classname, namespace)[source]
Parameters:
  • classname (string) – cached class name
  • namespace (string) – namespace name
Returns:

cached superclass to the given class name

Return type:

string

has_superclass(classname, namespace)[source]
Parameters:
  • classname (string) – cached class name
  • namespace (string) – namespace name
Returns:

True, if the cache contains superclass to the given class name; False otherwise

set_classes(classname_list)[source]

Stores a new class names’ list.

This Page