Sha256: 4261e1fe923734d76b4585fadb1102b078ba48b9139f2a721171e8205a1bb1b9
Contents?: true
Size: 1.3 KB
Versions: 31
Compression:
Stored size: 1.3 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, false, true) 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
31 entries across 31 versions & 1 rubygems