class ForemanInventoryUpload::Async::UploadReportJob
Public Class Methods
output_label(portal_user)
click to toggle source
# File lib/foreman_inventory_upload/async/upload_report_job.rb, line 4 def self.output_label(portal_user) "upload_for_#{portal_user}" end
Public Instance Methods
command()
click to toggle source
# File lib/foreman_inventory_upload/async/upload_report_job.rb, line 15 def command File.join(File.dirname(@filename), ForemanInventoryUpload.upload_script_file) end
env()
click to toggle source
Calls superclass method
ForemanInventoryUpload::Async::ShellProcess#env
# File lib/foreman_inventory_upload/async/upload_report_job.rb, line 19 def env super.merge( 'RH_USERNAME' => rh_username, 'RH_PASSWORD' => rh_password, 'FILES' => @filename ) end
perform(filename, portal_user)
click to toggle source
Calls superclass method
ForemanInventoryUpload::Async::ShellProcess#perform
# File lib/foreman_inventory_upload/async/upload_report_job.rb, line 8 def perform(filename, portal_user) @portal_user = portal_user @filename = filename super(UploadReportJob.output_label(portal_user)) end
rh_credentials()
click to toggle source
# File lib/foreman_inventory_upload/async/upload_report_job.rb, line 27 def rh_credentials @rh_credentials ||= RedhatAccess::TelemetryConfiguration.where(portal_user: @portal_user).last end
rh_password()
click to toggle source
# File lib/foreman_inventory_upload/async/upload_report_job.rb, line 35 def rh_password rh_credentials.portal_password end
rh_username()
click to toggle source
# File lib/foreman_inventory_upload/async/upload_report_job.rb, line 31 def rh_username @portal_user end