Sha256: 1e3a6e0862e44e86b3f27377548b46a0f5a678d12151f0d3f1cabf73261d9f26

Contents?: true

Size: 406 Bytes

Versions: 44

Compression:

Stored size: 406 Bytes

Contents

module ForemanRemoteExecution
  module SmartProxyExtensions
    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
      errors = super
      update_pubkey
      errors
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
foreman_remote_execution-1.7.1 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.7.0 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.6.7 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.6.6 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.6.5 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.6.4 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.5.6 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.6.3 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.6.2 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.5.5 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.6.1 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.6.0 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.5.4 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.5.3 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.5.2 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.5.1 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.5.0 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.4.6 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.4.5 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
foreman_remote_execution-1.4.4 app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb