Sha256: b5d1606791cde39d3b9414c0e081387d3ea4bf7c86af5397e9455e67f74bf561
Contents?: true
Size: 990 Bytes
Versions: 16
Compression:
Stored size: 990 Bytes
Contents
module Katello module Pulp3 class DockerTag < PulpContentUnit include LazyAccessor def self.content_api PulpContainerClient::ContentTagsApi.new(Katello::Pulp3::Api::Docker.new(SmartProxy.pulp_master!).api_client) end def self.ids_for_repository(repo_id) repo = Katello::Pulp3::Repository::Docker.new(Katello::Repository.find(repo_id), SmartProxy.pulp_master) repo_content_list = repo.content_list repo_content_list.map { |content| content.try(:pulp_href) } end def update_model(model) custom_json = {} taggable = ::Katello::DockerManifest.find_by(:pulp_id => backend_data['tagged_manifest']) if taggable.nil? taggable = ::Katello::DockerManifestList.find_by(:pulp_id => backend_data['tagged_manifest']) end custom_json['docker_taggable'] = taggable custom_json['name'] = backend_data['name'] model.update!(custom_json) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems