Bug 727906
| Summary: | repo create with --notes fails with NameError | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Preethi Thomas <pthomas> |
| Component: | user-experience | Assignee: | Sayli Karmarkar <skarmark> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | cperry, jortel, skarmark |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | Sprint 26 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-08-16 14:00:21 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: | 641987 | ||
Added input validation and error message with a correct format for notes input.
$ sudo pulp-admin repo create --id=ssss --notes="notes"
Invalid argument for notes. Notes need to be specified in dictionary form inside a string eg. "{'key':'value'}"
$ sudo pulp-admin repo create --id=test --notes="{'key':'value'}"
Successfully created repository [ test ]
build: 0.223 verified
[root@preethi ~]# pulp-admin repo create --id=ssss --notes="notes"
Invalid argument for notes. Notes need to be specified in dictionary form inside a string eg. "{'key':'value'}"
[root@preethi ~]# pulp-admin repo create --id=test --notes="{'key':'value'}"
Successfully created repository [ test ]
[root@preethi ~]# rpm -q pulp
pulp-0.0.223-1.fc14.noarch
[root@preethi ~]#
Closing with Community Release 15 pulp-0.0.223-4. |
Description of problem: [root@preethi ~]# pulp-admin repo create --id=test-notes --notes="note" Traceback (most recent call last): File "/usr/bin/pulp-admin", line 202, in <module> admin.main() File "/usr/lib/python2.7/site-packages/pulp/client/cli/base.py", line 117, in main command.main(args[1:]) File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 116, in main action.main(args[1:]) File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 204, in main self.run() File "/usr/lib/python2.7/site-packages/pulp/client/core/repo.py", line 513, in run notes = eval(self.opts.notes) File "<string>", line 1, in <module> NameError: name 'note' is not defined [root@preethi ~]# [root@preethi ~]# pulp-admin repo create --id=test-notes --notes=note Traceback (most recent call last): File "/usr/bin/pulp-admin", line 202, in <module> admin.main() File "/usr/lib/python2.7/site-packages/pulp/client/cli/base.py", line 117, in main command.main(args[1:]) File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 116, in main action.main(args[1:]) File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 204, in main self.run() File "/usr/lib/python2.7/site-packages/pulp/client/core/repo.py", line 513, in run notes = eval(self.opts.notes) File "<string>", line 1, in <module> NameError: name 'note' is not defined Version-Release number of selected component (if applicable): [root@preethi ~]# rpm -q pulp pulp-0.0.218-1.fc14.noarch