Project

Profile

Help

Issue #5459

closed

Response data from CollectionVersionViewSet is incompatible with ansible-galaxy

Added by alikins about 5 years ago. Updated about 4 years ago.

Status:
CLOSED - CURRENTRELEASE
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.


Files

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

Also available in: Atom PDF