Skip to content

Commit

Permalink
fixup! Fixes #29421 - add pulp3 debian support
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bucher committed Oct 28, 2020
1 parent c077697 commit daa5e0b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/actions/pulp3/repository/save_artifact.rb
Expand Up @@ -11,7 +11,7 @@ def invoke_external_task
artifact_href = input[:tasks].last[:created_resources].first
content_type = input[:unit_type_id]
content_backend_service = SmartProxy.pulp_primary.content_service(content_type)
output[:pulp_tasks] = [content_backend_service.content_api.create(input[:options][:file_name], artifact: artifact_href)]
output[:pulp_tasks] = [content_backend_service.content_api_create(relative_path: input[:options][:file_name], artifact: artifact_href)]
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions app/services/katello/pulp3/deb.rb
Expand Up @@ -8,6 +8,10 @@ def self.content_api
PulpDebClient::ContentPackagesApi.new(Katello::Pulp3::Api::Apt.new(SmartProxy.pulp_primary!).api_client)
end

def self.content_api_create(opts = {})
self.content_api.create(opts)
end

def self.create_content(options)
fail _("Artifact Id and relative path are needed to create content") unless options.dig(:file_name) && options.dig(:artifact)
PulpDebClient::DebContent.new(relative_path: options[:file_name], artifact: options[:artifact])
Expand Down
5 changes: 5 additions & 0 deletions app/services/katello/pulp3/pulp_content_unit.rb
Expand Up @@ -11,6 +11,11 @@ def self.content_api
fail NotImplementedError
end

def self.content_api_create(opts = {})
relative_path = opts.pop(:relative_path)
self.content_api.create(relative_path, opts)
end

def self.create_content
fail NotImplementedError
end
Expand Down

0 comments on commit daa5e0b

Please sign in to comment.