Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.
Issue #8002
closedList content fields= - first field named not returned
Description
If you issue a REST call like this one :
http :/pulp/api/v3/content/file/files/?fields=\['sha1','md5','sha224','sha256','sha384',\]
The return won't include the first field listed in fields. I've tested this for file/files and rpm/rpm.
Full example:
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 import_export]$ http :/pulp/api/v3/content/file/files/?fields=\['md5','sha256',\]
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"sha256": "eea228e372fa4c81456aff062985233111791b3a41a62d0052001cdb092241af"
},
{
"sha256": "da70de7648af0cc8c5c6a6b93f2fb446f2d48561d4309d2f49f4c0377536dc34"
},
{
"sha256": "99ba5519fa3afcc5fdc2b01e7fbc32610c8caaf9d3b8a70fb864ac26fef02e69"
}
]
}
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 import_export]$ http :/pulp/api/v3/content/file/files/?fields=\['sha1','md5','sha256',\]
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"md5": "184067a11844f4d05148f6f85be72432",
"sha256": "eea228e372fa4c81456aff062985233111791b3a41a62d0052001cdb092241af"
},
{
"md5": "bd62feeef34ab9072f32f8ee0404d6c9",
"sha256": "da70de7648af0cc8c5c6a6b93f2fb446f2d48561d4309d2f49f4c0377536dc34"
},
{
"md5": "371ad96c5dbc761d68ade02ae29528fc",
"sha256": "99ba5519fa3afcc5fdc2b01e7fbc32610c8caaf9d3b8a70fb864ac26fef02e69"
}
]
}
Updated by dalley almost 4 years ago
The issue as described is not an issue, the correct syntax is to use a comma-separated list without square brackets. The value of the parameter is not intended to be json-encoded.
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 devel]$ http GET :24817/pulp/api/v3/content/file/files/?fields=md5,sha256
HTTP/1.1 200 OK
Access-Control-Expose-Headers: Correlation-ID
Allow: GET, POST, HEAD, OPTIONS
Connection: close
Content-Length: 132
Content-Type: application/json
Correlation-ID: f36cd8c18124406c90c1ba871f88f16a
Date: Fri, 18 Dec 2020 17:37:12 GMT
Server: gunicorn/20.0.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"md5": null,
"sha256": null
},
{
"md5": null,
"sha256": null
},
{
"md5": null,
"sha256": null
}
]
}
However, ipanova pointed out that this is broken on the RPM plugin for a different reason. Moving to the RPM tracker.
Updated by dalley almost 4 years ago
- Project changed from Pulp to RPM Support
- Status changed from NEW to POST
- Assignee set to ipanova@redhat.com
Updated by pulpbot almost 4 years ago
Added by ipanova@redhat.com almost 4 years ago
Updated by ipanova@redhat.com almost 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset 85eb9317db0f5421e0ed5956a3faf9c1d22866e9.
Updated by pulpbot over 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Fixed package serialization so it displays content checksums.
closes #8002 https://pulp.plan.io/issues/8002
[notest] [nocoverage]