hwid: Decouples the probed results and the hwid v3 framework.

This is the first step of decoupling the probed results and the HWID
database.  As the `components` fields in the HWID database becomes
optional, the relation between the probed results and the HWID database
become weak.  Both the material to generate a HWID string and the result
of decoding a HWID string should be a BOM object.

TEST=make test
BUG=chromium:689944

Change-Id: I9da3778d51094a9228d8980aa1df93d474a3e09a
Reviewed-on: https://chromium-review.googlesource.com/844438
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>
diff --git a/py/gooftool/commands.py b/py/gooftool/commands.py
index 5f95245..b9e7cce 100755
--- a/py/gooftool/commands.py
+++ b/py/gooftool/commands.py
@@ -757,7 +757,9 @@
   event_log.Log('probed_results', probed_results=FilterDict(probed_results))
   event_log.Log('vpd', vpd=FilterDict(vpd) if vpd is None else None)
 
-  hwid_utils.VerifyHWID(db, encoded_string, probed_results, vpd=vpd,
+  bom = hwid_utils.GenerateBOMFromProbedResults(db, probed_results)
+
+  hwid_utils.VerifyHWID(db, encoded_string, bom, vpd=vpd,
                         rma_mode=options.rma_mode)
 
   event_log.Log('verified_hwid', hwid=encoded_string)