Project

Profile

Help

Issue #5459

Response data from CollectionVersionViewSet is incompatible with ansible-galaxy

Added by alikins about 1 year ago. Updated 12 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 59
Quarter:

Description

The ansible-galaxy bug is at https://github.com/ansible/ansible/issues/62076

The response from CollectionVersionViewSet (GET GET
/pulp/api/v3/content/ansible/collection_versions/ - https://pulp-ansible.readthedocs.io/en/latest/restapi.html#operation/content_ansible_collections_list)

has 'namespace' as a single string, where the ansible-galaxy client expect a dictionary.

Essentially, the 'namespace' value needs to be a dict with a 'name' key with the namespace string as value.

Current result (truncated for brevity)

{
  # ...
    "namespace": "alikins",
}

Exceptected

{
 # ...
 "namespace": {"name": "alikins"},
}

https://github.com/ansible/galaxy-api/compare/master...alikins:collection_version_detail_99_reopen is an example workaround in galaxy-api that adds the data.

Note that branch also adds some fields to the "metadata" item that is missing, though I don't believe that impacts ansible-galaxy. It does make the result more inline with the galaxy v2 result however.

pulp_collection_version_viewset.txt (1.52 KB) pulp_collection_version_viewset.txt output of `http "http://127.0.0.1:5002/api/automation-hub/v3/collections/alikins/collection_ntp/versions/0.1.182/" alikins, 09/17/2019 05:59 PM
pulp_example_expected.txt (2.49 KB) pulp_example_expected.txt Example expected output alikins, 09/17/2019 06:01 PM

Associated revisions

Revision 2d5f7a5a View on GitHub
Added by alikins about 1 year ago

Return collection version namespace as a dict

https://pulp.plan.io/issues/5459 closes #5459

Revision 65728315 View on GitHub
Added by bmbouter about 1 year ago

Merge pull request #206 from alikins/collection_ver_5459_serializer

Return collection version 'namespace' as a dict (Fixes #5459)

Please register to edit this issue

Also available in: Atom PDF