Bug 881366

Summary: Wallaby shell modify-* commands do not accept empty strings as arguments
Product: Red Hat Enterprise MRG Reporter: Robert Rati <rrati>
Component: wallaby-utilsAssignee: Robert Rati <rrati>
Status: CLOSED ERRATA QA Contact: Lubos Trilety <ltrilety>
Severity: low Docs Contact:
Priority: medium    
Version: 2.1CC: esammons, ltrilety, matt, willb
Target Milestone: 2.3   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: wallaby-0.16.2-1 Doc Type: Bug Fix
Doc Text:
Cause: Trying to empty a metadata field with any wallaby shell modify commands would produce an error Consequence: It was not possible to set metadata fields to empty strings Fix: The wallaby shell modify commands now accept empty values Result: It is now possible to set metadata fields to empty values
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-06 18:47:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 880973    

Description Robert Rati 2012-11-28 19:19:12 UTC
Description of problem:
It's not possible to blank entity metadata with an empty string, and trying to do so produces an error.  This is causing issues with ccs/ccp since a user could set metadata to an empty string from a non-string value.

$ wallaby modify-param --default-val ""
invalid argument: --default-val 
Usage:  wallaby modify-param PARAMETER [...] [OPTIONS]
    -h, --help                       displays this message
        --description VALUE          Sets the description property of the modified parameter
                                        (valid values are strings)
        --kind VALUE                 Sets the kind property of the modified parameter
                                        (valid values are strings)
        --needs-restart VALUE        Sets the needsRestart property of the modified parameter
                                        (valid values are "yes", "no")
        --default-val VALUE          Sets the default_val property of the modified parameter
                                        (valid values are strings)
        --must-change VALUE          Sets the must_change property of the modified parameter
                                        (valid values are "yes", "no")
        --level VALUE                Sets the level property of the modified parameter
                                        (valid values are integers)
        --annotation VALUE           Sets the annotation property of the modified parameter
                                        (valid values are strings)
 
Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Robert Rati 2012-11-28 19:36:31 UTC
Corrected repo:
wallaby modify-param PAR --default-val ""

Comment 3 Lubos Trilety 2013-01-10 15:01:15 UTC
Tested with:
wallaby-utils-0.16.3-1

Tested on:
RHEL6 i386,x86_64
RHEL5 i386,x86_64

# wallaby modify-param PAR --default-val '' --kind '' --annotation '' --description ''
Console Connection Established...
Modifying the following parameter: PAR with {:kind=>"", :annotation=>"", :default_val=>"", :description=>""}

# wallaby show-param PAR
Console Connection Established...
PAR
  kind:  ""
  default:  ""
  description:  ""
  must_change:  false
  requires_restart:  false
  visibility_level:  0
  depends:  []
  conflicts:  []
  annotation:  ""

>>> verified

Comment 5 errata-xmlrpc 2013-03-06 18:47:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0564.html