Automation change to move common keyword to file
lib/redfish_code_update_utils.robot
changes:
- Moveing below keywords
from redfish/extended/redfish_bmc_code_update.robot
to lib/redfish_code_update_utils.robot
- "Get BMC Functional Firmware"
- "Get Functional Firmware"
- "Get Non Functional Firmware"
Change-Id: I66343978b77332da45b6b3fcbb8b9850dddfb9bf
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/lib/redfish_code_update_utils.robot b/lib/redfish_code_update_utils.robot
index ba5fb60..08e0e44 100644
--- a/lib/redfish_code_update_utils.robot
+++ b/lib/redfish_code_update_utils.robot
@@ -104,6 +104,42 @@
[Return] ${software_inventory}[0]
+Get BMC Functional Firmware
+ [Documentation] Get BMC functional firmware details.
+
+ ${sw_inv}= Get Functional Firmware BMC update
+ ${sw_inv}= Get Non Functional Firmware ${sw_inv} True
+
+ [Return] ${sw_inv}
+
+
+Get Functional Firmware
+ [Documentation] Get all the BMC firmware details.
+ [Arguments] ${image_type}
+
+ # Description of argument(s):
+ # image_type Image value can be either BMC update or Host update.
+
+ ${software_inventory}= Get Software Inventory State
+ ${bmc_inv}= Get BMC Firmware ${image_type} ${software_inventory}
+
+ [Return] ${bmc_inv}
+
+
+Get Non Functional Firmware
+ [Documentation] Get BMC non functional fimware details.
+ [Arguments] ${sw_inv} ${functional_sate}
+
+ # Description of argument(s):
+ # sw_inv This dictionay contains all the BMC fimware details.
+ # functional_sate Functional state can be either True or False.
+
+ ${resp}= Filter Struct ${sw_inv} [('functional', ${functional_sate})]
+ ${list_inv_dict}= Get Dictionary Values ${resp}
+
+ [Return] ${list_inv_dict}[0]
+
+
Redfish Upload Image And Check Progress State
[Documentation] Code update with ApplyTime.
diff --git a/redfish/extended/redfish_bmc_code_update.robot b/redfish/extended/redfish_bmc_code_update.robot
index d42dca4..baea00a 100644
--- a/redfish/extended/redfish_bmc_code_update.robot
+++ b/redfish/extended/redfish_bmc_code_update.robot
@@ -125,42 +125,6 @@
Valid Value before_image_state["version"] ['${after_image_state["version"]}']
-Get BMC Functional Firmware
- [Documentation] Get BMC functional firmware details.
-
- ${sw_inv}= Get Functional Firmware BMC update
- ${sw_inv}= Get Non Functional Firmware ${sw_inv} True
-
- [Return] ${sw_inv}
-
-
-Get Functional Firmware
- [Documentation] Get all the BMC firmware details.
- [Arguments] ${image_type}
-
- # Description of argument(s):
- # image_type Image value can be either BMC update or Host update.
-
- ${software_inventory}= Get Software Inventory State
- ${bmc_inv}= Get BMC Firmware ${image_type} ${software_inventory}
-
- [Return] ${bmc_inv}
-
-
-Get Non Functional Firmware
- [Documentation] Get BMC non functional fimware details.
- [Arguments] ${sw_inv} ${functional_sate}
-
- # Description of argument(s):
- # sw_inv This dictionay contains all the BMC fimware details.
- # functional_sate Functional state can be either True or False.
-
- ${resp}= Filter Struct ${sw_inv} [('functional', ${functional_sate})]
- ${list_inv_dict}= Get Dictionary Values ${resp}
-
- [Return] ${list_inv_dict}[0]
-
-
Delete BMC Image
[Documentation] Delete a BMC image from the BMC flash chip.