Bug 669310 - wallaby adds None if there is no input as default value
Summary: wallaby adds None if there is no input as default value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-wallaby-tools
Version: 1.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 1.3.2
: ---
Assignee: Robert Rati
QA Contact: Lubos Trilety
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-13 09:54 UTC by Lubos Trilety
Modified: 2011-02-15 12:14 UTC (History)
3 users (show)

Fixed In Version: condor-wallaby-3.8-9
Doc Type: Bug Fix
Doc Text:
The condor_configure_store tool inserted the value of "None" inside of a YAML string or map when the empty '' value, represented as two consequent apostrophes, was removed from the string or map. However, the "None" value not equivalent to the '' (empty string or map) value. With this update, condor_configure_store treats a missing value as the empty string or map (i.e. '') rather than the "None" value.
Clone Of:
Environment:
Last Closed: 2011-02-15 12:14:56 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0217 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging and Grid bug fix and enhancement update 2011-02-15 12:10:15 UTC

Description Lubos Trilety 2011-01-13 09:54:37 UTC
Description of problem:
When there is no value used as default value, wallaby adds None as value. It will be better if empty string ('') will be used instead, because empty string '' means no value in wallaby point of view. On the other hand None is some value in wallaby context.

Version-Release number of selected component (if applicable):
wallaby-0.10.0-2
condor-wallaby-tools-3.8-8

How reproducible:
100%

Steps to Reproduce:
1. run 'condor_configure_store -a -p <new_param>'
2. remove '' from default line, change "default: ''" to "default:"
3. see new created parameter 'ccs -l -p <new_param>'
# condor_configure_store -l -p NP
Parameter "NP":
Name: NP
Type: string
Default: None
Description: 
MustChange: False
VisibilityLevel: 0
RequiresRestart: False
Dependencies:
Conflicts:
  
Actual results:
wallaby adds None as default value
Default: None

Expected results:
wallaby should use '' as default value, when there is no value
Default: ''

Comment 1 Robert Rati 2011-01-13 18:04:28 UTC
When there is no value for a string or a map value, the yaml parser places a None object as the value.  In the tools, there is some conversion to str values to deal with unicode values which resulted in a None object being translated into the string "None".

Fixed on master.

Comment 2 Robert Rati 2011-01-13 19:41:27 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C: Removing the value for a yaml string or map in an editor when using the condor_configure_store tool
C: The value becomes the string "None" instead of ''
F: The condor_configure_store tool now properly handles yaml strings/maps without values.  Those values will be '' instead of None.
R: Removing the value for a yaml string or map in an editor when using the condor_configure_store tool will result in the value ''

Comment 4 Lubos Trilety 2011-01-25 15:40:25 UTC
Tested with (version):
condor-wallaby-tools-3.9-2

Tested on:
RHEL5 x86_64,i386  - passed

>>> VERIFIED

Comment 7 Douglas Silas 2011-02-09 17:20:33 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1 @@
-C: Removing the value for a yaml string or map in an editor when using the condor_configure_store tool
+The condor_configure_store tool inserted the value of "None" inside of a YAML string or map when the empty '' value, represented as two consequent apostrophes, was removed from the string or map. However, the "None" value not equivalent to the '' (empty string or map) value. With this update, condor_configure_store treats a missing value as the empty string or map (i.e. '') rather than the "None" value.-C: The value becomes the string "None" instead of ''
-F: The condor_configure_store tool now properly handles yaml strings/maps without values.  Those values will be '' instead of None.
-R: Removing the value for a yaml string or map in an editor when using the condor_configure_store tool will result in the value ''

Comment 8 errata-xmlrpc 2011-02-15 12:14:56 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0217.html


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