Class: HybridPlatformsConductor::Plugin
- Inherits:
-
Object
- Object
- HybridPlatformsConductor::Plugin
- Extended by:
- LoggerHelpers
- Includes:
- LoggerHelpers
- Defined in:
- lib/hybrid_platforms_conductor/plugin.rb
Overview
Base class for all plugins
Direct Known Subclasses
Action, Cmdb, Connector, Log, PlatformHandler, Provisioner, Report, Test, TestReport
Constant Summary
Constants included from LoggerHelpers
LoggerHelpers::LEVELS_MODIFIERS, LoggerHelpers::LEVELS_TO_STDERR
Class Attribute Summary collapse
-
.logger ⇒ Object
Class loggers.
-
.logger_stderr ⇒ Object
Class loggers.
Class Method Summary collapse
-
.extend_config_dsl_with(mixin, init_method = nil) ⇒ Object
Extend the config DSL used when parsing the hpc_config.rb file with a given Mixin.
-
.valid? ⇒ Boolean
Are dependencies met before using this plugin? This method can be overriden by any plugin.
Instance Method Summary collapse
-
#initialize(logger: Logger.new(STDOUT), logger_stderr: Logger.new(STDERR), config: Config.new) ⇒ Plugin
constructor
Constructor.
Methods included from LoggerHelpers
err, init_loggers, log_component=, log_debug?, log_level=, out, section, set_loggers_format, stderr_device, stderr_device=, stderr_displayed?, stdout_device, stdout_device=, stdout_displayed?, stdouts_to_s, with_progress_bar
Constructor Details
#initialize(logger: Logger.new(STDOUT), logger_stderr: Logger.new(STDERR), config: Config.new) ⇒ Plugin
Constructor
- Parameters
-
logger (Logger): Logger to be used [default: Logger.new(STDOUT)]
-
logger_stderr (Logger): Logger to be used for stderr [default: Logger.new(STDERR)]
-
config (Config): Config to be used. [default: Config.new]
42 43 44 45 46 47 48 49 |
# File 'lib/hybrid_platforms_conductor/plugin.rb', line 42 def initialize( logger: Logger.new(STDOUT), logger_stderr: Logger.new(STDERR), config: Config.new ) init_loggers(logger, logger_stderr) @config = config end |
Class Attribute Details
.logger ⇒ Object
Class loggers
13 14 15 |
# File 'lib/hybrid_platforms_conductor/plugin.rb', line 13 def logger @logger end |
.logger_stderr ⇒ Object
Class loggers
13 14 15 |
# File 'lib/hybrid_platforms_conductor/plugin.rb', line 13 def logger_stderr @logger_stderr end |
Class Method Details
.extend_config_dsl_with(mixin, init_method = nil) ⇒ Object
Extend the config DSL used when parsing the hpc_config.rb file with a given Mixin. This can be used by any plugin to add plugin-specific configuration in the hpc_config.rb file.
- Parameters
-
mixin (Module): Mixin to add to the Platforms DSL
-
init_method (Symbol or nil): The initializer method of this Mixin, or nil if none [default = nil]
30 31 32 |
# File 'lib/hybrid_platforms_conductor/plugin.rb', line 30 def extend_config_dsl_with(mixin, init_method = nil) Config.extend_config_dsl_with(mixin, init_method) end |
.valid? ⇒ Boolean
Are dependencies met before using this plugin? This method can be overriden by any plugin
- Result
-
Boolean: Are dependencies met before using this plugin?
20 21 22 |
# File 'lib/hybrid_platforms_conductor/plugin.rb', line 20 def valid? true end |