LMIMethod Package

class LMIMethod.LMIMethod(conn, lmi_instance, method, sync_method)[source]

LMI wrapper class representing CIMMethod.

Parameters:
  • conn (LMIConnection) – connection object
  • lmi_instance (LMIInstance) – LMIInstance object, on which the method call will be issued
  • method (string) – method name
  • sync_method (bool) – flag indicating, if we are trying to perform a synchronous method call
parameters()[source]
Returns:list of strings of CIMMethod‘s parameters
print_parameters()[source]

Prints out CIMMethod‘s parameters.

print_valuemap_parameters()[source]

Prints out the list of strings of constant names.

return_type[source]
Returns:string of the method call’s return type
tomof()[source]

Prints out a message with MOF representation of CIMMethod. 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.

valuemap_parameters()[source]
Returns:list of strings of the constant names
wrapped_object[source]
Returns:wrapped CIMmethod object
class LMIMethod.LMISignalHelper[source]

Helper class, which takes care of signal (de)registration and handling.

callback_attach(cb_name, cb)[source]

Registers a callback, which will be called when a SIGINT or SIGTERM is caught.

Parameters:
  • cb_name (string) – callback name
  • cb – callable object, which takes zero arguments
callback_detach(cb_name)[source]

Removes a callback from the callback dictionary.

Parameters:cb_name (string) – callback name
reset()[source]

Resets the single instance into default state.

signal_attach()[source]

Registers SIGINT and SIGTERM signals to local handler in which, the flags for each signal are modified, if such signal is caught.

signal_detach()[source]

Unregisters SIGINT and SIGTERM handler and removes all the attached callbacks.

signal_handled()[source]
Returns:True, if any of SIGINT or SIGTERM has been caught; False otherwise

This Page