Package pyhai :: Module pyhai :: Class Auditor
[hide private]
[frames] | no frames]

Class Auditor

object --+
         |
        Auditor

Auditor class

Instance Methods [hide private]
 
__init__(self, plugin_paths=None, **kwargs)
Initialize System object
class
__load_module(self, module, cls='')
Loads a module and class dynamically return a reference to the class
 
__load_plugins(self, system_class, system, plugin_module=None)
Imports plugin modules and stores the list of successfully loaded plugins
 
__load_profiler(self, profiler, package='')
Loads a profiler plugin
list
__resolve_plugin_paths(self, system_class, system, **kwargs)
Checks plugin paths for validity and returns only those that are valid
 
__validate_plugins(self, path, base=None, plugins=None)
Performs an initial sanity check on all the plugins found in a path
dict
audit(self, convert_date_to_iso=True)
Profiles the system using the default plugins and all custom plugins, returning a dictionary of the results

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  plugin_paths = ['d:\\MARKSA~1\\WORKSP~1\\pyhai\\src\\pyhai\\pl...
Instance Variables [hide private]
str architecture
The name of the architecture as is normally returned by platform.architecture()[0]
str custom_plugin_path
The path to any custom plugins
list plugins = {}
A list of successfully loaded plugins
dict profile = None
A dictionary of properties for this host
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, plugin_paths=None, **kwargs)
(Constructor)

 

Initialize System object

Parameters:
  • plugin_paths (str | list) - A path (or list of paths) to a custom set of plugins
  • profiler_class (class | str) - The name of a class that extends ProfilerBase or the name of the module where the ProfilerBase class can be found. If supplying a module, must supply the profiler_class keyword arg
  • enable_default_plugins (bool) - A flag to use (or suppress) the builtin plugins
  • profiler_package (str) - The name of the package that contains a class that extends ProfilerBase
Overrides: object.__init__

__load_module(self, module, cls='')

 

Loads a module and class dynamically return a reference to the class

Parameters:
  • module (str) - The name of module to load
  • cls (str) - The name of a class to load
Returns: class
A reference to the loaded class

__load_plugins(self, system_class, system, plugin_module=None)

 

Imports plugin modules and stores the list of successfully loaded plugins

Parameters:
  • plugin_module (str) - A specific plugin_module to load

__load_profiler(self, profiler, package='')

 

Loads a profiler plugin

Parameters:
  • profiler (str) - The name of a class that extends ProfilerBase
  • package (str) - The name of the package where the profiler exists

__resolve_plugin_paths(self, system_class, system, **kwargs)

 

Checks plugin paths for validity and returns only those that are valid

Parameters:
  • system (str) - The type of system
  • plugin_paths (str|list) - A path (or list of paths) to a custom set of plugins
Returns: list
A list of valid plugin paths

__validate_plugins(self, path, base=None, plugins=None)

 

Performs an initial sanity check on all the plugins found in a path

Parameters:
  • path (str) - The path to look for plugins
  • base (str) - The base of the package name if path is a subfolder of a python package
    • To assist with the import, i.e. from package.module import plugin

audit(self, convert_date_to_iso=True)

 

Profiles the system using the default plugins and all custom plugins, returning a dictionary of the results

Parameters:
  • convert_date_to_iso (bool) - Converts the 'audit_completed' date to iso format before returning
Returns: dict
A dictionary representing the current state of the system

Class Variable Details [hide private]

plugin_paths

Value:
['d:\\MARKSA~1\\WORKSP~1\\pyhai\\src\\pyhai\\plugins']