Bug 799118

Summary: FEAT: v7 should preserve SUT hardware information when results are removed.
Product: [Retired] Red Hat Hardware Certification Program Reporter: Greg Nichols <gnichols>
Component: Test Suite (harness)Assignee: Greg Nichols <gnichols>
Status: CLOSED ERRATA QA Contact: Petr Beňas <pbenas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.4CC: czhang, gbai, pbenas, pstehlik, rlandry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A new feature has been made in v7 1.5 that now `v7 clean` command preserves SUT hardware information when results are removed. To remove all results including SUT hardware information, use `v7 clean all` command instead.
Story Points: ---
Clone Of:
: 811223 (view as bug list) Environment:
Last Closed: 2012-06-05 21:37:09 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: 782191, 811223    
Attachments:
Description Flags
hardwaretest.py patch implementing certification.xml for saving hardware/cert info
none
environment patch adding certification file name and path
none
tags.py patch adding serveral string constants
none
certification.py patch providing new certification document wrapper none

Description Greg Nichols 2012-03-01 19:54:10 UTC
Description of problem:

v7 should save hardware information (vendor, make, model, etc.) so that it is not removed when "v7 clean" is invoked.  Subsequent calls to "v7 plan" should use this saved information so the user doesn't have to re-enter it.

Also, v7 should add version and certification ID to this information

Note that "v7 plan --model" provides a way to edit this information,
the --model option should be changed to --certification.

Comment 1 Greg Nichols 2012-03-01 19:55:54 UTC
The implementation of this feature is needed to support bug 782191 by providing handling of certification ID to associate certification results with a hardware catalog certification-in-progress.

Comment 2 Greg Nichols 2012-03-01 20:03:14 UTC
Created attachment 566929 [details]
hardwaretest.py patch implementing certification.xml for saving hardware/cert info

This patch uses a new file stored with the results file to save a copy of the hardware information.   When v7 plan is called, v7 checks for the certification file /var/v7/certification.xml. If found, it uses information from there and bypasses the dmidecode checks and user prompts.   If it is not found, it uses the dmidecode/prompts to get the information, and creates a new certification.xml file.

The "v7 clean" command is changed to add an "all" option that removes this file.  Also "v7 plan --model" is changed to "v7 plan --certification" to allow a simple interactive edit of this information.

The certification.xml file is the same format as the results.xml file, but is limited to the <hardware> and <certification> elements.

Comment 3 Greg Nichols 2012-03-01 20:04:31 UTC
Created attachment 566931 [details]
environment patch adding certification file name and path

Comment 4 Greg Nichols 2012-03-01 20:05:50 UTC
Created attachment 566932 [details]
tags.py patch adding serveral string constants

Comment 5 Greg Nichols 2012-03-01 20:09:04 UTC
Created attachment 566933 [details]
certification.py patch providing new certification document wrapper


This patch renames the python class for the results.xml document to ResultsDocument, and splits off some functions to a new base class named CertificationTest for certification.xml.  methods are provided for copying <hardware> and <certification> elements between the two documents.

Comment 11 Caspar Zhang 2012-06-04 07:54:44 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:
A new feature has been made in v7 1.5 that now `v7 clean` command preserves SUT hardware information when results are removed. To remove all results including SUT hardware information, use `v7 clean all` command instead.

Comment 13 errata-xmlrpc 2012-06-05 21:37:09 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