Class: Katello::Resources::Registry::Proxy

Inherits:
Object
  • Object
show all
Defined in:
app/lib/katello/resources/registry.rb

Class Method Summary collapse

Class Method Details

.get(path, headers = {:accept => :json}, options = {}) ⇒ Object



13
14
15
16
17
18
19
20
# File 'app/lib/katello/resources/registry.rb', line 13

def self.get(path, headers = {:accept => :json}, options = {})
  logger.debug "Sending GET request to Registry: #{path}"
  resource = RegistryResource.load_class
  joined_path = resource.prefix.chomp("/") + path
  client = resource.rest_client(Net::HTTP::Get, :get, joined_path)
  client.options.merge!(options)
  client.get(headers)
end

.loggerObject



9
10
11
# File 'app/lib/katello/resources/registry.rb', line 9

def self.logger
  ::Foreman::Logging.logger('katello/registry_proxy')
end