Address issue for deprecated syntax
Changes:
- Change from :FOR to FOR/END to address a new WARNING in
the new robot version.
- Change for accessing a variable like ${software_object}[Path]
Sample warning message as mention below.
FOR loop starting on line 26: For loop header
': FOR' is deprecated. Use 'FOR' instead.
Accessing variable items using
'&{software_object}[RequestedActivation]'
syntax is deprecated. Use
'${software_object}[RequestedActivation]' instead
Change-Id: I2473064178fdd5aba45d1fefa21a91e26852c615
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/redfish/extended/test_software_manager.robot b/redfish/extended/test_software_manager.robot
index b523f12..bdb43ab 100755
--- a/redfish/extended/test_software_manager.robot
+++ b/redfish/extended/test_software_manager.robot
@@ -26,7 +26,7 @@
FOR ${uri} IN @{object_uris}
${object}= Read Properties ${uri}
Continue For Loop If not 'Purpose' in ${object}
- Should Contain Any &{object}[Purpose] ${VERSION_PURPOSE_HOST} ${VERSION_PURPOSE_BMC}
+ Should Contain Any ${object}[Purpose] ${VERSION_PURPOSE_HOST} ${VERSION_PURPOSE_BMC}
END
@@ -130,9 +130,10 @@
${software_ids}= Get Software Objects Id ${software_purpose}
- : FOR ${id} IN @{software_ids}
- \ Length Should Be ${id} ${8}
- \ Should Match Regexp ${id} [0-9a-f]*
+ FOR ${id} IN @{software_ids}
+ Length Should Be ${id} ${8}
+ Should Match Regexp ${id} [0-9a-f]*
+ END
Verify Software Path
@@ -141,10 +142,11 @@
${software_uris}= Get Software Objects ${software_purpose}
- : FOR ${uri} IN @{software_uris}
- \ ${software_object}= Get Host Software Property ${uri}
- \ Return From Keyword If len('&{software_object}[Path]') == ${0}
- \ BMC Execute Command [ -d "${path}" ]
+ FOR ${uri} IN @{software_uris}
+ ${software_object}= Get Host Software Property ${uri}
+ Return From Keyword If len('${software_object}[Path]') == ${0}
+ BMC Execute Command [ -d "${path}" ]
+ END
Verify Software RequestedActivation
@@ -153,10 +155,10 @@
${software_uris}= Get Software Objects ${software_purpose}
- : FOR ${uri} IN @{software_uris}
- \ ${software_object}= Get Host Software Property ${uri}
- \ Should Contain Any &{software_object}[RequestedActivation]
- ... ${REQUESTED_ACTIVE} ${REQUESTED_NONE}
+ FOR ${uri} IN @{software_uris}
+ ${software_object}= Get Host Software Property ${uri}
+ Should Contain Any ${software_object}[RequestedActivation] ${REQUESTED_ACTIVE} ${REQUESTED_NONE}
+ END
Verify Software Activation Association
@@ -191,8 +193,9 @@
${obj_path_list}= Get Software Objects ${software_purpose}
- : FOR ${index} IN @{obj_path_list}
- \ Verify Inventory Association ${index} ${assoiation_path}
+ FOR ${index} IN @{obj_path_list}
+ Verify Inventory Association ${index} ${assoiation_path}
+ END
Verify Inventory Association
@@ -238,12 +241,15 @@
# "/xyz/openbmc_project/software/2f974579",
# "/xyz/openbmc_project/software/136cf504"
# ]
+
${obj_list}= Get Software Objects ${software_purpose}
- : FOR ${index} IN @{obj_list}
- \ ${resp}= Get Host Software Property ${index}
- \ Verify Software Properties ${resp} ${software_purpose}
- \ Run Keyword If '${software_purpose}' == '${VERSION_PURPOSE_BMC}'
- ... Check BMC Version ${index} ${resp["Version"]}
+
+ FOR ${index} IN @{obj_list}
+ ${resp}= Get Host Software Property ${index}
+ Verify Software Properties ${resp} ${software_purpose}
+ Run Keyword If '${software_purpose}' == '${VERSION_PURPOSE_BMC}'
+ ... Check BMC Version ${index} ${resp["Version"]}
+ END
Verify Software Properties