LMIFormatter

class lmi.shell.LMIFormatter.LMIClassFormatter(cim_class)[source]

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 0x7f4075bb3150>)[source]

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)[source]

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[source]

Abstract class for derived subclasses.

fancy_format(interactive)[source]

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 0x7f4075bb3150>)[source]

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)[source]

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 0x7f4075bb3150>)[source]

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)[source]

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)[source]

Method formatter is used to print out wbem.CIMMethod representation.

format(indent=0, width=80, f=<open file '<stdout>', mode 'w' at 0x7f4075bb3150>)[source]

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)[source]

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)[source]

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)[source]

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)[source]

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 0x7f4075bb3150>)[source]

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)[source]

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 0x7f4075bb3150>, separator=True)[source]

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