Class: ForemanMaintain::Scenario::FilteredScenario
- Inherits:
-
ForemanMaintain::Scenario
- Object
- ForemanMaintain::Scenario
- ForemanMaintain::Scenario::FilteredScenario
- Defined in:
- lib/foreman_maintain/scenario.rb
Instance Attribute Summary collapse
-
#filter_label ⇒ Object
readonly
Returns the value of attribute filter_label.
-
#filter_tags ⇒ Object
readonly
Returns the value of attribute filter_tags.
Attributes inherited from ForemanMaintain::Scenario
Instance Method Summary collapse
-
#initialize(filter, definition_kinds = [:check]) ⇒ FilteredScenario
constructor
A new instance of FilteredScenario.
- #runtime_message ⇒ Object
Methods inherited from ForemanMaintain::Scenario
#add_step, #add_step_with_context, #add_steps, #add_steps_with_context, #before_scenarios, #compose, #executed_steps, #failed?, #filter_whitelisted, #inspect, inspect, #load_step_states, new_from_hash, #passed?, #preparation_steps, #set_context_mapping, #steps_with_abort, #steps_with_error, #steps_with_warning, #to_hash
Methods included from Concerns::Finders
#check, #detector, #feature, #find_all_scenarios, #find_checks, #find_procedures, #find_scenarios, #procedure
Methods included from Concerns::ScenarioMetadata
Methods included from Concerns::SystemHelpers
#check_min_version, #clean_all_packages, #create_lv_snapshot, #directory_empty?, #downstream_installation?, #execute, #execute!, #execute?, #execute_with_status, #file_exists?, #find_dir_containing_file, #find_package, #find_symlinks, #format_shell_args, #get_lv_info, #get_lv_path, #hostname, included, #package_version, #packages_action, #parse_csv, #parse_json, #rpm_version, #server?, #service_exists?, #shellescape, #smart_proxy?, #systemd_installed?, #version
Methods included from Concerns::Logger
Constructor Details
#initialize(filter, definition_kinds = [:check]) ⇒ FilteredScenario
Returns a new instance of FilteredScenario.
19 20 21 22 23 24 25 26 27 |
# File 'lib/foreman_maintain/scenario.rb', line 19 def initialize(filter, definition_kinds = [:check]) @filter_tags = filter[:tags] @filter_label = filter[:label] @definition_kinds = definition_kinds @steps = [] @steps += checks(filter) if definition_kinds.include?(:check) @steps += procedures(filter) if definition_kinds.include?(:procedure) @steps = DependencyGraph.sort(@steps) end |
Instance Attribute Details
#filter_label ⇒ Object (readonly)
Returns the value of attribute filter_label.
17 18 19 |
# File 'lib/foreman_maintain/scenario.rb', line 17 def filter_label @filter_label end |
#filter_tags ⇒ Object (readonly)
Returns the value of attribute filter_tags.
17 18 19 |
# File 'lib/foreman_maintain/scenario.rb', line 17 def @filter_tags end |
Instance Method Details
#runtime_message ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/foreman_maintain/scenario.rb', line 29 def if @filter_label "#{kind_list} with label [#{dashize(@filter_label)}]" else "#{kinds_list} with tags #{tag_string(@filter_tags)}" end end |