Bug 674119
| Summary: | Need a cleaner error message consumer does not exist for repo content | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Preethi Thomas <pthomas> |
| Component: | z_other | Assignee: | Pradeep Kilambi <pkilambi> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | skarmark |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | Sprint 22 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-08-16 12:06:16 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 647488 | ||
There are a couple of issues here:
1. $ pulp-admin repo content --id=test1 --consumerid=preethi --updates
error: operation failed: TypeError: 'NoneType' object is unsubscriptable
2. Even if I pass wrong consumerid or blank consumerid, it does not give any error.
$ pulp-admin repo content --id=test1 --consumerid=
+------------------------------------------+
Contents of test1
+------------------------------------------+
Packages in test1:
grinder-0.0.79-1.fc14.noarch.rpm
python-gofer-0.20-1.fc14.noarch.rpm
gofer-0.20-1.fc14.noarch.rpm
ruby-gofer-0.20-1.fc14.noarch.rpm
pulp-client-0.0.139-1.fc14.noarch.rpm
python-qpid-0.7.946106-1.fc14.noarch.rpm
pulp-0.0.139-1.fc14.noarch.rpm
pulp-common-0.0.139-1.fc14.noarch.rpm
pulp-cds-0.0.139-1.fc14.noarch.rpm
python-webpy-0.32-6.fc14.noarch.rpm
Errata in test1:
none
Files in test1:
filelists.xml.gz
primary.xml.gz
cachecookie
other.xml.gz
primary.xml.gz.sqlite
repomd.xml
commit 1d0ac7d9b2ee9c5a4c9d9260cfb78ffc093dad0e
Author: Pradeep Kilambi <pkilambi>
Date: Wed Mar 23 17:39:29 2011 -0400
674119 - fixing the options for repo content
This change includes:
* removed --updates; seemed redundant. Now if you want to see only updtaes just specify --consumer with --id and it should get those
* fixed the error msg to show right message if consumer doesnt exist
* fixed empty consumerid args
$ sudo pulp-admin repo content --id=foobar --consumerid=testcon
error: operation failed: No consumer testcon
$ sudo pulp-admin repo content --id=foobar --consumerid=
Usage: pulp-admin <options> repo content <options>
pulp-admin: error: error: --consumerid requires an argument
Build: 0.158 verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.163-1.fc14.noarch
[root@preethi ~]# pulp-admin -u admin -p admin repo content --id=f14 --helpUsage: pulp-admin <options> repo content <options>
Options:
-h, --help show this help message and exit
--id=ID repository id (required)
Updates Only:
--consumerid=CONSUMERID
optional consumer id to list only available updates;
[root@preethi ~]# pulp-admin -u admin -p admin repo content --id=f14-update --consumerid=
Usage: pulp-admin <options> repo content <options>
pulp-admin: error: error: --consumerid requires an argument
[root@preethi ~]# pulp-admin -u admin -p admin repo content --id=f14-update --consumerid=pulp-cli
error: operation failed: No consumer pulp-cli
Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |
Description of problem: [root@preethi ~]# rpm -q pulp pulp-0.0.132-1.fc14.noarch [root@preethi ~]# pulp-admin repo content --id=f13 --consumerid=preethi1 --updates error: operation failed: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 57, in report_error return method(self, *args, **kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/role_check.py", line 131, in check_roles result = f(instance, *fargs, **kw) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/consumers.py", line 243, in errata_package_updates return self.ok(consumer_api.list_errata_package(id)) File "/usr/lib/python2.7/site-packages/pulp/server/api/consumer.py", line 463, in list_errata_package applicable_errata = self._applicable_errata(consumer, types) File "/usr/lib/python2.7/site-packages/pulp/server/api/consumer.py", line 482, in _applicable_errata pkg_profile = consumer["package_profile"] TypeError: 'NoneType' object is not subscriptable