Bug 975432 - repository notes can be added with null keys, values, or both
repository notes can be added with null keys, values, or both
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.2 Beta
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.3.0
Assigned To: nobody nobody
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-18 09:07 EDT by Jeremy Cline
Modified: 2013-12-09 09:29 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-09 09:29:48 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 Jeremy Cline 2013-06-18 09:07:53 EDT
Description of problem: When creating or updating a puppet/rpm/iso repository, it is possible to add a note with a null key and null value, or a key with a null value, or a null key with a value.


Version-Release number of selected component (if applicable): pulp-admin-client-2.2.0-0.4.beta.fc18.noarch


How reproducible: always


Steps to Reproduce:
1. pulp-admin puppet repo create --repo-id=foo --note==
2. pulp-admin puppet repo update --repo-id=foo --note==value
3. pulp-admin iso repo create --repo-id=iso --note=key=

Actual results: The repository is successfully created or updated.


Expected results: An error message indicating the note key and value cannot be null


Additional info: when updating a repo with a null key, the null key is not added (and if it exists, it is removed):

[jeremy@jcline ~]$ pulp-admin puppet repo create --repo-id=foo --note==
Successfully created repository [foo]

[jeremy@jcline ~]$ pulp-admin repo list --detail
+----------------------------------------------------------------------+
                              Repositories
+----------------------------------------------------------------------+

Id:                  foo
Display Name:        foo
Description:         None
Content Unit Counts: 
Notes:               
  : None
Importers:           
...

[jeremy@jcline ~]$ pulp-admin puppet repo update --repo-id=foo --note==
Repository [foo] successfully updated

[jeremy@jcline ~]$ pulp-admin repo list --detail
+----------------------------------------------------------------------+
                              Repositories
+----------------------------------------------------------------------+

Id:                  foo
Display Name:        foo
Description:         None
Content Unit Counts: 
Notes:               
Importers:           
...
Comment 1 Jeremy Cline 2013-06-21 15:37:57 EDT
This only fixes the null key issue: https://github.com/pulp/pulp/pull/519
Comment 4 Jeff Ortel 2013-09-12 18:35:26 EDT
build: 2.3.0-0.10.alpha
Comment 5 Preethi Thomas 2013-09-19 16:00:31 EDT
verified


[root@pulp-v2-server ~]# pulp-admin puppet repo create --repo-id=foo --note==
Validation failed for argument [--note]: Keys cannot be null

[root@pulp-v2-server ~]#  pulp-admin puppet repo update --repo-id=foo --note==value
Validation failed for argument [--note]: Keys cannot be null

[root@pulp-v2-server ~]# pulp-admin iso repo create --repo-id=iso --note=key=
Successfully created repository [iso]

[root@pulp-v2-server ~]#  pulp-admin iso repo update --repo-id=foo --note==value 
Validation failed for argument [--note]: Keys cannot be null


[root@pulp-v2-server ~]#  pulp-admin iso repo update --repo-id=foo --note==value
Validation failed for argument [--note]: Keys cannot be null

[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]#  pulp-admin puppet repo create --repo-id=foo --note==
Validation failed for argument [--note]: Keys cannot be null

[root@pulp-v2-server ~]# pulp-admin puppet repo update --repo-id=foo --note==
Validation failed for argument [--note]: Keys cannot be null

[root@pulp-v2-server ~]#
Comment 6 Preethi Thomas 2013-12-09 09:29:48 EST
Pulp 2.3 released.

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