Log PNOR Driver Details
Add 'Get host Software Object Details' Keyword.
Resolves openbmc/openbmc-test-automation#942
Change-Id: Ifd6763b4b5e8dbb122ef56addd0140a24672a20d
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/lib/code_update_utils.robot b/lib/code_update_utils.robot
index 10e2171..ebb48a3 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -48,6 +48,19 @@
${sw_attributes}= Read Properties ${host_object}
[return] ${sw_attributes}
+Get Host Software Objects Details
+ [Documentation] Return software object details as a list of dictionaries.
+ [Arguments] ${quiet}=${QUIET}
+
+ ${software}= Create List
+
+ ${pnor_details}= Get Software Objects ${VERSION_PURPOSE_HOST}
+ :FOR ${pnor} IN @{pnor_details}
+ \ ${resp}= OpenBMC Get Request ${pnor} quiet=${1}
+ \ ${json}= To JSON ${resp.content}
+ \ Append To List ${software} ${json["data"]}
+
+ [Return] ${software}
Set Host Software Property
[Documentation] Set the host software properties of a given object.
diff --git a/tests/__init__.robot b/tests/__init__.robot
index 65d17e3..b99cb42 100644
--- a/tests/__init__.robot
+++ b/tests/__init__.robot
@@ -5,13 +5,13 @@
Resource ../lib/connection_client.robot
Resource ../lib/rest_client.robot
Resource ../lib/utils.robot
+Resource ../lib/code_update_utils.robot
Suite Setup System Driver Data
*** Variables ***
${DRIVER_CMD} cat /etc/os-release | grep ^VERSION_ID=
-${PNOR_CMD} /usr/sbin/pflash -r /tmp/out.txt -P VERSION; cat /tmp/out.txt
*** Keyword ***
@@ -35,17 +35,14 @@
Log ${output}
[Return] ${output}
-
Log PNOR Driver Details
[Documentation] Get PNOR driver details and log.
# Until the new REST interface is available using pflash to
# capture the PNOR details.
- ${pnor_details}= Execute Command On BMC ${PNOR_CMD}
- Log PNOR_INFO=${pnor_details}
-
+ ${software}= Get Host Software Objects Details
+ Log ${software}
Log BMC Model
[Documentation] Fetch BMC Model name from system and log.
${bmc_model}= Get BMC System Model
Log BMC Model=${bmc_model}
-