Reformat Robot files to follow best practices
[osm/tests.git] / robot-systest / lib / role_lib.robot
index 8f873fa..e3241a6 100644 (file)
@@ -22,29 +22,29 @@ Create Role
     ${rc}   ${stdout}=   Run and Return RC and Output   osm role-create ${role_name}
     Log   ${stdout}
     Should Be Equal As Integers   ${rc}   ${success_return_code}
     ${rc}   ${stdout}=   Run and Return RC and Output   osm role-create ${role_name}
     Log   ${stdout}
     Should Be Equal As Integers   ${rc}   ${success_return_code}
-    [Return]  ${stdout}
+    [Return]   ${stdout}
 
 
 Update Role
 
 
 Update Role
-    [Documentation]     Updates a role in OSM.
+    [Documentation]   Updates a role in OSM.
     ...                 The extra parameters (like '--add') are given to this function in name=value format. These parameters will be appended to the 'osm role-update' command with the next syntax: --param_name=param_value
     ...                 Example of execution:
     ...                 The extra parameters (like '--add') are given to this function in name=value format. These parameters will be appended to the 'osm role-update' command with the next syntax: --param_name=param_value
     ...                 Example of execution:
-    ...                     Update Role  \${role_name}  add='vims: true'
+    ...                     Update Role   \${role_name}   add='vims: true'
 
 
-    [Arguments]  ${role_name}  @{optional_parameters}
+    [Arguments]   ${role_name}   @{optional_parameters}
 
 
-    ${osm_update_command}=  Set Variable  osm role-update ${role_name}
-    FOR  ${param}  IN  @{optional_parameters}
-        ${match}  ${param_name}  ${param_value} =  Should Match Regexp  ${param}  (.+)=(.+)  msg=Syntax error in optional parameters
-        ${osm_update_command}=  Catenate  ${osm_update_command}  --${param_name}=${param_value}
+    ${osm_update_command}=   Set Variable   osm role-update ${role_name}
+    FOR   ${param}   IN   @{optional_parameters}
+        ${match}   ${param_name}   ${param_value} =   Should Match Regexp   ${param}   (.+)=(.+)   msg=Syntax error in optional parameters
+        ${osm_update_command}=   Catenate   ${osm_update_command}   --${param_name}=${param_value}
     END
     END
-    ${rc}  ${stdout}=  Run and Return RC and Output  ${osm_update_command}
-    log  ${stdout}
-    Should Be Equal As Integers  ${rc}  ${success_return_code}
+    ${rc}   ${stdout}=   Run and Return RC and Output   ${osm_update_command}
+    log   ${stdout}
+    Should Be Equal As Integers   ${rc}   ${success_return_code}
 
 
 Check If Role Exists
 
 
 Check If Role Exists
-    [Arguments]  ${role_name}
+    [Arguments]   ${role_name}
 
     Should Not Be Empty   ${role_name}
     ${rc}   ${stdout}=   Run And Return RC And Output   osm role-list | awk 'NR>3 {print $2}' | grep "${role_name}"
 
     Should Not Be Empty   ${role_name}
     ${rc}   ${stdout}=   Run And Return RC And Output   osm role-list | awk 'NR>3 {print $2}' | grep "${role_name}"
@@ -53,7 +53,7 @@ Check If Role Exists
 
 
 Check If User Has Role
 
 
 Check If User Has Role
-    [Arguments]  ${user_name}  ${role_name}  ${project_name}
+    [Arguments]   ${user_name}   ${role_name}   ${project_name}
 
     Should Not Be Empty   ${user_name}
     Should Not Be Empty   ${role_name}
 
     Should Not Be Empty   ${user_name}
     Should Not Be Empty   ${role_name}
@@ -64,7 +64,7 @@ Check If User Has Role
 
 
 Delete Role
 
 
 Delete Role
-    [Arguments]  ${role_name}
+    [Arguments]   ${role_name}
 
     ${rc}   ${stdout}=   Run and Return RC and Output   osm role-delete ${role_name}
     Log   ${stdout}
 
     ${rc}   ${stdout}=   Run and Return RC and Output   osm role-delete ${role_name}
     Log   ${stdout}