Class: ForemanRhCloud::RemediationsRetriever
- Inherits:
 - 
      Object
      
        
- Object
 - ForemanRhCloud::RemediationsRetriever
 
 
- Includes:
 - CertAuth
 
- Defined in:
 - app/services/foreman_rh_cloud/remediations_retriever.rb
 
Direct Known Subclasses
Instance Attribute Summary collapse
- 
  
    
      #logger  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute logger.
 
Instance Method Summary collapse
- #create_playbook ⇒ Object
 - 
  
    
      #initialize(logger: Logger.new(IO::NULL))  ⇒ RemediationsRetriever 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of RemediationsRetriever.
 
Methods included from CertAuth
#cert_auth_available?, #execute_cloud_request
Methods included from InsightsCloud::CandlepinCache
#candlepin_id_cert, #cp_owner_id, #upstream_owner
Methods included from CloudRequest
Constructor Details
#initialize(logger: Logger.new(IO::NULL)) ⇒ RemediationsRetriever
Returns a new instance of RemediationsRetriever.
      7 8 9  | 
    
      # File 'app/services/foreman_rh_cloud/remediations_retriever.rb', line 7 def initialize(logger: Logger.new(IO::NULL)) @logger = logger end  | 
  
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
      5 6 7  | 
    
      # File 'app/services/foreman_rh_cloud/remediations_retriever.rb', line 5 def logger @logger end  | 
  
Instance Method Details
#create_playbook ⇒ Object
      11 12 13 14 15 16 17 18 19 20 21 22  | 
    
      # File 'app/services/foreman_rh_cloud/remediations_retriever.rb', line 11 def create_playbook unless cert_auth_available?(organization) logger.debug('Manifest is not available, cannot continue') return end response = query_playbook logger.debug("Got playbook response: #{response.body}") response.body end  |