Class: ForemanAnsibleDirector::Issues::Warnings::NoResolutionCandidateForRole
- Inherits:
-
BaseWarning
- Object
- BaseIssue
- BaseWarning
- ForemanAnsibleDirector::Issues::Warnings::NoResolutionCandidateForRole
- Defined in:
- app/lib/foreman_ansible_director/issues/warnings/no_resolution_candidate_for_role.rb
Instance Method Summary collapse
-
#initialize(role_namespace:, role_name:, content_source:, assignment_id:) ⇒ NoResolutionCandidateForRole
constructor
A new instance of NoResolutionCandidateForRole.
- #message ⇒ Object
- #render_for_response ⇒ Object
- #title ⇒ Object
Methods inherited from BaseIssue
Constructor Details
#initialize(role_namespace:, role_name:, content_source:, assignment_id:) ⇒ NoResolutionCandidateForRole
Returns a new instance of NoResolutionCandidateForRole.
7 8 9 10 11 12 13 14 15 16 |
# File 'app/lib/foreman_ansible_director/issues/warnings/no_resolution_candidate_for_role.rb', line 7 def initialize(role_namespace:, role_name:, content_source:, assignment_id:) @role_namespace = role_namespace @role_name = role_name @content_source = content_source @assignment_id = assignment_id super end |
Instance Method Details
#message ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'app/lib/foreman_ansible_director/issues/warnings/no_resolution_candidate_for_role.rb', line 23 def <<~MESSAGE No resolution candidate was found for the following Ansible role: Role namespace: #{@role_namespace} Role name: #{@role_name} Ensure the lifecycle environment #{@content_source.cs_name} supplies this role, otherwise it will be skipped. MESSAGE end |
#render_for_response ⇒ Object
33 34 35 |
# File 'app/lib/foreman_ansible_director/issues/warnings/no_resolution_candidate_for_role.rb', line 33 def render_for_response super.merge({ assignment_id: @assignment_id }) end |
#title ⇒ Object
18 19 20 21 |
# File 'app/lib/foreman_ansible_director/issues/warnings/no_resolution_candidate_for_role.rb', line 18 def title fqrn = "#{@role_namespace}.#{@role_name}" "No resolution candidate for Ansible role: \"#{fqrn}\"" end |