Sha256: f98c1db5eec68706231f1f57a43173a10fcb7693ea6d9939f0f3f9f8a4dba4c6
Contents?: true
Size: 1.29 KB
Versions: 22
Compression:
Stored size: 1.29 KB
Contents
module Actions module Katello module RepositorySet class EnableRepository < Actions::EntryAction def humanized_name _("Enable") end def plan(product, content, options) mapper = repository_mapper(product, content, options, options[:registry_name]) mapper.validate! if mapper.find_repository fail ::Katello::Errors::ConflictException, _("The repository is already enabled") end repository = mapper.build_repository plan_action(Repository::Create, repository) action_subject(repository) end private def repository_mapper(product, content, substituions, registry_name) if content.type == ::Katello::Repository::CANDLEPIN_DOCKER_TYPE ::Katello::Candlepin::Content::DockerRepositoryMapper.new(product, content, registry_name) else ::Katello::Candlepin::Content::RepositoryMapper.new(product, content, substituions) end end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems