Issue #706
closedWhen adding a distributor to a repo_groups returned _href field is UID
Description
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
}
]
+ This bug was cloned from Bugzilla Bug #1194421 +