LMIClass Package

class lmi.shell.LMIClass.LMIClass(conn, namespace, classname)[source]

LMI wrapper class representing CIMClass.

Parameters:
  • conn (LMIConnection) – connection object
  • namespace (LMINamespace) – namespace object
  • classname (string) – CIM class name
classname[source]
Returns:class name
Return type:string
fetch(full_fetch=False)[source]

Manually fetches a wrapped CIMClass object.

Parameters:full_fetch (bool) – True, if CIMClass should include qualifiers and class origin. Default value is False.
Raises :pywbem.CIMError, pywbem.AuthError

Usage: See Fetching a class.

first_instance(inst_filter=None, **kwargs)[source]

Returns the first LMIInstance of the corresponding class.

Parameters:
  • inst_filter (dictionary) – filter values, where the key corresponds to the key of CIMInstance; value contains the filtering value.
  • client_filtering (bool) – if True, client-side filtering will be performed, otherwise the filtering will be done by a CIMOM. Default value is False.
  • kwargs (dictionary) –

    deprecated keyword arguments

    • Key or key – filtering key, see above
    • Value or value – filtering value, see above
Returns:

first LMIInstance object

Usage: See Get Instances and Filtering.

first_instance_name(inst_filter=None, **kwargs)[source]

Returns the first LMIInstanceName of the corresponding class.

Parameters:
  • inst_filter (dictionary) – filter values, where the key corresponds to the primary key of CIMInstanceName; value contains the filtering value
  • kwargs (dictionary) –

    deprecated keyword arguments

    • Key or key (string) – filtering key, see above
    • Value or value – filtering value, see above
Returns:

first LMIInstanceName object

Usage: See Get Instance Names and Filtering.

instance_names(self_wr, *args, **kwargs)[source]

Returns a LMIReturnValue containing a list of LMIInstanceNames.

Parameters:
  • inst_filter (dictionary) – filter values. The key corresponds to the primary key of the CIMInstanceName; value contains the filtering value
  • kwargs (dictionary) –

    deprecated keyword arguments

    • Key or key (string) – filtering key, see above
    • Value or value – filtering value, see above
Returns:

LMIReturnValue object with rval set to a list of LMIInstanceName objects

Usage: See Get Instance Names and Filtering.

instances(self_wr, *args, **kwargs)[source]

Returns a list of objects of LMIInstance.

Parameters:
  • inst_filter (dictionary) – filter values, where the key corresponds to the key of CIMInstance; value contains the filtering value
  • client_filtering (bool) – if True, client-side filtering will be performed, otherwise the filtering will be done by a CIMOM. Default value is False.
  • kwargs (dictionary) –

    deprecated keyword arguments

    • Key or key (string) – filtering key, see above
    • Value or value – filtering value, see above
Returns:

list of LMIInstance objects

Usage: See Get Instances and Filtering.

is_fetched(full_fetch=False)[source]

Returns True, if CIMClass has been fetched.

Parameters:full_fetch (bool) – defines, if qualifiers are also included
namespace[source]
Returns:namespace name
Return type:string
new_instance_name(keybindings)[source]
Create new LMIInstanceName object by passing all the
keys/values of the object.
Parameters:keybindings (dictionary) – primary keys of instance name with corresponding values
Returns:new LMIInstanceName object

Usage: See New Instance Name.

Previous topic

LMIConnection Package

Next topic

LMIShellCache Package

This Page