Fix the hex conversion in IPMI test

The hex conversion in the IPMI test cannot handle any numbers that would
be zero padded because it truncates them, causing the compare to fail.

For example, the number 1234 is converted to 0x4d2 by this code, while
the compare value from mc_info is 0x04d2, breaking the compare.

The fix is to use the built-in ability in convert_to_hex to fix the
length at 4. Additionally, the function can set a prefix, removing the
need for the "0x" string in the compare.

Change-Id: I5e77c2c53227c1e92de2e819cd948de2d568a5dd
Signed-off-by: Matt Fischer <matthew.fischer@hpe.com>
diff --git a/tests/ipmi/test_general_ipmi.robot b/tests/ipmi/test_general_ipmi.robot
index 2fa43c4..127e3a4 100755
--- a/tests/ipmi/test_general_ipmi.robot
+++ b/tests/ipmi/test_general_ipmi.robot
@@ -119,8 +119,8 @@
     Valid Value  mc_info['ipmi_version']  ['2.0']
 
     Valid Value  ${mc_info['manufacturer_id']}  [${device_id_config['manuf_id']}]
-    ${product_id_hex} =  Convert To Hex  ${device_id_config['prod_id']}  lowercase=True
-    Valid Value  mc_info['product_id']  ['${device_id_config['prod_id']} (0x${product_id_hex})']
+    ${product_id_hex} =  Convert To Hex  ${device_id_config['prod_id']}  lowercase=True  length=4  prefix=0x
+    Valid Value  mc_info['product_id']  ['${device_id_config['prod_id']} (${product_id_hex})']
 
     Valid Value  mc_info['device_available']  ['yes']
     Valid Value  mc_info['provides_device_sdrs']  ['yes']