Sha256: 5bfb1072fc26d2383070043b9d8d72c8d91e0581b868da968da9f95f383ae3d5

Contents?: true

Size: 568 Bytes

Versions: 19

Compression:

Stored size: 568 Bytes

Contents

module ForemanRemoteExecution
  module SmartProxyExtensions
    extend ActiveSupport::Concern

    included do
      alias_method_chain :refresh, :remote_execution
    end

    def pubkey
      self[:pubkey] || update_pubkey
    end

    def update_pubkey
      return unless has_feature?('SSH')
      key = ::ProxyAPI::RemoteExecutionSSH.new(:url => url).pubkey
      self.update_attribute(:pubkey, key) if key
      key
    end

    def refresh_with_remote_execution
      errors = refresh_without_remote_execution
      update_pubkey
      errors
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
foreman_remote_execution-1.3.7 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.3.6 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.3.5 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.3.3 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.3.2 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.3.1 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.3.0 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.2.2 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.2.1 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.2.0 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.1.1 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.1.0 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.0.0 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-0.3.2 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-0.3.1 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-0.3.0 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-0.2.3 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-0.2.2 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-0.2.1 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb