Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1073306

Summary: Push to portal strata API Tracker
Product: [Retired] Red Hat Hardware Certification Program Reporter: Huan Zhang <hzhang>
Component: Hardware CatalogAssignee: Wei Shen <wshen>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.5CC: hwcert-catalog, junwang, wshen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 04:13: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: 1073308, 1073309, 1073317, 1073319, 1073322    
Bug Blocks: 1080807    

Description Huan Zhang 2014-03-06 07:39:49 UTC
Define xml schemas for models and certs which includes both hwcert ID's and descriptions; see line 108

Add portal reference* to model tables( do we need a last_modified_date field? we have this how does it help?)( What should we do if the push fails notify the user who will be a reviewer so they can address)
Add portal reference* to cert tables (we need to discuss this with portal team, yes)
reference* might be the unique id in the portal, or a boolean confirmation
that we have or have not pushed to the portal already, I prefer a portal ID because then we can cross reference, even if that portal ID is the same as our model.id or cert.id.
Add a new function to process.cgi (is_public -> is_public, is_private -> is_public,  is_public -> is_private, is_private -> is_private[will ignore this sititution] what's trying to be conveyed?)
When is_public will change:
If is_public will be set to true to and no portal reference value exists for the cert then
if there is no portal reference for the model 
add a strata call to add the model to portal
record the model portal ID
add a strata call to add the cert to the model in portal
if the certification is RHEL7 and show_RHEL7_public param is not true(we'd better skip the rc release for the potal push, thus that we can simply our code)
cert is "draft"
else 
cert is "published"
record the cert portal ID
add a strata call to add the kbase's to the portal cert ????
if is_public will be set to false from true
add a call to update the cert portal ID to draft

when kbases will change:
if there is a portal reference for the model
remove the removed kbases from the portal cert
add the added kbases to the portal cert
else do nothing because we have not pushed the cert to portal yet

Write a script for use @ RHEL7 GA, to migrate all RHEL7 draft certs to published
lookup the is_public rhel7 certs in hwcert tables
retreive the RHEL7 portal ID's
call strata to change the portal ID's from draft to published

Write a script to push existing non-RHEL7 public certs to portal before RHEL7 GA
*** Run before any RHEL7 in portal activities (or alter to account for RHEL7)
Look up all models without portal reference
call strata to add model data to portal
add portal model reference ID to hwcert model table
Look up all certs with is_public
call strata to add certs to models in portal
add portal cert referecne ID to hwcert cert table

Extra definitions (is xml schema ready? or hzhang can discuss with portal team portal team has a rough idea, I suggest we provide one instead so that we can match that definition with the design items here OK, cool) lets add that as the 1st step.
Model Push -> hwcert.model.id, hwcert.model.desc, hwcert.make.id, hwcert.make.desc., hwcert.vendor.id, hwcert.vendor.desc
Cert Push -> hwcert.cert.id, hwcert.cert.redhatproduct, hwcert.cert.redhatproduct.major_version, hwcert.cert.redhatproduct.minor_version, hwcert.cert.redhatproduct.arch
Kbase Push-> hwcert.cert.id, hwcert.cert.kbase IDs kbase se type id,

Comment 1 Wei Shen 2014-06-13 04:13:31 UTC
Verified on live, close it.