Bug 1346860

Summary: otopi's machine dialog always outputs "False" for **%QDefault if no value is set
Product: [oVirt] otopi Reporter: Ryan Barry <rbarry>
Component: Plugins.dialogAssignee: Yedidyah Bar David <didi>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kubica <pkubica>
Severity: medium Docs Contact:
Priority: unspecified    
Version: masterCC: bugs, oourfali, sbonazzo
Target Milestone: ovirt-4.0.1Keywords: ZStream
Target Release: 1.5.1Flags: rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 13:06:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1306739    

Description Ryan Barry 2016-06-15 13:26:12 UTC
Description of problem:
Even if there is no default value, otopi prints **%QDefault: False

How reproducible:
100%

Steps to Reproduce:
1. Run anything with DIALOG/dialect=str:machine
2. Look at a field where you'd expect no default (storage paths, etc)

Actual results:
False

Expected results:
Empty if there's nothing

Additional info:

This appears to be a bad evaluation between "False" and "None"

https://gerrit.ovirt.org/gitweb?p=otopi.git;a=blob;f=src/plugins/otopi/dialog/machine.py;h=26cec326c960593f1acd325a03c6f5ff47872153;hb=HEAD#l144

Comment 1 Red Hat Bugzilla Rules Engine 2016-06-15 13:26:16 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 2 Red Hat Bugzilla Rules Engine 2016-06-15 13:26:16 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 3 Yedidyah Bar David 2016-06-22 07:04:30 UTC
How to reproduce/verify:

Run some otopi based tool with the machine dialect, wait for a question that has no default. With a broken build, you'll get:

**%QDefault: False

With a fixed build, you'll get no QDefault.

Example:

engine-setup --otopi-environment=DIALOG/dialect=str:machine
...
**%QStart: NFS_CONFIG_ENABLED
### Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [No]: 
**%QDefault: No
***QValidValues: Yes|No
**%QHidden: FALSE
***Q:STRING NFS_CONFIG_ENABLED
**%QEnd: NFS_CONFIG_ENABLED

Reply 'yes', then:

...
**%QStart: ISO_DOMAIN_ACL
###
### Please provide the ACL for the Local ISO domain.
### See the exports(5) manpage for the format.
### Examples:
### - To allow access for host1, host2 and host3, input: host1(rw) host2(rw) host3(rw)
### - To allow access to the entire Internet, input: *(rw)
###
### For more information, see: http://www.ovirt.org/Troubleshooting_NFS_Storage_Issues
###
### Local ISO domain ACL: 
**%QDefault: False
**%QHidden: FALSE
***Q:STRING ISO_DOMAIN_ACL
**%QEnd: ISO_DOMAIN_ACL

Above last question, for NFS iso domain ACL, has no default (since bug 1110740). Above output is for a broken build, with a good build it will be the same except for the line with QDefault which will not appear.

Exact same logic appears a bit earlier, in the question for admin password, which too has (obviously) no default.

Comment 4 Gil Klein 2016-07-27 13:06:19 UTC
This bug was fixed and is slated to be in the upcoming version. As we
are focusing our testing at this phase on severe bugs, this bug was
closed without going through its verification step. If you think this
bug should be verified by QE, please set its severity to high and move
it back to ON_QA