Sha256: ed60a345cb1473922218b9a711d4b30bbd0db1b1d30b3f5bc62406d43555e4f9
Contents?: true
Size: 1.34 KB
Versions: 51
Compression:
Stored size: 1.34 KB
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") param :setup_remote_execution_pull, :bool, desc: N_("Set 'host_registration_remote_execution_pull' parameter for the host. If it is set to true, pull provider client will be deployed on the host") end end extend ActiveSupport::Concern def host_setup_extension remote_execution_interface remote_execution_pull reset_host_known_keys! unless @host.new_record? super end def remote_execution_pull HostParameter.where(host: @host, name: 'host_registration_remote_execution_pull').destroy_all setup_host_param('host_registration_remote_execution_pull', ActiveRecord::Type::Boolean.new.deserialize(params['setup_remote_execution_pull'])) 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
51 entries across 51 versions & 1 rubygems