Module: Api::V2::RegistrationControllerExtensions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb
Defined Under Namespace
Modules: ApipieExtensions
Instance Method Summary
collapse
Instance Method Details
#host_setup_extension ⇒ Object
15
16
17
18
19
20
|
# File 'app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb', line 15
def host_setup_extension
remote_execution_interface
remote_execution_pull
reset_host_known_keys! unless @host.new_record?
super
end
|
#remote_execution_interface ⇒ Object
28
29
30
31
32
|
# File 'app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb', line 28
def remote_execution_interface
return unless params['remote_execution_interface'].present?
@host.set_execution_interface(params['remote_execution_interface'])
end
|
#remote_execution_pull ⇒ Object
22
23
24
25
26
|
# File 'app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb', line 22
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
|
#reset_host_known_keys! ⇒ Object
34
35
36
|
# File 'app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb', line 34
def reset_host_known_keys!
@host.host_proxy_invocations.destroy_all
end
|