Hide Forgot
Description of problem: Background reference BZ : 741635 Need better errata summary The above BZ was created to enhance the Pulp behavior for Errata by providing a means to query errata for a set of repos and retrieve: a) for each repo, a list of errata that are needed by a system subscribed to that repo b) for each errata, the systems that need that errata To support this, the following API was created: https://fedorahosted.org/pulp/wiki/UGREST-Consumers#Listapplicableerrataforconsumersfromgivensetofrepositories Unfortunately, unable to successfully execute the API providing a single repoid or multiple as input. Attempting to do so generates an error indicating that the repo does not exist. Version-Release number of selected component (if applicable): pulp-0.0.256-1.fc15.noarch How reproducible: always Steps to Reproduce: 1. create/sync a couple of repos (1 or more with errata associated) 2. bind a consumer to those repos 3. attempt to retrieve the errata in those repos that is needed by the consumer... e.g. curl -k -u admin:admin https://localhost/pulp/api/consumers/applicable_errata_in_repos/?"repoids=ACME_Corporation-dev-rhel6-rhel_6_repo&repoids=ACME_Corporation-dev-pulp_rhel6-pulp_rhel6_repo" curl -k -u admin:admin https://localhost/pulp/api/consumers/applicable_errata_in_repos/?repoids=ACME_Corporation-dev-rhel6-rhel_6_repo&repoids=ACME_Corporation-dev-pulp_rhel6-pulp_rhel6_repo curl -k -u admin:admin https://localhost/pulp/api/consumers/applicable_errata_in_repos/?repoids=ACME_Corporation-dev-rhel6-rhel_6_repo Actual results: "Traceback (most recent call last):\n File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py\", line 48, in report_error\n return method(self, *args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py\", line 127, in _auth_decorator\n value = method(self, *args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/consumers.py\", line 666, in GET\n errata = consumer_api.get_consumers_applicable_errata(repoids)\n File \"/usr/lib/python2.7/site-packages/pulp/server/api/consumer.py\", line 731, in get_consumers_applicable_errata\n raise PulpException('Repository [%s] does not exist', repoid)\nPulpException: ('Repository [%s] does not exist', u'A')\n" Expected results: The list of errata with summary details similar to those described in bug 741635 Additional info:
Apparently because of missing comma at the end of "valid_filters = ('repoids',)", http.query_parameters was returning only first repoid string instead of a list of repoids (not 100% sure why the comma is required, but it seems to be used everywhere in the code to specify valid filters). Adding it has fixed the input fed to the api and it is working fine now. Here is a sample output from ipython httplib and curl. httplib - In [68]: url = 'https://ravisayli/pulp/api/consumers/applicable_errata_in_repos/?repoids=test2&repoids=test' In [69]: connection.request("GET", url, headers=headers) In [70]: response = connection.getresponse() In [71]: print response.read() {"RHBA-2008:0279": [], "RHBA-2008:0291": [], "RHBA-2010:0281": [], "RHEA-2009:1270": [], "RHBA-2010:0222": [], "RHBA-2009:0118": [], "RHBA-2010:0010": [], "RHSA-2008:0194": [], "RHBA-2009:1514": [], "RHBA-2010:0282": [], "RHBA-2008:0198": [], "RHBA-2009:1412": [], "RHEA-2008:0467": [], "RHBA-2009:1299": [], "RHBA-2007:0611": [], "RHEA-2007:0635": [], "RHEA-2007:0637": [], "RHEA-2007:0636": [], "test-errata": ["consumer1", "consumer2"]} curl - $ curl -k -u admin:admin https://ravisayli/pulp/api/consumers/applicable_errata_in_repos/?"repoids=bcd&repoids=abc&repoids=test2" {"RHBA-2008:0279": [], "RHBA-2008:0291": [], "RHBA-2010:0281": [], "RHEA-2009:1270": [], "RHBA-2010:0222": [], "RHBA-2009:0118": [], "RHBA-2010:0010": [], "RHSA-2008:0194": [], "RHBA-2009:1514": [], "RHBA-2010:0282": [], "RHBA-2008:0198": [], "RHBA-2009:1412": [], "RHEA-2008:0467": [], "RHBA-2009:1299": [], "RHBA-2007:0611": [], "RHEA-2007:0635": [], "RHEA-2007:0637": [], "RHEA-2007:0636": [], "test-errata": ["consumer1", "consumer2"]}
build: 0.257
verified [root@preethi ~]# rpm -q pulp pulp-0.0.257-1.fc15.noarch [root@preethi ~]# [root@preethi ~]# curl -k -u admin:admin 'https://localhost/pulp/api/consumers/applicable_errata_in_repos/?repoids=protected_rhel_6&repoids=pulp' {"RHEA-2011:0664": [], "RHEA-2011:1207": [], "RHEA-2011:0660": [], "RHSA-2011:0423": [], "RHEA-2011:1366": [], "RHEA-2011:0669": [], "RHEA-2011:0532": [], "RHSA-2010:0872": [], "RHSA-2011:1282": [], "RHSA-2011:1328": [], "RHSA-2010:0975": [], "RHBA-2011:0774": [], "RHSA-2011:1289": [], "RHBA-2011:0776": [], "RHSA-2010:0979": [], "RHBA-2011:0770": [], "RHBA-2011:0771": [], "RHBA-2011:0772": [], "RHBA-2011:0773": [], "RHEA-2011:1663": [], "RHEA-2011:1592": [], "RHBA-2011:0173": [], "RHBA-2011:0171": [], "RHSA-2011:1455": [], "RHBA-2011:0201": [], "RHSA-2011:1458": [], "RHBA-2011:1179": [], "RHEA-2011:0752": [], "RHBA-2011:1171": [], "RHBA-2011:1170": [], "RHBA-2011:1173": [], "RHBA-2011:1172": [], "RHBA-2011:1175": [], "RHBA-2011:1174": [], "RHBA-2011:1177": [], "RHBA-2011:1176": [], "RHEA-2011:1733": [], "RHSA-2011:1807": [], "RHSA-2011:0779": [], "RHSA-2011:1615": [], "RHSA-2011:1359": [], "RHSA-2011:1356": [], "RHEA-2011:1561": [], "RHEA-2011:1560": [], "RHSA-2011:1350": [], "RHEA-2011:1128": [], "RHSA-2011:0356": [], "RHEA-2011:0628": [], "RHSA-2011:0862": [], "RHSA-2010:1003": [], "RHSA-2010:1002": [], "RHBA-2011:1389": [],
Pulp v1.0 is released Closed Current Release.