Module: ForemanRemoteExecution::SmartProxyExtensions
- Defined in:
- app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
Instance Method Summary collapse
- #drop_host_from_known_hosts(host) ⇒ Object
- #pubkey ⇒ Object
- #refresh ⇒ Object
- #update_pubkey ⇒ Object
Instance Method Details
#drop_host_from_known_hosts(host) ⇒ Object
15 16 17 |
# File 'app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb', line 15 def drop_host_from_known_hosts(host) ::ProxyAPI::RemoteExecutionSSH.new(:url => url).drop_from_known_hosts(host) end |
#pubkey ⇒ Object
3 4 5 |
# File 'app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb', line 3 def pubkey self[:pubkey] || update_pubkey end |
#refresh ⇒ Object
19 20 21 22 23 |
# File 'app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb', line 19 def refresh errors = super update_pubkey errors end |
#update_pubkey ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb', line 7 def update_pubkey return unless has_feature?('SSH') key = ::ProxyAPI::RemoteExecutionSSH.new(:url => url).pubkey self.update_attribute(:pubkey, key) if key key end |