Class: Katello::Resources::Registry::RegistryResource

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

Constant Summary

Constants inherited from HttpResource

HttpResource::REQUEST_MAP

Instance Attribute Summary

Attributes inherited from HttpResource

#json

Class Method Summary collapse

Methods inherited from HttpResource

#[], #[]=, hash_to_query, #initialize, issue_request, join_path, logger, raise_rest_client_exception, rest_client

Methods included from Concerns::FilterSensitiveData

#filter_sensitive_data

Constructor Details

This class inherits a constructor from Katello::HttpResource

Class Method Details

.load_classObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'app/lib/katello/resources/registry.rb', line 25

def load_class
  pulp_primary = ::SmartProxy.pulp_primary
  content_app_url = pulp_primary.setting(SmartProxy::PULP3_FEATURE, 'content_app_url')

  fail Errors::ContainerRegistryNotConfigured unless content_app_url

  uri = URI.parse(content_app_url)
  self.prefix = "/pulpcore_registry/"
  self.site = "#{uri.scheme}://#{uri.host}:#{uri.port}"
  self.ca_cert_file = Setting[:ssl_ca_file]
  pulp_primary.pulp3_ssl_configuration(self, :net_http)

  self
end

.process_response(response) ⇒ Object



40
41
42
43
44
# File 'app/lib/katello/resources/registry.rb', line 40

def process_response(response)
  debug_level = response.code >= 400 ? :error : :debug
  logger.send(debug_level, "Registry request returned with code #{response.code}")
  super
end