Bug 1194421 - When adding a distributor to a repo_groups returned _href field is UID
Summary: When adding a distributor to a repo_groups returned _href field is UID
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: API/integration
Version: Master
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: amacdona@redhat.com
QA Contact: pulp-qe-list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-19 19:16 UTC by amacdona@redhat.com
Modified: 2015-02-28 23:25 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 23:25:15 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 706 0 None None None Never

Description amacdona@redhat.com 2015-02-19 19:16:20 UTC
Description of problem:

The _href should point to an actual endpoint, not a UID.

Steps to Reproduce:
1. Add a distributor to a repo_group

 curl -s -H Accept: application/json -H "WebFrameworkSwitch: webpy" -X POST -d '{"distributor_type_id": "group_export_distributor", "distributor_config": {"http": true, "https": false}}' -k -u admin:admin https://localhost/pulp/api/v2/repo_groups/test/distributors/
 

Actual results:

[
    {
        "_href": "a68bca8a-7cbb-4ec2-9bb6-8386447b55dd",
        "_id": {
            "$oid": "54e630a3e138231230a80605"
        },
        "_ns": "repo_group_distributors",
        "config": {
            "http": true,
            "https": false
        },
        "distributor_type_id": "group_export_distributor",
        "id": "a68bca8a-7cbb-4ec2-9bb6-8386447b55dd",
        "last_publish": null,
        "repo_group_id": "test",
        "scratchpad": null
    }
]


Expected results:

[
    {
        "_id": {
            "$oid": "54e630a3e138231230a80605"
        },
        "_ns": "repo_group_distributors",
        "config": {
            "http": true,
            "https": false
        },
        "distributor_type_id": "group_export_distributor",
        "href": "/pulp/api/v2/repo_groups/test/distributors/a68bca8a-7cbb-4ec2-9bb6-8386447b55dd/",
        "id": "a68bca8a-7cbb-4ec2-9bb6-8386447b55dd",
        "last_publish": null,
        "repo_group_id": "test",
        "scratchpad": null
    }
]

Comment 1 amacdona@redhat.com 2015-02-20 20:25:28 UTC
Correction, the bug is with GET all distributors, not with creating a new one.

Comment 2 amacdona@redhat.com 2015-02-20 20:44:01 UTC
https://github.com/pulp/pulp/pull/1670

Comment 3 Brian Bouterse 2015-02-28 23:25:15 UTC
Moved to https://pulp.plan.io/issues/706


Note You need to log in before you can comment on or make changes to this bug.