Tidy new .robot files 28/28328/2
authorVratko Polak <vrpolak@cisco.com>
Tue, 13 Oct 2015 11:20:50 +0000 (13:20 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 13 Oct 2015 17:06:57 +0000 (17:06 +0000)
Version used: Robot Framework 2.9 (Python 2.7.9 on linux2)
This also reverts changes caused by tidy from earlier Robot version.

Change-Id: I8e95e2968f993809e87c4779fad71c0512ec0286
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
13 files changed:
csit/libraries/AAAKeywords.robot
csit/libraries/CarsAndPeople.robot
csit/libraries/ClusterKeywords.robot
csit/libraries/KarafKeywords.robot
csit/libraries/LISPFlowMapping.robot
csit/libraries/SwitchUtils.robot
csit/libraries/TsdrUtils.robot
csit/libraries/VtnMaKeywords.robot
csit/suites/controller/Clustering_Datastore/050_car_persistence_recovery.robot
csit/suites/controller/Clustering_Datastore/140_recovery_restart_follower.robot
csit/suites/controller/Clustering_Routedrpc/023_routed_rpc_crud_test.robot
csit/suites/lacp/Lacp_Feature_OF13/020__lacp_lag_resiliency.robot
csit/suites/vtn/VTN_Mgr_OF13/010__vtn_manager_pathpolicy.robot

index dcc5f8ca809275d00ce9d6c4a440033432037074..a6737e756bcb8b9d824d7d74cda2078cb444acbf 100644 (file)
@@ -23,10 +23,10 @@ Create Auth Data
     [Documentation]    returns a string in the direct authentacation format (e.g., grant_type=password&username=admin&password=admin).
     ...    It can also be passed scope, client_id and client_secret arguments for the case of client specific authorization
     ${data}=    Set Variable    grant_type=password&username=${user}&password=${password}&scope=${scope}
-    ${data}=    Run Keyword If    "${client_id}" != "${EMPTY}"    Set Variable    ${data}&client_id=${client_id}    ELSE    Set Variable
-    ...    ${data}
-    ${data}=    Run Keyword If    "${client_secret}" != "${EMPTY}"    Set Variable    ${data}&client_secret=${client_secret}    ELSE    Set Variable
-    ...    ${data}
+    ${data}=    Run Keyword If    "${client_id}" != "${EMPTY}"    Set Variable    ${data}&client_id=${client_id}
+    ...    ELSE    Set Variable    ${data}
+    ${data}=    Run Keyword If    "${client_secret}" != "${EMPTY}"    Set Variable    ${data}&client_secret=${client_secret}
+    ...    ELSE    Set Variable    ${data}
     [Return]    ${data}
 
 Disable Authentication On Controller
index a95d0afc6888799d01c631b370128d21a120d97b..a5bb4e1a98380c9c166f7d563077c0f9882ac9a1 100644 (file)
@@ -100,7 +100,7 @@ Check Cars Deleted
     Should Be Equal As Strings    ${resp.status_code}    404
 
 Delete All Cars And Verify
-    [Arguments]    ${controller_ip}   ${timeout}=3s
+    [Arguments]    ${controller_ip}    ${timeout}=3s
     DeleteAllCars    ${controller_ip}    ${RESTCONFPORT}    ${0}
     Wait Until Keyword Succeeds    ${timeout}    1s    Check Cars Deleted    ${controller_ip}
 
@@ -125,8 +125,8 @@ Delete All Cars-Persons And Verify
     Wait Until Keyword Succeeds    ${timeout}    1s    Check Cars-Persons Deleted    ${controller_ip}
 
 Delete All Entries From Shards
-    [Documentation]    Delete All Shards.
     [Arguments]    @{controllers}
+    [Documentation]    Delete All Shards.
     : FOR    ${ip}    IN    @{controllers}
     \    Delete All Cars And Verify    ${ip}
     : FOR    ${ip}    IN    @{controllers}
index 270e23888fe5496d333d651c1ca00cac8e0b9bde..8ba9dbadf4c8aa83d523ea05293f9f329221dfbc 100644 (file)
@@ -30,8 +30,8 @@ Get Leader And Verify
     [Return]    ${leader}
 
 Expect No Leader
-    [Documentation]    No leader is elected in the car shard
     [Arguments]    ${shard_name}
+    [Documentation]    No leader is elected in the car shard
     ${leader}    GetLeader    ${shard_name}    ${3}    ${1}    ${1}    ${RESTCONFPORT}
     ...    ${CURRENT_CAR_LEADER}
     Should Be Equal As Strings    ${leader}    None
@@ -223,4 +223,3 @@ Flush IPTables
     Should Contain    ${return string}    Flushing chain `INPUT'
     Should Contain    ${return string}    Flushing chain `FORWARD'
     Should Contain    ${return string}    Flushing chain `OUTPUT'
-
index cee90f3c51b91ed266cfd32766082e68133e3de8..98bf50d064e37007afe25f1f5fe9411e9117efa7 100644 (file)
@@ -33,7 +33,7 @@ Verify Feature Is Not Installed
 Issue Command On Karaf Console
     [Arguments]    ${cmd}    ${controller}=${CONTROLLER}    ${karaf_port}=${KARAF_SHELL_PORT}    ${timeout}=5
     [Documentation]    Will execute the given ${cmd} by ssh'ing to the karaf console running on ${CONTROLLER}
-    ...   Note that this keyword will open&close new SSH connection, without switching back to previously current session.
+    ...    Note that this keyword will open&close new SSH connection, without switching back to previously current session.
     Open Connection    ${controller}    port=${karaf_port}    prompt=${KARAF_PROMPT}    timeout=${timeout}
     Login    ${KARAF_USER}    ${KARAF_PASSWORD}
     Write    ${cmd}
index b721f956bfcc8ff0af02859f4b54095c6a0db4f9..6f15ad4857c7e499f21b78babcbf99b3e229815b 100644 (file)
@@ -10,8 +10,8 @@ ${ODL_VERSION}    Be
 *** Keywords ***
 Check Mapping Removal
     [Arguments]    ${json}
-    Run Keyword If    "${ODL_VERSION}" == "Li"    Check Mapping Removal Lithium    ${json}    ELSE    Post Log Check    ${LFM_RPC_API}:get-mapping
-    ...    ${json}    404
+    Run Keyword If    "${ODL_VERSION}" == "Li"    Check Mapping Removal Lithium    ${json}
+    ...    ELSE    Post Log Check    ${LFM_RPC_API}:get-mapping    ${json}    404
 
 Check Mapping Removal Lithium
     [Arguments]    ${json}
index e863f4c457988ea3799f0b9faaafba706c81cef3..4058ff0549a29df480bc0952f68d305242d2144a 100644 (file)
@@ -92,8 +92,8 @@ Open Connection Wrapper
     Run Keyword If    "${switch.mgmt_protocol}" == "ssh"    Call Method    ${switch}    set_mgmt_user    ${MININET_USER}
     ${connection_index}=    Run Keyword If    "${switch.mgmt_protocol}" == "ssh"    SSHLibrary.Open Connection    ${switch.mgmt_ip}    prompt=${switch.mgmt_prompt}    timeout=30s
     Run Keyword If    "${switch.mgmt_protocol}" == "ssh"    Login With Public Key    ${switch.mgmt_user}    ${switch.ssh_key}    any
-    ${connection_index}=    Run Keyword If    "${switch.mgmt_protocol}" == "telnet"    Telnet.Open Connection    ${switch.mgmt_ip}    ELSE    Set Variable
-    ...    ${connection_index}
+    ${connection_index}=    Run Keyword If    "${switch.mgmt_protocol}" == "telnet"    Telnet.Open Connection    ${switch.mgmt_ip}
+    ...    ELSE    Set Variable    ${connection_index}
     [Return]    ${connection_index}
 
 Configure Connection Index And Prompt Wrapper
@@ -124,8 +124,8 @@ Execute Command Wrapper
     [Documentation]    Wraps the Execute Command keyword so that depending on the switch.mgmt_protocol the right
     ...    library (Telnet or SSHLibrary) is used.
     ${output}=    Run Keyword If    "${switch.mgmt_protocol}" == "ssh"    SSHLibrary.Execute Command    ${cmd}
-    ${output}=    Run Keyword If    "${switch.mgmt_protocol}" == "telnet"    Telnet.Execute Command    ${cmd}    ELSE    Set Variable
-    ...    ${output}
+    ${output}=    Run Keyword If    "${switch.mgmt_protocol}" == "telnet"    Telnet.Execute Command    ${cmd}
+    ...    ELSE    Set Variable    ${output}
     [Return]    ${output}
 
 Connect To Switch
index 09d0d509b3fa9159b7530b58ece05341dfb80079..f876c4326857cb04595939eff7b60b1f7de2a79c 100644 (file)
@@ -78,9 +78,10 @@ Prepare HBase Filter
     [Documentation]    Prepare the Hbase Filter from Tsdr List output
     ${left_str}=    Remove Space on String    ${left_str}
     ${right_str}=    Remove Space on String    ${right_str}    1
-    ${x}=    Run Keyword If    '${left_str}' == 'MetricID'    Catenate    ${SPACE}    _    ELSE IF
-    ...    '${left_str}' == 'ObjectKeys'    Catenate    ${right_str}    _    ELSE IF    '${left_str}' == 'TimeStamp'
-    ...    Get Epoch Time    ${right_str}    ELSE    Catenate    ${SPACE}
+    ${x}=    Run Keyword If    '${left_str}' == 'MetricID'    Catenate    ${SPACE}    _
+    ...    ELSE IF    '${left_str}' == 'ObjectKeys'    Catenate    ${right_str}    _
+    ...    ELSE IF    '${left_str}' == 'TimeStamp'    Get Epoch Time    ${right_str}
+    ...    ELSE    Catenate    ${SPACE}
     [Return]    ${x}
 
 Create the Hbase table row
index cfaaa48afe96f44ebcf8a34ec9dd83da2cb66613..5ed9fc65d8e606a07bf442674d8a14c0e79a2151 100644 (file)
@@ -21,9 +21,9 @@ ${vlanmap_bridge1}    {"vlan": "200"}
 ${vlanmap_bridge2}    {"vlan": "300"}
 ${pathpolicy_topo}    sudo mn --controller=remote,ip=${CONTROLLER} --custom topo-3sw-2host_multipath.py --topo pathpolicytopo --switch ovsk,protocols=OpenFlow13
 @{PATHMAP_ATTR}    "index":"1"    "condition":"flowcond_path"    "policy":"1"
-${policy_id}    1
+${policy_id}      1
 @{PATHPOLICY_ATTR}    "id":"1"    "type":"OF"    "name":"s4-eth2"
-${custom}    ${CURDIR}/${CREATE_PATHPOLICY_TOPOLOGY_FILE_PATH}
+${custom}         ${CURDIR}/${CREATE_PATHPOLICY_TOPOLOGY_FILE_PATH}
 
 *** Keywords ***
 Start SuiteVtnMa
@@ -90,26 +90,26 @@ Add a portmap
 Add a pathmap
     [Arguments]    ${pathmap_data}
     [Documentation]    Create a pathmap for a vtn
-    ${json_data}=   json.dumps    ${pathmap_data}
+    ${json_data}=    json.dumps    ${pathmap_data}
     ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT}/pathmaps/${policy_id}    data=${pathmap_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Get a pathmap
     [Documentation]    Get a pathmap for a vtn.
-    ${resp}=    RequestsLibrary.Get   session    ${REST_CONTEXT}/pathmaps
+    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT}/pathmaps
     : FOR    ${pathElement}    IN    @{PATHMAP_ATTR}
     \    should Contain    ${resp.content}    ${pathElement}
 
 Add a pathpolicy
     [Arguments]    ${pathpolicy_data}
     [Documentation]    Create a pathpolicy for a vtn
-    ${json_data}=   json.dumps    ${pathpolicy_data}
+    ${json_data}=    json.dumps    ${pathpolicy_data}
     ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT}/pathpolicies/${policy_id}    data=${pathpolicy_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Get a pathpolicy
     [Documentation]    Get a pathpolicy for a vtn.
-    ${resp}=    RequestsLibrary.Get   session    ${REST_CONTEXT}/pathpolicies/${policy_id}
+    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT}/pathpolicies/${policy_id}
     : FOR    ${pathpolicyElement}    IN    @{PATHPOLICY_ATTR}
     \    should Contain    ${resp.content}    ${pathpolicyElement}
 
@@ -146,7 +146,7 @@ Delete a pathmap
 
 Get a pathmap after delete
     [Documentation]    Get a pathmap for a vtn.
-    ${resp}=    RequestsLibrary.Get   session    ${REST_CONTEXT}/pathmaps
+    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT}/pathmaps
     : FOR    ${pathElement}    IN    @{PATHMAP_ATTR}
     \    should Not Contain    ${resp.content}    ${pathElement}
 
@@ -157,7 +157,7 @@ Delete a pathpolicy
 
 Get a pathpolicy after delete
     [Documentation]    Get a pathpolicy for a vtn after delete.
-    ${resp}=    RequestsLibrary.Get   session    ${REST_CONTEXT}/pathpolicies/${policy_id}
+    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT}/pathpolicies/${policy_id}
     : FOR    ${pathpolicyElement}    IN    @{PATHPOLICY_ATTR}
     \    should Not Contain    ${resp.content}    ${pathpolicyElement}
 
index 6ffc97de8f8cca7b2016a7aae53e74c9eacf74b2..fde39ab3868ae02da163c91991ca0e43cea300ae 100644 (file)
@@ -77,4 +77,3 @@ Get Cars From Follower1 After Restart
 Get Cars From Follower2 After Restart
     [Documentation]    Get cars in follower and verify
     Wait Until Keyword Succeeds    ${START_TIMEOUT}    2s    Get Cars And Verify    @{CAR_FOLLOWERS}[1]    ${NUM_CARS}
-
index 472864fd38707aa64530ac929a4bf9fddd7464b9..38879de9d92bff4df600fa5854ef998c3d26f917 100644 (file)
@@ -73,4 +73,3 @@ Restart The Second Follower
 Get All The Cars From The Second Follower
     [Documentation]    Add cars to the follower and verify
     Wait Until Keyword Succeeds    ${START_TIMEOUT}    2s    Get Cars And Verify    @{CAR_FOLLOWERS}[1]    ${NUM_CARS}
-
index 896bb9e2b7593780330e45963f331e853f0806fb..727b1d28d4ad642dad9467bd45138bf228484b32 100644 (file)
@@ -20,7 +20,7 @@ ${STOP_TIMEOUT}    180s
 *** Test Cases ***
 Delete All Entries
     [Documentation]    Make sure the shards are cleared for testing.
-    Delete All Entries From Shards     @{controllers}
+    Delete All Entries From Shards    @{controllers}
 
 Get Car Leader And Followers
     [Documentation]    Find leader and followers in the car shard
@@ -47,15 +47,15 @@ Purchase 100 Cars Using Car Follower1
 
 Check Contents Of Car Leader Shards
     [Documentation]    Check all content using Leader
-    Check Elements In Shards  ${CURRENT_CAR_LEADER}    ${NUM_ENTRIES}
+    Check Elements In Shards    ${CURRENT_CAR_LEADER}    ${NUM_ENTRIES}
 
 Check Contents Of Car Follower1 Shards
     [Documentation]    Check all content using first follower
-    Check Elements In Shards  @{CAR_FOLLOWERS}[0]    ${NUM_ENTRIES}
+    Check Elements In Shards    @{CAR_FOLLOWERS}[0]    ${NUM_ENTRIES}
 
 Check Contents Of Car Follower2 Shards
     [Documentation]    Check all content using second follower
-    Check Elements In Shards  @{CAR_FOLLOWERS}[1]    ${NUM_ENTRIES}
+    Check Elements In Shards    @{CAR_FOLLOWERS}[1]    ${NUM_ENTRIES}
 
 Get Old Car Leader
     [Documentation]    Find leader in the car shard
@@ -85,11 +85,11 @@ Check Contents Of New Car Leader Shards
 
 Check Contents Of New Car Follower1 Shards
     [Documentation]    Check all content using first follower
-    Check Elements In Shards  @{CAR_FOLLOWERS}[0]    ${NUM_ENTRIES}
+    Check Elements In Shards    @{CAR_FOLLOWERS}[0]    ${NUM_ENTRIES}
 
 Readd People From New Car Leader
     [Documentation]    Add 100 persons and get persons from Leader
-    Add People And Verify Without Init   ${NEW_CAR_LEADER}    ${NUM_ENTRIES}
+    Add People And Verify Without Init    ${NEW_CAR_LEADER}    ${NUM_ENTRIES}
 
 Repurchase 100 Cars Using New Car Follower1
     [Documentation]    Repurchase 100 cars using Follower1
@@ -97,11 +97,11 @@ Repurchase 100 Cars Using New Car Follower1
 
 Check Contents Of New Car Leader Shards After Repurchase
     [Documentation]    Check all content using new Leader
-    Check Elements In Shards  ${NEW_CAR_LEADER}    ${NUM_ENTRIES}
+    Check Elements In Shards    ${NEW_CAR_LEADER}    ${NUM_ENTRIES}
 
 Check Contents Of New Car First Follower Shards After Repurchase
     [Documentation]    Check all content using first follower
-    Check Elements In Shards  @{CAR_FOLLOWERS}[0]    ${NUM_ENTRIES}
+    Check Elements In Shards    @{CAR_FOLLOWERS}[0]    ${NUM_ENTRIES}
 
 Start Old Car Leader
     [Documentation]    Start Leader controller
@@ -114,11 +114,11 @@ Check Cars In Old Car Leader
 
 Check Contents Of Old Leader Shards
     [Documentation]    Check all content using old Leader
-    Check Elements In Shards  ${OLD_CAR_LEADER}    ${NUM_ENTRIES}
+    Check Elements In Shards    ${OLD_CAR_LEADER}    ${NUM_ENTRIES}
 
 Readd People From Old Leader
     [Documentation]    Add 100 persons and get persons from Leader
-    Wait Until Keyword Succeeds    30    2s    Add People And Verify Without Init   ${OLD_CAR_LEADER}    ${NUM_ENTRIES}
+    Wait Until Keyword Succeeds    30    2s    Add People And Verify Without Init    ${OLD_CAR_LEADER}    ${NUM_ENTRIES}
 
 Repurchase 100 Cars Using Old Leader
     [Documentation]    Repurchase 100 cars using Follower1
@@ -126,5 +126,4 @@ Repurchase 100 Cars Using Old Leader
 
 Check Contents Of Old Leader Shards After Repurchase
     [Documentation]    Check all content using Leader
-    Check Elements In Shards  ${OLD_CAR_LEADER}    ${NUM_ENTRIES}
-
+    Check Elements In Shards    ${OLD_CAR_LEADER}    ${NUM_ENTRIES}
index 259c9d1d3bd73c139750c444ce5a6bfa605f29ed..ac9f4b4139bb01b491c153e884420f4262f46ca9 100644 (file)
@@ -111,5 +111,5 @@ Verify Switch S1 Group Table
     ${result}=    Get Lines Containing String    ${group_output}    output:${port-id1}
     Should Contain    ${result}    type=${group-type}
     Should Contain    ${result}    output:${port-id1}
-    Run Keyword If    "${port-id2-state}" == "up"    Should Contain    ${result}    output:${port-id2}    ELSE    Should not Contain
-    ...    ${result}    output:${port-id2}
+    Run Keyword If    "${port-id2-state}" == "up"    Should Contain    ${result}    output:${port-id2}
+    ...    ELSE    Should not Contain    ${result}    output:${port-id2}
index 83b841154d00d0aaa8bd7b46f372ea4ad029e0cc..94562db190a2edbf6a82b84f362a0603d185be18 100644 (file)
@@ -11,19 +11,19 @@ ${pathpolicydata}    {"id": 1,"default": 100000,"cost": [{"location": {"node": {
 *** Test Cases ***
 Check if switch1 detected
     [Documentation]    Check if openflow:1 is detected
-    BuiltIn.Wait_Until_Keyword_Succeeds    12     3    Fetch vtn switch inventory     openflow:1
+    BuiltIn.Wait_Until_Keyword_Succeeds    12    3    Fetch vtn switch inventory    openflow:1
 
 Check if switch2 detected
     [Documentation]    Check if openflow:2 is detected
-    BuiltIn.Wait_Until_Keyword_Succeeds    3     1    Fetch vtn switch inventory     openflow:2
+    BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:2
 
 Check if switch3 detected
     [Documentation]    Check if openflow:3 is detected
-    BuiltIn.Wait_Until_Keyword_Succeeds    3     1    Fetch vtn switch inventory     openflow:3
+    BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:3
 
 Check if switch4 detected
     [Documentation]    Check if openflow:4 is detected
-    BuiltIn.Wait_Until_Keyword_Succeeds    3     1    Fetch vtn switch inventory     openflow:4
+    BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:4
 
 Add a vtn Tenant_path
     [Documentation]    Add a vtn Tenant_path
@@ -46,7 +46,7 @@ Add a portmap for interface if1_path
 
 Add a interface If2_path
     [Documentation]    Add a interface if2_path into vBrdige vBridge1
-    Add a interface    Tenant_path    vBridge1    if2_path   {}
+    Add a interface    Tenant_path    vBridge1    if2_path    {}
 
 Add a portmap for interface if2_path
     [Documentation]    Create a portmap on Interface if2_path of vBridge1
@@ -72,7 +72,7 @@ Add a flowcondition flowcond_path
     ${matchElement}=    Create Dictionary    index=1    ethernet=${ethernet}    inetMatch=${inetMatch}
     @{matchlist}    Create List    ${matchElement}
     ${flowcond_data}=    Create Dictionary    name=flowcond_path    match=${matchlist}
-    Add a flowcondition  flowcond_path    ${flowcond_data}
+    Add a flowcondition    flowcond_path    ${flowcond_data}
 
 Add a pathmap
     [Documentation]    Create a pathmap in the vtn
@@ -122,7 +122,3 @@ Delete a flowcondition
 Delete a vtn Tenant_path
     [Documentation]    Delete a vtn Tenant_path
     Delete a vtn    Tenant_path
-
-
-
-