In consumer there are the following fields that I don't think belong there: - unit_profile - these are stored in a separate collection called UnitProfile, there's no reason to reference them here - certificate - we shouldn't be storing the certificate, it's a security issue; we stopped storing them a while ago, I suspect this field was simply left in from the v1 port
Ignore the certificate part. That's used in the shared secret to the consumer. Just double check that we're not storing the key too.
Removed unit_profile reference. Also confirmed that cert_gen_manager.make_cert is returning both key and cert and we are storing only cert part in the db.
Confirmed no errors in db validation and merged. commit acfd78d6e9dcc41567c466aa511083a1cf541d9c Merge: aeb23c2 38b83d1 Author: skarmark <skarmark> Date: Sun Oct 21 16:17:02 2012 -0700 Merge pull request #110 from pulp/skarmark-865527 865527 - removed unused unit_profile from consumer model
build: 0.333
verified [root@pulp-master ~]# curl -k -u admin:admin "https://localhost/pulp/api/v2/consumers/pulp-master/" |json_reformat % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1040 100 1040 0 0 5175 0 --:--:-- --:--:-- --:--:-- 5226 { "display_name": "pulp-master", "description": null, "certificate": "-----BEGIN CERTIFICATE-----\nMIICGjCCAQICAQIwDQYJKoZIhvcNAQEFBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0\nMB4XDTEyMTAyMzE4NDUyMVoXDTIyMTAyMTE4NDUyMVowFjEUMBIGA1UEAxMLcHVs\ncC1tYXN0ZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMR5lIjgP0tt6W40\nM8G8r6NYbJ0IqBLVjEVU/aUeDbyk+HdZoFy/A7h/0eehqwM9Enf3r3377qISKLFG\nOtqpKJJwYKyfu17SY+YgVhX8G0dIUPe/o8ctrxWEAsVn7ASWul+fhJtWBQ6+WOhm\nhz3/vI95FCVJyoQ3wIZYPQAmqayRAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAG4+\n3IwFrPaBuhKK2w2v64MnlY0AoYd4Yl4BUbzP1QHl2Fdp+8rC22z/e0pw1GjLoA/7\nvIi6Brp4Ora8uqoXhNoIvO6zoo1RrOaZznGUfwtzZE4AVejNjl0hQ/PcHRn2dx7A\ncaPrVsC61mE/B8iet1OXjWFSmTHwth4tZ69lyOFKnksSVeWxzf9Z2yTZHKC97Jpm\nGmspu2jg5MGOkJDbsJrvAMrIBrN98DORt1obzOaMnR/8bSfkunwSexaAiDIveahi\n232tubK8boIEqKsB7+1OC/qsktLbPjLmQEtOYhAsdoHAdWQIhasUKmCvZUn9By5K\niU1dCyuAiB7XBMjeq4E=\n-----END CERTIFICATE-----", "_ns": "consumers", "notes": { }, "capabilities": { }, "_id": { "$oid": "5086e5c1edfc0642b6001315" }, "id": "pulp-master", "_href": "/pulp/api/v2/consumers/pulp-master/" } [root@pulp-master ~]#
Pulp v2.0 released