Helper class used for passing a value by reference. It uses the advantage of python, where all the dictionaries are passed by reference.
Parameters: | val – value, which will be passed by reference |
---|
Example of usage:
by_ref = LMIPassByRef(some_value)
by_ref.value == some_value
Singleton helper class used for storing a bool flag, which defines, if the LMIShell should propagate exceptions or dump them.
Helper function to speed up associator traversal. Returns a list of tuples, where each tuple contains LMIInstance objects, which are in association.
Parameters: | assoc_classes (list) – list of LMIClass objects, for which the associations will be returned |
---|---|
Returns: | list of tuples of LMIInstance objects in association |
Casts the value to CIM type.
Parameters: |
|
---|---|
Returns: | cast value in pywbem type |
Casts the value to LMI (python) type.
Parameters: |
|
---|---|
Returns: | cast value in python native type |
Returns: | whether the LMIShell should use the exceptions, or throw them away |
---|---|
Return type: | bool |
Function returns True if lmi_obj is an instance of a lmi_class, False otherwise. When passed LMIInstance, LMIInstanceName as lmi_obj and lmi_class is of LMIClass type, function can tell, if such lmi_obj is direct instance of LMIClass, or it’s super class.
If lmi_obj and lmi_class is not instance of mentioned classes, an exception will be raised.
Parameters: |
|
---|---|
Returns: | whether lmi_obj is instance of lmi_class |
Return type: | bool |
Raises : | TypeError |
Function which either raises an exception, or throws it away.
Parameters: | e (Exception) – exception, which will be either raised or thrown away |
---|
Sets a global flag indicating, if the LMIShell should use the exceptions, or throw them away.
Parameters: | use (bool) – specifies, whether the LMIShell should use the exceptions |
---|
Helper function for method calls, which transforms input object into CIMInstanceName object. Members if lists, dictionaries and tuples are transformed as well. The function does not cast numeric types.
Parameters: |
|
---|---|
Returns: | transformed LMIShell’s object into pywbem one |
Transforms returned values from a method call into LMI wrapped objects. Returns transformed input, where CIMInstance and CIMInstanceName are wrapped into LMI wrapper classes and primitive types are cast to python native types.
Parameters: |
|
---|---|
Returns: | transformed py:pywbem object into LMIShell one |
Helper function, which returns wrapped CIMClass into LMIClass.
Parameters: |
|
---|---|
Returns: | wrapped CIMClass into LMIClass |
Helper function, which returns wrapped CIMInstance into LMIInstance.
Parameters: |
|
---|---|
Returns: | wrapped CIMInstance into LMIInstance |
Helper function, which returns wrapped CIMInstanceName into LMIInstanceName.
Parameters: |
|
---|---|
Returns: | wrapped CIMInstanceName into LMIInstanceName |
Helper function, which returns wrapped CIMMethod into LMIMethod.
Parameters: |
|
---|---|
Returns: | wrapped CIMMethod into LMIMethod |
Helper function, which returns wrapped CIM namespace in LMINamespace.
Parameters: |
|
---|---|
Returns: | wrapped CIM namespace into LMINamespace |