Bug 809240

Summary: v7 plan --model should use the same prompts as v7 plan for certification data
Product: [Retired] Red Hat Hardware Certification Program Reporter: Rob Landry <rlandry>
Component: Test Suite (harness)Assignee: Greg Nichols <gnichols>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.2CC: czhang, pbenas, rlandry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
no tech note needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-05 21:37:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 767775    
Attachments:
Description Flags
hardwaretest.py patch to use same prompts for both initial plan and edit of certification info
none
certificationtest.py patch to return an empty string rather than "unknown"
none
catalog.py patch clarifying a blank response to the certification ID prompt none

Description Rob Landry 2012-04-02 20:13:09 UTC
Description of problem:

v7 plan --model asks dissimilar questions regarding the certification data than v7 plan or submit does.  This inconsistency doesn't seem like it would cause too much confusion itself but looks funny.


Version-Release number of selected component (if applicable):

v7-1.5-13.el6.noarch

How reproducible:

every time

Steps to Reproduce:
1. v7 clean all
2. v7 plan
3. v7 plan --model
  
Actual results:

v7 plan provides this order of prompts:

[root@unused ~]# v7 plan
found interface for udisks
found device file /dev/sda
Please verify the vendor, make, and model:
Vendor: LENOVO
Make: 4291CL9
Model: 4291CL9
Hardware: LENOVO 4291CL9 4291CL9
OS: Santiago 6.2
What certification is this system being tested for? (new|existing|none) 


v7 plan --model provides this order of prompts:

[root@unused ~]# v7 plan --model
loaded results /var/v7/results.xml
found interface for udisks
found device file /dev/sda

Please verify the hardware product information:
    vendor:LENOVO
    make:4291CL9
    model:4291CL9
    product-url:unknown
    category (Desktop/Workstation|Laptop|Component/Peripheral|Server) unknown

Please enter the certification ID:


Expected results:

v7 plan and v7 plan --model should use the same sequence of prompts simply in the --model case the questions will have default values provided from the xml if they exist. 

Additional info:

Using the example above, --model should include the what certification question, if the answer originally was 'none' then the default value for pressing enter would be none; if a # is present then existing would be the value.

Comment 2 Greg Nichols 2012-04-18 15:08:58 UTC
Created attachment 578383 [details]
hardwaretest.py patch to use same prompts for both initial plan and edit of certification info

Comment 3 Greg Nichols 2012-04-18 15:09:47 UTC
Created attachment 578384 [details]
certificationtest.py patch to return an  empty string rather than "unknown"

Comment 4 Greg Nichols 2012-04-18 15:25:11 UTC
The attached patch uses the same sequence for both the initial plan creation (after install, or "v7 clean all"), as well as editing of certification information ("v7 plan --model" or "v7 plan --certification".

The patch handles catalog interaction the same way in either situation, but it's a little different than the behavior described in comment 1.   After prompting for hardware information, product url and category, the certification ID is handled as follows:

If the certification ID is not set, and the hardware catalog is reachable, the certification (new, existing, none) is presented.

If the certification ID is set, a prompt is provided with it as the default value for editing (no new, existing, none prompt).

Comment 5 Greg Nichols 2012-04-18 15:27:51 UTC
Created attachment 578389 [details]
catalog.py patch clarifying a blank response to the certification ID prompt


The message states that 0 should be entered if the cert ID is not known.

Comment 9 Petr Beňas 2012-05-02 11:25:23 UTC
Reproduced in v7-1.5-20.el6.noarch and verified in v7-1.5-21.el6.noarch.

Comment 10 Caspar Zhang 2012-06-04 08:00:33 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:
no tech note needed.

Comment 12 errata-xmlrpc 2012-06-05 21:37:23 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/RHBA-2012-0711.html