Sha256: ad58383c064654324ea1c28e0c69c40bdf87b31b4d28fdd032adb50c51b193d1

Contents?: true

Size: 835 Bytes

Versions: 9

Compression:

Stored size: 835 Bytes

Contents

module ForemanRemoteExecution
  module Concerns
    module Api::V2::RegistrationControllerExtensions
      module ApipieExtensions
        extend Apipie::DSL::Concern

        update_api(:global, :host) do
          param :remote_execution_interface, String, desc: N_("Identifier of the Host interface for Remote execution")
        end
      end

      extend ActiveSupport::Concern

      def host_setup_extension
        remote_execution_interface
        reset_host_known_keys! unless @host.new_record?
        super
      end

      def remote_execution_interface
        return unless params['remote_execution_interface'].present?

        @host.set_execution_interface(params['remote_execution_interface'])
      end

      def reset_host_known_keys!
        @host.host_proxy_invocations.destroy_all
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
foreman_remote_execution-5.0.8 app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb
foreman_remote_execution-7.1.1 app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb
foreman_remote_execution-7.1.0 app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb
foreman_remote_execution-7.0.0 app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb
foreman_remote_execution-5.0.7 app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb
foreman_remote_execution-5.0.6 app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb
foreman_remote_execution-6.2.0 app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb
foreman_remote_execution-5.0.5 app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb
foreman_remote_execution-6.1.0 app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb