Bug 727906 - repo create with --notes fails with NameError
Summary: repo create with --notes fails with NameError
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 26
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: pulp-verified
TreeView+ depends on / blocked
 
Reported: 2011-08-03 15:19 UTC by Preethi Thomas
Modified: 2015-03-23 01:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 14:00:21 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2011-08-03 15:19:13 UTC
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

Comment 1 Sayli Karmarkar 2011-08-08 08:56:18 UTC
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 ]

Comment 2 Jeff Ortel 2011-08-08 19:55:34 UTC
build: 0.223

Comment 3 Preethi Thomas 2011-08-08 20:28:12 UTC
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 ~]#

Comment 4 Preethi Thomas 2011-08-16 14:00:21 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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