Project

Profile

Help

Issue #392

closed

GET works in different way for Upload and rest of API items

Added by igulina@redhat.com about 9 years ago. Updated almost 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.3
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:

Creating an Upload Request returns a dictionary {upload url: url, upload_id: id}, but List All Upload Requests returns a dictionary {upload_idS: [id1, ..., idN]}. Furthermore, in contrast, for example for Repo list returns list of dictionaries. In other words, GET works in different way for Upload and rest of API items

Version-Release number of selected component (if applicable):
2.3

How reproducible:
always

Steps to Reproduce:
1. curl -i -H \"Accept: application/json\" -X POST -k -u admin:admin 'https://localhost/pulp/api/v2/content/uploads/'
2. curl -i -H \"Accept: application/json\" -X GET -k -u admin:admin 'https://localhost/pulp/api/v2/content/uploads/'
3. To comapre with other API items please implement the same (create and list Repo item for example)

Actual results:

HTTP/1.1 201 Created
Date: Tue, 28 Jan 2014 13:49:15 GMT
Server: Apache/2.4.6 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Location: /pulp/api/v2/content/uploads/17b576cc-bf09-48b3-9208-eb30b0a31bf6/
Content-Length: 132
Content-Type: application/json

{"upload_id": "17b576cc-bf09-48b3-9208-eb30b0a31bf6", "_href": "/pulp/api/v2/content/uploads/17b576cc-bf09-48b3-9208-eb30b0a31bf6/"}

HTTP/1.1 200 OK
Date: Tue, 28 Jan 2014 13:52:15 GMT
Server: Apache/2.4.6 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Length: 56
Content-Type: application/json

{"upload_ids": ["17b576cc-bf09-48b3-9208-eb30b0a31bf6"]}

Expected results:

HTTP/1.1 201 Created
Date: Tue, 28 Jan 2014 13:49:15 GMT
Server: Apache/2.4.6 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Location: /pulp/api/v2/content/uploads/17b576cc-bf09-48b3-9208-eb30b0a31bf6/
Content-Length: 132
Content-Type: application/json

{"upload_id": "17b576cc-bf09-48b3-9208-eb30b0a31bf6", "_href": "/pulp/api/v2/content/uploads/17b576cc-bf09-48b3-9208-eb30b0a31bf6/"}

HTTP/1.1 200 OK
Date: Tue, 28 Jan 2014 13:52:15 GMT
Server: Apache/2.4.6 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Length: 56
Content-Type: application/json

[{"upload_id": "17b576cc-bf09-48b3-9208-eb30b0a31bf6", "_href": "/pulp/api/v2/content/uploads/17b576cc-bf09-48b3-9208-eb30b0a31bf6/"}]

Additional info:

+ This bug was cloned from Bugzilla Bug #1058771 +

Also available in: Atom PDF