Hide Forgot
Description of problem: GETting a consumer--repo--distributor object from the Pulp REST API yields a JSON structure with wrong _href field e.g.: /pulp/api/v2/consumers/test_consumer/bindings/test_rpm_repo/test_distributor/test_consumer/test_rpm_repo/test_distributor/ Version-Release number of selected component (if applicable): 2.2 How reproducible: Always Steps to Reproduce: 1. create a repo, associate it with an yum-type importer and distributor 2. create a consumer 3. bind the consumer to the repo--distributor created 4. result: the binding object has invalid _href field 5. try following the invalid _href field 6. 404 response Actual results: _href field of a consumer--repo--distributor object is invalid Expected results: _href field of a consumer--repo--distributor object is correct Additional info: ### Screen log [mkovacik@malina pulp]$ http --verify=no -a admin:admin https://pulp.example.com/pulp/api/v2/consumers/test_consumer/bindings/test_rpm_repo/test_distributor/ HTTP/1.1 200 OK Content-Length: 692 Content-Type: application/json Date: Tue, 15 Oct 2013 08:23:27 GMT Server: Apache/2.4.6 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5 { "_href": "/pulp/api/v2/consumers/test_consumer/bindings/test_rpm_repo/test_distributor/test_consumer/test_rpm_repo/test_distributor/", "_id": { "$oid": "525cfacec805d07f7010bb79" }, "_ns": "consumer_bindings", "binding_config": null, "consumer_actions": [], "consumer_id": "test_consumer", "deleted": false, "details": { "ca_cert": null, "client_cert": null, "gpg_keys": [], "protocols": [ "http", "https" ], "relative_path": "/pulp/repos//zoo/", "repo_name": "test_rpm_repo", "server_name": "pulp.example.com" }, "distributor_id": "test_distributor", "id": "525cfacec805d07f7010bb79", "notify_agent": true, "repo_id": "test_rpm_repo", "type_id": "yum_distributor" } [mkovacik@malina pulp]$ http --verify=no -a admin:admin https://pulp.example.com/pulp/api/v2/consumers/test_consumer/bindings/test_rpm_repo/test_distributor/test_consumer/test_rpm_repo/test_distributor/ HTTP/1.1 404 Not Found Content-Length: 9 Content-Type: text/html; charset=UTF-8 Date: Tue, 15 Oct 2013 08:24:45 GMT Server: Apache/2.4.6 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5 not found
Fix in PR: https://github.com/pulp/pulp/pull/716
build: 2.4.0-0.7.beta
Verified in 2.4.0-0.10.beta # screen log [root@ec2-54-73-150-13 pulp_auto]# curl -k https://admin:admin@`hostname`/pulp/api/v2/consumers/milan/bindings/zoo/yum_distributor/ {"notify_agent": true, "repo_id": "zoo", "_href": "/pulp/api/v2/consumers/milan/bindings/zoo/yum_distributor/", "type_id": "yum_distributor", "consumer_actions": [], "_ns": "consumer_bindings", "_id": {"$oid": "535a733ee128540534d5d015"}, "consumer_id": "milan", "deleted": false, "binding_config": {}, "details": {"server_name": "ec2-54-73-150-13.eu-west-1.compute.amazonaws.com", "ca_cert": null, "relative_path": "/pulp/repos/repos/pulp/pulp/demo_repos/zoo/", "gpg_keys": [], "client_cert": null, "protocols": ["https"], "repo_name": "zoo"}, "distributor_id": "yum_distributor", "id": "535a733ee128540534d5d015"} [root@ec2-54-73-150-13 pulp_auto]#
This has been fixed in Pulp 2.4.0-1.