Bug 1019162 - missing bindings attribute in a consumer object
Summary: missing bindings attribute in a consumer object
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: API/integration
Version: 2.2
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: ---
Assignee: pulp-bugs
QA Contact: pulp-qe-list
URL: https://pulp-dev-guide.readthedocs.or...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-15 08:53 UTC by mkovacik
Modified: 2015-02-28 21:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 21:59:19 UTC
Embargoed:


Attachments (Terms of Use)


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

Description mkovacik 2013-10-15 08:53:36 UTC
Description of problem:
Based on the specs, the retrieval of a consumer should yield an object with a bindings attribute. That is not the case.

Version-Release number of selected component (if applicable):
2.2

How reproducible:
Always

Steps to Reproduce:
1. create a repo, associate a it with a yum-type importer and distributor
2. create a consumer, bind it to the repo--distributor
3. retrieve the consumer


Actual results:
no bindings attribute in the retrieved object can be found

Expected results:
there is a valid bindings attribute present in the retrieved object

Additional info:
### Screen log
[mkovacik@malina pulp]$ http --verify=no -a admin:admin  https://pulp.example.com/pulp/api/v2/consumers/test_consumer/
HTTP/1.1 200 OK
Content-Length: 1050
Content-Type: application/json
Date: Tue, 15 Oct 2013 08:51:31 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/", 
    "_id": {
        "$oid": "5258088bc805d066faef1da8"
    }, 
    "_ns": "consumers", 
    "capabilities": {}, 
    "certificate": "-----BEGIN CERTIFICATE-----\nMIICHDCCAQQCAXYwDQYJKoZIhvcNAQEFBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0\nMB4XDTEzMTAxMTE0MTc0N1oXDTIzMTAwOTE0MTc0N1owGDEWMBQGA1UEAxQNdGVz\ndF9jb25zdW1lcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA9Rhj3w1oDAN6\nnqvwhsG4FsTGZHIXf8TTM/CJAxPsrV502xpWXpQLYaM4yRI5QptN3BC66qMAfscS\nWRPGRe98LvVnEfhItUvpK0G+ULIeGa0iGk+ocAivWhhIQ8WSyKG0HyzP2OEWqhuE\nNpqUmmD0Y9o1K4mE6qsBFCuqNxQKNM8CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA\nQjrD2IUchkSisHxXJfGE4N1TP1lr6KnEVd6Oe9WAObYS7x2XdUZJLycI2HBecbqx\nRXI5vqNc9XexUR5xdVrL85bBtm61IENfGYgLRg2fq45XpbKBnsJqgWFRzrkx99Uf\nULABsFkjamTZcVCutc0gmXLFqEDL1XETrOZlAqjUn74XTvF7K8vg9EOmwRdhlI22\nownK+YniH3tCTNskb6a24mAzK10//SRDSk/p1qDggSPfhKZO6DErLrrmaLdzOFiW\neOLnLNJAXdNBAFj/1Wr+gtFXUyaMOofxW3BSfg+n3eRuSmRTSGrCBpH5HVraK0HV\ndGogAMLF+7xhTvuA5AXIdA==\n-----END CERTIFICATE-----", 
    "description": null, 
    "display_name": "test_consumer", 
    "id": "test_consumer", 
    "notes": {}
}

### proof that there are bindings indeed
[mkovacik@malina pulp]$ http --verify=no -a admin:admin  https://pulp.example.com/pulp/api/v2/consumers/test_consumer/bindings/
HTTP/1.1 200 OK
Content-Length: 663
Content-Type: application/json
Date: Tue, 15 Oct 2013 08:29:12 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_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"
    }

Comment 1 Chris Duryee 2014-11-12 01:38:59 UTC
This is still the case as of pulp 2.4.3. I believe this change could be done as part of a Y release (2.6, 2.7, etc) since it is additive.

Comment 2 Brian Bouterse 2015-02-28 21:59:19 UTC
Moved to https://pulp.plan.io/issues/378


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