LMIFormatter¶
- class lmi.shell.LMIFormatter.LMIClassFormatter(cim_class)¶
Class formatter is used to print out wbem.CIMClass representation.
Parameters: cim_class (CIMClass) – object to print out - format(indent=0, width=80, f=<open file '<stdout>', mode 'w' at 0x7f0d9c902150>)¶
Formats out wbem.CIMClass object.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- format_property(prop, indent, width, f)¶
Prints out a property of wbem.CIMClass.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- class lmi.shell.LMIFormatter.LMIFormatter¶
Abstract class for derived subclasses.
- fancy_format(interactive)¶
Formats a block of text. If the LMIShell is running in interactive mode, pager will be used, otherwise the output will be written to standard output.
Parameters: interactive (bool) – defines, if to use pager
- format(indent=0, width=80, f=<open file '<stdout>', mode 'w' at 0x7f0d9c902150>)¶
Formats a block of text and prints it to the output stream.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- class lmi.shell.LMIFormatter.LMIInstanceFormatter(cim_instance)¶
Instance formatter is used to print out wbem.CIMInstance representation.
Parameters: cim_instance (CIMInstance) – object to print out - format(indent=0, width=80, f=<open file '<stdout>', mode 'w' at 0x7f0d9c902150>)¶
Prints out :py:class`CIMInstance` object.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- format_property(prop, indent, width, f)¶
Prints out a property of wbem.CIMInstance.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- class lmi.shell.LMIFormatter.LMIMethodFormatter(cim_method)¶
Method formatter is used to print out wbem.CIMMethod representation.
- format(indent=0, width=80, f=<open file '<stdout>', mode 'w' at 0x7f0d9c902150>)¶
Prints out :py:class`CIMMethod` object.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- format_method(method, indent, width, f)¶
Prints out a method of wbem.CIMClass.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- format_parameter(param, indent, width, f)¶
Prints out a parameter of wbem.CIMMethod.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- format_qualifier(qualif, indent, width, f)¶
Prints out a parameter of wbem.CIMMethod.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- class lmi.shell.LMIFormatter.LMIMofFormatter(obj)¶
MOF formatter is used to print out MOF representation of a CIM object.
Parameters: obj – object, which has tomof() method - format(indent=0, width=80, f=<open file '<stdout>', mode 'w' at 0x7f0d9c902150>)¶
Formats a MOF object and prints it to the output stream.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- class lmi.shell.LMIFormatter.LMITextFormatter(text)¶
Text formatter class. Used when printing a block of text to output stream.
Parameters: text (string) – text to be formatted - format(indent=0, width=80, f=<open file '<stdout>', mode 'w' at 0x7f0d9c902150>, separator=True)¶
Formats a block of text and prints it to the output stream.
Parameters: - indent (int) – number of spaces to indent the text block
- width (int) – total text block width
- f – output stream
- kwargs (dictionary) – supported keyword arguments
- separator (bool) – if True, there will be a new line appended after the formatted text; default value is True