Bug 640021 - consumergroup list results in error if the consumer group has a keyvalue.
Summary: consumergroup list results in error if the consumer group has a keyvalue.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
: ---
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: pulp-verified
TreeView+ depends on / blocked
 
Reported: 2010-10-04 15:06 UTC by Preethi Thomas
Modified: 2015-03-23 01:10 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 13:59:22 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2010-10-04 15:06:04 UTC
Description of problem:
consumergroup list results in error if you add a keyvalue to the consumergroup.


Steps

1. Create a consumer group

[root@preethi ~]# pulp-admin consumergroup create --id=consumer_grp1 --consumerids=preethi.usersys.redhat.com
 Successfully created Consumer group [ consumer_grp1 ] with description [  ]
You have new mail in /var/spool/mail/root

2. Add a key value to the consumergroup


[root@preethi ~]# pulp-admin consumergroup add_keyvalue --id=consumer_grp1 --key=test_key --value=key
 Successfully added key-value pair test_key:key


3. No do a consumergroup list

[root@preethi ~]# pulp-admin consumergroup list
+------------------------------------------+
      List of Available Consumer Groups
+------------------------------------------+
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 30, in <module>
    pulpcli.PulpCore().main()
  File "/usr/lib/python2.6/site-packages/pulp/client/pulpcli.py", line 108, in main
    cmd.main()
  File "/usr/lib/python2.6/site-packages/pulp/client/core/basecore.py", line 151, in main
    self._do_core()
  File "/usr/lib/python2.6/site-packages/pulp/client/core/core_consumergroup.py", line 141, in _do_core
    self._list()
  File "/usr/lib/python2.6/site-packages/pulp/client/core/core_consumergroup.py", line 193, in _list
    group["key_value_pairs"])
KeyError: 'key_value_pairs'

Comment 1 Sayli Karmarkar 2010-10-04 21:07:43 UTC
$ sudo pulp-admin consumergroup add_keyvalue --id=demogroup --key=test_key --value=key
 Successfully added key-value pair test_key:key


$ sudo pulp-admin consumergroup list
+------------------------------------------+
      List of Available Consumer Groups
+------------------------------------------+

Id                 	demogroup                
Description        	                         
Consumer ids       	[]                       
Additional info    	{u'test_key': u'key'}    

Seems to be working fine. I am not able to reproduce it. Please re-test it with the new build.

Comment 2 Preethi Thomas 2010-10-05 18:30:55 UTC
verified.
[root@preethi ~]# rpm -qa pulp
pulp-0.0.71-1.fc13.noarch

root@preethi ~]# pulp-admin consumergroup add_keyvalue --id=consumer-grp1  --key=location --value=rdu
 Successfully added key-value pair location:rdu
[root@preethi ~]# pulp-admin consumergroup list
+------------------------------------------+
      List of Available Consumer Groups
+------------------------------------------+

Id                 	consumer-grp1            
Description        	                         
Consumer ids       	[]                       
Additional info    	{u'location': u'rdu'}

Comment 3 Preethi Thomas 2011-08-16 13:59:22 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.