Class: Katello::Pulp3::DockerManifest
Constant Summary
collapse
- CONTENT_TYPE =
"docker_manifest".freeze
Instance Attribute Summary
#backend_data, #uuid
Class Method Summary
collapse
included
add_timestamps, backend_unit_identifier, content_api_create, content_type, create_content, #fetch_backend_data, fetch_content_list, find_duplicate_unit, #initialize, model_class, page_options, pulp_data, pulp_units_batch_all, pulp_units_batch_for_repo, pulp_units_for_ids, supports_id_fetch?, unit_identifier
Class Method Details
.content_api ⇒ Object
7
8
9
|
# File 'app/services/katello/pulp3/docker_manifest.rb', line 7
def self.content_api
PulpContainerClient::ContentManifestsApi.new(Katello::Pulp3::Api::Docker.new(SmartProxy.pulp_primary!).api_client)
end
|
.content_unit_list(page_opts) ⇒ Object
17
18
19
20
21
22
|
# File 'app/services/katello/pulp3/docker_manifest.rb', line 17
def self.content_unit_list(page_opts)
page_opts[:media_type] = ['application/vnd.docker.distribution.manifest.v1+json',
'application/vnd.docker.distribution.manifest.v2+json',
'application/vnd.oci.image.manifest.v1+json']
self.content_api.list(page_opts)
end
|
.generate_model_row(unit) ⇒ Object
24
25
26
27
28
29
30
|
# File 'app/services/katello/pulp3/docker_manifest.rb', line 24
def self.generate_model_row(unit)
{
schema_version: unit['schema_version'],
digest: unit['digest'],
pulp_id: unit[unit_identifier]
}
end
|
.ids_for_repository(repo_id) ⇒ Object
11
12
13
14
15
|
# File 'app/services/katello/pulp3/docker_manifest.rb', line 11
def self.ids_for_repository(repo_id)
repo = Katello::Pulp3::Repository::Docker.new(Katello::Repository.find(repo_id), SmartProxy.pulp_primary)
repo_content_list = repo.content_list
repo_content_list.map { |content| content.try(:pulp_href) }
end
|