Project

Profile

Help

Issue #397

_href not present in the response body when single unit retrieval is done

Added by ipanova@redhat.com over 5 years ago. Updated 4 months ago.

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

Description

Description of problem:
There is a discrepancy in response body while doing retrieval of different resource type.
For example when doing retrieval of single unit https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/content/retrieval.html#retrieve-a-single-unit there is no _href in response body,
Meanwhile retrieval of single repo also contains _href in response body.
As an additional info - when doing a generic search for unit https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/content/retrieval.html#search-for-units the response body contains _href.

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

pulp-server-2.4.0-0.2.alpha.git.6.53c19dc.fc19.noarch
How reproducible:

Steps to Reproduce:
1.Retrieve a single unit with GET method with path /pulp/api/v2/content/units/<content_type>/<unit_id>/
2.
3.

Actual results:
_href not present in response body

Expected results:
_href present in the response body

Additional info:

Doing retrieval of single unit by providing its id:
_href not present
$ curl H "Accept: application/json" -X GET -k -u admin:admin 'https://example.com/pulp/api/v2/content/units/puppet_module/557a6577-02be-4981-b80c-54cd0a853333/' | python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1109 100 1109 0 0 1398 0 -
:--:-- --:--:-- --:--:-- 1842
{
"_content_type_id": "puppet_module",
"_id": "557a6577-02be-4981-b80c-54cd0a853333",
"_last_updated": "2014-02-13T14:54:33Z",
"_storage_path": "/var/lib/pulp/content/puppet_module/sbilo-jenkins-0.1.0.tar.gz",
"author": "sbilo",
"checksum": "0c1dd3f7e8bfb5dddfadc6488ce7f86168b0eddbe2a4adef5f2d8d94ac7e979f",
"checksum_type": "sha256",
"checksums": [
[
"spec/spec.opts",
"a600ded995d948e393fbe2320ba8e51c"
],
[
"tests/init.pp",
"f3efee0dc58cbe32a1c03854b9801fa7"
],
[
"spec/spec_helper.rb",
"3ea886dd135e120afa31e0aab12e85b0"
],
[
"Modulefile",
"a26fdee8f1ca55cc682fa23cb1cb74e4"
],
[
"Rakefile",
"f37e6131fe7de9a49b09d31596f5fbf1"
],
[
"manifests/init.pp",
"6d32d585a2a6060a9a3674b08aeb0969"
],
[
"README.md",
"bd49a65e501ff65f2c70b9c4b4a4a6e3"
],
[
"manifests/instance.pp",
"a20f6163181f15ab47dfbb5242dd45d8"
]
],
"children": {},
"dependencies": [
{
"name": "proteon-tomcat",
"version_requirement": ">= 0.1.15"
}
],
"description": "",
"license": "",
"name": "jenkins",
"project_page": "",
"source": "",
"summary": "",
"tag_list": [
"jenkins",
"continuous",
"integration",
"tomcat",
"hudson",
"ci"
],
"types": [],
"version": "0.1.0"
}

Meanwhile retrieval of single repo by its id contains _href:

$ curl H "Accept: application/json" -X GET -k -u admin:admin 'https://example.com/pulp/api/v2/repositories/SimpleUnitSearchTest/' | python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 316 100 316 0 0 424 0 -
:--:-- --:--:-- --:--:-- 484
{
"_href": "/pulp/api/v2/repositories/SimpleUnitSearchTest/",
"_id": {
"$oid": "52fcdca1c053704cf2c55200"
},
"_ns": "repos",
"content_unit_counts": {
"puppet_module": 17
},
"description": null,
"display_name": "SimpleUnitSearchTest",
"id": "SimpleUnitSearchTest",
"notes": {
"_repo-type": "puppet-repo"
},
"scratchpad": {}
}

Even when doing search for units with a post method _href is present:

$ curl H "Accept: application/json" -X POST -k -u admin:admin -d '{"criteria": {"filters": {"name":"jenkins"}, "fields": ["name","_content_type_id"]}}' 'https://example.com/pulp/api/v2/content/units/puppet_module/search/' | python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 296 100 212 100 84 303 120 -
:--:-- --:--:-- --:--:-- 349
[
{
"_content_type_id": "puppet_module",
"_href": "/pulp/api/v2/content/units/puppet_module/557a6577-02be-4981-b80c-54cd0a853333/",
"_id": "557a6577-02be-4981-b80c-54cd0a853333",
"children": {},
"name": "jenkins"
}
]

+ This bug was cloned from Bugzilla Bug #1064934 +

History

#1 Updated by bmbouter over 1 year ago

  • Status changed from NEW to CLOSED - WONTFIX

#2 Updated by bmbouter over 1 year ago

  • Severity set to 1. Low

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#3 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

#4 Updated by bmbouter 4 months ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Please register to edit this issue

Also available in: Atom PDF