Update robot codes with latest directives
Changes:
- Non local variable is not uppercase
- The assignment sign is not consistent within the file.
Expected = but instead of blank spaces
- Run KeyWord If is deprecated since Robot
Framework version 5.*, use 'IF' instead
Tested:
- Checked using robot dry-run to make sure the
syntax is not broken
Change-Id: I08a142a18a9066abdd6494bcddc167122564fd17
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/network/test_vlan_network.robot b/network/test_vlan_network.robot
index 73106bc..c884100 100644
--- a/network/test_vlan_network.robot
+++ b/network/test_vlan_network.robot
@@ -278,8 +278,9 @@
... ${vlan_record['${uri}']['PrefixLength']}
END
- Run Keyword If @{uris} == @{EMPTY}
- ... Append To List ${initial_vlan_config} ${id} ${EMPTY} ${EMPTY}
+ IF @{uris} == @{EMPTY}
+ Append To List ${initial_vlan_config} ${id} ${EMPTY} ${EMPTY}
+ END
Suite Teardown Execution
@@ -290,15 +291,16 @@
${previous_id}= Set Variable ${EMPTY}
FOR ${index} IN RANGE 0 ${length} 3
-
- Run Keyword If '${initial_vlan_config[${index+1}]}' == '${EMPTY}'
- ... Create VLAN ${initial_vlan_config[${index}]}
- ... ELSE IF '${previous_id}' == '${initial_vlan_config[${index}]}'
- ... Configure Network Settings On VLAN ${initial_vlan_config[${index}]}
- ... ${initial_vlan_config[${index+1}]} ${initial_vlan_config[${index+2}]}
- ... ELSE Run Keywords Create VLAN ${initial_vlan_config[${index}]} AND
- ... Configure Network Settings On VLAN ${initial_vlan_config[${index}]}
- ... ${initial_vlan_config[${index+1}]} ${initial_vlan_config[${index+2}]}
+ IF '${initial_vlan_config[${index+1}]}' == '${EMPTY}'
+ Create VLAN ${initial_vlan_config[${index}]}
+ ELSE IF '${previous_id}' == '${initial_vlan_config[${index}]}'
+ Configure Network Settings On VLAN ${initial_vlan_config[${index}]}
+ ... ${initial_vlan_config[${index+1}]} ${initial_vlan_config[${index+2}]}
+ ELSE
+ Create VLAN ${initial_vlan_config[${index}]}
+ Configure Network Settings On VLAN ${initial_vlan_config[${index}]}
+ ... ${initial_vlan_config[${index+1}]} ${initial_vlan_config[${index+2}]}
+ END
${previous_id}= Set Variable ${initial_vlan_config[${index}]}
END
@@ -352,12 +354,12 @@
${status}= Run Keyword And Return Status Should Be True ${num_vlan_records} > 0
... msg=Could not find a uri for vlan "${vlan_id}" with IP "${vlan_ip}".
- Run Keyword If '${expected_result}' == 'valid'
- ... Should Be Equal ${status} ${True}
- ... msg=VLAN IP URI doesn't exist!.
- ... ELSE
- ... Should Be Equal ${status} ${False}
- ... msg=VLAN IP URI exists!.
+ IF '${expected_result}' == 'valid'
+ Should Be Equal ${status} ${True} msg=VLAN IP URI doesn't exist!.
+ ELSE
+ Should Be Equal ${status} ${False} msg=VLAN IP URI exists!.
+ END
+
${uris}= Get Dictionary Keys ${vlan_record}
Return From Keyword If @{uris} == @{EMPTY}
@@ -383,9 +385,8 @@
Should Be Equal ${rest_status} ${cli_status}
... msg=REST and CLI Output are not the same.
- Run Keyword If '${expected_result}' == 'valid'
- ... Should Be Equal ${rest_status} ${True}
- ... msg=VLAN ID doesn't exist!.
- ... ELSE
- ... Should Be Equal ${rest_status} ${False}
- ... msg=VLAN ID exists!.
+ IF '${expected_result}' == 'valid'
+ Should Be Equal ${rest_status} ${True} msg=VLAN ID doesn't exist!.
+ ELSE
+ Should Be Equal ${rest_status} ${False} msg=VLAN ID exists!.
+ END