Project

Profile

Help

Issue #4897

closed

PulpCore API client - Artifacts_create method doesn't accept only upload parameter

Added by sajha almost 5 years ago. Updated almost 4 years ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 54
Quarter:

Description

With the below call, providing only upload_href to artifacts_create:

opts = {upload: "/pulp/api/v3/uploads/390d46d1-e728-4bae-85e9-8355b2b09db9/"}
pulp3_api.artifacts_create(opts)

HTTP Request:


2019-05-31T02:55:53 [D|kat|] Calling API: ArtifactsApi.artifacts_create ...
2019-05-31T02:55:53 [D|kat|] HTTP request body param ~BEGIN~
 | {"upload"=>"/pulp/api/v3/uploads/390d46d1-e728-4bae-85e9-8355b2b09db9/"}
 | ~END~
 | 

2019-05-31T02:55:53 [D|app|] ETHON: performed EASY effective_url=http://dev.pulp3/pulp/api/v3/artifacts/ response_code=400 return_code=ok total_time=0.127177
2019-05-31T02:55:53 [D|kat|] HTTP response body ~BEGIN~
 | {"non_field_errors":["Either 'file' or 'upload' parameter must be supplied but not both."]}
 | ~END~
 | 

Client error:

PulpcoreClient::ApiError (Error message: the server returns an error)
HTTP status code: 400
Response headers: {"Server"=>"nginx/1.12.1", "Date"=>"Fri, 31 May 2019 02:55:53 GMT", "Content-Type"=>"application/json", "Content-Length"=>"91", "Connection"=>"keep-alive", "Vary"=>"Accept, Cookie", "Allow"=>"GET, POST, HEAD, OPTIONS", "X-Frame-Options"=>"SAMEORIGIN"}
Response body: {"non_field_errors":["Either 'file' or 'upload' parameter must be supplied but not both."]}

Also available in: Atom PDF