Code update BMC signed image keyword
Added:
- Keyword to check if the BMC image is signed.
Currently the logic is kept simple and generic so that it can be
extended for host signing as well ahead.
Resolves openbmc/openbmc-test-automation#1305
Change-Id: I97d9820bccacceb6361bf24d451ad22c15646522
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/data/variables.py b/data/variables.py
index 5d7f08e..2b3f6e6 100644
--- a/data/variables.py
+++ b/data/variables.py
@@ -131,6 +131,9 @@
# User manager variable.
BMC_USER_URI = OPENBMC_BASE_URI + 'user/'
+# The path on the BMC where signed keys are stored.
+ACTIVATION_DIR_PATH = "/etc/activationdata/"
+
'''
QEMU HTTPS variable:
diff --git a/lib/code_update_utils.robot b/lib/code_update_utils.robot
index fc06b89..cbbd7a5 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -466,3 +466,10 @@
Should Be True ${data} == ${value}
... msg=Given attribute value ${data} mismatch ${value}.
+
+
+Image Should Be Signed
+ [Documentation] Fail if the image is not signed.
+
+ Directory Should Exist ${ACTIVATION_DIR_PATH}
+ ... msg=${ACTIVATION_DIR_PATH} does not exist. Therefore, the image is not signed.