LMIClass Package

class 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
create_instance(properties=None, qualifiers=None, property_list=None)[source]

Creates a new CIMInstance at the server side and returns LMIReturnValue object containing LMIInstance as a result.

Parameters:
  • properties (dictionary) – initial properties with corresponding values
  • qualifiers (dictionary) – initial qualifiers
  • property_list (list) – list of properties, which should be present in LMIInstance object

Usage: See Creating a new instance.

doc()[source]

Prints out pretty verbose message with documentation for the class. If the LMIShell is run in a interactive mode, the output will be redirected to a pager set by environment variable PAGER. If there is not PAGER set, less or more will be used as a fall-back.

instance_names(inst_filter=None, **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(inst_filter=None, **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
  • 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.

valuemap_properties()[source]
Returns:list of strings of the constant names

Usage: class_valuemap_properties.

print_valuemap_properties()[source]

Prints out the list of string of constant names.

Usage: class_valuemap_properties.

properties()[source]
Returns:list of strings of the CIMClass properties

Usage: See class_properties.

print_properties()[source]

Prints out the list of CIMClass properties.

Usage: See class_properties.

methods()[source]
Returns:list of strings of CIMClass methods.

Usage: See Class Methods.

print_methods()[source]

Prints out the list of CIMClass methods.

Usage: See Class Methods.

classname[source]
Returns:class name
Return type:string
fetch()[source]

Manually fetches a wrapped CIMClass object.

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.
  • 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.

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.

wrapped_object[source]
Returns:wrapped CIMClass object

This Page