Automation fix 401 session issue
Changes:
- In current code using Redfish OBMC Reboot (off), in order
to reboot the BMC. but after reboot it delete all the session.
the session created by test case still needed even after the
reboot in order to continue the execution.
Change-Id: Id65b507ca1de37e65ef784c3a07bd3ea04e0855c
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/openpower/ext_interfaces/test_savearea_management.robot b/openpower/ext_interfaces/test_savearea_management.robot
index 13cf0cc..05c7e1d 100644
--- a/openpower/ext_interfaces/test_savearea_management.robot
+++ b/openpower/ext_interfaces/test_savearea_management.robot
@@ -436,7 +436,11 @@
# Description of argument(s):
# file_name Partition file name.
- Redfish OBMC Reboot (off)
+ ${before_reboot_xauth_token}= Set Variable ${XAUTH_TOKEN}
+ Redfish BMC Reset Operation
+ Set Global Variable ${XAUTH_TOKEN} ${before_reboot_xauth_token}
+
+ Is BMC Standby
Redfish Upload Partition File ${file_name}
@@ -453,7 +457,13 @@
Create Partition File ${Partition_file_list}
Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPLOAD_MESSAGE}
Verify Partition File On BMC ${Partition_file_list} Partition_status=1
- Redfish OBMC Reboot (off)
+
+ ${before_reboot_xauth_token}= Set Variable ${XAUTH_TOKEN}
+ Redfish BMC Reset Operation
+ Set Global Variable ${XAUTH_TOKEN} ${before_reboot_xauth_token}
+
+ Is BMC Standby
+
Verify Partition File On BMC ${Partition_file_list} Partition_status=1
Initialize OpenBMC
Run Keyword If ${num_records} == ${1}
@@ -524,14 +534,20 @@
Verify Partition File On BMC ${Partition_file_list} Partition_status=1
Verify Redfish Partition File Content ${Partition_file_list} ${content_dict} ${HTTP_OK}
+ ${before_reboot_xauth_token}= Set Variable ${XAUTH_TOKEN}
+
Run Keyword If ${True} == ${reboot_flag}
- ... Run Keywords Redfish OBMC Reboot (off) AND
+ ... Run Keywords Redfish BMC Reset Operation AND
+ ... Set Global Variable ${XAUTH_TOKEN} ${before_reboot_xauth_token} AND
+ ... Is BMC Standby AND
... Initialize OpenBMC AND
... Verify Redfish Partition File Content ${Partition_file_list} ${content_dict} ${HTTP_OK}
+
Run Keyword If ${num_records} == ${1}
... Delete BMC Partition File ${Partition_file_list} ${HTTP_OK} ${FILE_DELETED_MESSAGE}
... ELSE
... Delete All BMC Partition File ${HTTP_OK}
+
Delete Local Partition File ${Partition_file_list}
@@ -550,8 +566,12 @@
Verify Partition File On BMC ${Partition_file_list} Partition_status=1
Verify Redfish Partition File Content ${Partition_file_list} ${content_dict} ${HTTP_OK}
+ ${before_reboot_xauth_token}= Set Variable ${XAUTH_TOKEN}
+
Run Keyword If ${True} == ${reboot_flag}
- ... Run Keywords Redfish OBMC Reboot (off) AND
+ ... Run Keywords Redfish BMC Reset Operation AND
+ ... Set Global Variable ${XAUTH_TOKEN} ${before_reboot_xauth_token} AND
+ ... Is BMC Standby AND
... Initialize OpenBMC
${content_dict}= Add Content To Files ${Partition_file_list} ${0}
@@ -578,8 +598,12 @@
Verify Partition File On BMC ${Partition_file_list} Partition_status=1
Verify Redfish Partition File Content ${Partition_file_list} ${content_dict} ${HTTP_OK}
+ ${before_reboot_xauth_token}= Set Variable ${XAUTH_TOKEN}
+
Run Keyword If ${True} == ${reboot_flag}
- ... Run Keywords Redfish OBMC Reboot (off) AND
+ ... Run Keywords Redfish BMC Reset Operation AND
+ ... Set Global Variable ${XAUTH_TOKEN} ${before_reboot_xauth_token} AND
+ ... Is BMC Standby AND
... Initialize OpenBMC
${content_dict}= Add Content To Files ${Partition_file_list} ${1}