Class: ForemanInventoryUpload::CloudStatusController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ForemanInventoryUpload::CloudStatusController
- Defined in:
- app/controllers/foreman_inventory_upload/cloud_status_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/foreman_inventory_upload/cloud_status_controller.rb', line 3 def index organizations = User.current.my_organizations ping_service = ForemanRhCloud::CloudPingService.new(organizations, logger) ping_result = ping_service.ping ping_result[:cert_auth] = ping_result[:cert_auth].map do |org, status_hash| status_hash.merge( { org_id: org.id, org_name: org.name, } ) end render json: { ping: ping_result, }, status: :ok end |
#logger ⇒ Object
22 23 24 |
# File 'app/controllers/foreman_inventory_upload/cloud_status_controller.rb', line 22 def logger Foreman::Logging.logger('app') end |