Class: Katello::Pulp3::Repository::Generic
- Inherits:
-
Katello::Pulp3::Repository
- Object
- Katello::Pulp3::Repository
- Katello::Pulp3::Repository::Generic
- Defined in:
- app/services/katello/pulp3/repository/generic.rb
Constant Summary
Constants inherited from Katello::Pulp3::Repository
Instance Attribute Summary
Attributes inherited from Katello::Pulp3::Repository
Instance Method Summary collapse
- #copy_content_for_source(source_repository, _options = {}) ⇒ Object
- #distribution_options(path) ⇒ Object
- #partial_repo_path ⇒ Object
- #remote_options ⇒ Object
Methods inherited from Katello::Pulp3::Repository
#add_content, #add_content_for_repo, #api, api, #append_proxy_cacert, #common_remote_options, #compute_remote_options, #content_service, #copy_all, #copy_units_by_href, #copy_version, #core_api, #create, #create_distribution, #create_mirror_entities, #create_options, #create_publication, #create_remote, #create_version, #delete_distributions, #delete_distributions_by_path, #delete_remote, #delete_repository, #delete_version, #distribution_needs_update?, #distribution_reference, #fail_missing_publication, #generate_backend_object_name, #get_distribution, #get_remote, #initialize, instance_for_type, #list, #lookup_distributions, #lookup_publication, #lookup_version, #mirror_remote_options, publication_href?, #publication_options, #published?, #read, #read_distribution, #refresh_distributions, #refresh_if_needed, #refresh_mirror_entities, #relative_path, #remote_partial_update, #remove_content, #repair, #repository_import_content, #repository_reference, #retain_package_versions_count, #save_distribution_references, #secure_distribution_options, #should_purge_empty_contents?, #skip_types, #specific_create_options, #ssl_remote_options, #sync, #sync_url_params, #unit_keys, #update, #update_distribution, #update_remote, version_href?, #version_zero?, #with_mirror_adapter
Methods included from ServiceCommon
#create_remote, #create_test_remote, #ignore_404_exception, #reformat_api_exception, #test_remote_name
Methods included from Util::HttpProxy
#proxy, #proxy_host, #proxy_port, #proxy_scheme, #proxy_uri
Constructor Details
This class inherits a constructor from Katello::Pulp3::Repository
Instance Method Details
#copy_content_for_source(source_repository, _options = {}) ⇒ Object
5 6 7 |
# File 'app/services/katello/pulp3/repository/generic.rb', line 5 def copy_content_for_source(source_repository, = {}) copy_units_by_href(source_repository.files.pluck(:pulp_id)) end |
#distribution_options(path) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/services/katello/pulp3/repository/generic.rb', line 9 def (path) = { base_path: path, name: "#{generate_backend_object_name}" } if ::Katello::RepositoryTypeManager.find(repo.content_type).pulp3_skip_publication .merge!(repository_version: repo.version_href) else .merge!(publication: repo.publication_href) end end |
#partial_repo_path ⇒ Object
33 34 35 |
# File 'app/services/katello/pulp3/repository/generic.rb', line 33 def partial_repo_path "/pulp/content/#{repo.relative_path}/".sub('//', '/') end |
#remote_options ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'app/services/katello/pulp3/repository/generic.rb', line 24 def = JSON.parse(root.) if .any? .merge().symbolize_keys else end end |