Sha256: f6b1dc6fb28c7f4ec2241859c88fe7a2dad37690626c7aa688ce789ae4ccc62f
Contents?: true
Size: 1.89 KB
Versions: 4
Compression:
Stored size: 1.89 KB
Contents
module Katello module Pulp class Repository class Puppet < ::Katello::Pulp::Repository def generate_master_importer config = { feed: root.url, remove_missing: root.mirror_on_sync? } importer_class.new(config.merge(master_importer_connection_options)) end def generate_mirror_importer config = { :feed => self.external_url, :remove_missing => true } importer_class.new(config.merge(mirror_importer_connection_options)) end def generate_distributors puppet_install_dist = Runcible::Models::PuppetInstallDistributor.new(puppet_install_distributor_path, :subdir => 'modules', :id => repo.pulp_id, :auto_publish => false) puppet_dist = Runcible::Models::PuppetDistributor.new(nil, (root.unprotected || false), true, :id => "#{repo.pulp_id}_puppet", :auto_publish => true) [puppet_dist, puppet_install_dist] end def puppet_install_distributor_path puppet_env = ::Environment.construct_name(repo.organization, repo.environment, repo.content_view) ::File.join(smart_proxy.puppet_path, puppet_env) end def partial_repo_path "/pulp/puppet/#{repo.pulp_id}/" end def importer_class Runcible::Models::PuppetImporter end def copy_contents(destination_repo, options = {}) if options[:puppet_modules] module_uuids = options[:puppet_modules].pluck(:pulp_id) clauses = {'filters': { 'association': { 'unit_id' => { "$in" => module_uuids } } } } else clauses = {} end @smart_proxy.pulp_api.extensions.puppet_module.copy(@repo.pulp_id, destination_repo.pulp_id, clauses) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems