Bug 1346860 - otopi's machine dialog always outputs "False" for **%QDefault if no value is set
Summary: otopi's machine dialog always outputs "False" for **%QDefault if no value is set
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: otopi
Classification: oVirt
Component: Plugins.dialog
Version: master
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.0.1
: 1.5.1
Assignee: Yedidyah Bar David
QA Contact: Petr Kubica
URL:
Whiteboard:
Depends On:
Blocks: 1306739
TreeView+ depends on / blocked
 
Reported: 2016-06-15 13:26 UTC by Ryan Barry
Modified: 2019-04-28 14:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 13:06:19 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 59245 0 master MERGED machine_dialog: fix the comparison for default 2016-06-21 14:14:34 UTC
oVirt gerrit 59249 0 master ABANDONED dialog: machine: Default to None and not False 2016-06-15 14:00:04 UTC
oVirt gerrit 59559 0 otopi-1.5 MERGED machine_dialog: fix the comparison for default 2016-06-23 10:19:29 UTC

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


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