Issue #1105
closedrelative_path should default to repo_id if not specified differently
Description
Relative_path should default to repo_id if not specified differently. If repo without feed is created then relative_path is null by default.
$ pulp-admin ostree repo create --repo-id=test2
Repository [test2] successfully created
[ipanova@ina pulp_ostree]$ curl -H "Accept: application/json" -X GET -k -u admin:admin https://localhost/pulp/api/v2/repositories/test2/distributors/ostree_web_distributor_name_cli/| python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 288 100 288 0 0 729 0 --:--:-- --:--:-- --:--:-- 729
{
"_id": {
"$oid": "5596875245ef484fc3850970"
},
"_ns": "repo_distributors",
"auto_publish": true,
"config": {},
"distributor_type_id": "ostree_web_distributor",
"id": "ostree_web_distributor_name_cli",
"last_publish": null,
"repo_id": "test2",
"scheduled_publishes": [],
"scratchpad": null
}
Meanwhile everything works if feed was specified
$ pulp-admin ostree repo create --repo-id=test1 --feed=http://rpm-ostree.cloud.fedoraproject.org/repo/
Repository [test1] successfully created
[ipanova@ina pulp_ostree]$
[ipanova@ina pulp_ostree]$ curl -H "Accept: application/json" -X GET -k -u admin:admin https://localhost/pulp/api/v2/repositories/test1/distributors/ostree_web_distributor_name_cli/| python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 313 100 313 0 0 942 0 --:--:-- --:--:-- --:--:-- 945
{
"_id": {
"$oid": "5596874545ef484fc385096c"
},
"_ns": "repo_distributors",
"auto_publish": true,
"config": {
"relative_path": "/repo/"
},
"distributor_type_id": "ostree_web_distributor",
"id": "ostree_web_distributor_name_cli",
"last_publish": null,
"repo_id": "test1",
"scheduled_publishes": [],
"scratchpad": null
}
Related issues
Updated by jortel@redhat.com almost 9 years ago
This is already defaulted to the repo_id by the plugin. However, to be consistent with other parts of the API, the CLI should omit the property instead of setting it to None (null). This is nice to have but not broken.
Any objection to making this LOW priority?
Or, close as a duplicate of #1104?
Updated by jortel@redhat.com almost 9 years ago
- Related to Issue #1104: If relative_url is not specified during repo creation it should not be present in distibutor_config post data added
Updated by bmbouter about 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter about 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.