BMC and host PNOR priority setting test
Resolves openbmc/openbmc-test-automation#966
Change-Id: I403e675bb3ed9f3dac0f0f212bc162581b839f9f
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/code_update/bmc_code_update.robot b/extended/code_update/bmc_code_update.robot
index 71395f7..99be4ef 100644
--- a/extended/code_update/bmc_code_update.robot
+++ b/extended/code_update/bmc_code_update.robot
@@ -61,8 +61,44 @@
Delete Image And Verify ${software_object} ${VERSION_PURPOSE_BMC}
+BMC Image Priority Attribute Test
+ [Documentation] Set "Priority" attribute.
+ [Tags] BMC_Image_Priority_Attribute_Test
+ [Template] Temporarily Set BMC Attribute
+
+ # Property Value
+ Priority ${0}
+ Priority ${1}
+ Priority ${127}
+ Priority ${255}
+
+
*** Keywords ***
+Temporarily Set BMC Attribute
+ [Documentation] Update the BMC attribute value.
+ [Arguments] ${attribute_name} ${attribute_value}
+
+ # Description of argument(s):
+ # attribute_name BMC software attribute name (e.g. "Priority").
+ # attribute_value Value to be written.
+
+ ${image_ids}= Get Software Objects ${VERSION_PURPOSE_BMC}
+ ${init_bmc_properties}= Get Host Software Property ${image_ids[0]}
+ ${initial_priority}= Set Variable ${init_bmc_properties["Priority"]}
+
+ Set Host Software Property ${image_ids[0]} ${attribute_name}
+ ... ${attribute_value}
+
+ ${cur_bmc_properties}= Get Host Software Property ${image_ids[0]}
+ Should Be Equal As Integers ${cur_bmc_properties["Priority"]}
+ ... ${attribute_value}
+
+ # Revert to to initial value.
+ Set Host Software Property
+ ... ${image_ids[0]} ${attribute_name} ${initial_priority}
+
+
Upload And Activate Multiple BMC Images Setup
[Documentation] Check that the ALTERNATE_FILE_PATH variable is set.
diff --git a/extended/code_update/host_code_update.robot b/extended/code_update/host_code_update.robot
index df16823..df728b5 100644
--- a/extended/code_update/host_code_update.robot
+++ b/extended/code_update/host_code_update.robot
@@ -73,6 +73,7 @@
Priority ${0}
Priority ${1}
Priority ${127}
+ Priority ${255}
Host Set Priority To Invalid Values