Bug 870160 - consumer group id does not validate the ids.
consumer group id does not validate the ids.
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: consumers (Show other bugs)
Master
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 41
Assigned To: Sayli Karmarkar
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-25 12:50 EDT by Preethi Thomas
Modified: 2015-03-22 21:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:08:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Preethi Thomas 2012-10-25 12:50:17 EDT
Description of problem:
Consumer group create does not validate the values for ids



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

[root@pulp-master ~]# pulp-admin consumer group create  --consumer-group-id " "
Consumer Group [ ] successfully created

[root@pulp-master ~]# pulp-admin consumer group create  --consumer-group-id "_"Consumer Group [_] successfully created

[root@pulp-master ~]# pulp-admin consumer group delete --consumer-group-id "*"
Consumer group [*] does not exist on the server
[root@pulp-master ~]# pulp-admin consumer group create  --consumer-group-id "*"
Consumer Group [*] successfully created

[root@pulp-master ~]# 
[root@pulp-master ~]# 
[root@pulp-master ~]# pulp-admin consumer group list
+----------------------------------------------------------------------+
                            Consumer Groups
+----------------------------------------------------------------------+

Id:            consumer-grp1
Display Name:  consumer group
Description:   None
Consumer Ids:  
Notes:         


Id:             
Display Name:  None
Description:   None
Consumer Ids:  
Notes:         


Id:            _
Display Name:  None
Description:   None
Consumer Ids:  
Notes:         


Id:            *
Display Name:  None
Description:   None
Consumer Ids:  
Notes:         


[root@pulp-master ~]# 

1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Sayli Karmarkar 2012-11-06 18:18:26 EST
commit 50410ac230f32a11702a55ebb9f46fe69eaa3ff9
Merge: 54e0411 3f1e39e
Author: skarmark <skarmark@redhat.com>
Date:   Tue Nov 6 13:22:16 2012 -0800

    Merge pull request #128 from pulp/skarmark-870160
    
    870160 - adding consumer group id validation on client and server side


$ pulp-admin consumer group create  --consumer-group-id " "
Validation failed for argument [--consumer-group-id]:
  value must contain only letters, numbers, underscore and hyphen

$ pulp-admin consumer group create --consumer-group-id "*"
Validation failed for argument [--consumer-group-id]:
  value must contain only letters, numbers, underscore and hyphen
Comment 2 Jeff Ortel 2012-11-12 17:33:36 EST
build: 2.0.6-0.2.beta
Comment 3 Preethi Thomas 2012-12-10 16:46:10 EST
[root@preethi-el6-pulp ~]# rpm -q pulp-server
pulp-server-2.0.6-0.14.beta.noarch
[root@preethi-el6-pulp ~]# 

[root@preethi-el6-pulp ~]# 
[root@preethi-el6-pulp ~]# pulp-admin rpm consumer group delete --group-id "*"Validation failed for argument [--group-id]: value must contain only letters,
numbers, underscores, and hyphens

[root@preethi-el6-pulp ~]# pulp-admin rpm consumer group delete --group-id ""
Validation failed for argument [--group-id]: value must contain only letters,
numbers, underscores, and hyphens

[root@preethi-el6-pulp ~]# pulp-admin rpm consumer group delete --group-id "_"
Consumer Group [_] does not exist on the server
[root@preethi-el6-pulp ~]#
Comment 4 Preethi Thomas 2013-01-09 12:08:10 EST
Pulp v2.0 released

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