Update Robot Framework format - step 14 44/102344/8
authorSangwook Ha <sangwook.ha@verizon.com>
Sat, 10 Sep 2022 02:37:16 +0000 (19:37 -0700)
committerSangwook Ha <sangwook.ha@verizon.com>
Fri, 7 Oct 2022 02:12:08 +0000 (19:12 -0700)
Robotidy has stricter formatting rules for line width, alignment,
section ordering & spacing, etc.

Update the format of Robot Framework files in the following directory
with Robotidy:

- csit/suites/packetcable
- csit/suites/persistence
- csit/suites/sfc
- csit/suites/sxp

JIRA: INTTEST-132
Change-Id: I3fafc815aeda8bf74c4f12ae889102308d8b72dd
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
44 files changed:
csit/suites/packetcable/PCMM/010__pcmm_rest_call.robot
csit/suites/persistence/basic/test_app.robot
csit/suites/sfc/Full_Deploy/010__sfc_full_deploy.robot
csit/suites/sfc/Full_Deploy/011__sfc_service_paths.robot
csit/suites/sfc/Full_Deploy/012__sfc_service_paths_validation.robot
csit/suites/sfc/Full_Deploy/013__sfc_service_functions_logical.robot
csit/suites/sfc/Full_Deploy/014__sfc_service_forwarders_logical.robot
csit/suites/sfc/Full_Deploy/015__sfc_rendered_service_paths_logical.robot
csit/suites/sfc/SFC_Basic/010__sfc_service_functions.robot
csit/suites/sfc/SFC_Basic/020__sfc_service_forwarders.robot
csit/suites/sfc/SFC_Basic/030__sfc_service_nodes.robot
csit/suites/sfc/SFC_Basic/040__sfc_service_chains.robot
csit/suites/sfc/SFC_Basic/050__sfc_service_schedule_types.robot
csit/suites/sfc/SFC_Basic/060__sfc_service_paths.robot
csit/suites/sfc/SFC_Basic/070__sfc_rendered_service_paths.robot
csit/suites/sfc/SFC_Basic/080__sfc_simple_clustering.robot
csit/suites/sfc/SFC_Basic/120__sfc_service_function_acl.robot
csit/suites/sfc/SFC_Basic/140__sfc_service_function_classifier.robot
csit/suites/sfc/SFC_Persistency/020__sfc_persistency.robot
csit/suites/sxp/basic/020_Restconf_CRUD.robot
csit/suites/sxp/basic/030_Connectivity.robot
csit/suites/sxp/basic/040_Custom_Passwords.robot
csit/suites/sxp/basic/040_SSL_Passwords.robot
csit/suites/sxp/binding-origin/010_Binding_Origins_Configuration.robot
csit/suites/sxp/binding-origin/020_Binding_Origins_Checks.robot
csit/suites/sxp/cluster-binding/010_Bindings_consistency.robot
csit/suites/sxp/cluster-routing/010_Route_Switching.robot
csit/suites/sxp/cluster-routing/020_Sxp_Node_Switching.robot
csit/suites/sxp/clustering/010_Connection_switchover.robot
csit/suites/sxp/clustering/020_RPC_Redirecting.robot
csit/suites/sxp/clustering/030_RPC_functionality.robot
csit/suites/sxp/filtering/010_Inbound_Filtering.robot
csit/suites/sxp/filtering/020_Outbound_Filtering.robot
csit/suites/sxp/filtering/030_Inbound_Filtering_Discarding.robot
csit/suites/sxp/filtering/040_Peer_Sequence_filtering.robot
csit/suites/sxp/filtering/050_Domain_filtering.robot
csit/suites/sxp/filtering/100_Inbound_Filtering_Policy.robot
csit/suites/sxp/filtering/200_Outbound_Filtering_Policy.robot
csit/suites/sxp/performance/010_ConnectivityTests.robot
csit/suites/sxp/performance/020_BindingExportTests.robot
csit/suites/sxp/topology/010_Topology_Features.robot
csit/suites/sxp/topology/020_Scalability.robot
csit/suites/sxp/topology/030_Domains_Forwarding.robot
csit/suites/sxp/topology/040_Domains_Substraction.robot

index b208a3ad7aecbf96745b3ba3327578099eb28ff7..7845a7d23b3a1866a1d475e1a495223fd1c63c00 100644 (file)
@@ -1,25 +1,29 @@
 *** Settings ***
-Documentation     Checking packetcable:ccap resconf is working
-Suite Setup       Create Session And Init Variables
-Suite Teardown    Delete All Sessions
-Library           OperatingSystem
-Library           String
-Library           RequestsLibrary
-Library           ../../../libraries/Common.py
-Variables         ../../../variables/Variables.py
-Resource          ../../../libraries/PacketcableVersion.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Checking packetcable:ccap resconf is working
+
+Library             OperatingSystem
+Library             String
+Library             RequestsLibrary
+Library             ../../../libraries/Common.py
+Variables           ../../../variables/Variables.py
+Resource            ../../../libraries/PacketcableVersion.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Create Session And Init Variables
+Suite Teardown      Delete All Sessions
+
 
 *** Variables ***
-${CCAP_ID1}       93b7d8de-15fb-11e5-b60b-1697f925ec7b
-${CCAP_ID2}       dc13b3fc-15fe-11e5-b60b-1697f925ec7b
-${CCAP_IP1}       192.168.1.101
-${CCAP_IP2}       192.168.1.102
+${CCAP_ID1}     93b7d8de-15fb-11e5-b60b-1697f925ec7b
+${CCAP_ID2}     dc13b3fc-15fe-11e5-b60b-1697f925ec7b
+${CCAP_IP1}     192.168.1.101
+${CCAP_IP2}     192.168.1.102
+
 
 *** Test Cases ***
 Add CCAP
     [Documentation]    Add Single CCAP
-    [Tags]    PacketCable PCMM Reset Call
+    [Tags]    packetcable pcmm reset call
     ${Data}    OperatingSystem.Get File    ${PACKETCABLE_RESOURCE_DIR}/add_ccap.json
     ${Data}    Replace String    ${Data}    {ccapId-1}    ${CCAP_ID1}
     ${Data}    Replace String    ${Data}    {ccapIp-1}    ${CCAP_IP1}
@@ -30,21 +34,21 @@ Add CCAP
 
 Get CCAP
     [Documentation]    Get Single CCAP
-    [Tags]    PacketCable PCMM Reset Call
+    [Tags]    packetcable pcmm reset call
     log    ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
     ${resp}    RequestsLibrary.Get Request    ODLSession    ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
     Should be Equal As Strings    ${resp.status_code}    200
 
 Delete CAPP
     [Documentation]    Delete Single CCAP
-    [Tags]    PacketCable PCMM Reset Call
+    [Tags]    packetcable pcmm reset call
     log    ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
     ${resp}    RequestsLibrary.Delete Request    ODLSession    ${ODLREST_CCAPS}/${CCAP_TOKEN}/${CCAP_ID1}
     Should be Equal As Strings    ${resp.status_code}    200
 
 Add Multiple.CCAPs
     [Documentation]    Add Multiple CCAPs
-    [Tags]    PacketCable PCMM Reset Call
+    [Tags]    packetcable pcmm reset call
     ${Data}    OperatingSystem.Get File    ${PACKETCABLE_RESOURCE_DIR}/add_multi_ccaps.json
     ${Data}    Replace String    ${Data}    {ccapId-1}    ${CCAP_ID1}
     ${Data}    Replace String    ${Data}    {ccapIp-1}    ${CCAP_IP1}
@@ -56,12 +60,12 @@ Add Multiple.CCAPs
 
 Get ALL.CCAPs
     [Documentation]    Get ALL CCAPs
-    [Tags]    PacketCable PCMM Reset Call
+    [Tags]    packetcable pcmm reset call
     ${resp}    RequestsLibrary.Get Request    ODLSession    ${ODLREST_CCAPS}
     Should be Equal As Strings    ${resp.status_code}    200
 
 Delete All.CCAPs
     [Documentation]    Delete ALL CCAPs
-    [Tags]    PacketCable PCMM Reset Call
+    [Tags]    packetcable pcmm reset call
     ${resp}    RequestsLibrary.Delete Request    ODLSession    ${ODLREST_CCAPS}
     Should be Equal As Strings    ${resp.status_code}    200
index dd81fa2187827f1206837568d080b385a2ef1e63..514f7c6a0679451d939c2a57973318271a6b089f 100644 (file)
@@ -1,26 +1,30 @@
 *** Settings ***
-Documentation     Basic Tests for Persistence Test APP.
+Documentation       Basic Tests for Persistence Test APP.
 ...
-...               Copyright (c) 2015 Hewlett-Packard Development Company, L.P. and others. All rights reserved.
-Suite Setup       Setup Persistence Test App Environment
-Suite Teardown    Cleanup Persistence Test Database
-Library           SSHLibrary
-Library           Collections
-Library           ../../../libraries/UtilLibrary.py
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/Utils.robot
-Variables         ../../../variables/Variables.py
+...                 Copyright (c) 2015 Hewlett-Packard Development Company, L.P. and others. All rights reserved.
+
+Library             SSHLibrary
+Library             Collections
+Library             ../../../libraries/UtilLibrary.py
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/Utils.robot
+Variables           ../../../variables/Variables.py
+
+Suite Setup         Setup Persistence Test App Environment
+Suite Teardown      Cleanup Persistence Test Database
+
 
 *** Variables ***
-${username}       user1
-${password}       user1
-${email_addr}     user1@example.com
-${location1}      BUILDING_1_FIRST_FLOOR
-${location2}      BUILDING_2_FIRST_FLOOR
-${device1_name}    node1
-${device1_ip}     10.1.1.10
-${device2_name}    node2
-${device2_ip}     10.1.1.20
+${username}         user1
+${password}         user1
+${email_addr}       user1@example.com
+${location1}        BUILDING_1_FIRST_FLOOR
+${location2}        BUILDING_2_FIRST_FLOOR
+${device1_name}     node1
+${device1_ip}       10.1.1.10
+${device2_name}     node2
+${device2_ip}       10.1.1.20
+
 
 *** Test Cases ***
 Verify User Test App
@@ -32,7 +36,7 @@ Verify User Test App
     ...    4. Verify unknown user cannot be authenticated
     ...    5. Disable the user
     ...    6. Verify disabled user can be fetched
-    [Tags]    Persistence    TestApp
+    [Tags]    persistence    testapp
     Issue Command On Karaf Console    user:sign-up ${username} ${password} ${email_addr}
     ${output}=    Issue Command On Karaf Console    user:get-enabled
     ${string}=    Extract String To Validate    ${output}    User{username=Username{value=    0
@@ -57,12 +61,12 @@ Verify Network Device Test App
     ...    4. Verify device name
     ...    5. Configure a location
     ...    6. Verify device location
-    [Tags]    Persistence    TestApp
+    [Tags]    persistence    testapp
     Issue Command On Karaf Console    networkdevice:discover ${device1_ip}
     ${output}=    Issue Command On Karaf Console    networkdevice:get-reachable
     ${string}=    Extract String To Validate    ${output}    ipAddress=IpAddress{value=    2
     Should Match    ${string}    ${device1_ip}
-    ${device_id}    Find Device Id    ${device1_ip}
+    ${device_id}=    Find Device Id    ${device1_ip}
     Issue Command On Karaf Console    networkdevice:set-friendly-name ${device_id} ${device1_name}
     ${data}=    Find Device Name    ${device1_ip}
     Should Match    ${data}    ${device1_name}
@@ -78,10 +82,10 @@ Verify Data Persistency
     ...    3. Restart the controller
     ...    4. Verify user name, email address and state are persisted
     ...    5. Verify device name and location are persisted
-    [Tags]    Persistence    TestApp
+    [Tags]    persistence    testapp
     Issue Command On Karaf Console    user:sign-up ${username} ${password} ${email_addr}
     Issue Command On Karaf Console    networkdevice:discover ${device2_ip}
-    ${device_id}    Find Device Id    ${device2_ip}
+    ${device_id}=    Find Device Id    ${device2_ip}
     Issue Command On Karaf Console    networkdevice:set-location ${device_id} ${location2}
     Issue Command On Karaf Console    networkdevice:set-friendly-name ${device_id} ${device2_name}
     Stop One Or More Controllers    ${ODL_SYSTEM_IP}
@@ -101,22 +105,23 @@ Verify Data Persistency
     ${data}=    Find Device Location    ${device2_ip}    ${location2}
     Should Match    ${data}    ${location2}
 
+
 *** Keywords ***
 Extract String To Validate
-    [Arguments]    ${output}    ${splitter}    ${index}
     [Documentation]    Take the output of a content, the string to be splitted and the
     ...    index of the data from the output, parse the strin and return the data that includes
     ...    user's name, user's email address, device's IP address
+    [Arguments]    ${output}    ${splitter}    ${index}
     ${output}=    Split Value from String    ${output}    }
     ${string}=    Get From List    ${output}    ${index}
     ${string}=    Split Value from String    ${string}    ${splitter}
     ${string}=    Get From List    ${string}    1
-    [Return]    ${string}
+    RETURN    ${string}
 
 Find Line
-    [Arguments]    ${device_ip}
     [Documentation]    Take the output of networkdevice:get-reachable, find the line
     ...    with the give IP with the given IP address and return the line
+    [Arguments]    ${device_ip}
     ${output}=    Issue Command On Karaf Console    networkdevice:get-reachable
     ${output}=    Split To Lines    ${output}
     ${length}=    Get Length    ${output}
@@ -125,47 +130,47 @@ Find Line
         ${data}=    Fetch From Right    ${line}    ipAddress=IpAddress{value=
         ${data}=    Split String    ${data}    },
         ${data}=    Get From List    ${data}    0
-        Run Keyword If    '${data}' == '${device_ip}'    Exit For Loop
+        IF    '${data}' == '${device_ip}'            BREAK
     END
-    [Return]    ${line}
+    RETURN    ${line}
 
 Find Device Id
-    [Arguments]    ${device_ip}
     [Documentation]    Find the device ID using its IP address
+    [Arguments]    ${device_ip}
     ${line}=    Find Line    ${device_ip}
     ${id}=    Split String    ${line}    NetworkDevice{id=SerialNumber{value=
     ${id}=    Get From List    ${id}    1
     ${id}=    Fetch from Left    ${id}    }
-    [Return]    ${id}
+    RETURN    ${id}
 
 Find Device Name
-    [Arguments]    ${device_ip}
     [Documentation]    Find the device's name using its IP address
+    [Arguments]    ${device_ip}
     ${line}=    Find Line    ${device_ip}
     ${line}=    Split String    ${line}    ,
     ${line}=    Get From List    ${line}    -2
     ${name}=    Split String    ${line}    friendlyName=
     ${name}=    Get From List    ${name}    1
-    [Return]    ${name}
+    RETURN    ${name}
 
 Find Device Location
-    [Arguments]    ${device_ip}    ${location}
     [Documentation]    Find the device's location using its IP address
+    [Arguments]    ${device_ip}    ${location}
     ${line}=    Find Line    ${device_ip}
     ${line}=    Split String    ${line}    ,
     ${line}=    Get From List    ${line}    3
     ${name}=    Split String    ${line}    location=
     ${name}=    Get From List    ${name}    1
-    [Return]    ${location}
+    RETURN    ${location}
 
 Find User State
-    [Arguments]    ${output}
     [Documentation]    Find the user's state
+    [Arguments]    ${output}
     ${output}=    Split Value from String    ${output}    ,
     ${data}=    Get From List    ${output}    4
     ${data}=    Remove Space on String    ${data}
     ${data}=    Split String    ${data}    }
-    [Return]    ${data}
+    RETURN    ${data}
 
 Setup Persistence Test App Environment
     [Documentation]    Installing Persistence Related features
index 95f713e0ae033939d7692613121c0ec6f8d3ea13..02aa571b6b370435310766ef7672c06f73cbe185 100644 (file)
@@ -1,21 +1,24 @@
 *** Settings ***
-Documentation     Test suite for SFC Rendered Service Paths and Classifiers.
-Suite Setup       Init Suite
-Suite Teardown    Cleanup Suite
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           ../../../libraries/SFC/SfcUtils.py
-Resource          ../../../libraries/SFC/SfcKeywords.robot
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/SSHKeywords.robot
-Resource          ../../../libraries/TemplatedRequests.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/DataModels.robot
-Resource          ../../../libraries/SFC/DockerSfc.robot
-Resource          ../../../libraries/Utils.robot
-Variables         ../../../variables/sfc/Modules.py
+Documentation       Test suite for SFC Rendered Service Paths and Classifiers.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             ../../../libraries/SFC/SfcUtils.py
+Resource            ../../../libraries/SFC/SfcKeywords.robot
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/SSHKeywords.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/DataModels.robot
+Resource            ../../../libraries/SFC/DockerSfc.robot
+Resource            ../../../libraries/Utils.robot
+Variables           ../../../variables/sfc/Modules.py
+
+Suite Setup         Init Suite
+Suite Teardown      Cleanup Suite
+
 
 *** Test Cases ***
 Basic Environment Setup Tests
@@ -30,7 +33,10 @@ Basic Environment Setup Tests
     ${rsp_name} =    SfcKeywords.Get Rendered Service Path Name    ${SFP_NAME}
     ${rsp_rev_name} =    SfcKeywords.Get Rendered Service Path Name    ${SFP_NAME}    True
     ${mapping} =    BuiltIn.Create Dictionary    RSP1=${rsp_name}    RSP1_Reverse=${rsp_rev_name}
-    ${sf_acl_text} =    TemplatedRequests.Resolve_Text_From_Template_File    folder=${CONFIG_DIR}    file_name=${SERVICE_FUNCTION_ACLS_FILE}    mapping=${mapping}
+    ${sf_acl_text} =    TemplatedRequests.Resolve_Text_From_Template_File
+    ...    folder=${CONFIG_DIR}
+    ...    file_name=${SERVICE_FUNCTION_ACLS_FILE}
+    ...    mapping=${mapping}
     Utils.Add Elements To URI And Verify    ${SERVICE_FUNCTION_ACLS_URI}    ${sf_acl_text}
 
 Get Rendered Service Path By Name
@@ -40,39 +46,67 @@ Get Rendered Service Path By Name
     Utils.Get URI And Verify    ${OPERATIONAL_RSP_URI}/${rsp_name}
     ${rsp_rev_name} =    SfcKeywords.Get Rendered Service Path Name    ${SFP_NAME}    True
     Utils.Get URI And Verify    ${OPERATIONAL_RSP_URI}/${rsp_rev_name}
-    ${elements} =    BuiltIn.Create List    ${rsp_name}    "parent-service-function-path":"${SFP_NAME}"    "hop-number":0    "service-index":255    "hop-number":1
+    ${elements} =    BuiltIn.Create List
+    ...    ${rsp_name}
+    ...    "parent-service-function-path":"${SFP_NAME}"
+    ...    "hop-number":0
+    ...    "service-index":255
+    ...    "hop-number":1
     ...    "service-index":254
     Utils.Check For Elements At URI    ${OPERATIONAL_RSPS_URI}    ${elements}
 
 Create and Get Classifiers
     [Documentation]    Apply json file descriptions of ACLs and Classifiers. Full Deploy
     Utils.Add Elements To URI From File    ${SERVICE_CLASSIFIERS_URI}    ${SERVICE_CLASSIFIERS_FILE}
-    ${classifiers}=    BuiltIn.Create List    "service-function-classifiers"    "service-function-classifier"    "type":"ietf-access-control-list:ipv4-acl"    "scl-service-function-forwarder"
+    ${classifiers} =    BuiltIn.Create List
+    ...    "service-function-classifiers"
+    ...    "service-function-classifier"
+    ...    "type":"ietf-access-control-list:ipv4-acl"
+    ...    "scl-service-function-forwarder"
     Append To List    ${classifiers}    "name":"Classifier2"    "name":"ACL2"
     Append To List    ${classifiers}    "name":"Classifier1"    "name":"ACL1"
     Utils.Check For Elements At URI    ${SERVICE_CLASSIFIERS_URI}    ${classifiers}
     BuiltIn.Wait Until Keyword Succeeds    60s    2s    SfcKeywords.Check Classifier Flows
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Connect Create session and initialize ODL version specific variables
-    RequestsLibrary.Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+    RequestsLibrary.Create Session
+    ...    session
+    ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
+    ...    auth=${AUTH}
+    ...    headers=${HEADERS}
     SSHLibrary.Open Connection    ${TOOLS_SYSTEM_IP}    timeout=3s
     SSHKeywords.Flexible Mininet Login
     ${docker_cidr} =    DockerSfc.Get Docker Bridge Subnet
     ${docker_nw} =    SfcUtils.Get Network From Cidr    ${docker_cidr}
     ${docker_mask} =    SfcUtils.Get Mask From Cidr    ${docker_cidr}
-    ${route_to_docker_net} =    BuiltIn.Set Variable    sudo route add -net ${docker_nw} netmask ${docker_mask} gw ${TOOLS_SYSTEM_IP}
-    Utils.Run Command On Remote System    ${ODL_SYSTEM_IP}    ${route_to_docker_net}    ${ODL_SYSTEM_USER}    prompt=${ODL_SYSTEM_PROMPT}
+    ${route_to_docker_net} =    BuiltIn.Set Variable
+    ...    sudo route add -net ${docker_nw} netmask ${docker_mask} gw ${TOOLS_SYSTEM_IP}
+    Utils.Run Command On Remote System
+    ...    ${ODL_SYSTEM_IP}
+    ...    ${route_to_docker_net}
+    ...    ${ODL_SYSTEM_USER}
+    ...    prompt=${ODL_SYSTEM_PROMPT}
     SSHLibrary.Put File    ${CURDIR}/docker-ovs.sh    .    mode=0755
     SSHLibrary.Put File    ${CURDIR}/Dockerfile    .    mode=0755
     SSHLibrary.Put File    ${CURDIR}/setup-docker-image.sh    .    mode=0755
-    ${result} =    SSHLibrary.Execute Command    ./setup-docker-image.sh ${ODL_STREAM} > >(tee myFile.log) 2> >(tee myFile.log)    return_stderr=True    return_stdout=True    return_rc=True
+    ${result} =    SSHLibrary.Execute Command
+    ...    ./setup-docker-image.sh ${ODL_STREAM} > >(tee myFile.log) 2> >(tee myFile.log)
+    ...    return_stderr=True
+    ...    return_stdout=True
+    ...    return_rc=True
     BuiltIn.log    ${result}
     BuiltIn.Should be equal as integers    ${result[2]}    0
     BuiltIn.Set Suite Variable    @{INTERFACE_NAMES}    v-ovsnsn6g1    v-ovsnsn1g1
     DockerSfc.Docker Ovs Start    nodes=6    guests=1    tunnel=vxlan-gpe    odl_ip=${ODL_SYSTEM_IP}
-    BuiltIn.Wait Until Keyword Succeeds    60s    2s    Utils.Check For Elements At URI    ${OVSDB_TOPOLOGY_URI}    ${INTERFACE_NAMES}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    2s
+    ...    Utils.Check For Elements At URI
+    ...    ${OVSDB_TOPOLOGY_URI}
+    ...    ${INTERFACE_NAMES}
     ${docker_name_list} =    DockerSfc.Get Docker Names As List
     BuiltIn.Set Suite Variable    ${DOCKER_NAMES_LIST}    ${docker_name_list}
     BuiltIn.log    ${ODL_STREAM}
index b7dd9595b3b6e77b8452797cae0fcbf3bc19a914..4b41480603f9e51c25ccec71060b6f0a9992de2c 100644 (file)
@@ -1,16 +1,19 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Function Paths, Operates paths from Restconf APIs.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_FUNCTION_PATHS_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Service Function Paths, Operates paths from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_FUNCTION_PATHS_URI}
+
 
 *** Test Cases ***
 Add Service Function Paths
@@ -37,7 +40,7 @@ Delete All Service Function Paths
 Get one Service Function Path
     [Documentation]    Get one Service Function Path
     Add Elements To URI From File    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_FILE}
-    ${elements}=    Create List    SFC1-100    "service-chain-name":"SFC1"
+    ${elements}    Create List    SFC1-100    "service-chain-name":"SFC1"
     Check For Elements At URI    ${SERVICE_FUNCTION_PATH_URI}/SFC1-100    ${elements}
 
 Get A Non-existing Service Function Path
@@ -82,6 +85,7 @@ Put one Service Function
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Should Contain    ${resp.text}    SFC1-400
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Initialize session and ODL version specific variables
index 5fdc157b0d1084cb2134acee70e1af671bb8d237..6096c544e75e47c44d194f38a2f65790af1354bb 100644 (file)
@@ -1,24 +1,34 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Function Paths validation. This validation is in charge of verifying that the SF types for the SFs defined in newly added SFPs are consistent with SF types defined in the referenced SFC.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_FUNCTION_PATHS_URI}
-Test Teardown     Clean_All_URIs
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../libraries/CompareStream.robot
-Resource          ../../../libraries/TemplatedRequests.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/sfc/Variables.robot
+Documentation       Test suite for SFC Service Function Paths validation. This validation is in charge of verifying that the SF types for the SFs defined in newly added SFPs are consistent with SF types defined in the referenced SFC.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../libraries/CompareStream.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/sfc/Variables.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_FUNCTION_PATHS_URI}
+Test Teardown       Clean_All_URIs
+
 
 *** Test Cases ***
 Add Service Function Path referencing a non-existing SF
     [Documentation]    Add Service Function Paths from JSON file
-    CompareStream.Run_Keyword_If_Equals_Else    neon    Add Elements To URI From File And Check Validation Error    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
-    ...    ELSE    Add Elements To URI From File And Check Server Error    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
+    CompareStream.Run_Keyword_If_Equals_Else
+    ...    neon
+    ...    Add Elements To URI From File And Check Validation Error
+    ...    ${SERVICE_FUNCTION_PATHS_URI}
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
+    ...    ELSE
+    ...    Add Elements To URI From File And Check Server Error
+    ...    ${SERVICE_FUNCTION_PATHS_URI}
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
     ${body}    OperatingSystem.Get File    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
     ${jsonbody}    To Json    ${body}
     ${paths}    Get From Dictionary    ${jsonbody}    service-function-paths
@@ -28,8 +38,15 @@ Add Service Function Path referencing a non-existing SF
 Add Service Function Path referencing a non-existing SFC
     [Documentation]    Add Service Function Paths from JSON file
     Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
-    CompareStream.Run_Keyword_If_Equals_Else    neon    Add Elements To URI From File And Check Validation Error    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
-    ...    ELSE    Add Elements To URI From File And Check Server Error    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
+    CompareStream.Run_Keyword_If_Equals_Else
+    ...    neon
+    ...    Add Elements To URI From File And Check Validation Error
+    ...    ${SERVICE_FUNCTION_PATHS_URI}
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
+    ...    ELSE
+    ...    Add Elements To URI From File And Check Server Error
+    ...    ${SERVICE_FUNCTION_PATHS_URI}
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
     ${body}    OperatingSystem.Get File    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
     ${jsonbody}    To Json    ${body}
     ${paths}    Get From Dictionary    ${jsonbody}    service-function-paths
@@ -41,8 +58,15 @@ Add Service Function Path where SFC types size and hop sizes differ
     [Documentation]    Add Service Function Paths from JSON file
     Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
     Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE}
-    CompareStream.Run_Keyword_If_At_Least_Else    neon    Add Elements To URI From File And Check Validation Error    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
-    ...    ELSE    Add Elements To URI From File And Check Server Error    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
+    CompareStream.Run_Keyword_If_At_Least_Else
+    ...    neon
+    ...    Add Elements To URI From File And Check Validation Error
+    ...    ${SERVICE_FUNCTION_PATHS_URI}
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
+    ...    ELSE
+    ...    Add Elements To URI From File And Check Server Error
+    ...    ${SERVICE_FUNCTION_PATHS_URI}
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
     ${body}    OperatingSystem.Get File    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
     ${jsonbody}    To Json    ${body}
     ${paths}    Get From Dictionary    ${jsonbody}    service-function-paths
@@ -55,8 +79,15 @@ Add Service Function Path where SFC types size and types for SFs in hops differ
     [Documentation]    Add Service Function Paths from JSON file
     Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
     Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE}
-    CompareStream.Run_Keyword_If_At_Least_Else    neon    Add Elements To URI From File And Check Validation Error    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_WITH_THREE_HOPS_FILE}
-    ...    ELSE    Add Elements To URI From File And Check Server Error    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_WITH_THREE_HOPS_FILE}
+    CompareStream.Run_Keyword_If_At_Least_Else
+    ...    neon
+    ...    Add Elements To URI From File And Check Validation Error
+    ...    ${SERVICE_FUNCTION_PATHS_URI}
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_THREE_HOPS_FILE}
+    ...    ELSE
+    ...    Add Elements To URI From File And Check Server Error
+    ...    ${SERVICE_FUNCTION_PATHS_URI}
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_THREE_HOPS_FILE}
     ${body}    OperatingSystem.Get File    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
     ${jsonbody}    To Json    ${body}
     ${paths}    Get From Dictionary    ${jsonbody}    service-function-paths
@@ -69,7 +100,9 @@ Add Service Function Path where SFC types size and types for SFs in hops match
     [Documentation]    Add Service Function Paths from JSON file
     Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
     Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE_FW_NAPT44_DPI}
-    Add Elements To URI From File And Verify    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_WITH_THREE_HOPS_FILE}
+    Add Elements To URI From File And Verify
+    ...    ${SERVICE_FUNCTION_PATHS_URI}
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_THREE_HOPS_FILE}
     ${body}    OperatingSystem.Get File    ${SERVICE_FUNCTION_PATHS_FILE}
     ${jsonbody}    To Json    ${body}
     ${paths}    Get From Dictionary    ${jsonbody}    service-function-paths
@@ -79,6 +112,7 @@ Add Service Function Path where SFC types size and types for SFs in hops match
     ${path}    Get From Dictionary    ${result}    service-function-paths
     Lists Should be Equal    ${path}    ${paths}
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Initialize session and ODL version specific variables
@@ -87,11 +121,17 @@ Init Suite
     Set Suite Variable    ${VERSION_DIR}    master
     Set Suite Variable    ${SFC_JSON_TEST_FILES_DIR}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}
     Set Suite Variable    ${SERVICE_FUNCTION_PATHS_FILE}    ${SFC_JSON_TEST_FILES_DIR}/service-function-paths.json
-    Set Suite Variable    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}    ${SFC_JSON_TEST_FILES_DIR}/service-function-paths-with-one-hop.json
-    Set Suite Variable    ${SERVICE_FUNCTION_PATHS_WITH_THREE_HOPS_FILE}    ${SFC_JSON_TEST_FILES_DIR}/service-function-paths-with-three-hops-firewall-napt44-dpi.json
+    Set Suite Variable
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_HOP_FILE}
+    ...    ${SFC_JSON_TEST_FILES_DIR}/service-function-paths-with-one-hop.json
+    Set Suite Variable
+    ...    ${SERVICE_FUNCTION_PATHS_WITH_THREE_HOPS_FILE}
+    ...    ${SFC_JSON_TEST_FILES_DIR}/service-function-paths-with-three-hops-firewall-napt44-dpi.json
     Set Suite Variable    ${SERVICE_FUNCTIONS_FILE}    ${SFC_JSON_TEST_FILES_DIR}/service-functions.json
     Set Suite Variable    ${SERVICE_CHAINS_FILE}    ${SFC_JSON_TEST_FILES_DIR}/service-function-chains.json
-    Set Suite Variable    ${SERVICE_CHAINS_FILE_FW_NAPT44_DPI}    ${SFC_JSON_TEST_FILES_DIR}/service-function-chain-firewall-napt44-dpi.json
+    Set Suite Variable
+    ...    ${SERVICE_CHAINS_FILE_FW_NAPT44_DPI}
+    ...    ${SFC_JSON_TEST_FILES_DIR}/service-function-chain-firewall-napt44-dpi.json
 
 Clean_All_URIs
     [Documentation]    Deletes all the elements which might have been created during SFP validation tests
index 8df1e374caf1d58a805d4515ecdf79fdea7df252..30d0f2edc5c5263d3501295e1d6a9000bd69ad8b 100644 (file)
@@ -1,22 +1,26 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Functions using Logical SFF functionality, Operates functions from Restconf APIs.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_FUNCTIONS_URI}
-Test Teardown     Remove All Elements If Exist    ${SERVICE_FUNCTIONS_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Service Functions using Logical SFF functionality, Operates functions from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_FUNCTIONS_URI}
+Test Teardown       Remove All Elements If Exist    ${SERVICE_FUNCTIONS_URI}
+
 
 *** Variables ***
-${VERSION_DIR}    master
-${SERVICE_FUNCTIONS_FILE}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-functions-logicalsff.json
-${SF_DPI_URI}     ${SERVICE_FUNCTION_URI}/dpi-1/
-${SF_DPI_FILE}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/sf_dpi.json
+${VERSION_DIR}                  master
+${SERVICE_FUNCTIONS_FILE}       ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-functions-logicalsff.json
+${SF_DPI_URI}                   ${SERVICE_FUNCTION_URI}/dpi-1/
+${SF_DPI_FILE}                  ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/sf_dpi.json
+
 
 *** Test Cases ***
 Add Service Functions
@@ -44,7 +48,7 @@ Delete All Service Functions
 Get one Service Function
     [Documentation]    Get one Service Function. Logical SFF
     Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
-    ${elements}=    Create List    firewall-1    firewall
+    ${elements}    Create List    firewall-1    firewall
     Check For Elements At URI    ${SERVICE_FUNCTION_URI}/firewall-1    ${elements}
 
 Get A Non-existing Service Function
@@ -79,10 +83,11 @@ Put one Service Function
     [Documentation]    Put one Service Function. Logical SFF
     [Tags]    include
     Add Elements To URI From File    ${SF_DPI_URI}    ${SF_DPI_FILE}
-    ${elements}=    Create List    dpi-1    dpi
+    ${elements}    Create List    dpi-1    dpi
     Check For Elements At URI    ${SF_DPI_URI}    ${elements}
     Check For Elements At URI    ${SERVICE_FUNCTIONS_URI}    ${elements}
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Initialize session and ODL version specific variables .Logical SFF
index 8ebbda73148594d1a96859655801b013af8b0d0f..2550d371268550220a64ee854809857168c996be 100644 (file)
@@ -1,23 +1,27 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Function Forwarders, Operates SFFs from Restconf APIs. Logical SFF
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_FORWARDERS_URI}
-Test Teardown     Remove All Elements If Exist    ${SERVICE_FORWARDERS_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Service Function Forwarders, Operates SFFs from Restconf APIs. Logical SFF
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_FORWARDERS_URI}
+Test Teardown       Remove All Elements If Exist    ${SERVICE_FORWARDERS_URI}
+
 
 *** Variables ***
-${VERSION_DIR}    master
-${TEST_DIR}       ${CURDIR}/../../../variables/sfc/${VERSION_DIR}
-${SERVICE_FORWARDERS_FILE}    ${TEST_DIR}/service-function-forwarders-logicallsff.json
-${SFF_SFFLOG_URI}    ${SERVICE_FORWARDER_URI}/sfflogical1
-${SFF_SFFLOG_FILE}    ${TEST_DIR}/service-function-forwarder-logicallsff1.json
+${VERSION_DIR}                  master
+${TEST_DIR}                     ${CURDIR}/../../../variables/sfc/${VERSION_DIR}
+${SERVICE_FORWARDERS_FILE}      ${TEST_DIR}/service-function-forwarders-logicallsff.json
+${SFF_SFFLOG_URI}               ${SERVICE_FORWARDER_URI}/sfflogical1
+${SFF_SFFLOG_FILE}              ${TEST_DIR}/service-function-forwarder-logicallsff1.json
+
 
 *** Test Cases ***
 Put Service Function Forwarders
@@ -47,7 +51,7 @@ Get one Service Function Forwarder
     [Documentation]    Get one Service Function Forwarder. Logical SFF
     [Tags]    include
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
-    ${elements}=    Create List    sfflogical1
+    ${elements}    Create List    sfflogical1
     Check For Elements At URI    ${SFF_SFFLOG_URI}    ${elements}
 
 Delete A Service Function Forwarder
@@ -66,10 +70,11 @@ Put one Service Function Forwarder
     Add Elements To URI From File    ${SFF_SFFLOG_URI}    ${SFF_SFFLOG_FILE}
     ${resp}    RequestsLibrary.Get Request    session    ${SFF_SFFLOG_URI}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
-    ${elements}=    Create List    sfflogical1
+    ${elements}    Create List    sfflogical1
     Check For Elements At URI    ${SFF_SFFLOG_URI}    ${elements}
     Check For Elements At URI    ${SERVICE_FORWARDERS_URI}    ${elements}
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Initialize session and ODL version specific variable. Logical SFFs
index 92bbbeb5b249471afa2243fce3010dfc777ce391..5c9df2ac877ec044ff5cf4eb3b793636cc50f039 100644 (file)
@@ -1,30 +1,37 @@
 *** Settings ***
-Documentation     Test suite for SFC Rendered Service Paths. Logical SFF
-Suite Setup       Init Suite
-Suite Teardown    Delete All Elements
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../libraries/SFC/SfcKeywords.robot
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Rendered Service Paths. Logical SFF
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../libraries/SFC/SfcKeywords.robot
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Elements
+
 
 *** Variables ***
-${VERSION_DIR}    master
-${TEST_DIR}       ${CURDIR}/../../../variables/sfc/${VERSION_DIR}
-${SERVICE_FUNCTIONS_FILE}    ${TEST_DIR}/service-functions-logicalsff.json
-${SERVICE_FORWARDERS_FILE}    ${TEST_DIR}/service-function-forwarders-logicallsff.json
-${SERVICE_CHAINS_FILE}    ${TEST_DIR}/service-function-chains-logicalsff.json
-${SERVICE_FUNCTION_PATHS_FILE}    ${TEST_DIR}/service-function-paths-logicalsff.json
-${CREATE_RSP1_INPUT}    {"input":{"name": "RSP1","parent-service-function-path": "SFP1","symmetric": "true"}}
-${CREATE_RSP2_INPUT}    {"input":{"name": "RSP2","parent-service-function-path": "SFP2","symmetric": "true"}}
-${CREATE_RSP_FAILURE_INPUT}    {"input":{"name": "RSP1","parent-service-function-path": "SFP3","symmetric": "true"}}
-${DELETE_RSP1_INPUT}    {"input":{"name":"RSP1"}}
-${DELETE_RSP1_REVERSE_INPUT}    {"input":{"name":"RSP1-Reverse"}}
-${DELETE_RSP2_INPUT}    {"input":{"name":"RSP2"}}
-@{SF_NAMES}       "name":"firewall-1"    "name":"dpi-1"
+${VERSION_DIR}                      master
+${TEST_DIR}                         ${CURDIR}/../../../variables/sfc/${VERSION_DIR}
+${SERVICE_FUNCTIONS_FILE}           ${TEST_DIR}/service-functions-logicalsff.json
+${SERVICE_FORWARDERS_FILE}          ${TEST_DIR}/service-function-forwarders-logicallsff.json
+${SERVICE_CHAINS_FILE}              ${TEST_DIR}/service-function-chains-logicalsff.json
+${SERVICE_FUNCTION_PATHS_FILE}      ${TEST_DIR}/service-function-paths-logicalsff.json
+${CREATE_RSP1_INPUT}
+...                                 {"input":{"name": "RSP1","parent-service-function-path": "SFP1","symmetric": "true"}}
+${CREATE_RSP2_INPUT}
+...                                 {"input":{"name": "RSP2","parent-service-function-path": "SFP2","symmetric": "true"}}
+${CREATE_RSP_FAILURE_INPUT}
+...                                 {"input":{"name": "RSP1","parent-service-function-path": "SFP3","symmetric": "true"}}
+${DELETE_RSP1_INPUT}                {"input":{"name":"RSP1"}}
+${DELETE_RSP1_REVERSE_INPUT}        {"input":{"name":"RSP1-Reverse"}}
+${DELETE_RSP2_INPUT}                {"input":{"name":"RSP2"}}
+@{SF_NAMES}                         "name":"firewall-1"    "name":"dpi-1"
+
 
 *** Test Cases ***
 Basic Environment Setup Tests
@@ -42,7 +49,12 @@ Get Rendered Service Path By Name
     Utils.Get URI And Verify    ${OPERATIONAL_RSP_URI}/${rsp_name}
     ${rsp_name_rev} =    SfcKeywords.Get Rendered Service Path Name    ${SFP_NAME}
     Utils.Get URI And Verify    ${OPERATIONAL_RSP_URI}/${rsp_name_rev}
-    ${elements} =    Create List    "parent-service-function-path":"${SFP_NAME}"    "hop-number":0    "service-index":255    "hop-number":1    "service-index":254
+    ${elements} =    Create List
+    ...    "parent-service-function-path":"${SFP_NAME}"
+    ...    "hop-number":0
+    ...    "service-index":255
+    ...    "hop-number":1
+    ...    "service-index":254
     Utils.Check For Elements At URI    ${OPERATIONAL_RSPS_URI}    ${elements}
 
 Delete one Rendered Service Path By Name
@@ -62,22 +74,40 @@ Get Rendered Service Path Hop
     ${rsp_name} =    SfcKeywords.Get Rendered Service Path Name    ${SFP_NAME}
     ${elements} =    BuiltIn.Create List    "hop-number":0    "service-index":255    "service-function-name":"dpi-1
     Utils.Check For Elements At URI    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/0/    ${elements}
-    ${elements} =    BuiltIn.Create List    "hop-number":1    "service-index":254    "service-function-name":"firewall-1
+    ${elements} =    BuiltIn.Create List
+    ...    "hop-number":1
+    ...    "service-index":254
+    ...    "service-function-name":"firewall-1
     Utils.Check For Elements At URI    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/1/    ${elements}
-    ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/2/
+    ${resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/2/
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    404
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Create session and initialize ODL version specific variables
-    RequestsLibrary.Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+    RequestsLibrary.Create Session
+    ...    session
+    ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
+    ...    auth=${AUTH}
+    ...    headers=${HEADERS}
     BuiltIn.log    ${ODL_STREAM}
     BuiltIn.Set Suite Variable    ${SFP_NAME}    SFP1
     BuiltIn.Set Suite Variable    ${VERSION_DIR}    master
-    BuiltIn.Set Suite Variable    ${SERVICE_FUNCTIONS_FILE}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-functions-logicalsff.json
-    BuiltIn.Set Suite Variable    ${SERVICE_FORWARDERS_FILE}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-function-forwarders-logicallsff.json
-    BuiltIn.Set Suite Variable    ${SERVICE_CHAINS_FILE}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-function-chains-logicalsff.json
-    BuiltIn.Set Suite Variable    ${SERVICE_FUNCTION_PATHS_FILE}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-function-paths-logicalsff.json
+    BuiltIn.Set Suite Variable
+    ...    ${SERVICE_FUNCTIONS_FILE}
+    ...    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-functions-logicalsff.json
+    BuiltIn.Set Suite Variable
+    ...    ${SERVICE_FORWARDERS_FILE}
+    ...    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-function-forwarders-logicallsff.json
+    BuiltIn.Set Suite Variable
+    ...    ${SERVICE_CHAINS_FILE}
+    ...    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-function-chains-logicalsff.json
+    BuiltIn.Set Suite Variable
+    ...    ${SERVICE_FUNCTION_PATHS_FILE}
+    ...    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-function-paths-logicalsff.json
     BuiltIn.Set Suite Variable    @{SF_NAMES}    "name":"firewall-1"    "name":"dpi-1"
 
 Delete All Elements
index e88c9bdfda719106e90b9f7bf6080201ab4a299d..47c2a5716c1969273cb3c0fc369663418b5d4dd4 100644 (file)
@@ -1,15 +1,18 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Functions, Operates functions from Restconf APIs.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_FUNCTIONS_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Service Functions, Operates functions from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_FUNCTIONS_URI}
+
 
 *** Test Cases ***
 Add Service Functions
@@ -37,7 +40,7 @@ Delete All Service Functions
 Get one Service Function
     [Documentation]    Get one Service Function
     Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
-    ${elements}=    Create List    dpi-102-1    dpi
+    ${elements}    Create List    dpi-102-1    dpi
     Check For Elements At URI    ${SERVICE_FUNCTION_URI}/dpi-102-1    ${elements}
 
 Get A Non-existing Service Function
@@ -71,21 +74,21 @@ Delete A Non-existing Empty Service Function
 Put one Service Function
     [Documentation]    Put one Service Function
     Add Elements To URI From File    ${SF_DPI102100_URI}    ${SF_DPI102100_FILE}
-    ${elements}=    Create List    dpi-102-100    dpi
+    ${elements}    Create List    dpi-102-100    dpi
     Check For Elements At URI    ${SF_DPI102100_URI}    ${elements}
     Check For Elements At URI    ${SERVICE_FUNCTIONS_URI}    ${elements}
 
 Get Service Function DPL
     [Documentation]    Get Service Function Data Plane Locator
     Add Elements To URI From File    ${SF_DPI102100_URI}    ${SF_DPI102100_FILE}
-    ${elements}=    Create List    100    10100
+    ${elements}    Create List    100    10100
     Check For Elements At URI    ${SF_DPI102100_URI}/sf-data-plane-locator/dpl-100    ${elements}
 
 Put Service Function DPL
     [Documentation]    Put Service Function Data Plane Locator
     Add Elements To URI From File    ${SF_DPI102100_URI}    ${SF_DPI102100_FILE}
     Add Elements To URI From File    ${SF_DPI102100_URI}/sf-data-plane-locator/dpl-101    ${SF_DPL101_FILE}
-    ${elements}=    Create List    dpl-101    10101
+    ${elements}    Create List    dpl-101    10101
     Check For Elements At URI    ${SF_DPI102100_URI}/sf-data-plane-locator/dpl-101    ${elements}
     Check For Elements At URI    ${SF_DPI102100_URI}    ${elements}
 
@@ -96,7 +99,7 @@ Put Service Function DPL to a Non-existing Service Function
     ${resp}    RequestsLibrary.Get Request    session    ${SERVICE_FUNCTIONS_URI}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Should Contain    ${resp.text}    dpi-102-100
-    ${elements}=    Create List    dpl-101    10101
+    ${elements}    Create List    dpl-101    10101
     Check For Elements At URI    ${SF_DPI102100_URI}/sf-data-plane-locator/dpl-101    ${elements}
     Check For Elements At URI    ${SF_DPI102100_URI}    ${elements}
 
@@ -108,6 +111,7 @@ Delete Service Function DPL
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Should Not Contain    ${resp.text}    dpl-100
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Initialize session and ODL version specific variables
index e66db8186452c449d75947289fb757def8730058..0570d95f767deaf2784077d2aa0692b1c9c20a08 100644 (file)
@@ -1,15 +1,18 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Function Forwarders, Operates SFFs from Restconf APIs.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_FORWARDERS_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Service Function Forwarders, Operates SFFs from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_FORWARDERS_URI}
+
 
 *** Test Cases ***
 Put Service Function Forwarders
@@ -36,7 +39,7 @@ Delete All Service Function Forwarders
 Get one Service Function Forwarder
     [Documentation]    Get one Service Function Forwarder
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
-    ${elements}=    Create List    SFF-bootstrap    service-locator:vxlan-gpe    SF1
+    ${elements}    Create List    SFF-bootstrap    service-locator:vxlan-gpe    SF1
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}    ${elements}
 
 Get A Non-existing Service Function Forwarder
@@ -76,21 +79,21 @@ Put one Service Function Forwarder
     Add Elements To URI From File    ${SFF_OVS100_URI}    ${SFF_OVS100_FILE}
     ${resp}    RequestsLibrary.Get Request    session    ${SFF_OVS100_URI}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
-    ${elements}=    Create List    ovs-100    SF7
+    ${elements}    Create List    ovs-100    SF7
     Check For Elements At URI    ${SFF_OVS100_URI}    ${elements}
     Check For Elements At URI    ${SERVICE_FORWARDERS_URI}    ${elements}
 
 Get Service Function Forwarder DPL
     [Documentation]    Get Service Function Data Plane Locator
     Add Elements To URI From File    ${SFF_OVS100_URI}    ${SFF_OVS100_FILE}
-    ${elements}=    Create List    eth0    service-locator:vxlan-gpe
+    ${elements}    Create List    eth0    service-locator:vxlan-gpe
     Check For Elements At URI    ${SFF_OVS100_URI}/sff-data-plane-locator/eth0    ${elements}
 
 Put Service Function Forwarder DPL
     [Documentation]    Put Service Function Forwarder Data Plane Locator
     Add Elements To URI From File    ${SFF_OVS100_URI}    ${SFF_OVS100_FILE}
     Add Elements To URI From File    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101    ${SFF_DPL101_FILE}
-    ${elements}=    Create List    dpl-101    6101
+    ${elements}    Create List    dpl-101    6101
     Check For Elements At URI    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101    ${elements}
     Check For Elements At URI    ${SFF_OVS100_URI}    ${elements}
 
@@ -100,7 +103,7 @@ Put DPL to a Non-existing Service Function Forwarder
     ${resp}    RequestsLibrary.Get Request    session    ${SERVICE_FORWARDERS_URI}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Should Contain    ${resp.text}    ovs-100
-    ${elements}=    Create List    dpl-101    6101
+    ${elements}    Create List    dpl-101    6101
     Check For Elements At URI    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101    ${elements}
     Check For Elements At URI    ${SFF_OVS100_URI}    ${elements}
 
@@ -115,17 +118,19 @@ Delete Service Function Forwarder DPL
 Get Service Function Forwarder DPL's Locator
     [Documentation]    Get Service Function Data Plane Locator
     Add Elements To URI From File    ${SFF_OVS100_URI}    ${SFF_OVS100_FILE}
-    ${elements}=    Create List    6000    service-locator:vxlan-gpe
+    ${elements}    Create List    6000    service-locator:vxlan-gpe
     Check For Elements At URI    ${SFF_OVS100_URI}/sff-data-plane-locator/eth0/data-plane-locator/    ${elements}
 
 Put Service Function Forwarder DPL's Locator
     [Documentation]    Put Service Function Forwarder Data Plane Locator
     Add Elements To URI From File    ${SFF_OVS100_URI}    ${SFF_OVS100_FILE}
     Add Elements To URI From File    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101    ${SFF_DPL101_FILE}
-    Add Elements To URI From File    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101/data-plane-locator/    ${SFF_DPL_LOCATOR_FILE}
-    ${elements}=    Create List    5000    service-locator:vxlan-gpe
+    Add Elements To URI From File
+    ...    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101/data-plane-locator/
+    ...    ${SFF_DPL_LOCATOR_FILE}
+    ${elements}    Create List    5000    service-locator:vxlan-gpe
     Check For Elements At URI    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101/data-plane-locator    ${elements}
-    ${elements}=    Create List    dpl-101    5000    service-locator:vxlan-gpe
+    ${elements}    Create List    dpl-101    5000    service-locator:vxlan-gpe
     Check For Elements At URI    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101    ${elements}
     Check For Elements At URI    ${SFF_OVS100_URI}    ${elements}
 
@@ -134,7 +139,9 @@ Delete Service Function Forwarder DPL's Locator
     [Tags]    exclude
     Add Elements To URI From File    ${SFF_OVS100_URI}    ${SFF_OVS100_FILE}
     Add Elements To URI From File    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101    ${SFF_DPL101_FILE}
-    Add Elements To URI From File    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101/data-plane-locator    ${SFF_DPL_LOCATOR_FILE}
+    Add Elements To URI From File
+    ...    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101/data-plane-locator
+    ...    ${SFF_DPL_LOCATOR_FILE}
     Remove All Elements At URI    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101/data-plane-locator
     ${resp}    RequestsLibrary.Get Request    session    ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
@@ -149,7 +156,7 @@ Delete Service Function Forwarder DPL's Locator
 Get Service Function Dictionary From SFF
     [Documentation]    Get Service Function Dictionary From SFF
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
-    ${elements}=    Create List    service-function-dictionary    SF1    SF1-DPL    eth0
+    ${elements}    Create List    service-function-dictionary    SF1    SF1-DPL    eth0
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}    ${elements}
 
 Delete Service Function Dictionary From SFF
@@ -169,40 +176,48 @@ Put Service Function Dictionary to SFF
     [Documentation]    Put Service Function Dictionary to SFF
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
     Add Elements To URI From File    ${SFF_BOOTSTRAP_URI}/service-function-dictionary/SF100    ${SFF_SFD_SF100_FILE}
-    ${elements}=    Create List    SF100    SF2-DPL    eth0
+    ${elements}    Create List    SF100    SF2-DPL    eth0
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}/service-function-dictionary/SF100    ${elements}
-    ${elements}=    create list    service-function-dictionary    SF100    SF2-DPL    eth0
+    ${elements}    create list    service-function-dictionary    SF100    SF2-DPL    eth0
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}    ${elements}
 
 Get Service Function Dictionary's DPL From SFF
     [Documentation]    Get Service Function Dictionary From SFF
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
-    ${elements}=    create list    sff-sf-data-plane-locator    SF1-DPL    eth0
+    ${elements}    create list    sff-sf-data-plane-locator    SF1-DPL    eth0
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}/sff-sf-data-plane-locator/    ${elements}
 
 Delete Service Function Dictionary's DPL From SFF
     [Documentation]    Delete Service Function Dictionary From SFF
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
-    ${resp}    RequestsLibrary.Get Request    session    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}/sff-sf-data-plane-locator
+    ${resp}    RequestsLibrary.Get Request
+    ...    session
+    ...    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}/sff-sf-data-plane-locator
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Remove All Elements At URI    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}/sff-sf-data-plane-locator
-    ${resp}    RequestsLibrary.Get Request    session    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}/sff-sf-data-plane-locator
+    ${resp}    RequestsLibrary.Get Request
+    ...    session
+    ...    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}/sff-sf-data-plane-locator
     Should Be Equal As Strings    ${resp.status_code}    404
 
 Put DPL of Service Function Dictionary to SFF
     [Documentation]    Put DPL of Service Function Dictionary to SFF
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
-    Add Elements To URI From File    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}/sff-sf-data-plane-locator    ${SFF_SFD_LOCATOR_FILE}
-    ${elements}=    create list    sff-sf-data-plane-locator    SF2-DPL    eth0
+    Add Elements To URI From File
+    ...    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}/sff-sf-data-plane-locator
+    ...    ${SFF_SFD_LOCATOR_FILE}
+    ${elements}    create list    sff-sf-data-plane-locator    SF2-DPL    eth0
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}/sff-sf-data-plane-locator    ${elements}
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}/${SF_DICT_SF1_URI}    ${elements}
 
 Get Connected SFF Dictionary From SFF
     [Documentation]    Get Connected SFF Dictionary Dictionary From SFF
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
-    ${elements}=    create list    connected-sff-dictionary    br-int-ovs-2    sff-sff-data-plane-locator
+    ${elements}    create list    connected-sff-dictionary    br-int-ovs-2    sff-sff-data-plane-locator
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2    ${elements}
-    ${resp}    RequestsLibrary.Get Request    session    ${SERVICE_FORWARDER_URI}/br-int-ovs-2/connected-sff-dictionary/SFF-bootstrap
+    ${resp}    RequestsLibrary.Get Request
+    ...    session
+    ...    ${SERVICE_FORWARDER_URI}/br-int-ovs-2/connected-sff-dictionary/SFF-bootstrap
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Should Contain    ${resp.text}    SFF-bootstrap
 
@@ -222,24 +237,31 @@ Put Connected SFF Dictionary to SFF
     [Documentation]    Put Connected SFF Dictionary to SFF
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
     Add Elements To URI From File    ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/SFF100    ${SFF_CSD_SFF100_FILE}
-    ${elements}=    create list    SFF100    service-function-forwarder:open
+    ${elements}    create list    SFF100    service-function-forwarder:open
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/SFF100    ${elements}
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}    ${elements}
 
 Get Connected SFF Dictionary's DPL From SFF
     [Documentation]    Get Connected SFF Dictionary's DPL From SFF
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
-    ${elements}=    create list    sff-sff-data-plane-locator    5000    192.168.1.2
-    Check For Elements At URI    ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2/sff-sff-data-plane-locator    ${elements}
+    ${elements}    create list    sff-sff-data-plane-locator    5000    192.168.1.2
+    Check For Elements At URI
+    ...    ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2/sff-sff-data-plane-locator
+    ...    ${elements}
 
 Put DPL of Connected SFF Dictionary to SFF
     [Documentation]    Put DPL of Connected SFF Dictionary to SFF
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
-    Add Elements To URI From File    ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2/sff-sff-data-plane-locator    ${SFF_CSD_LOCATOR_FILE}
-    ${elements}=    create list    sff-sff-data-plane-locator    6000    10.1.1.1
-    Check For Elements At URI    ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2/sff-sff-data-plane-locator    ${elements}
+    Add Elements To URI From File
+    ...    ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2/sff-sff-data-plane-locator
+    ...    ${SFF_CSD_LOCATOR_FILE}
+    ${elements}    create list    sff-sff-data-plane-locator    6000    10.1.1.1
+    Check For Elements At URI
+    ...    ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2/sff-sff-data-plane-locator
+    ...    ${elements}
     Check For Elements At URI    ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2    ${elements}
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Initialize session and ODL version specific variables
index cfefb342741e392d65cce6dc0b0cdb53b7c6ef6f..c9776d52bc922da78cc4f92eccbce81df519915a 100644 (file)
@@ -1,15 +1,18 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Nodes, Operates Nodes from Restconf APIs.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_NODES_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Service Nodes, Operates Nodes from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_NODES_URI}
+
 
 *** Test Cases ***
 Put Service Nodes
@@ -36,7 +39,7 @@ Delete All Service Nodes
 Get one Service Node
     [Documentation]    Get one Service Node
     Add Elements To URI From File    ${SERVICE_NODES_URI}    ${SERVICE_NODES_FILE}
-    ${elements}=    Create List    node-101    firewall-101-2    10.3.1.101
+    ${elements}    Create List    node-101    firewall-101-2    10.3.1.101
     Check For Elements At URI    ${SERVICE_NODE_URI}/node-101    ${elements}
 
 Get A Non-existing Service Node
@@ -70,10 +73,11 @@ Delete A Non-existing Service Node
 Put one Service Node
     [Documentation]    Put one Service Node
     Add Elements To URI From File    ${SN_NODE100_URI}    ${SN_NODE100_FILE}
-    ${elements}=    Create List    node-100    10.3.1.100    dpi-100-1    firewall-102-1
+    ${elements}    Create List    node-100    10.3.1.100    dpi-100-1    firewall-102-1
     Check For Elements At URI    ${SN_NODE100_URI}    ${elements}
     Check For Elements At URI    ${SERVICE_NODES_URI}    ${elements}
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Initialize session and ODL version specific variables
index c510d9239946c5801624b0d0c9d740d8050cfcf5..b73793285a4c49c3a35b5c5746bb3cf748e49612 100644 (file)
@@ -1,15 +1,18 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Function Chains, Operates Chains from Restconf APIs.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_CHAINS_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Service Function Chains, Operates Chains from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_CHAINS_URI}
+
 
 *** Test Cases ***
 Put Service Function Chains
@@ -36,7 +39,7 @@ Delete All Service Function Chains
 Get one Service Function Chain
     [Documentation]    Get one Service Function Chain
     Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE}
-    ${elements}=    Create List    SFC1    dpi-abstract1    napt44-abstract1    firewall-abstract1
+    ${elements}    Create List    SFC1    dpi-abstract1    napt44-abstract1    firewall-abstract1
     Check For Elements At URI    ${SERVICE_CHAIN_URI}/SFC1    ${elements}
 
 Get A Non-existing Service Function Chain
@@ -51,7 +54,7 @@ Delete A Service Function Chain
     ${resp}    RequestsLibrary.Get Request    session    ${SERVICE_CHAIN_URI}/SFC1
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Remove All Elements At URI    ${SERVICE_CHAIN_URI}/SFC1
-    ${elements}=    Create List    SFC1    dpi-abstract1    napt44-abstract1    firewall-abstract1
+    ${elements}    Create List    SFC1    dpi-abstract1    napt44-abstract1    firewall-abstract1
     Check For Elements Not At URI    ${SERVICE_CHAINS_URI}    ${elements}
 
 Delete A Non-existing Service Function Chain
@@ -71,20 +74,22 @@ Delete A Non-existing Service Function Chain
 Put one Service Function Chain
     [Documentation]    Put one Service Function Chain
     Add Elements To URI From File    ${SERVICE_CHAIN100_URI}    ${SERVICE_CHAIN100_FILE}
-    ${elements}=    Create List    SFC100    dpi-abstract100    napt44-abstract100    firewall-abstract100
+    ${elements}    Create List    SFC100    dpi-abstract100    napt44-abstract100    firewall-abstract100
     Check For Elements At URI    ${SERVICE_CHAIN100_URI}    ${elements}
     Check For Elements At URI    ${SERVICE_CHAINS_URI}    ${elements}
 
 Get one Service Function From Chain
     [Documentation]    Get one Service Function From Chain
     Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE}
-    ${elements}=    Create List    dpi-abstract1    "order":0    "type":"dpi"
+    ${elements}    Create List    dpi-abstract1    "order":0    "type":"dpi"
     Check For Elements At URI    ${SERVICE_CHAIN_URI}/SFC1/sfc-service-function/dpi-abstract1    ${elements}
 
 Get A Non-existing Service Function From Chain
     [Documentation]    Get A Non-existing Service Function From Chain
     Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE}
-    ${resp}    RequestsLibrary.Get Request    session    ${SERVICE_CHAIN_URI}/SFC1/sfc-service-function/non-existing-sft
+    ${resp}    RequestsLibrary.Get Request
+    ...    session
+    ...    ${SERVICE_CHAIN_URI}/SFC1/sfc-service-function/non-existing-sft
     Should Be Equal As Strings    ${resp.status_code}    404
 
 Delete A Service Function From Chain
@@ -94,15 +99,17 @@ Delete A Service Function From Chain
     ${resp}    RequestsLibrary.Get Request    session    ${SERVICE_CHAINS_URI}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Should Contain    ${resp.text}    SFC1
-    ${elements}=    Create List    dpi-abstract1    service-function-type:dpi
+    ${elements}    Create List    dpi-abstract1    service-function-type:dpi
     Check For Elements Not At URI    ${SERVICE_CHAIN_URI}/SFC1    ${elements}
 
 Delete A Non-existing Service Function From Chain
     [Documentation]    Delete A Non existing Service Function From Chain
     Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE}
-    ${resp}    RequestsLibrary.Delete Request    session    ${SERVICE_CHAIN_URI}/SFC1/sfc-service-function/non-existing-sft
+    ${resp}    RequestsLibrary.Delete Request
+    ...    session
+    ...    ${SERVICE_CHAIN_URI}/SFC1/sfc-service-function/non-existing-sft
     Should Be Equal As Strings    ${resp.status_code}    404
-    ${elements}=    Create List    dpi-abstract1    napt44-abstract1    firewall-abstract1
+    ${elements}    Create List    dpi-abstract1    napt44-abstract1    firewall-abstract1
     Check For Elements At URI    ${SERVICE_CHAIN_URI}/SFC1    ${elements}
     Check For Elements At URI    ${SERVICE_CHAINS_URI}    ${elements}
 
@@ -110,11 +117,12 @@ Put one Service Function into Chain
     [Documentation]    Put one Service Function Chain
     Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE}
     Add Elements To URI From File    ${SERVICE_CHAIN100_SFIDS_URI}    ${SERVICE_CHAIN100_SFIDS_FILE}
-    ${elements}=    Create List    ids-abstract100    "order":3    "type":"ids"
+    ${elements}    Create List    ids-abstract100    "order":3    "type":"ids"
     Check For Elements At URI    ${SERVICE_CHAIN100_SFIDS_URI}    ${elements}
     Check For Elements At URI    ${SERVICE_CHAIN100_URI}    ${elements}
     Check For Elements At URI    ${SERVICE_CHAINS_URI}    ${elements}
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Initialize session and ODL version specific variables
index 79036c8120b3be3808d5426a9e2ad82042e187ff..05cc04411e35c8275ff2c5c6aaeb6a331fe661c3 100644 (file)
@@ -1,15 +1,18 @@
 *** Settings ***
-Documentation     Test suite for SFC Function Schedule Algorithm Types, Operates types from Restconf APIs.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_SCHED_TYPES_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Function Schedule Algorithm Types, Operates types from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_SCHED_TYPES_URI}
+
 
 *** Test Cases ***
 Add Service Function Schedule Algorithm Types
@@ -36,7 +39,7 @@ Delete All Service Function Schedule Algorithm Types
 Get Ramdom Schedule Algorithm Type
     [Documentation]    Get Ramdom Schedule Algorithm Type
     Add Elements To URI From File    ${SERVICE_SCHED_TYPES_URI}    ${SERVICE_SCHED_TYPES_FILE}
-    ${elements}=    Create List    random    "enabled":false    service-function-scheduler-type:random
+    ${elements}    Create List    random    "enabled":false    service-function-scheduler-type:random
     Check For Elements At URI    ${SERVICE_RANDOM_SCHED_TYPE_URI}    ${elements}
     ${resp}    RequestsLibrary.Get Request    session    ${SERVICE_RANDOM_SCHED_TYPE_URI}
 
@@ -50,7 +53,7 @@ Delete Ramdom Schedule Algorithm Type
     [Documentation]    Delete Ramdom Schedule Algorithm Type
     Add Elements To URI From File    ${SERVICE_SCHED_TYPES_URI}    ${SERVICE_SCHED_TYPES_FILE}
     Remove All Elements At URI    ${SERVICE_RANDOM_SCHED_TYPE_URI}
-    ${elements}=    Create List    random    service-function-scheduler-type:random
+    ${elements}    Create List    random    service-function-scheduler-type:random
     Check For Elements Not At URI    ${SERVICE_SCHED_TYPES_URI}    ${elements}
 
 Delete A Non-existing Service Function Schedule Algorithm Type
@@ -70,10 +73,11 @@ Delete A Non-existing Service Function Schedule Algorithm Type
 Put one Service Function Schedule Algorithm Type
     [Documentation]    Put one Service Function Schedule Algorithm Type
     Add Elements To URI From File    ${SERVICE_WSP_SCHED_TYPE_URI}    ${SERVICE_WSP_SCHED_TYPE_FILE}
-    ${elements}=    Create List    weighted-shortest-path    service-function-scheduler-type:weighted-shortest-path
+    ${elements}    Create List    weighted-shortest-path    service-function-scheduler-type:weighted-shortest-path
     Check For Elements At URI    ${SERVICE_WSP_SCHED_TYPE_URI}    ${elements}
     Check For Elements At URI    ${SERVICE_SCHED_TYPES_URI}    ${elements}
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Initialize session and ODL version specific variables
index ebb8639f95208e38b9f6243ca7dd343b90118863..00efccb69d6524e1a9d8c51ab316b9fd76589835 100644 (file)
@@ -1,15 +1,18 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Function Paths, Operates paths from Restconf APIs.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_FUNCTION_PATHS_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Service Function Paths, Operates paths from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_FUNCTION_PATHS_URI}
+
 
 *** Test Cases ***
 Add Service Function Paths
@@ -36,7 +39,7 @@ Delete All Service Function Paths
 Get one Service Function Path
     [Documentation]    Get one Service Function Path
     Add Elements To URI From File    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_FILE}
-    ${elements}=    Create List    SFC1-100    "service-chain-name":"SFC1"
+    ${elements}    Create List    SFC1-100    "service-chain-name":"SFC1"
     Check For Elements At URI    ${SERVICE_FUNCTION_PATH_URI}/SFC1-100    ${elements}
 
 Get A Non-existing Service Function Path
@@ -81,6 +84,7 @@ Put One Service Function Path
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Should Contain    ${resp.text}    SFC1-400
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Initialize session and ODL version specific variables
index a3266c5b90575e045ba97056912ce8de78e022d9..d6a4b9f2202e21836a79ba3515f65a390acfd90e 100644 (file)
@@ -1,15 +1,18 @@
 *** Settings ***
-Documentation     Test suite for SFC Rendered Service Paths, Operates functions from Restconf APIs.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/SFC/SfcKeywords.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
+Documentation       Test suite for SFC Rendered Service Paths, Operates functions from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/SFC/SfcKeywords.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+
 
 *** Test Cases ***
 Basic Environment Setup Tests
@@ -17,7 +20,11 @@ Basic Environment Setup Tests
     Utils.Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
     Utils.Add Elements To URI From File    ${SERVICE_NODES_URI}    ${SERVICE_NODES_FILE}
     Utils.Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
-    BuiltIn.Wait Until Keyword Succeeds    60s    2s    SfcKeywords.Check Service Function Types Added    ${SERVICE_FUNCTION_NAMES}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    2s
+    ...    SfcKeywords.Check Service Function Types Added
+    ...    ${SERVICE_FUNCTION_NAMES}
     Utils.Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE}
     # Creates SFPs: SFC1-100, SFC1-200, SFC1-300, SFC2-100, and SFC2-200
     SfcKeywords.Create Sfp And Wait For Rsp Creation    ${SERVICE_FUNCTION_PATHS_FILE}
@@ -29,16 +36,27 @@ Get Rendered Service Path By Name
     ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSP_URI}/${rsp_name}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     # The RSP should not be symetric, so only 1 should be created for the SFP
-    Utils.Check For Specific Number Of Elements At URI    ${SERVICE_FUNCTION_PATH_STATE_URI}/${sfp_name}    "sfp-rendered-service-path"    1
-    ${elements} =    BuiltIn.Create List    "parent-service-function-path":"SFC1-100"    "hop-number":0    "service-index":255    "hop-number":1    "service-index":254
-    ...    "hop-number":2    "service-index":253
+    Utils.Check For Specific Number Of Elements At URI
+    ...    ${SERVICE_FUNCTION_PATH_STATE_URI}/${sfp_name}
+    ...    "sfp-rendered-service-path"
+    ...    1
+    ${elements} =    BuiltIn.Create List
+    ...    "parent-service-function-path":"SFC1-100"
+    ...    "hop-number":0
+    ...    "service-index":255
+    ...    "hop-number":1
+    ...    "service-index":254
+    ...    "hop-number":2
+    ...    "service-index":253
     Utils.Check For Elements At URI    ${OPERATIONAL_RSPS_URI}    ${elements}
 
 Get Rendered Service Path Hop
     [Documentation]    Check Rendered Service Path Hops Created in "Basic Environment Setup Tests"
     ${sfp_name} =    BuiltIn.Set Variable    SFC1-100
     ${rsp_name} =    SfcKeywords.Get Rendered Service Path Name    ${sfp_name}
-    ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/0/
+    ${resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/0/
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${elements} =    BuiltIn.Create List    "hop-number":0    "service-index":255    "service-function-name":"dpi
     Utils.Check For Elements At URI    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/0/    ${elements}
@@ -46,7 +64,9 @@ Get Rendered Service Path Hop
     Utils.Check For Elements At URI    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/1/    ${elements}
     ${elements} =    BuiltIn.Create List    "hop-number":2    "service-index":253    "service-function-name":"firewall
     Utils.Check For Elements At URI    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/2/    ${elements}
-    ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/3/
+    ${resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${OPERATIONAL_RSP_URI}/${rsp_name}/rendered-service-path-hop/3/
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    404
 
 Delete one Rendered Service Path By Name
@@ -79,7 +99,9 @@ Generate RSPs with Round Robin Schedule Algorithm type
     [Documentation]    Generate RSPs with Round Robin Schedule Algorithm type
     [Tags]    exclude
     Utils.Remove All Elements At URI    ${SERVICE_SCHED_TYPES_URI}
-    Utils.Add Elements To URI From File    ${SERVICE_ROUNDROBIN_SCHED_TYPE_URI}    ${SERVICE_ROUNDROBIN_SCHED_TYPE_FILE}
+    Utils.Add Elements To URI From File
+    ...    ${SERVICE_ROUNDROBIN_SCHED_TYPE_URI}
+    ...    ${SERVICE_ROUNDROBIN_SCHED_TYPE_FILE}
     SfcKeywords.Delete All Sfps And Wait For Rsps Deletion
     # Create the SFPs which will create the RSPs with the Random scheduler
     SfcKeywords.Create Sfp And Wait For Rsp Creation    ${SERVICE_FUNCTION_PATHS_FILE}
@@ -88,21 +110,36 @@ Generate RSPs with Round Robin Schedule Algorithm type
     ${rsp3_name} =    SfcKeywords.Get Rendered Service Path Name    SFC1-300
     ${rsp4_name} =    SfcKeywords.Get Rendered Service Path Name    SFC2-100
     ${rsp5_name} =    SfcKeywords.Get Rendered Service Path Name    SFC2-200
-    ${path1_hop0} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
-    ${path1_hop1} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
-    ${path1_hop2} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
-    ${path2_hop0} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
-    ${path2_hop1} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
-    ${path2_hop2} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
-    ${path3_hop0} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
-    ${path3_hop1} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
-    ${path3_hop2} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
-    ${path4_hop0} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
-    ${path4_hop1} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
-    ${path4_hop2} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
-    ${path5_hop0} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
-    ${path5_hop1} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
-    ${path5_hop2} =    SfcKeywords.Get JSON Elements From URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
+    ${path1_hop0} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
+    ${path1_hop1} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
+    ${path1_hop2} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
+    ${path2_hop0} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
+    ${path2_hop1} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
+    ${path2_hop2} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
+    ${path3_hop0} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
+    ${path3_hop1} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
+    ${path3_hop2} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
+    ${path4_hop0} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
+    ${path4_hop1} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
+    ${path4_hop2} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
+    ${path5_hop0} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
+    ${path5_hop1} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
+    ${path5_hop2} =    SfcKeywords.Get JSON Elements From URI
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
     BuiltIn.Should Be Equal    ${path1_hop0}    ${path4_hop0}
     BuiltIn.Should Not Be Equal    ${path1_hop0}    ${path2_hop0}
     BuiltIn.Should Be Equal    ${path1_hop1}    ${path4_hop1}
@@ -125,7 +162,9 @@ Generate RSPs with Round Robin Schedule Algorithm type
 Generate RSPs with Shortest Path Schedule Algorithm type
     [Documentation]    Generate RSPs with Shortest Path Schedule Algorithm type Through RESTConf APIs
     Utils.Remove All Elements At URI    ${SERVICE_SCHED_TYPES_URI}
-    Utils.Add Elements To URI From File    ${SERVICE_SHORTESTPATH_SCHED_TYPE_URI}    ${SERVICE_SHORTESTPATH_SCHED_TYPE_FILE}
+    Utils.Add Elements To URI From File
+    ...    ${SERVICE_SHORTESTPATH_SCHED_TYPE_URI}
+    ...    ${SERVICE_SHORTESTPATH_SCHED_TYPE_FILE}
     SfcKeywords.Delete All Sfps And Wait For Rsps Deletion
     # Create the SFPs which will create the RSPs with the Random scheduler
     SfcKeywords.Create Sfp And Wait For Rsp Creation    ${SERVICE_FUNCTION_PATHS_FILE}
@@ -140,25 +179,37 @@ Generate RSPs with Shortest Path Schedule Algorithm type
     Utils.Check For Elements At URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/    ${elements}
     ${elements} =    BuiltIn.Create List    "hop-number":2    "service-index":253    "service-function-name":"firewall
     Utils.Check For Elements At URI    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/    ${elements}
-    ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
+    ${resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${temp_vars} =    BuiltIn.Set Variable    ['rendered-service-path-hop'][0]['service-function-forwarder']
     ${fwd_hop1} =    Utils.Extract Value From Content    ${resp.content}    ${temp_vars}
-    ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
+    ${resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop2} =    Utils.Extract Value From Content    ${resp.content}    ${temp_vars}
-    ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
+    ${resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop3} =    Utils.Extract Value From Content    ${resp.content}    ${temp_vars}
     BuiltIn.Should Be Equal    ${fwd_hop1}    ${fwd_hop2}
     BuiltIn.Should Be Equal    ${fwd_hop2}    ${fwd_hop3}
-    ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSP_URI}/${rsp2_name}/rendered-service-path-hop/0/
+    ${resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${OPERATIONAL_RSP_URI}/${rsp2_name}/rendered-service-path-hop/0/
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop1} =    Utils.Extract Value From Content    ${resp.content}    ${temp_vars}
-    ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSP_URI}/${rsp2_name}/rendered-service-path-hop/1/
+    ${resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${OPERATIONAL_RSP_URI}/${rsp2_name}/rendered-service-path-hop/1/
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop2} =    Utils.Extract Value From Content    ${resp.content}    ${temp_vars}
-    ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSP_URI}/${rsp2_name}/rendered-service-path-hop/2/
+    ${resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${OPERATIONAL_RSP_URI}/${rsp2_name}/rendered-service-path-hop/2/
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop3} =    Utils.Extract Value From Content    ${resp.content}    ${temp_vars}
     BuiltIn.Should Be Equal    ${fwd_hop1}    ${fwd_hop2}
@@ -167,7 +218,11 @@ Generate RSPs with Shortest Path Schedule Algorithm type
 Clean Datastore After Tests
     [Documentation]    Clean All Items In Datastore After Tests
     Utils.Remove All Elements At URI    ${SERVICE_FUNCTIONS_URI}
-    BuiltIn.Wait Until Keyword Succeeds    60s    2s    SfcKeywords.Check Service Function Types Removed    ${SERVICE_FUNCTION_NAMES}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    2s
+    ...    SfcKeywords.Check Service Function Types Removed
+    ...    ${SERVICE_FUNCTION_NAMES}
     Utils.Remove All Elements At URI    ${SERVICE_FORWARDERS_URI}
     Utils.Remove All Elements At URI    ${SERVICE_NODES_URI}
     Utils.Remove All Elements At URI    ${SERVICE_CHAINS_URI}
@@ -175,21 +230,41 @@ Clean Datastore After Tests
     Utils.Remove All Elements If Exist    ${SERVICE_FUNCTION_PATHS_URI}
     BuiltIn.Wait Until Keyword Succeeds    60s    2s    SfcKeywords.Check Empty Service Function Paths State
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Create session and initialize ODL version specific variables
-    RequestsLibrary.Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+    RequestsLibrary.Create Session
+    ...    session
+    ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
+    ...    auth=${AUTH}
+    ...    headers=${HEADERS}
     BuiltIn.log    ${ODL_STREAM}
     BuiltIn.Set Suite Variable    ${VERSION_DIR}    master
     BuiltIn.Set Suite Variable    ${TEST_DIR}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}
     BuiltIn.Set Suite Variable    ${SERVICE_FUNCTIONS_FILE}    ${TEST_DIR}/service-functions.json
-    BuiltIn.Set Suite Variable    @{SERVICE_FUNCTION_NAMES}    "napt44-103-2"    "napt44-103-1"    "dpi-102-2"    "firewall-101-2"    "napt44-104"
-    ...    "dpi-102-1"    "firewall-104"    "dpi-102-3"    "firewall-101-1"
+    BuiltIn.Set Suite Variable
+    ...    @{SERVICE_FUNCTION_NAMES}
+    ...    "napt44-103-2"
+    ...    "napt44-103-1"
+    ...    "dpi-102-2"
+    ...    "firewall-101-2"
+    ...    "napt44-104"
+    ...    "dpi-102-1"
+    ...    "firewall-104"
+    ...    "dpi-102-3"
+    ...    "firewall-101-1"
     BuiltIn.Set Suite Variable    ${SERVICE_FORWARDERS_FILE}    ${TEST_DIR}/service-function-forwarders.json
     BuiltIn.Set Suite Variable    ${SERVICE_NODES_FILE}    ${TEST_DIR}/service-nodes.json
     BuiltIn.Set Suite Variable    ${SERVICE_CHAINS_FILE}    ${TEST_DIR}/service-function-chains.json
     BuiltIn.Set Suite Variable    ${SERVICE_FUNCTION_PATHS_FILE}    ${TEST_DIR}/service-function-paths.json
     BuiltIn.Set Suite Variable    ${SERVICE_RANDOM_SCHED_TYPE_FILE}    ${TEST_DIR}/service-random-schedule-type.json
-    BuiltIn.Set Suite Variable    ${SERVICE_ROUNDROBIN_SCHED_TYPE_FILE}    ${TEST_DIR}/service-roundrobin-schedule-type.json
-    BuiltIn.Set Suite Variable    ${SERVICE_LOADBALANCE_SCHED_TYPE_FILE}    ${TEST_DIR}/service-loadbalance-schedule-type.json
-    BuiltIn.Set Suite Variable    ${SERVICE_SHORTESTPATH_SCHED_TYPE_FILE}    ${TEST_DIR}/service-shortestpath-schedule-type.json
+    BuiltIn.Set Suite Variable
+    ...    ${SERVICE_ROUNDROBIN_SCHED_TYPE_FILE}
+    ...    ${TEST_DIR}/service-roundrobin-schedule-type.json
+    BuiltIn.Set Suite Variable
+    ...    ${SERVICE_LOADBALANCE_SCHED_TYPE_FILE}
+    ...    ${TEST_DIR}/service-loadbalance-schedule-type.json
+    BuiltIn.Set Suite Variable
+    ...    ${SERVICE_SHORTESTPATH_SCHED_TYPE_FILE}
+    ...    ${TEST_DIR}/service-shortestpath-schedule-type.json
index c9563325f4cf0a2f84b3d6ed57058dd2f31f9215..08d5ac697929385fb55d373c2231b20d66ec0fee 100644 (file)
@@ -1,16 +1,20 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Functions, Operates functions from Restconf APIs.
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
+Documentation       Test suite for SFC Service Functions, Operates functions from Restconf APIs.
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+
 
 *** Variables ***
-${SFC_API}        /restconf/config/service-function:service-functions
+${SFC_API}      /restconf/config/service-function:service-functions
+
 
 *** Test Cases ***
 Add Service Functions To First Node
@@ -39,15 +43,18 @@ Read Service Functions From Third Node
     ${result}    To JSON    ${resp.content}
     Lists Should be Equal    ${result}    ${jsonbody}
 
+
 *** Keywords ***
 Read JSON From File
     [Arguments]    ${filepath}
     ${body}    OperatingSystem.Get File    ${filepath}
     ${jsonbody}    To Json    ${body}
-    [Return]    ${jsonbody}
+    RETURN    ${jsonbody}
 
 Init Suite
     [Documentation]    Initialize ODL version specific variables
     log    ${ODL_STREAM}
     Set Suite Variable    ${VERSION_DIR}    master
-    Set Suite Variable    ${SFC_FUNCTIONS_FILE}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-functions.json
+    Set Suite Variable
+    ...    ${SFC_FUNCTIONS_FILE}
+    ...    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-functions.json
index f6e126942a5b198e50e7f012a5aca2dee86adebd..bdad5ed9bd6b9519e2feb74c789d3872801da443 100644 (file)
@@ -1,19 +1,23 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Function ACL, Operates functions from Restconf APIs.
-Suite Setup       Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_FUNCTION_ACLS_URI}
-Test Teardown     Remove All Elements At URI    ${SERVICE_FUNCTION_ACLS_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
+Documentation       Test suite for SFC Service Function ACL, Operates functions from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+
+Suite Setup         Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_FUNCTION_ACLS_URI}
+Test Teardown       Remove All Elements At URI    ${SERVICE_FUNCTION_ACLS_URI}
+
 
 *** Variables ***
 ${SERVICE_FUNCTION_ACL_FILE}    ${CURDIR}/../../../variables/sfc/master/service-function-acl.json
 
+
 *** Test Cases ***
 Add ACL
     [Documentation]    Add Service Function ACL from JSON file
@@ -41,7 +45,9 @@ Delete All ACLs
 Get one ACL
     [Documentation]    Get one ACL
     Add Elements To URI From File    ${SERVICE_FUNCTION_ACLS_URI}    ${SERVICE_FUNCTION_ACL_FILE}
-    ${resp}    RequestsLibrary.Get Request    session    ${SERVICE_FUNCTION_ACLS_URI}/acl/ietf-access-control-list:ipv4-acl/ACL1
+    ${resp}    RequestsLibrary.Get Request
+    ...    session
+    ...    ${SERVICE_FUNCTION_ACLS_URI}/acl/ietf-access-control-list:ipv4-acl/ACL1
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Get A Non-existing ACL
index 5f2a98c8ff3182303e706d10856091e041f654fc..1d0cd708952d425dae58f05349d848add6e6e49c 100644 (file)
@@ -1,18 +1,22 @@
 *** Settings ***
-Documentation     Test suite for SFC Service Function Classifiers, Operates functions from Restconf APIs.
-Suite Setup       Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
-Suite Teardown    Delete All Sessions
-Test Setup        Remove All Elements If Exist    ${SERVICE_CLASSIFIERS_URI}
-Test Teardown     Remove All Elements At URI    ${SERVICE_CLASSIFIERS_URI}
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
+Documentation       Test suite for SFC Service Function Classifiers, Operates functions from Restconf APIs.
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+
+Suite Setup         Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown      Delete All Sessions
+Test Setup          Remove All Elements If Exist    ${SERVICE_CLASSIFIERS_URI}
+Test Teardown       Remove All Elements At URI    ${SERVICE_CLASSIFIERS_URI}
+
 
 *** Variables ***
-${SERVICE_CLASSIFIER_FILE}    ${CURDIR}/../../../variables/sfc/master/service-function-classifiers.json
+${SERVICE_CLASSIFIER_FILE}      ${CURDIR}/../../../variables/sfc/master/service-function-classifiers.json
+
 
 *** Test Cases ***
 Add Service Function Classifier
@@ -41,13 +45,17 @@ Delete All Classifiers
 Get one Classifier
     [Documentation]    Get one Classifier
     Add Elements To URI From File    ${SERVICE_CLASSIFIERS_URI}    ${SERVICE_CLASSIFIER_FILE}
-    ${resp}    RequestsLibrary.Get Request    session    ${SERVICE_CLASSIFIERS_URI}/service-function-classifier/Classifier1
+    ${resp}    RequestsLibrary.Get Request
+    ...    session
+    ...    ${SERVICE_CLASSIFIERS_URI}/service-function-classifier/Classifier1
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Get A Non-existing Classifier
     [Documentation]    Get A Non-existing Classifier
     Add Elements To URI From File    ${SERVICE_CLASSIFIERS_URI}    ${SERVICE_CLASSIFIER_FILE}
-    ${resp}    RequestsLibrary.Get Request    session    ${SERVICE_CLASSIFIERS_URI}/service-function-classifier/nonexistant-classifier
+    ${resp}    RequestsLibrary.Get Request
+    ...    session
+    ...    ${SERVICE_CLASSIFIERS_URI}/service-function-classifier/nonexistant-classifier
     Should Be Equal As Strings    ${resp.status_code}    404
 
 Delete a Classifier
index 147e4a79314ada1cd8712cc1a3af26e4aa890f96..692db1d9903f2b703286e4aae54019f080f15964 100644 (file)
@@ -1,31 +1,43 @@
 *** Settings ***
-Documentation     Test suite for SFC Persistency. Checks that system persistency is working as expected
-Suite Setup       Init Suite
-Suite Teardown    Delete All Sessions
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           ../../../libraries/SFC/SfcUtils.py
-Resource          ../../../libraries/SFC/SfcKeywords.robot
-Resource          ../../../libraries/ClusterOpenFlow.robot
-Resource          ../../../libraries/CompareStream.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../variables/sfc/Variables.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/TemplatedRequests.robot
-Resource          ../../../libraries/SFC/DockerSfc.robot
+Documentation       Test suite for SFC Persistency. Checks that system persistency is working as expected
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             ../../../libraries/SFC/SfcUtils.py
+Resource            ../../../libraries/SFC/SfcKeywords.robot
+Resource            ../../../libraries/ClusterOpenFlow.robot
+Resource            ../../../libraries/CompareStream.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../variables/sfc/Variables.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+Resource            ../../../libraries/SFC/DockerSfc.robot
+
+Suite Setup         Init Suite
+Suite Teardown      Delete All Sessions
+
 
 *** Variables ***
-${JSON_DIR}       ${CURDIR}/../../../variables/sfc/master
-${SERVICE_FUNCTIONS_FILE}    ${JSON_DIR}/service-functions.json
-${SERVICE_FORWARDERS_FILE}    ${JSON_DIR}/service-function-forwarders.json
-${SERVICE_NODES_FILE}    ${JSON_DIR}/service-nodes.json
-${SERVICE_CHAINS_FILE}    ${JSON_DIR}/service-function-chains.json
-${SERVICE_FUNCTION_PATHS_FILE}    ${JSON_DIR}/service-function-paths.json
-${CREATE_RSP1_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-Path-1"}}
-@{SF_NAMES}       napt44-103-2    napt44-103-1    dpi-102-2    firewall-101-2    napt44-104    dpi-102-1    firewall-104
-...               dpi-102-3    firewall-101-1
+${JSON_DIR}                         ${CURDIR}/../../../variables/sfc/master
+${SERVICE_FUNCTIONS_FILE}           ${JSON_DIR}/service-functions.json
+${SERVICE_FORWARDERS_FILE}          ${JSON_DIR}/service-function-forwarders.json
+${SERVICE_NODES_FILE}               ${JSON_DIR}/service-nodes.json
+${SERVICE_CHAINS_FILE}              ${JSON_DIR}/service-function-chains.json
+${SERVICE_FUNCTION_PATHS_FILE}      ${JSON_DIR}/service-function-paths.json
+${CREATE_RSP1_INPUT}                {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-Path-1"}}
+@{SF_NAMES}
+...                                 napt44-103-2
+...                                 napt44-103-1
+...                                 dpi-102-2
+...                                 firewall-101-2
+...                                 napt44-104
+...                                 dpi-102-1
+...                                 firewall-104
+...                                 dpi-102-3
+...                                 firewall-101-1
+
 
 *** Test Cases ***
 Add SFC Elements and restart cluster
@@ -40,13 +52,29 @@ Add SFC Elements and restart cluster
     Wait Until Keyword Succeeds    2min    5 sec    Check Service Function Types Added    ${SF_NAMES}
     Wait until Keyword succeeds    2min    5 sec    Get Data From URI    session    ${SERVICE_CHAINS_URI}
     Wait until Keyword succeeds    2min    5 sec    Get Data From URI    session    ${SERVICE_FUNCTION_PATHS_URI}
-    Wait until Keyword succeeds    2min    5 sec    TemplatedRequests.Get_As_Json_Templated    session=${session}    folder=${RESTCONF_MODULES_DIR}    verify=False
+    Wait until Keyword succeeds
+    ...    2min
+    ...    5 sec
+    ...    TemplatedRequests.Get_As_Json_Templated
+    ...    session=${session}
+    ...    folder=${RESTCONF_MODULES_DIR}
+    ...    verify=False
     # From oxygen, RSPs are persisted between reboots
-    Run_Keyword_If_At_Least_Else    oxygen    Wait until Keyword succeeds    2min    5 sec    Get Data From URI    session
+    Run_Keyword_If_At_Least_Else
+    ...    oxygen
+    ...    Wait until Keyword succeeds
+    ...    2min
+    ...    5 sec
+    ...    Get Data From URI
+    ...    session
+    ...    ${OPERATIONAL_RSPS_URI}
+    ...    ELSE
+    ...    No Content From URI
+    ...    session
     ...    ${OPERATIONAL_RSPS_URI}
-    ...    ELSE    No Content From URI    session    ${OPERATIONAL_RSPS_URI}
     [Teardown]    Remove SFC Elements
 
+
 *** Keywords ***
 Init Suite
     [Documentation]    Connect Create session and initialize ODL version specific variables
@@ -73,4 +101,4 @@ Remove SFC Elements
 
 Resolve Http Session for Controller
     ${session} =    Resolve_Http_Session_For_Member    member_index=1
-    [Return]    ${session}
+    RETURN    ${session}
index abd35a742922fd22cfa4d57159871b3d17f23e23..18cc1108392928ca41138872a9aa19e028efd028 100644 (file)
@@ -1,18 +1,19 @@
 *** Settings ***
-Documentation     Test suite to verify CRUD operations
-Suite Setup       Setup SXP Environment
-Suite Teardown    Clean SXP Environment
-Test Teardown     Clean Node
-Library           RequestsLibrary
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to verify CRUD operations
+
+Library             RequestsLibrary
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         Setup SXP Environment
+Suite Teardown      Clean SXP Environment
+Test Teardown       Clean Node
 
-*** Variables ***
 
 *** Test Cases ***
 Test Add Bindings
     [Documentation]    Test if bindings are added to Master DB
-    [Tags]    Restconf CRUD    SXP
+    [Tags]    restconf crud    sxp
     ${resp}    Get Bindings
     Add Bindings    5230    1.1.1.1/32
     Wait Until Keyword Succeeds    30x    1s    Bindings Should Contain    5230    1.1.1.1/32
@@ -21,7 +22,7 @@ Test Add Bindings
 
 Test Update Bindings
     [Documentation]    Test if bindings can be updated to different SGT values by new incoming bindings for the same IP prefix
-    [Tags]    Restconf CRUD    SXP
+    [Tags]    restconf crud    sxp
     Add Bindings    30    1.1.1.10/32
     Wait Until Keyword Succeeds    30x    1s    Bindings Should Contain    30    1.1.1.10/32
     Sleep    1s    New binding must be at least 1s newer
@@ -31,7 +32,7 @@ Test Update Bindings
 
 Test Delete Bindings
     [Documentation]    Test if bindings are deleted from Master DB
-    [Tags]    Restconf CRUD    SXP
+    [Tags]    restconf crud    sxp
     Add Bindings    52301    12.1.1.1/32
     Wait Until Keyword Succeeds    30x    1s    Bindings Should Contain    52301    12.1.1.1/32
     Run Keyword And Expect Error    *    Delete Bindings    2631    12.1.1.1/32
@@ -41,7 +42,7 @@ Test Delete Bindings
 
 Test Add Connection
     [Documentation]    Test if connections are added to Node
-    [Tags]    Restconf CRUD    SXP
+    [Tags]    restconf crud    sxp
     Add Connection    version4    speaker    10.1.0.0    60000
     Wait Until Keyword Succeeds    30x    1s    Connections Should Contain    10.1.0.0    60000    speaker
     ...    version4
@@ -51,7 +52,7 @@ Test Add Connection
 
 Test Delete Connection
     [Documentation]    Test if conncetions are removed from Node
-    [Tags]    Restconf CRUD    SXP
+    [Tags]    restconf crud    sxp
     Add Connection    version4    speaker    127.1.0.30    60000
     Wait Until Keyword Succeeds    30x    1s    Connections Should Contain    127.1.0.30    60000    speaker
     ...    version4
@@ -62,6 +63,7 @@ Test Delete Connection
     Wait Until Keyword Succeeds    30x    1s    Connections Should Not Contain    127.1.0.30    60000    speaker
     ...    version4
 
+
 *** Keywords ***
 Clean Node
     Clean Bindings    127.0.0.1
index 37302ab484c34fa2387676486c09f6c7aee741d0..3a349ee0e33c65fbbcdb16b787eef45295deaea5 100644 (file)
@@ -1,19 +1,20 @@
 *** Settings ***
-Documentation     Test suite to test connectivity problems
-Suite Setup       SxpLib.Setup SXP Environment    5
-Suite Teardown    SxpLib.Clean SXP Environment    5
-Test Setup        Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to test connectivity problems
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         SxpLib.Setup SXP Environment    5
+Suite Teardown      SxpLib.Clean SXP Environment    5
+Test Setup          Clean Nodes
 
-*** Variables ***
 
 *** Test Cases ***
 Version 1
     [Documentation]    Test if Version1 <=> Version1 can be connected
-    [Tags]    SXP    Connectivity
+    [Tags]    sxp    connectivity
     Test Nodes    version1    none    version1
     BuiltIn.Log    OK without passwords
     Test Nodes    version1    default    version1
@@ -21,7 +22,7 @@ Version 1
 
 Version 2
     [Documentation]    Test if Version2 <=> Version2 can be connected
-    [Tags]    SXP    Connectivity
+    [Tags]    sxp    connectivity
     Test Nodes    version2    none    version2
     BuiltIn.Log    OK without passwords
     Test Nodes    version2    default    version2
@@ -29,7 +30,7 @@ Version 2
 
 Version 3
     [Documentation]    Test if Version3 <=> Version3 can be connected
-    [Tags]    SXP    Connectivity
+    [Tags]    sxp    connectivity
     Test Nodes    version3    none    version3
     BuiltIn.Log    OK without passwords
     Test Nodes    version3    default    version3
@@ -37,7 +38,7 @@ Version 3
 
 Version 4
     [Documentation]    Test if Version4 <=> Version4 can be connected
-    [Tags]    SXP    Connectivity
+    [Tags]    sxp    connectivity
     Test Nodes    version4    none    version4
     BuiltIn.Log    OK without passwords
     Test Nodes    version4    default    version4
@@ -45,7 +46,7 @@ Version 4
 
 Mixed Versions
     [Documentation]    Test of version negotiation proces during connecting
-    [Tags]    SXP    Connectivity
+    [Tags]    sxp    connectivity
     @{list} =    BuiltIn.Create List    version2    version3    version4
     Test Nodes    version1    none    @{list}
     Test Nodes    version1    default    @{list}
@@ -59,12 +60,13 @@ Mixed Versions
     Test Nodes    version4    none    @{list}
     Test Nodes    version4    default    @{list}
 
+
 *** Keywords ***
 Test Nodes
-    [Arguments]    ${version}    ${PASSWORD}    @{versions}
     [Documentation]    Setup connection Speaker => Listener / Listener => Speaker / Both <=> Both for specific versions
+    [Arguments]    ${version}    ${PASSWORD}    @{versions}
     FOR    ${r_version}    IN    @{versions}
-        ${cmp_version}    Lower Version    ${r_version}    ${version}
+        ${cmp_version}    Lower Version    ${r_version}    ${version}
         BuiltIn.Log    ${r_version}
         SxpLib.Add Connection    ${r_version}    listener    127.0.0.2    64999    127.0.0.1
         ...    ${PASSWORD}
@@ -84,20 +86,36 @@ Test Nodes
         BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${cmp_version}    speaker
         ...    127.0.0.3    64999    127.0.0.2
         BuiltIn.Log    OK ${version}:listener ${r_version}:speaker
-        BuiltIn.Run Keyword If    '${version}' == 'version4' and '${r_version}' == 'version4'    Test Both    ${version}    ${r_version}    ${PASSWORD}
+        IF    '${version}' == 'version4' and '${r_version}' == 'version4'
+            Test Both    ${version}    ${r_version}    ${PASSWORD}
+        END
         Clean Nodes
     END
 
 Test Both
-    [Arguments]    ${version}    ${r_version}    ${PASSWORD}
     [Documentation]    Setup Both <=> Both connection
-    ${cmp_version}    Sxp.Lower Version    ${r_version}    ${version}
+    [Arguments]    ${version}    ${r_version}    ${PASSWORD}
+    ${cmp_version} =    Sxp.Lower Version    ${r_version}    ${version}
     SxpLib.Add Connection    ${r_version}    both    127.0.0.3    64999    127.0.0.1    ${PASSWORD}
     SxpLib.Add Connection    ${version}    both    127.0.0.1    64999    127.0.0.3    ${PASSWORD}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${cmp_version}    both    127.0.0.3
-    ...    64999    127.0.0.1
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${cmp_version}    both    127.0.0.1
-    ...    64999    127.0.0.3
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpLib.Verify Connection
+    ...    ${cmp_version}
+    ...    both
+    ...    127.0.0.3
+    ...    64999
+    ...    127.0.0.1
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpLib.Verify Connection
+    ...    ${cmp_version}
+    ...    both
+    ...    127.0.0.1
+    ...    64999
+    ...    127.0.0.3
     BuiltIn.Log    OK ${r_version}:both ${version}:both
 
 Clean Nodes
index a58e0b6b4b9600dfdcb9571f8252ea65bea0ddeb..542c4b2aefe36e8fd613880c98569adfff46fb88 100644 (file)
@@ -1,57 +1,64 @@
 *** Settings ***
-Documentation     Test suite to test custom password per peer fuctionality
-Suite Setup       Setup SXP Environment Local
-Suite Teardown    Clean SXP Environment    3
-Test Setup        Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to test custom password per peer fuctionality
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         Setup SXP Environment Local
+Suite Teardown      Clean SXP Environment    3
+Test Setup          Clean Nodes
 
-*** Variables ***
 
 *** Test Cases ***
 Version 1
     [Documentation]    Test of custom passwords on version1 connections
-    [Tags]    SXP    Passwords
+    [Tags]    sxp    passwords
     Test Mode    version1    listener    speaker
     Clean Nodes
     Test Mode    version1    speaker    listener
 
 Version 2
     [Documentation]    Test of custom passwords on version2 connections
-    [Tags]    SXP    Passwords
+    [Tags]    sxp    passwords
     Test Mode    version2    listener    speaker
     Clean Nodes
     Test Mode    version2    speaker    listener
 
 Version 3
     [Documentation]    Test of custom passwords on version3 connections
-    [Tags]    SXP    Passwords
+    [Tags]    sxp    passwords
     Test Mode    version3    listener    speaker
     Clean Nodes
     Test Mode    version3    speaker    listener
 
 Version 4
     [Documentation]    Test of custom passwords on version4 connections
-    [Tags]    SXP    Passwords
+    [Tags]    sxp    passwords
     Test Mode    version4    speaker    listener
     Clean Nodes
     Test Mode    version4    listener    speaker
     Clean Nodes
     Test Mode    version4    both    both
 
+
 *** Keywords ***
 Setup SXP Environment Local
     [Documentation]    Create session to Controller
-    RequestsLibrary.Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    timeout=${DEFAULT_TIMEOUT_HTTP}    max_retries=0
+    RequestsLibrary.Create Session
+    ...    session
+    ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
+    ...    auth=${AUTH}
+    ...    timeout=${DEFAULT_TIMEOUT_HTTP}
+    ...    max_retries=0
     Add Node    127.0.0.1    ${EMPTY}
     Add Node    127.0.0.2    ${EMPTY}
     Add Node    127.0.0.3    CUSTOM
 
 Test Mode
-    [Arguments]    ${version}    ${mode_local}    ${mode_remote}
     [Documentation]    Setup connection Speaker => Listener / Listener => Speaker / Both <=> Both for specific versions
+    [Arguments]    ${version}    ${mode_local}    ${mode_remote}
     Add Connection    ${version}    ${mode_local}    127.0.0.3    64999    127.0.0.1    CUSTOM
     Add Connection    ${version}    ${mode_remote}    127.0.0.1    64999    127.0.0.3    ${EMPTY}
     Wait Until Keyword Succeeds    120x    1s    Verify Connection    ${version}    ${mode_local}    127.0.0.3
index 567773f307125b39abb4b4e6d1176121b760fcb0..93176edb7d5fadecc2ef753b9bf3e7bf01bc4bb9 100644 (file)
@@ -1,36 +1,54 @@
 *** Settings ***
-Documentation     Test suite to test SSL security fuctionality
-Suite Setup       Setup SXP Environment Local    5
-Suite Teardown    Clean SXP Environment    5
-Test Setup        Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
-Resource          ../../../libraries/WaitForFailure.robot
-Resource          ../../../libraries/SSHKeywords.robot
+Documentation       Test suite to test SSL security fuctionality
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+Resource            ../../../libraries/WaitForFailure.robot
+Resource            ../../../libraries/SSHKeywords.robot
+
+Suite Setup         Setup SXP Environment Local    5
+Suite Teardown      Clean SXP Environment    5
+Test Setup          Clean Nodes
+
 
 *** Variables ***
-${version}        version4
-${password}       admin123
-${ssl_stores}     /tmp
+${version}          version4
+${password}         admin123
+${ssl_stores}       /tmp
+
 
 *** Test Cases ***
 SSL ConectivityCase 1
     [Documentation]    Test of SSL security with two SXP-nodes both have each other in truststores
-    [Tags]    SXP    SSL
+    [Tags]    sxp    ssl
     SxpLib.Add Connection    ${version}    speaker    127.0.0.2    64999    127.0.0.1    security_mode=TLS
     SxpLib.Add Connection    ${version}    listener    127.0.0.1    64999    127.0.0.2    security_mode=TLS
     BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    speaker    127.0.0.2
     ...    64999    127.0.0.1
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    listener    127.0.0.1
-    ...    64999    127.0.0.2
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    listener
+    ...    127.0.0.1
+    ...    64999
+    ...    127.0.0.2
     SxpLib.Clean Connections    127.0.0.1
     SxpLib.Clean Connections    127.0.0.2
     SxpLib.Add Connection    ${version}    listener    127.0.0.2    64999    127.0.0.1    security_mode=TLS
     SxpLib.Add Connection    ${version}    speaker    127.0.0.1    64999    127.0.0.2    security_mode=TLS
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    listener    127.0.0.2
-    ...    64999    127.0.0.1
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    listener
+    ...    127.0.0.2
+    ...    64999
+    ...    127.0.0.1
     BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    speaker    127.0.0.1
     ...    64999    127.0.0.2
     SxpLib.Clean Connections    127.0.0.1
@@ -44,124 +62,258 @@ SSL ConectivityCase 1
 
 SSL ConectivityCase 2
     [Documentation]    Test of SSL security with two SXP-nodes while node-1 does not contain node-3 in truststore
-    [Tags]    SXP    SSL
+    [Tags]    sxp    ssl
     SxpLib.Add Connection    ${version}    speaker    127.0.0.3    64999    127.0.0.1    security_mode=TLS
     SxpLib.Add Connection    ${version}    listener    127.0.0.1    64999    127.0.0.3    security_mode=TLS
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    speaker    127.0.0.3
-    ...    64999    127.0.0.1
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    listener    127.0.0.1
-    ...    64999    127.0.0.3
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    speaker
+    ...    127.0.0.3
+    ...    64999
+    ...    127.0.0.1
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    listener
+    ...    127.0.0.1
+    ...    64999
+    ...    127.0.0.3
     SxpLib.Clean Connections    127.0.0.1
     SxpLib.Clean Connections    127.0.0.3
     SxpLib.Add Connection    ${version}    listener    127.0.0.3    64999    127.0.0.1    security_mode=TLS
     SxpLib.Add Connection    ${version}    speaker    127.0.0.1    64999    127.0.0.3    security_mode=TLS
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    listener    127.0.0.3
-    ...    64999    127.0.0.1
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    speaker    127.0.0.1
-    ...    64999    127.0.0.3
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    listener
+    ...    127.0.0.3
+    ...    64999
+    ...    127.0.0.1
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    speaker
+    ...    127.0.0.1
+    ...    64999
+    ...    127.0.0.3
     SxpLib.Clean Connections    127.0.0.1
     SxpLib.Clean Connections    127.0.0.3
     SxpLib.Add Connection    ${version}    both    127.0.0.3    64999    127.0.0.1    security_mode=TLS
     SxpLib.Add Connection    ${version}    both    127.0.0.1    64999    127.0.0.3    security_mode=TLS
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    both    127.0.0.3
-    ...    64999    127.0.0.1
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    both    127.0.0.1
-    ...    64999    127.0.0.3
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    both
+    ...    127.0.0.3
+    ...    64999
+    ...    127.0.0.1
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    both
+    ...    127.0.0.1
+    ...    64999
+    ...    127.0.0.3
 
 SSL ConectivityCase 3
     [Documentation]    Test of SSL security with two SXP-nodes while both of nodes does not have each other in truststores
-    [Tags]    SXP    SSL
+    [Tags]    sxp    ssl
     SxpLib.Add Connection    ${version}    speaker    127.0.0.4    64999    127.0.0.1    security_mode=TLS
     SxpLib.Add Connection    ${version}    listener    127.0.0.1    64999    127.0.0.4    security_mode=TLS
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    speaker    127.0.0.4
-    ...    64999    127.0.0.1
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    listener    127.0.0.1
-    ...    64999    127.0.0.4
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    speaker
+    ...    127.0.0.4
+    ...    64999
+    ...    127.0.0.1
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    listener
+    ...    127.0.0.1
+    ...    64999
+    ...    127.0.0.4
     SxpLib.Clean Connections    127.0.0.1
     SxpLib.Clean Connections    127.0.0.4
     SxpLib.Add Connection    ${version}    listener    127.0.0.4    64999    127.0.0.1    security_mode=TLS
     SxpLib.Add Connection    ${version}    speaker    127.0.0.1    64999    127.0.0.4    security_mode=TLS
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    listener    127.0.0.4
-    ...    64999    127.0.0.1
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    speaker    127.0.0.1
-    ...    64999    127.0.0.4
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    listener
+    ...    127.0.0.4
+    ...    64999
+    ...    127.0.0.1
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    speaker
+    ...    127.0.0.1
+    ...    64999
+    ...    127.0.0.4
     SxpLib.Clean Connections    127.0.0.1
     SxpLib.Clean Connections    127.0.0.4
     SxpLib.Add Connection    ${version}    both    127.0.0.4    64999    127.0.0.1    security_mode=TLS
     SxpLib.Add Connection    ${version}    both    127.0.0.1    64999    127.0.0.4    security_mode=TLS
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    both    127.0.0.4
-    ...    64999    127.0.0.1
-    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout    60    1    SxpLib.Verify Connection    ${version}    both    127.0.0.1
-    ...    64999    127.0.0.4
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    both
+    ...    127.0.0.4
+    ...    64999
+    ...    127.0.0.1
+    WaitForFailure.Verify_Keyword_Never_Passes_Within_Timeout
+    ...    60
+    ...    1
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    both
+    ...    127.0.0.1
+    ...    64999
+    ...    127.0.0.4
 
 SSL ConectivityCase 4
     [Documentation]    Test of SSL security in topology consisting of SXP-nodes that does not uses any security,
     ...    uses TCP-MD5 and SSL security. Each node contains series of bindings that in the end should
     ...    be all propagated to node-5 in topology.
-    [Tags]    SXP    SSL
+    [Tags]    sxp    ssl
     SxpLib.Add Connection    ${version}    listener    127.0.0.2    64999    127.0.0.1    security_mode=TLS
     SxpLib.Add Connection    ${version}    speaker    127.0.0.1    64999    127.0.0.2    security_mode=TLS
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    listener    127.0.0.2
-    ...    64999    127.0.0.1
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    listener
+    ...    127.0.0.2
+    ...    64999
+    ...    127.0.0.1
     BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    speaker    127.0.0.1
     ...    64999    127.0.0.2
     SxpLib.Add Connection    ${version}    listener    127.0.0.3    64999    127.0.0.1    paswd
     SxpLib.Add Connection    ${version}    speaker    127.0.0.1    64999    127.0.0.3    paswd
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    listener    127.0.0.3
-    ...    64999    127.0.0.1
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    listener
+    ...    127.0.0.3
+    ...    64999
+    ...    127.0.0.1
     BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    speaker    127.0.0.1
     ...    64999    127.0.0.3
     SxpLib.Add Connection    ${version}    listener    127.0.0.4    64999    127.0.0.1
     SxpLib.Add Connection    ${version}    speaker    127.0.0.1    64999    127.0.0.4
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    listener    127.0.0.4
-    ...    64999    127.0.0.1
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    listener
+    ...    127.0.0.4
+    ...    64999
+    ...    127.0.0.1
     BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    speaker    127.0.0.1
     ...    64999    127.0.0.4
     SxpLib.Add Connection    ${version}    speaker    127.0.0.5    64999    127.0.0.1    security_mode=TLS
     SxpLib.Add Connection    ${version}    listener    127.0.0.1    64999    127.0.0.5    security_mode=TLS
     BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    speaker    127.0.0.5
     ...    64999    127.0.0.1
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${version}    listener    127.0.0.1
-    ...    64999    127.0.0.5
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpLib.Verify Connection
+    ...    ${version}
+    ...    listener
+    ...    127.0.0.1
+    ...    64999
+    ...    127.0.0.5
     BuiltIn.Wait Until Keyword Succeeds    120x    1s    Verify Topology Bindings    5
 
+
 *** Keywords ***
 Setup SXP Environment Local
-    [Arguments]    ${node_range}
     [Documentation]    Create session to Controller, copy keystores to ODL machines and setup topology for testing
-    RequestsLibrary.Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    timeout=${DEFAULT_TIMEOUT_HTTP}    max_retries=0
+    [Arguments]    ${node_range}
+    RequestsLibrary.Create Session
+    ...    session
+    ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
+    ...    auth=${AUTH}
+    ...    timeout=${DEFAULT_TIMEOUT_HTTP}
+    ...    max_retries=0
     SSHKeywords.Open_Connection_To_ODL_System
-    ${ODL_SYSTEM_JAVA_HOME}    SSHLibrary.Execute_Command    java -XshowSettings:properties -version 2>&1 | grep java.home | sed 's/.*= //'
+    ${ODL_SYSTEM_JAVA_HOME}    SSHLibrary.Execute_Command
+    ...    java -XshowSettings:properties -version 2>&1 | grep java.home | sed 's/.*= //'
     FOR    ${node}    IN RANGE    1    ${node_range}+1
-        SSHKeywords.Execute_Command_Should_Pass    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -genkeypair -alias odl-sxp-${node} -keyalg RSA -storepass ${password} -keypass ${password} -dname "CN=www.opendaylight.org, OU=csit, O=ODL, L=N/A, S=N/A, C=N/A" -keystore csit-keystore-${node}
-        SSHKeywords.Execute_Command_Should_Pass    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -exportcert -keystore csit-keystore-${node} -alias odl-sxp-${node} -storepass ${password} -file odl-sxp-${node}.cer
+        SSHKeywords.Execute_Command_Should_Pass
+        ...    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -genkeypair -alias odl-sxp-${node} -keyalg RSA -storepass ${password} -keypass ${password} -dname "CN=www.opendaylight.org, OU=csit, O=ODL, L=N/A, S=N/A, C=N/A" -keystore csit-keystore-${node}
+        SSHKeywords.Execute_Command_Should_Pass
+        ...    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -exportcert -keystore csit-keystore-${node} -alias odl-sxp-${node} -storepass ${password} -file odl-sxp-${node}.cer
         # Node-1 TRUSTS Node-2, Node-5
     END
-    SSHKeywords.Execute_Command_Should_Pass    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-1 -alias odl-sxp-2 -storepass ${password} -keypass ${password} -file odl-sxp-2.cer -noprompt
-    SSHKeywords.Execute_Command_Should_Pass    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-1 -alias odl-sxp-5 -storepass ${password} -keypass ${password} -file odl-sxp-5.cer -noprompt
+    SSHKeywords.Execute_Command_Should_Pass
+    ...    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-1 -alias odl-sxp-2 -storepass ${password} -keypass ${password} -file odl-sxp-2.cer -noprompt
+    SSHKeywords.Execute_Command_Should_Pass
+    ...    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-1 -alias odl-sxp-5 -storepass ${password} -keypass ${password} -file odl-sxp-5.cer -noprompt
     # Node-2 TRUSTS Node-1
-    SSHKeywords.Execute_Command_Should_Pass    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-2 -alias odl-sxp-2 -storepass ${password} -keypass ${password} -file odl-sxp-1.cer -noprompt
+    SSHKeywords.Execute_Command_Should_Pass
+    ...    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-2 -alias odl-sxp-2 -storepass ${password} -keypass ${password} -file odl-sxp-1.cer -noprompt
     # Node-3 TRUSTS Node-1
-    SSHKeywords.Execute_Command_Should_Pass    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-3 -alias odl-sxp-2 -storepass ${password} -keypass ${password} -file odl-sxp-1.cer -noprompt
+    SSHKeywords.Execute_Command_Should_Pass
+    ...    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-3 -alias odl-sxp-2 -storepass ${password} -keypass ${password} -file odl-sxp-1.cer -noprompt
     # Node-5 TRUSTS Node-1
-    SSHKeywords.Execute_Command_Should_Pass    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-5 -alias odl-sxp-2 -storepass ${password} -keypass ${password} -file odl-sxp-1.cer -noprompt
+    SSHKeywords.Execute_Command_Should_Pass
+    ...    ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-5 -alias odl-sxp-2 -storepass ${password} -keypass ${password} -file odl-sxp-1.cer -noprompt
     SSHKeywords.Execute_Command_Should_Pass    cp csit-keystore-4 csit-truststore-4
     SSHKeywords.Execute_Command_Should_Pass    rm odl-sxp-*.cer
     SSHKeywords.Execute_Command_Should_Pass    mv ./csit-keystore-* ${ssl_stores}
     SSHKeywords.Execute_Command_Should_Pass    mv ./csit-truststore-* ${ssl_stores}
     SSHLibrary.Close Connection
     FOR    ${node}    IN RANGE    1    ${node_range}+1
-        ${SSL}    BuiltIn.Create Dictionary    truststore=${ssl_stores}/csit-truststore-${node}    keystore=${ssl_stores}/csit-keystore-${node}    password=${password}
-        ${rnd_retry_time} =    BuiltIn.Evaluate    random.randint(1, 5)    modules=random
+        ${SSL}    BuiltIn.Create Dictionary
+        ...    truststore=${ssl_stores}/csit-truststore-${node}
+        ...    keystore=${ssl_stores}/csit-keystore-${node}
+        ...    password=${password}
+        ${rnd_retry_time}    BuiltIn.Evaluate    random.randint(1, 5)    modules=random
         SxpLib.Add Node    127.0.0.${node}    ${EMPTY}    ssl_stores=${SSL}    retry_open_timer=${rnd_retry_time}
-        BuiltIn.Wait Until Keyword Succeeds    20x    10s    SxpLib.Check Node started    127.0.0.${node}    system=${ODL_SYSTEM_IP}
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    20x
+        ...    10s
+        ...    SxpLib.Check Node started
+        ...    127.0.0.${node}
+        ...    system=${ODL_SYSTEM_IP}
         SxpLib.Add Bindings    ${node}00    1.1.1.${node}/32    127.0.0.${node}
         SxpLib.Add Bindings    ${node}00    2.2.2.${node}/32    127.0.0.${node}
     END
 
 Verify Topology Bindings
-    [Arguments]    ${node_range}
     [Documentation]    Create session to Controller
+    [Arguments]    ${node_range}
     ${resp}    SxpLib.Get Bindings    127.0.0.5
     FOR    ${node}    IN RANGE    1    ${node_range}+1
         SxpLib.Should Contain Binding    ${resp}    ${node}00    1.1.1.${node}/32
index de4da57e6c6a838516fc78417162ade845236e6e..0141d832404b5cc8fe3bbe12ee97065423ab1d72 100644 (file)
@@ -1,36 +1,48 @@
 *** Settings ***
-Documentation     Test suite to verify binding origins configuration possibilities (CRUD)
-Suite Setup       SxpLib.Setup SXP Environment    0
-Suite Teardown    SxpLib.Clean SXP Environment    0
-Test Setup        SxpBindingOriginsLib.Revert To Default Binding Origins Configuration
-Library           RequestsLibrary
-Resource          ../../../libraries/SxpBindingOriginsLib.robot
+Documentation       Test suite to verify binding origins configuration possibilities (CRUD)
+
+Library             RequestsLibrary
+Resource            ../../../libraries/SxpBindingOriginsLib.robot
+
+Suite Setup         SxpLib.Setup SXP Environment    0
+Suite Teardown      SxpLib.Clean SXP Environment    0
+Test Setup          SxpBindingOriginsLib.Revert To Default Binding Origins Configuration
+
 
 *** Variables ***
-@{DEFAULT_ORIGINS}    LOCAL    NETWORK
-@{CLUSTER}        CLUSTER
-@{DEFAULT_AND_CLUSTER}    LOCAL    NETWORK    CLUSTER
+@{DEFAULT_ORIGINS}          LOCAL    NETWORK
+@{CLUSTER}                  CLUSTER
+@{DEFAULT_AND_CLUSTER}      LOCAL    NETWORK    CLUSTER
+
 
 *** Test Cases ***
 Test Add Binding Origin
     [Documentation]    Test if binding origin is added to configuration
-    [Tags]    Binding Origins CRUD    SXP
+    [Tags]    binding origins crud    sxp
     SxpBindingOriginsLib.Add Binding Origin    CLUSTER    0
     SxpBindingOriginsLib.Should Contain Binding Origins    @{DEFAULT_AND_CLUSTER}
 
 Test Add Binding Origin With Already Used Origin Type
     [Documentation]    Test if binding origin with already used origin type cannot be added to configuration
-    [Tags]    Binding Origins CRUD    SXP
-    BuiltIn.Run Keyword And Expect Error    RPC result is False    SxpBindingOriginsLib.Add Binding Origin    LOCAL    0
+    [Tags]    binding origins crud    sxp
+    BuiltIn.Run Keyword And Expect Error
+    ...    RPC result is False
+    ...    SxpBindingOriginsLib.Add Binding Origin
+    ...    LOCAL
+    ...    0
 
 Test Add Binding Origin With Already Used Priority
     [Documentation]    Test if binding origin with already used priotity cannot be added to configuration
-    [Tags]    Binding Origins CRUD    SXP
-    BuiltIn.Run Keyword And Expect Error    RPC result is False    SxpBindingOriginsLib.Add Binding Origin    CLUSTER    1
+    [Tags]    binding origins crud    sxp
+    BuiltIn.Run Keyword And Expect Error
+    ...    RPC result is False
+    ...    SxpBindingOriginsLib.Add Binding Origin
+    ...    CLUSTER
+    ...    1
 
 Test Update Binding Origin
     [Documentation]    Test if binding origin is updated in configuration
-    [Tags]    Binding Origins CRUD    SXP
+    [Tags]    binding origins crud    sxp
     BuiltIn.Comment    Update default origin
     SxpBindingOriginsLib.Update Binding Origin    LOCAL    0
     BuiltIn.Comment    Verify that LOCAL origin priority is updated
@@ -38,17 +50,25 @@ Test Update Binding Origin
 
 Test Update Binding Origin Of Unknown Origin Type
     [Documentation]    Test if unknown origin cannot be updated
-    [Tags]    Binding Origins CRUD    SXP
-    BuiltIn.Run Keyword And Expect Error    RPC result is False    SxpBindingOriginsLib.Update Binding Origin    CLUSTER    0
+    [Tags]    binding origins crud    sxp
+    BuiltIn.Run Keyword And Expect Error
+    ...    RPC result is False
+    ...    SxpBindingOriginsLib.Update Binding Origin
+    ...    CLUSTER
+    ...    0
 
 Test Update Binding Origin With Already Used Priority
     [Documentation]    Test if binding origin cannot be updated to use priority of another binding origin
-    [Tags]    Binding Origins CRUD    SXP
-    BuiltIn.Run Keyword And Expect Error    RPC result is False    SxpBindingOriginsLib.Update Binding Origin    LOCAL    2
+    [Tags]    binding origins crud    sxp
+    BuiltIn.Run Keyword And Expect Error
+    ...    RPC result is False
+    ...    SxpBindingOriginsLib.Update Binding Origin
+    ...    LOCAL
+    ...    2
 
 Test Delete Binding Origin
     [Documentation]    Test if binding origin is deleted from configuration
-    [Tags]    Binding Origins CRUD    SXP
+    [Tags]    binding origins crud    sxp
     BuiltIn.Comment    Add CLUSTER origin and verify it is added
     SxpBindingOriginsLib.Add Binding Origin    CLUSTER    0
     SxpBindingOriginsLib.Should Contain Binding Origins    @{DEFAULT_AND_CLUSTER}
@@ -59,7 +79,7 @@ Test Delete Binding Origin
 
 Test Delete Default Binding Origin
     [Documentation]    Test that default binding origin cannot be deleted from configuration
-    [Tags]    Binding Origins CRUD    SXP
+    [Tags]    binding origins crud    sxp
     BuiltIn.Comment    Try to delete default origin
     BuiltIn.Run Keyword And Expect Error    RPC result is False    SxpBindingOriginsLib.Delete Binding Origin    LOCAL
     BuiltIn.Comment    Verify all default origins are preserved
index b5bd17422e09845d2f49f2936345281cf6db49ad..548e8dfcb56f9287241831be97098f0211f5be61 100644 (file)
@@ -1,27 +1,35 @@
 *** Settings ***
-Documentation     Test suite to verify binding origins checks are performed in master database
-Suite Setup       SxpLib.Setup SXP Environment
-Suite Teardown    SxpLib.Clean SXP Environment
-Test Setup        Clean Bindings
-Library           RequestsLibrary
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to verify binding origins checks are performed in master database
+
+Library             RequestsLibrary
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         SxpLib.Setup SXP Environment
+Suite Teardown      SxpLib.Clean SXP Environment
+Test Setup          Clean Bindings
+
 
 *** Test Cases ***
 Test Add Lower Priority Binding
     [Documentation]    Test that incoming binding with lower priority does not override already existing
     ...    higher priority binding in master database for the same IP prefix
-    [Tags]    Binding Origins Checks    SXP
+    [Tags]    binding origins checks    sxp
     BuiltIn.Comment    Add binding
     SxpLib.Add Bindings    10    1.1.1.1/32    origin=LOCAL
     BuiltIn.Comment    Try to add binding with lower priority
-    BuiltIn.Run Keyword And Expect Error    RPC result is False    SxpLib.Add Bindings    20    1.1.1.1/32    origin=NETWORK
+    BuiltIn.Run Keyword And Expect Error
+    ...    RPC result is False
+    ...    SxpLib.Add Bindings
+    ...    20
+    ...    1.1.1.1/32
+    ...    origin=NETWORK
     BuiltIn.Comment    Verify that new binding is not added and previous binding is preserved
     Verify Bindings Content    10    20    1.1.1.1/32
 
 Test Add Higher Priority Binding
     [Documentation]    Test that incoming binding with higher priority overrides already existing
     ...    lower priority binding in master database for the same IP prefix
-    [Tags]    Binding Origins Checks    SXP
+    [Tags]    binding origins checks    sxp
     BuiltIn.Comment    Add binding
     SxpLib.Add Bindings    10    1.1.1.1/32    origin=NETWORK
     BuiltIn.Comment    Add binding with higher priority
@@ -31,7 +39,7 @@ Test Add Higher Priority Binding
 
 Test Add Unknown Priority Binding
     [Documentation]    Test that incoming binding with unknown priority cannot be added to master database
-    [Tags]    Binding Origins Checks    SXP
+    [Tags]    binding origins checks    sxp
     BuiltIn.Comment    Try to add binding with unknown origin priority
     BuiltIn.Run Keyword And Expect Error    400 != 200    SxpLib.Add Bindings    10    1.1.1.1/32    origin=CLUSTER
     BuiltIn.Comment    Verify that binding is not in master database
@@ -40,18 +48,24 @@ Test Add Unknown Priority Binding
 Test Add Lower Priority Binding To Domain
     [Documentation]    Test that incoming binding with lower priority does not override already existing
     ...    higher priority binding in master database for the same IP prefix
-    [Tags]    Binding Origins Checks    SXP
+    [Tags]    binding origins checks    sxp
     BuiltIn.Comment    Create custom domain with binding
     SxpLib.Add Domain    guest    10    1.1.1.1/32    origin=LOCAL
     BuiltIn.Comment    Try add binding to custom domain with lower priority
-    BuiltIn.Run Keyword And Expect Error    RPC result is False    SxpLib.Add Bindings    20    1.1.1.1/32    domain=guest    origin=NETWORK
+    BuiltIn.Run Keyword And Expect Error
+    ...    RPC result is False
+    ...    SxpLib.Add Bindings
+    ...    20
+    ...    1.1.1.1/32
+    ...    domain=guest
+    ...    origin=NETWORK
     BuiltIn.Comment    Verify that new binding is not added and previous binding is preserved
     Verify Bindings Content    10    20    1.1.1.1/32    guest
 
 Test Add Higher Priority Binding To Domain
     [Documentation]    Test that incoming binding with lower priority does not override already existing
     ...    higher priority binding in master database for the same IP prefix
-    [Tags]    Binding Origins Checks    SXP
+    [Tags]    binding origins checks    sxp
     BuiltIn.Comment    Create custom domain with binding
     SxpLib.Add Domain    guest    10    1.1.1.1/32    origin=NETWORK
     BuiltIn.Comment    Add binding to custom domain with higher priority
@@ -61,7 +75,7 @@ Test Add Higher Priority Binding To Domain
 
 Test Get Bindings
     [Documentation]    Test that when requesting for LOCAL bindings then only LOCAL bindings are returned
-    [Tags]    Binding Origins Checks    SXP
+    [Tags]    binding origins checks    sxp
     BuiltIn.Comment    Add LOCAL binding
     SxpLib.Add Bindings    10    1.1.1.1/32    origin=LOCAL
     BuiltIn.Comment    Add NETWORK binding
@@ -71,6 +85,7 @@ Test Get Bindings
     BuiltIn.Comment    Verify request for ALL bindings
     Verify All Bindings Content    10    1.1.1.1/32    20    2.2.2.2/32
 
+
 *** Keywords ***
 Clean Bindings
     SxpLib.Clean Bindings    scope=all
index f565c7823f71626322e80317d4e62d8cdc442fa2..48b54db0785bac9fa6cd8a356300a4ea6ec1f79e 100644 (file)
@@ -1,36 +1,70 @@
 *** Settings ***
-Documentation     Test suite to test cluster binding propagation
-Suite Setup       SxpClusterLib.Setup SXP Cluster Session With Device
-Suite Teardown    SxpClusterLib.Clean SXP Cluster Session
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/ClusterManagement.robot
-Resource          ../../../libraries/SxpClusterLib.robot
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to test cluster binding propagation
+
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/ClusterManagement.robot
+Resource            ../../../libraries/SxpClusterLib.robot
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         SxpClusterLib.Setup SXP Cluster Session With Device
+Suite Teardown      SxpClusterLib.Clean SXP Cluster Session
+
 
 *** Variables ***
-${RUNNING_MEMBER}    ${EMPTY}
+${RUNNING_MEMBER}       ${EMPTY}
+
 
 *** Test Cases ***
 Isolation of SXP service follower Test Speaker Part
     [Documentation]    Test SXP binding propagation from device to cluster after cluster owner is isolated
     [Setup]    Setup Custom SXP Cluster    speaker
     ${controller_index} =    SxpClusterLib.Get Owner Controller
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    Check Bindings    ${INADDR_ANY}    ClusterManagement__session_${controller_index}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    Check Bindings
+    ...    ${INADDR_ANY}
+    ...    ClusterManagement__session_${controller_index}
     Isolate SXP Controller    ${controller_index}    ${INADDR_ANY}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    Check Bindings    ${INADDR_ANY}    ClusterManagement__session_${RUNNING_MEMBER}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    Check Bindings
+    ...    ${INADDR_ANY}
+    ...    ClusterManagement__session_${RUNNING_MEMBER}
     UnIsolate SXP Controller    ${controller_index}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    Check Bindings    ${INADDR_ANY}    ClusterManagement__session_${controller_index}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    Check Bindings
+    ...    ${INADDR_ANY}
+    ...    ClusterManagement__session_${controller_index}
     [Teardown]    SxpClusterLib.Clean SXP Cluster
 
 Isolation of SXP noservice follower Test Speaker Part
     [Documentation]    Test SXP binding propagation from device to cluster after cluster (not owner) node is isolated
     [Setup]    Setup Custom SXP Cluster    speaker
     ${controller_index} =    SxpClusterLib.Get Not Owner Controller
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    Check Bindings    ${INADDR_ANY}    ClusterManagement__session_${controller_index}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    Check Bindings
+    ...    ${INADDR_ANY}
+    ...    ClusterManagement__session_${controller_index}
     Isolate SXP Controller    ${controller_index}    ${INADDR_ANY}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    Check Bindings    ${INADDR_ANY}    ClusterManagement__session_${RUNNING_MEMBER}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    Check Bindings
+    ...    ${INADDR_ANY}
+    ...    ClusterManagement__session_${RUNNING_MEMBER}
     UnIsolate SXP Controller    ${controller_index}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    Check Bindings    ${INADDR_ANY}    ClusterManagement__session_${controller_index}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    Check Bindings
+    ...    ${INADDR_ANY}
+    ...    ClusterManagement__session_${controller_index}
     [Teardown]    SxpClusterLib.Clean SXP Cluster
 
 Isolation of SXP service follower Test Listener Part
@@ -55,10 +89,11 @@ Isolation of SXP noservice follower Test Listener Part
     BuiltIn.Wait Until Keyword Succeeds    120x    1s    Check Bindings    ${DEVICE_NODE_ID}    ${DEVICE_SESSION}
     [Teardown]    SxpClusterLib.Clean SXP Cluster
 
+
 *** Keywords ***
 Setup Custom SXP Cluster
-    [Arguments]    ${mode}    ${node}=${DEVICE_NODE_ID}    ${session}=${DEVICE_SESSION}
     [Documentation]    Setup custom SXP cluster topology with ${NUM_ODL_SYSTEM} nodes and one device
+    [Arguments]    ${mode}    ${node}=${DEVICE_NODE_ID}    ${session}=${DEVICE_SESSION}
     SxpClusterLib.Check Shards Status
     SxpClusterLib.Setup SXP Cluster    ${mode}
     FOR    ${i}    IN RANGE    1    25
@@ -66,27 +101,55 @@ Setup Custom SXP Cluster
     END
 
 Isolate SXP Controller
-    [Arguments]    ${controller_index}    ${node}    ${session}=ClusterManagement__session_${controller_index}
     [Documentation]    Isolate one of cluster nodes and perform check that device is connected
+    [Arguments]    ${controller_index}    ${node}    ${session}=ClusterManagement__session_${controller_index}
     @{running_members} =    ClusterManagement.Isolate_Member_From_List_Or_All    ${controller_index}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    ClusterManagement.Verify_Members_Are_Ready    member_index_list=${running_members}    verify_cluster_sync=True    verify_restconf=True
-    ...    verify_system_status=False    service_list=${EMPTY_LIST}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    ClusterManagement.Verify_Members_Are_Ready
+    ...    member_index_list=${running_members}
+    ...    verify_cluster_sync=True
+    ...    verify_restconf=True
+    ...    verify_system_status=False
+    ...    service_list=${EMPTY_LIST}
     ${running_member} =    Collections.Get From List    ${running_members}    0
     BuiltIn.Set Test Variable    ${RUNNING_MEMBER}    ${running_member}
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    ClusterManagement.Sync_Status_Should_Be_False    ${controller_index}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpClusterLib.Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    ClusterManagement.Sync_Status_Should_Be_False
+    ...    ${controller_index}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpClusterLib.Check Device is Connected
+    ...    ${DEVICE_NODE_ID}
+    ...    session=${DEVICE_SESSION}
 
 UnIsolate SXP Controller
-    [Arguments]    ${controller_index}
     [Documentation]    Un-Isolate one of cluster nodes and perform check that device is connected
+    [Arguments]    ${controller_index}
     ClusterManagement.Flush_Iptables_From_List_Or_All
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    ClusterManagement.Verify_Members_Are_Ready    member_index_list=${EMPTY}    verify_cluster_sync=True    verify_restconf=True
-    ...    verify_system_status=False    service_list=${EMPTY_LIST}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpClusterLib.Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    ClusterManagement.Verify_Members_Are_Ready
+    ...    member_index_list=${EMPTY}
+    ...    verify_cluster_sync=True
+    ...    verify_restconf=True
+    ...    verify_system_status=False
+    ...    service_list=${EMPTY_LIST}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpClusterLib.Check Device is Connected
+    ...    ${DEVICE_NODE_ID}
+    ...    session=${DEVICE_SESSION}
 
 Check Bindings
-    [Arguments]    ${node}    ${session}
     [Documentation]    Checks that bindings were propagated to Peer
+    [Arguments]    ${node}    ${session}
     ${resp} =    SxpLib.Get Bindings    node=${node}    session=${session}
     FOR    ${i}    IN RANGE    1    25
         SxpLib.Should Contain Binding    ${resp}    ${i}0    ${i}.${i}.${i}.${i}/32
index eeb68089f441e662edd7bd14fabdeccf77e15a07..e0db50154e7213cbf88ed4fae1e216ff6a7c0d21 100644 (file)
@@ -1,26 +1,61 @@
 *** Settings ***
-Documentation     Test suite to test cluster connection switchover using virtual IP, this suite requires additional TOOLS_SYSTEM VM.
-...               VM is used for its assigned ip-address that will be overlayed by virtual-ip used in test suites.
-...               Resources of this VM are not required and after start of Test suite this node shutted down and to reduce routing conflicts.
-Suite Setup       Setup Custom SXP Cluster Session
-Suite Teardown    Clean Custom SXP Cluster Session
-Test Teardown     Custom Clean SXP Cluster
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/ClusterManagement.robot
-Resource          ../../../libraries/SxpClusterLib.robot
+Documentation       Test suite to test cluster connection switchover using virtual IP, this suite requires additional TOOLS_SYSTEM VM.
+...                 VM is used for its assigned ip-address that will be overlayed by virtual-ip used in test suites.
+...                 Resources of this VM are not required and after start of Test suite this node shutted down and to reduce routing conflicts.
+
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/ClusterManagement.robot
+Resource            ../../../libraries/SxpClusterLib.robot
+
+Suite Setup         Setup Custom SXP Cluster Session
+Suite Teardown      Clean Custom SXP Cluster Session
+Test Teardown       Custom Clean SXP Cluster
+
 
 *** Test Cases ***
 Route Definition Test
     [Documentation]    Test Route update mechanism without cluster node isolation
     SxpClusterLib.Check Shards Status
     ${owner_controller} =    SxpClusterLib.Get Owner Controller
-    BuiltIn.Wait Until Keyword Succeeds    240    1    SxpClusterLib.Ip Addres Should Not Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${owner_controller}
-    Add Route Definition To Cluster    ${VIRTUAL_IP}    ${VIRTUAL_IP_MASK}    ${VIRTUAL_INTERFACE}    ${owner_controller}
-    BuiltIn.Wait Until Keyword Succeeds    240    1    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${owner_controller}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240
+    ...    1
+    ...    SxpClusterLib.Ip Addres Should Not Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${owner_controller}
+    Add Route Definition To Cluster
+    ...    ${VIRTUAL_IP}
+    ...    ${VIRTUAL_IP_MASK}
+    ...    ${VIRTUAL_INTERFACE}
+    ...    ${owner_controller}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240
+    ...    1
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${owner_controller}
     SxpLib.Clean Routing Configuration To Controller    ClusterManagement__session_${owner_controller}
-    BuiltIn.Wait Until Keyword Succeeds    240    1    SxpClusterLib.Ip Addres Should Not Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${owner_controller}
-    Put Route Definition To Cluster    ${VIRTUAL_IP}    ${VIRTUAL_IP_MASK}    ${VIRTUAL_INTERFACE}    ${owner_controller}
-    BuiltIn.Wait Until Keyword Succeeds    240    1    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${owner_controller}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240
+    ...    1
+    ...    SxpClusterLib.Ip Addres Should Not Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${owner_controller}
+    Put Route Definition To Cluster
+    ...    ${VIRTUAL_IP}
+    ...    ${VIRTUAL_IP_MASK}
+    ...    ${VIRTUAL_INTERFACE}
+    ...    ${owner_controller}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240
+    ...    1
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${owner_controller}
 
 Isolation of SXP service follower Test
     [Documentation]    Test Route update mechanism during Cluster isolation,
@@ -31,17 +66,18 @@ Isolation of SXP service follower Test
     ${controller_index} =    SxpClusterLib.Get Owner Controller
     Isolate SXP Controller    ${controller_index}
 
+
 *** Keywords ***
 Put Route Definition To Cluster
-    [Arguments]    ${virtual_ip}    ${VIRTUAL_IP_MASK}    ${VIRTUAL_INTERFACE}    ${follower}
     [Documentation]    Put Route definition to DS replacing all present
+    [Arguments]    ${virtual_ip}    ${VIRTUAL_IP_MASK}    ${VIRTUAL_INTERFACE}    ${follower}
     ${route} =    Sxp.Route Definition Xml    ${virtual_ip}    ${VIRTUAL_IP_MASK}    ${VIRTUAL_INTERFACE}
     ${routes} =    Sxp.Route Definitions Xml    ${route}
     SxpLib.Put Routing Configuration To Controller    ${routes}    ClusterManagement__session_${follower}
 
 Add Route Definition To Cluster
-    [Arguments]    ${VIRTUAL_IP}    ${VIRTUAL_IP_MASK}    ${VIRTUAL_INTERFACE}    ${follower}
     [Documentation]    Add Route definition to DS
+    [Arguments]    ${VIRTUAL_IP}    ${VIRTUAL_IP_MASK}    ${VIRTUAL_INTERFACE}    ${follower}
     ${old_routes} =    SxpLib.Get Routing Configuration From Controller    ClusterManagement__session_${follower}
     ${route} =    Sxp.Route Definition Xml    ${VIRTUAL_IP}    ${VIRTUAL_IP_MASK}    ${VIRTUAL_INTERFACE}
     ${routes} =    Sxp.Route Definitions Xml    ${route}    ${old_routes}
@@ -66,17 +102,47 @@ Clean Custom SXP Cluster Session
     SxpClusterLib.Delete Virtual Interface
 
 Isolate SXP Controller
-    [Arguments]    ${controller_index}
     [Documentation]    Isolate the cluster leader node and perform check that virtual IP is routed to a new leader,
     ...    afterwards unisolate old leader.
+    [Arguments]    ${controller_index}
     @{running_members} =    ClusterManagement.Isolate_Member_From_List_Or_All    ${controller_index}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60    1    ClusterManagement.Verify_Members_Are_Ready    member_index_list=${running_members}    verify_cluster_sync=True    verify_restconf=True
-    ...    verify_system_status=False    service_list=${EMPTY_LIST}
-    BuiltIn.Wait Until Keyword Succeeds    240    1    ClusterManagement.Sync_Status_Should_Be_False    ${controller_index}
-    BuiltIn.Wait Until Keyword Succeeds    240    1    SxpClusterLib.Ip Addres Should Not Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${controller_index}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60
+    ...    1
+    ...    ClusterManagement.Verify_Members_Are_Ready
+    ...    member_index_list=${running_members}
+    ...    verify_cluster_sync=True
+    ...    verify_restconf=True
+    ...    verify_system_status=False
+    ...    service_list=${EMPTY_LIST}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240
+    ...    1
+    ...    ClusterManagement.Sync_Status_Should_Be_False
+    ...    ${controller_index}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240
+    ...    1
+    ...    SxpClusterLib.Ip Addres Should Not Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${controller_index}
     ${running_member} =    Collections.Get From List    ${running_members}    0
     ${active_follower} =    SxpClusterLib.Get Owner Controller    ${running_member}
-    BuiltIn.Wait Until Keyword Succeeds    240    1    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${active_follower}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240
+    ...    1
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${active_follower}
     ClusterManagement.Flush_Iptables_From_List_Or_All
-    BuiltIn.Wait_Until_Keyword_Succeeds    60    1    ClusterManagement.Verify_Members_Are_Ready    member_index_list=${EMPTY}    verify_cluster_sync=True    verify_restconf=True
-    ...    verify_system_status=False    service_list=${EMPTY_LIST}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60
+    ...    1
+    ...    ClusterManagement.Verify_Members_Are_Ready
+    ...    member_index_list=${EMPTY}
+    ...    verify_cluster_sync=True
+    ...    verify_restconf=True
+    ...    verify_system_status=False
+    ...    service_list=${EMPTY_LIST}
index 2fb0069909be7e3915ad7e728b9ed801590cb2f2..fb8f614351964e8b0a2ea9085019d007b1620afd 100644 (file)
@@ -1,26 +1,42 @@
 *** Settings ***
-Documentation     Test suite to test cluster connection and propagation switchover using virtual IP, this suite requires additional TOOLS_SYSTEM_2 VM.
-...               VM is used for its assigned ip-address that will be overlayed by virtual-ip used in test suites.
-...               Resources of this VM are not required. At suite start this node is shutted down to reduce routing conflicts.
-Suite Setup       Setup Custom SXP Cluster Session
-Suite Teardown    Clean Custom SXP Cluster Session
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/ClusterManagement.robot
-Resource          ../../../libraries/SxpClusterLib.robot
+Documentation       Test suite to test cluster connection and propagation switchover using virtual IP, this suite requires additional TOOLS_SYSTEM_2 VM.
+...                 VM is used for its assigned ip-address that will be overlayed by virtual-ip used in test suites.
+...                 Resources of this VM are not required. At suite start this node is shutted down to reduce routing conflicts.
+
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/ClusterManagement.robot
+Resource            ../../../libraries/SxpClusterLib.robot
+
+Suite Setup         Setup Custom SXP Cluster Session
+Suite Teardown      Clean Custom SXP Cluster Session
+
 
 *** Variables ***
-${BINDINGS}       4
-${NEW_OWNER}      ${EMPTY}
+${BINDINGS}     4
+${NEW_OWNER}    ${EMPTY}
+
 
 *** Test Cases ***
 Isolation Of SXP Service Follower W/O Bindings Listener Test
     [Documentation]    Device is listener. Connection between device and cluster must be established despite of cluster owner isolation
     [Setup]    Setup Nodes And Connections    listener
     ${cluster_owner} =    SxpClusterLib.Get Owner Controller
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${cluster_owner}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${cluster_owner}
     Check Connections    ${cluster_owner}    listener
     Isolate SXP Controller    ${cluster_owner}
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${NEW_OWNER}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${NEW_OWNER}
     Check Connections    ${NEW_OWNER}    listener
     [Teardown]    Clean Custom SXP Cluster
 
@@ -28,10 +44,22 @@ Isolation Of SXP Service Follower W/O Bindings Speaker Test
     [Documentation]    Device is speaker. Connection between device and cluster must be established despite of cluster owner isolation
     [Setup]    Setup Nodes And Connections    speaker
     ${cluster_owner} =    SxpClusterLib.Get Owner Controller
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${cluster_owner}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${cluster_owner}
     Check Connections    ${cluster_owner}    speaker
     Isolate SXP Controller    ${cluster_owner}
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${NEW_OWNER}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${NEW_OWNER}
     Check Connections    ${NEW_OWNER}    speaker
     [Teardown]    Clean Custom SXP Cluster
 
@@ -39,12 +67,24 @@ Isolation Of SXP Service Follower Listener Test
     [Documentation]    Device is listener. Cluster owner is isolated but bindings must be propagated to the device throught virtual IP
     [Setup]    Setup Nodes And Connections    listener
     ${cluster_owner} =    SxpClusterLib.Get Owner Controller
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${cluster_owner}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${cluster_owner}
     Check Connections    ${cluster_owner}    listener
     Add Bindings To Node    ${CLUSTER_NODE_ID}    ClusterManagement__session_${cluster_owner}
     BuiltIn.Wait Until Keyword Succeeds    240x    1s    Check Bindings    ${DEVICE_NODE_ID}    ${DEVICE_SESSION}
     Isolate SXP Controller    ${cluster_owner}
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${NEW_OWNER}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${NEW_OWNER}
     Check Connections    ${NEW_OWNER}    listener
     BuiltIn.Wait Until Keyword Succeeds    240x    1s    Check Bindings    ${DEVICE_NODE_ID}    ${DEVICE_SESSION}
     [Teardown]    Clean Custom SXP Cluster
@@ -53,16 +93,39 @@ Isolation Of SXP Service Follower Speaker Test
     [Documentation]    Device is speaker. Cluster owner is isolated but bindings must be propagated to the cluster throught virtual IP
     [Setup]    Setup Nodes And Connections    speaker
     ${cluster_owner} =    SxpClusterLib.Get Owner Controller
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${cluster_owner}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${cluster_owner}
     Check Connections    ${cluster_owner}    speaker
     Add Bindings To Node    ${DEVICE_NODE_ID}    ${DEVICE_SESSION}
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    Check Bindings    ${CLUSTER_NODE_ID}    ClusterManagement__session_${cluster_owner}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    Check Bindings
+    ...    ${CLUSTER_NODE_ID}
+    ...    ClusterManagement__session_${cluster_owner}
     Isolate SXP Controller    ${cluster_owner}
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpClusterLib.Ip Addres Should Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${NEW_OWNER}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    SxpClusterLib.Ip Addres Should Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${NEW_OWNER}
     Check Connections    ${NEW_OWNER}    speaker
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    Check Bindings    ${CLUSTER_NODE_ID}    ClusterManagement__session_${NEW_OWNER}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    Check Bindings
+    ...    ${CLUSTER_NODE_ID}
+    ...    ClusterManagement__session_${NEW_OWNER}
     [Teardown]    Clean Custom SXP Cluster
 
+
 *** Keywords ***
 Setup Custom SXP Cluster Session
     [Documentation]    Prepare topology for testing, creates sessions and generate Route definitions based on Cluster nodes IP
@@ -85,16 +148,33 @@ Setup Virtual IP
     SxpLib.Put Routing Configuration To Controller    ${routes}    ${CONTROLLER_SESSION}
 
 Setup Nodes And Connections
-    [Arguments]    ${peer_mode}
     [Documentation]    Setup and connect SXP cluster topology and one device
+    [Arguments]    ${peer_mode}
     SxpClusterLib.Check Shards Status
     SxpLib.Add Node    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}    retry_open_timer=2
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpLib.Check Node Started    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
-    SxpLib.Add Connection    version4    ${peer_mode}    ${VIRTUAL_IP}    64999    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    SxpLib.Check Node Started
+    ...    ${DEVICE_NODE_ID}
+    ...    session=${DEVICE_SESSION}
+    SxpLib.Add Connection
+    ...    version4
+    ...    ${peer_mode}
+    ...    ${VIRTUAL_IP}
+    ...    64999
+    ...    ${DEVICE_NODE_ID}
+    ...    session=${DEVICE_SESSION}
     ${cluster_mode} =    Sxp.Get Opposing Mode    ${peer_mode}
     SxpLib.Add Node    ${CLUSTER_NODE_ID}    session=${CONTROLLER_SESSION}    retry_open_timer=5
     BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpClusterLib.Check Cluster Node Started    ${CLUSTER_NODE_ID}
-    SxpLib.Add Connection    version4    ${cluster_mode}    ${DEVICE_NODE_ID}    64999    ${CLUSTER_NODE_ID}    session=${CONTROLLER_SESSION}
+    SxpLib.Add Connection
+    ...    version4
+    ...    ${cluster_mode}
+    ...    ${DEVICE_NODE_ID}
+    ...    64999
+    ...    ${CLUSTER_NODE_ID}
+    ...    session=${CONTROLLER_SESSION}
 
 Clean Custom SXP Cluster Session
     [Documentation]    Clean up resources generated by test
@@ -105,46 +185,82 @@ Clean Custom SXP Cluster Session
 Clean Custom SXP Cluster
     [Documentation]    Disconnect SXP cluster topology
     ClusterManagement.Flush_Iptables_From_List_Or_All
-    BuiltIn.Wait_Until_Keyword_Succeeds    60    1    ClusterManagement.Verify_Members_Are_Ready    member_index_list=${EMPTY}    verify_cluster_sync=True    verify_restconf=True
-    ...    verify_system_status=False    service_list=${EMPTY_LIST}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60
+    ...    1
+    ...    ClusterManagement.Verify_Members_Are_Ready
+    ...    member_index_list=${EMPTY}
+    ...    verify_cluster_sync=True
+    ...    verify_restconf=True
+    ...    verify_system_status=False
+    ...    service_list=${EMPTY_LIST}
     SxpLib.Delete Node    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
     SxpLib.Delete Node    ${CLUSTER_NODE_ID}    session=${CONTROLLER_SESSION}
 
 Add Bindings To Node
-    [Arguments]    ${node}    ${session}
     [Documentation]    Setup initial bindings to SXP device/controller ${node} with ${session}
+    [Arguments]    ${node}    ${session}
     FOR    ${i}    IN RANGE    1    ${BINDINGS}
         SxpLib.Add Bindings    ${i}0    ${i}.${i}.${i}.${i}/32    node=${node}    session=${session}
     END
 
 Isolate SXP Controller
-    [Arguments]    ${controller_index}
     [Documentation]    Isolate cluster node specified by ${controller_index} and find new owner
+    [Arguments]    ${controller_index}
     @{running_members} =    ClusterManagement.Isolate_Member_From_List_Or_All    ${controller_index}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60    1    ClusterManagement.Verify_Members_Are_Ready    member_index_list=${running_members}    verify_cluster_sync=True    verify_restconf=True
-    ...    verify_system_status=False    service_list=${EMPTY_LIST}
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    ClusterManagement.Sync_Status_Should_Be_False    ${controller_index}
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    SxpClusterLib.Ip Addres Should Not Be Routed To Follower    ${MAC_ADDRESS_TABLE}    ${VIRTUAL_IP}    ${controller_index}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60
+    ...    1
+    ...    ClusterManagement.Verify_Members_Are_Ready
+    ...    member_index_list=${running_members}
+    ...    verify_cluster_sync=True
+    ...    verify_restconf=True
+    ...    verify_system_status=False
+    ...    service_list=${EMPTY_LIST}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    ClusterManagement.Sync_Status_Should_Be_False
+    ...    ${controller_index}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    SxpClusterLib.Ip Addres Should Not Be Routed To Follower
+    ...    ${MAC_ADDRESS_TABLE}
+    ...    ${VIRTUAL_IP}
+    ...    ${controller_index}
     ${running_member} =    Collections.Get From List    ${running_members}    0
     ${new_owner} =    SxpClusterLib.Get Owner Controller    ${running_member}
     BuiltIn.Set Test Variable    ${NEW_OWNER}    ${new_owner}
 
 Check Connections
-    [Arguments]    ${controller_index}    ${peer_mode}
     [Documentation]    Check that connection is established between device and the cluster
+    [Arguments]    ${controller_index}    ${peer_mode}
     ${cluster_mode} =    Sxp.Get Opposing Mode    ${peer_mode}
-    BuiltIn.Wait Until Keyword Succeeds    480x    1s    SxpClusterLib.Check Cluster is Connected    ${CLUSTER_NODE_ID}    mode=${cluster_mode}    session=ClusterManagement__session_${controller_index}
-    BuiltIn.Wait Until Keyword Succeeds    480x    1s    Check Device is Connected    ${DEVICE_NODE_ID}    ${peer_mode}    session=${DEVICE_SESSION}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    480x
+    ...    1s
+    ...    SxpClusterLib.Check Cluster is Connected
+    ...    ${CLUSTER_NODE_ID}
+    ...    mode=${cluster_mode}
+    ...    session=ClusterManagement__session_${controller_index}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    480x
+    ...    1s
+    ...    Check Device is Connected
+    ...    ${DEVICE_NODE_ID}
+    ...    ${peer_mode}
+    ...    session=${DEVICE_SESSION}
 
 Check Device is Connected
-    [Arguments]    ${node}    ${mode}    ${session}    ${version}=version4    ${port}=64999
     [Documentation]    Check if SXP device is connected to the cluster. It means it has connection to ${VIRTUAL_IP} in state "on"
+    [Arguments]    ${node}    ${mode}    ${session}    ${version}=version4    ${port}=64999
     ${resp} =    SxpLib.Get Connections    node=${node}    session=${session}
     SxpLib.Should Contain Connection    ${resp}    ${VIRTUAL_IP}    ${port}    ${mode}    ${version}    on
 
 Check Bindings
-    [Arguments]    ${node}    ${session}
     [Documentation]    Check that bindings were propagated to the peer ${node}
+    [Arguments]    ${node}    ${session}
     ${resp} =    SxpLib.Get Bindings    node=${node}    session=${session}
     FOR    ${i}    IN RANGE    1    ${BINDINGS}
         SxpLib.Should Contain Binding    ${resp}    ${i}0    ${i}.${i}.${i}.${i}/32
index eccfbdb96f2fb7d148d388f9dbab514c0015ff38..724ad01b97096cc25345836235d9bf3f428da5e8 100644 (file)
@@ -1,11 +1,14 @@
 *** Settings ***
-Documentation     Test suite to test cluster connection switchover
-Suite Setup       SxpClusterLib.Setup SXP Cluster Session With Device
-Suite Teardown    SxpClusterLib.Clean SXP Cluster Session
-Test Setup        SxpClusterLib.Setup SXP Cluster
-Test Teardown     SxpClusterLib.Clean SXP Cluster
-Resource          ../../../libraries/ClusterManagement.robot
-Resource          ../../../libraries/SxpClusterLib.robot
+Documentation       Test suite to test cluster connection switchover
+
+Resource            ../../../libraries/ClusterManagement.robot
+Resource            ../../../libraries/SxpClusterLib.robot
+
+Suite Setup         SxpClusterLib.Setup SXP Cluster Session With Device
+Suite Teardown      SxpClusterLib.Clean SXP Cluster Session
+Test Setup          SxpClusterLib.Setup SXP Cluster
+Test Teardown       SxpClusterLib.Clean SXP Cluster
+
 
 *** Test Cases ***
 Isolation of SXP service follower Test
@@ -20,16 +23,45 @@ Isolation of SXP noservice follower Test
     ${controller_index} =    SxpClusterLib.Get Not Owner Controller
     Isolate SXP Controller    ${controller_index}
 
+
 *** Keywords ***
 Isolate SXP Controller
-    [Arguments]    ${controller_index}
     [Documentation]    Isolate one of cluster nodes and perform check that Device is still connected afterwards reverts isolation
+    [Arguments]    ${controller_index}
     ${running_members} =    ClusterManagement.Isolate_Member_From_List_Or_All    ${controller_index}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    ClusterManagement.Verify_Members_Are_Ready    member_index_list=${running_members}    verify_cluster_sync=True    verify_restconf=True
-    ...    verify_system_status=False    service_list=${EMPTY_LIST}
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    ClusterManagement.Sync_Status_Should_Be_False    ${controller_index}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpClusterLib.Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    ClusterManagement.Verify_Members_Are_Ready
+    ...    member_index_list=${running_members}
+    ...    verify_cluster_sync=True
+    ...    verify_restconf=True
+    ...    verify_system_status=False
+    ...    service_list=${EMPTY_LIST}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    ClusterManagement.Sync_Status_Should_Be_False
+    ...    ${controller_index}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpClusterLib.Check Device is Connected
+    ...    ${DEVICE_NODE_ID}
+    ...    session=${DEVICE_SESSION}
     ClusterManagement.Flush_Iptables_From_List_Or_All
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    ClusterManagement.Verify_Members_Are_Ready    member_index_list=${EMPTY}    verify_cluster_sync=True    verify_restconf=True
-    ...    verify_system_status=False    service_list=${EMPTY_LIST}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpClusterLib.Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    ClusterManagement.Verify_Members_Are_Ready
+    ...    member_index_list=${EMPTY}
+    ...    verify_cluster_sync=True
+    ...    verify_restconf=True
+    ...    verify_system_status=False
+    ...    service_list=${EMPTY_LIST}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpClusterLib.Check Device is Connected
+    ...    ${DEVICE_NODE_ID}
+    ...    session=${DEVICE_SESSION}
index 8cd4be78bfdee26ffcfa53fb7ab6f22e3355d0d9..64ac0953493d9fcd09ce41fdaf2336c97ea1b208 100644 (file)
@@ -1,25 +1,38 @@
 *** Settings ***
-Documentation     SXP holds active SXP nodes only on the cluster owner node. Active SXP node holds its master database and datastore access. This implies that all RPC operation logic must be executed only on cluster owner node. In case RPC is send to another cluster node it must be redirected to owner to be properly executed. This suite contains tests for SxpControllerService and SxpConfigControllerService RPCs.
-Suite Setup       SxpClusterLib.Setup SXP Cluster Session
-Suite Teardown    SxpClusterLib.Clean SXP Cluster Session
-Library           ../../../libraries/Common.py
-Resource          ../../../libraries/CompareStream.robot
-Resource          ../../../libraries/SxpBindingOriginsLib.robot
-Resource          ../../../libraries/SxpClusterLib.robot
-Resource          ../../../libraries/SxpLib.robot
+Documentation       SXP holds active SXP nodes only on the cluster owner node. Active SXP node holds its master database and datastore access. This implies that all RPC operation logic must be executed only on cluster owner node. In case RPC is send to another cluster node it must be redirected to owner to be properly executed. This suite contains tests for SxpControllerService and SxpConfigControllerService RPCs.
+
+Library             ../../../libraries/Common.py
+Resource            ../../../libraries/CompareStream.robot
+Resource            ../../../libraries/SxpBindingOriginsLib.robot
+Resource            ../../../libraries/SxpClusterLib.robot
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         SxpClusterLib.Setup SXP Cluster Session
+Suite Teardown      SxpClusterLib.Clean SXP Cluster Session
+
 
 *** Test Cases ***
 Test Add/Delete Node
     [Documentation]    Adding and then deleting SXP node is sucessfull only if all operations are done on cluster owner node. To verify that all RPCs are redirected to cluster owner send add-node RPC to the first cluster node and delete-node RPC to the second cluster node (requires datastore access).
-    [Tags]    SXP Clustering Redirecting
+    [Tags]    sxp clustering redirecting
     SxpLib.Add Node    ${INADDR_ANY}    session=ClusterManagement__session_1
-    BuiltIn.Wait Until Keyword Succeeds    20x    10s    SxpClusterLib.Check Cluster Node started    ${INADDR_ANY}    ip=${EMPTY}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    20x
+    ...    10s
+    ...    SxpClusterLib.Check Cluster Node started
+    ...    ${INADDR_ANY}
+    ...    ip=${EMPTY}
     SxpLib.Delete Node    ${INADDR_ANY}    session=ClusterManagement__session_2
-    BuiltIn.Wait Until Keyword Succeeds    12x    10s    SxpClusterLib.Check Cluster Node stopped    ${INADDR_ANY}    ip=${EMPTY}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    12x
+    ...    10s
+    ...    SxpClusterLib.Check Cluster Node stopped
+    ...    ${INADDR_ANY}
+    ...    ip=${EMPTY}
 
 Test Add/Delete Binding
     [Documentation]    Adding and then deleting binding from a SXP node is sucessfull only if all operations are done on cluster owner node. To verify that all RPCs are redirected to cluster owner send add-node RPC to the first cluster node, add-bindings RPC to the second cluster node (requires master database) and delete-bindings RPC to the third cluster node (requires master database).
-    [Tags]    SXP Clustering Redirecting
+    [Tags]    sxp clustering redirecting
     Add Node And Check It Is Started
     SxpLib.Add Bindings    1100    1.1.1.1/32    node=${INADDR_ANY}    session=ClusterManagement__session_2
     SxpLib.Delete Bindings    1100    1.1.1.1/32    node=${INADDR_ANY}    session=ClusterManagement__session_3
@@ -27,7 +40,7 @@ Test Add/Delete Binding
 
 Test Add/Delete Domain
     [Documentation]    Adding and then deleting domain from a SXP node is sucessfull only if all operations are done on cluster owner node. To verify that all RPCs are redirected to cluster owner send add-node RPC to the first cluster node, add-domain RPC to the second cluster node (requires datastore access and master database) and delete-domain RPC to the third cluster node (requires datastore access).
-    [Tags]    SXP Clustering Redirecting
+    [Tags]    sxp clustering redirecting
     Add Node And Check It Is Started
     SxpLib.Add Domain    cluster    node=${INADDR_ANY}    session=ClusterManagement__session_2
     SxpLib.Delete Domain    cluster    node=${INADDR_ANY}    session=ClusterManagement__session_3
@@ -35,15 +48,21 @@ Test Add/Delete Domain
 
 Test Add/Delete Connection
     [Documentation]    Adding and then deleting connection from a SXP node is sucessfull only if all operations are done on cluster owner node. To verify that all RPCs are redirected to cluster owner send add-node RPC to the first cluster node, add-connection RPC to the second cluster node (requires datastore access) and delete-connection RPC to the third cluster node (requires datastore access).
-    [Tags]    SXP Clustering Redirecting
+    [Tags]    sxp clustering redirecting
     Add Node And Check It Is Started
-    SxpLib.Add Connection    version4    listener    ${INADDR_ANY}    64999    node=${INADDR_ANY}    session=ClusterManagement__session_1
+    SxpLib.Add Connection
+    ...    version4
+    ...    listener
+    ...    ${INADDR_ANY}
+    ...    64999
+    ...    node=${INADDR_ANY}
+    ...    session=ClusterManagement__session_1
     SxpLib.Delete Connections    ${INADDR_ANY}    64999    node=${INADDR_ANY}    session=ClusterManagement__session_2
     [Teardown]    Delete Node And Check It Is Stopped
 
 Test Add/Delete Peer Group
     [Documentation]    Adding and then deleting peer group from a SXP node is sucessfull only if all operations are done on cluster owner node. To verify that all RPCs are redirected to cluster owner send add-peer-group RPC to the first cluster node, get-peer-groups RPC to the second cluster node (requires datastore access) and delete-peer-group RPC to the third cluster node (requires datastore access).
-    [Tags]    SXP Clustering Redirecting
+    [Tags]    sxp clustering redirecting
     [Setup]    Add Node And Check It Is Started
     SxpLib.Add PeerGroup    GROUP    peers=${EMPTY}    node=${INADDR_ANY}    session=ClusterManagement__session_1
     ${resp} =    SxpLib.Get Peer Groups    ${INADDR_ANY}    session=ClusterManagement__session_2
@@ -55,47 +74,78 @@ Test Add/Delete Peer Group
 
 Test Add/Delete Domain Filter
     [Documentation]    Adding and then deleting domain filter from a SXP node is sucessfull only if all operations are done on cluster owner node. To verify that all RPCs are redirected to cluster owner send add-domain-filter RPC to the first cluster node and delete-domain-filter RPC to the second cluster node (requires datastore access).
-    [Tags]    SXP Clustering Redirecting
+    [Tags]    sxp clustering redirecting
     [Setup]    Add Node And Check It Is Started
     ${domain_1_xml} =    Sxp.Add Domains    domain-1
     ${domain_2_xml} =    Sxp.Add Domains    domain-2
     ${domains} =    Common.Combine Strings    ${domain_1_xml}    ${domain_2_xml}
     ${entry} =    Sxp.Get Filter Entry    10    permit    pl=20.0.0.0/8
     ${entries} =    Common.Combine Strings    ${entry}
-    SxpLib.Add Domain Filter    global    ${domains}    ${entries}    node=${INADDR_ANY}    session=ClusterManagement__session_1
+    SxpLib.Add Domain Filter
+    ...    global
+    ...    ${domains}
+    ...    ${entries}
+    ...    node=${INADDR_ANY}
+    ...    session=ClusterManagement__session_1
     SxpLib.Delete Domain Filter    global    node=${INADDR_ANY}    session=ClusterManagement__session_2
     [Teardown]    Delete Node And Check It Is Stopped
 
 Test Add/Delete Filter
     [Documentation]    Adding, updating and then deleting filter from a SXP node is sucessfull only if all operations are done on cluster owner node. To verify that all RPCs are redirected to cluster owner send add-filter RPC to the first cluster node, update-filter RPC to the second cluster node (requires datastore access) and delete-filter RPC to the third cluster node (requires datastore access).
-    [Tags]    SXP Clustering Redirecting
+    [Tags]    sxp clustering redirecting
     [Setup]    Add Node And Check It Is Started
     ${entry1} =    Sxp.Get Filter Entry    10    deny    pl=10.10.20.0/24
     ${entry2} =    Sxp.Get Filter Entry    20    permit    epl=10.10.0.0/16,le,24
     ${entry3} =    Sxp.Get Filter Entry    30    permit    sgt=30    pl=10.10.10.0/24
     ${entries} =    Common.Combine Strings    ${entry1}    ${entry2}    ${entry3}
     SxpLib.Add PeerGroup    GROUP    peers=${EMPTY}    node=${INADDR_ANY}    session=${CONTROLLER_SESSION}
-    SxpLib.Add Filter    GROUP    outbound    ${entries}    node=${INADDR_ANY}    policy=manual-update    session=ClusterManagement__session_1
-    SxpLib.Update Filter    GROUP    outbound    ${entries}    node=${INADDR_ANY}    policy=manual-update    session=ClusterManagement__session_2
+    SxpLib.Add Filter
+    ...    GROUP
+    ...    outbound
+    ...    ${entries}
+    ...    node=${INADDR_ANY}
+    ...    policy=manual-update
+    ...    session=ClusterManagement__session_1
+    SxpLib.Update Filter
+    ...    GROUP
+    ...    outbound
+    ...    ${entries}
+    ...    node=${INADDR_ANY}
+    ...    policy=manual-update
+    ...    session=ClusterManagement__session_2
     SxpLib.Delete Filter    GROUP    outbound    node=${INADDR_ANY}    session=ClusterManagement__session_3
     [Teardown]    Delete Node And Check It Is Stopped
 
 Test Add/Update/Delete Binding Origin
     [Documentation]    Binding origin operations need to be executed on cluster owner because they rely on static map which is present solely on cluster owner. To test that binding origin RPCs are redirected to cluster owner first add binding origin to the first node then update it on the second node (requires up-to date binding origin map) and update it on the third node (requires up-to date binding origin map).
-    [Tags]    SXP Clustering Redirecting
-    CompareStream.Run_Keyword_If_Less_Than    fluorine    BuiltIn.Pass Execution    Binding origins are not supported before Fluorine
+    [Tags]    sxp clustering redirecting
+    CompareStream.Run_Keyword_If_Less_Than
+    ...    fluorine
+    ...    BuiltIn.Pass Execution
+    ...    Binding origins are not supported before Fluorine
     SxpBindingOriginsLib.Add Binding Origin    CLUSTER    0    session=ClusterManagement__session_1
     SxpBindingOriginsLib.Update Binding Origin    CLUSTER    3    session=ClusterManagement__session_2
     SxpBindingOriginsLib.Delete Binding Origin    CLUSTER    session=ClusterManagement__session_3
     [Teardown]    SxpBindingOriginsLib.Revert To Default Binding Origins Configuration    session=${CONTROLLER_SESSION}
 
+
 *** Keywords ***
 Add Node And Check It Is Started
     [Documentation]    Send add-node RPC to the first cluster member and check if node has been started.
     SxpLib.Add Node    ${INADDR_ANY}    session=ClusterManagement__session_1
-    BuiltIn.Wait Until Keyword Succeeds    20x    10s    SxpClusterLib.Check Cluster Node started    ${INADDR_ANY}    ip=${EMPTY}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    20x
+    ...    10s
+    ...    SxpClusterLib.Check Cluster Node started
+    ...    ${INADDR_ANY}
+    ...    ip=${EMPTY}
 
 Delete Node And Check It Is Stopped
     [Documentation]    Send delete-node RPC to the first cluster member and check if node has been stopped.
     SxpLib.Delete Node    ${INADDR_ANY}    session=ClusterManagement__session_1
-    BuiltIn.Wait Until Keyword Succeeds    20x    10s    SxpClusterLib.Check Cluster Node stopped    ${INADDR_ANY}    ip=${EMPTY}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    20x
+    ...    10s
+    ...    SxpClusterLib.Check Cluster Node stopped
+    ...    ${INADDR_ANY}
+    ...    ip=${EMPTY}
index 83719ffc6c3eb5516ffd252d978d9f0c0b66fdaa..ded94eb02cf9aa9182d86fe08aaedd0e6d8169b3 100644 (file)
@@ -1,13 +1,16 @@
 *** Settings ***
-Documentation     Test suite to verify RPC funcionality on cluster
-Suite Setup       SxpClusterLib.Setup SXP Cluster Session With Device
-Suite Teardown    SxpClusterLib.Clean SXP Cluster Session
-Test Setup        SxpClusterLib.Setup SXP Cluster
-Test Teardown     SxpClusterLib.Clean SXP Cluster
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/ClusterManagement.robot
-Resource          ../../../libraries/SxpClusterLib.robot
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to verify RPC funcionality on cluster
+
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/ClusterManagement.robot
+Resource            ../../../libraries/SxpClusterLib.robot
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         SxpClusterLib.Setup SXP Cluster Session With Device
+Suite Teardown      SxpClusterLib.Clean SXP Cluster Session
+Test Setup          SxpClusterLib.Setup SXP Cluster
+Test Teardown       SxpClusterLib.Clean SXP Cluster
+
 
 *** Test Cases ***
 Isolation of RCP service Test
@@ -22,40 +25,67 @@ Isolation of RPC noservice Test
     ${controller_index} =    SxpClusterLib.Get Not Owner Controller
     Isolate SXP Controller    ${controller_index}
 
+
 *** Keywords ***
 Isolate SXP Controller
-    [Arguments]    ${controller_index}
     [Documentation]    Isolate one of cluster nodes and perform check that RPC changes were performed afterwards reverts isolation
+    [Arguments]    ${controller_index}
     ${owner_controller} =    SxpClusterLib.Get Owner Controller
     FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
-        SxpLib.Add Bindings    ${i+1}0    ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32    node=${INADDR_ANY}    session=ClusterManagement__session_${owner_controller}
+        SxpLib.Add Bindings
+        ...    ${i+1}0
+        ...    ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32
+        ...    node=${INADDR_ANY}
+        ...    session=ClusterManagement__session_${owner_controller}
     END
     @{running_members} =    ClusterManagement.Isolate_Member_From_List_Or_All    ${controller_index}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    ClusterManagement.Verify_Members_Are_Ready    member_index_list=${running_members}    verify_cluster_sync=True    verify_restconf=True
-    ...    verify_system_status=False    service_list=${EMPTY_LIST}
-    BuiltIn.Wait Until Keyword Succeeds    240x    1s    ClusterManagement.Sync_Status_Should_Be_False    ${controller_index}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    ClusterManagement.Verify_Members_Are_Ready
+    ...    member_index_list=${running_members}
+    ...    verify_cluster_sync=True
+    ...    verify_restconf=True
+    ...    verify_system_status=False
+    ...    service_list=${EMPTY_LIST}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    240x
+    ...    1s
+    ...    ClusterManagement.Sync_Status_Should_Be_False
+    ...    ${controller_index}
     ${running_member} =    Collections.Get From List    ${running_members}    0
     ${owner_controller} =    SxpClusterLib.Get Owner Controller    ${running_member}
     BuiltIn.Wait Until Keyword Succeeds    60x    1s    Check Bindings Exist    ${owner_controller}
     FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
-        SxpLib.Delete Bindings    ${i+1}0    ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32    node=${INADDR_ANY}    session=ClusterManagement__session_${owner_controller}
+        SxpLib.Delete Bindings
+        ...    ${i+1}0
+        ...    ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32
+        ...    node=${INADDR_ANY}
+        ...    session=ClusterManagement__session_${owner_controller}
     END
     ClusterManagement.Flush_Iptables_From_List_Or_All
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    ClusterManagement.Verify_Members_Are_Ready    member_index_list=${EMPTY}    verify_cluster_sync=True    verify_restconf=True
-    ...    verify_system_status=False    service_list=${EMPTY_LIST}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    ClusterManagement.Verify_Members_Are_Ready
+    ...    member_index_list=${EMPTY}
+    ...    verify_cluster_sync=True
+    ...    verify_restconf=True
+    ...    verify_system_status=False
+    ...    service_list=${EMPTY_LIST}
     BuiltIn.Wait Until Keyword Succeeds    60x    1s    Check Bindings Does Not Exist    ${owner_controller}
 
 Check Bindings Exist
-    [Arguments]    ${owner_controller}
     [Documentation]    Check that bindings exists in Cluster datastore
+    [Arguments]    ${owner_controller}
     ${resp} =    SxpLib.Get Bindings    node=${INADDR_ANY}    session=ClusterManagement__session_${owner_controller}
     FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
         SxpLib.Should Contain Binding    ${resp}    ${i+1}0    ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32
     END
 
 Check Bindings Does Not Exist
-    [Arguments]    ${owner_controller}
     [Documentation]    Check that bindings does not exist in Cluster datastore
+    [Arguments]    ${owner_controller}
     ${resp} =    SxpLib.Get Bindings    node=${INADDR_ANY}    session=ClusterManagement__session_${owner_controller}
     FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
         SxpLib.Should Not Contain Binding    ${resp}    ${i+1}0    ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32
index 8d509eb0db8b408f355671efcc40af343b80c679..5ab7883e05d751b82efe651d5fc47882825fd332 100644 (file)
@@ -1,21 +1,22 @@
 *** Settings ***
-Documentation     Test suite to verify Inbound filtering functionality
-Suite Setup       Setup SXP Environment    5
-Suite Teardown    Clean SXP Environment    5
-Test Teardown     Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Library           ../../../libraries/Common.py
-Resource          ../../../libraries/SxpLib.robot
-Resource          ../../../libraries/SXP/FilteringResources.robot
+Documentation       Test suite to verify Inbound filtering functionality
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Library             ../../../libraries/Common.py
+Resource            ../../../libraries/SxpLib.robot
+Resource            ../../../libraries/SXP/FilteringResources.robot
+
+Suite Setup         Setup SXP Environment    5
+Suite Teardown      Clean SXP Environment    5
+Test Teardown       Clean Nodes
 
-*** Variables ***
 
 *** Test Cases ***
 Access List Filtering
     [Documentation]    Test ACL filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.2    127.0.0.4
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    acl=10.10.10.0,0.0.0.255
@@ -35,7 +36,7 @@ Access List Filtering
 
 Access List Sgt Filtering
     [Documentation]    Test ACL and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.3    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    sgt=30    acl=10.10.10.0,0.0.0.255
@@ -51,7 +52,7 @@ Access List Sgt Filtering
 
 Prefix List Filtering
     [Documentation]    Test Prefix List filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.2    127.0.0.4
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    pl=10.10.10.0/24
@@ -71,7 +72,7 @@ Prefix List Filtering
 
 Prefix List Sgt Filtering
     [Documentation]    Test Prefix List and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.3    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    sgt=30    pl=10.10.10.0/24
index 13567d0addc6bfdbd619955a38a11754e61aca7a..053a865b030b1f876863d6fd4d3028e77cc29c43 100644 (file)
@@ -1,21 +1,22 @@
 *** Settings ***
-Documentation     Test suite to verify Outbound filtering functionality
-Suite Setup       Setup SXP Environment    5
-Suite Teardown    Clean SXP Environment    5
-Test Teardown     Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Library           ../../../libraries/Common.py
-Resource          ../../../libraries/SxpLib.robot
-Resource          ../../../libraries/SXP/FilteringResources.robot
+Documentation       Test suite to verify Outbound filtering functionality
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Library             ../../../libraries/Common.py
+Resource            ../../../libraries/SxpLib.robot
+Resource            ../../../libraries/SXP/FilteringResources.robot
+
+Suite Setup         Setup SXP Environment    5
+Suite Teardown      Clean SXP Environment    5
+Test Teardown       Clean Nodes
 
-*** Variables ***
 
 *** Test Cases ***
 Access List Filtering
     [Documentation]    Test ACL filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.4    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    acl=10.10.10.0,0.0.0.255
@@ -34,7 +35,7 @@ Access List Filtering
 
 Access List Sgt Filtering
     [Documentation]    Test ACL and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.2    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    deny    acl=10.10.20.0,0.0.0.255
@@ -51,7 +52,7 @@ Access List Sgt Filtering
 
 Prefix List Filtering
     [Documentation]    Test Prefix List filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.4    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    pl=10.10.10.0/24
@@ -70,7 +71,7 @@ Prefix List Filtering
 
 Prefix List Sgt Filtering
     [Documentation]    Test Prefix List and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.2    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    deny    pl=10.10.20.0/24
index 010b45892d977f44e187ece67c399ab8009767ff..fcf74ae7da936d9a1c14c3354bc3d4b9117e28c8 100644 (file)
@@ -1,20 +1,21 @@
 *** Settings ***
-Documentation     Test suite to verify inbound-discarding filtering functionality
-Suite Setup       Setup SXP Environment    5
-Suite Teardown    Clean SXP Environment    5
-Test Teardown     Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Library           ../../../libraries/Common.py
-Resource          ../../../libraries/SxpLib.robot
-
-*** Variables ***
+Documentation       Test suite to verify inbound-discarding filtering functionality
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Library             ../../../libraries/Common.py
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         Setup SXP Environment    5
+Suite Teardown      Clean SXP Environment    5
+Test Teardown       Clean Nodes
+
 
 *** Test Cases ***
 Access List Filtering
     [Documentation]    Test ACL filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     Setup Nodes
     ${peers} =    Sxp.Add Peers    127.0.0.2    127.0.0.4
     SxpLib.Add PeerGroup    GROUP    ${peers}
@@ -28,7 +29,7 @@ Access List Filtering
 
 Access List Sgt Filtering
     [Documentation]    Test ACL and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers} =    Sxp.Add Peers    127.0.0.3    127.0.0.5
     SxpLib.Add PeerGroup    GROUP    ${peers}
     ${entry1} =    Sxp.Get Filter Entry    10    permit    sgt=30    acl=10.10.10.0,0.0.0.255
@@ -42,7 +43,7 @@ Access List Sgt Filtering
 
 Prefix List Filtering
     [Documentation]    Test Prefix List filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     Setup Nodes
     ${peers} =    Sxp.Add Peers    127.0.0.2    127.0.0.4
     SxpLib.Add PeerGroup    GROUP    ${peers}
@@ -56,7 +57,7 @@ Prefix List Filtering
 
 Prefix List Sgt Filtering
     [Documentation]    Test Prefix List and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers} =    Sxp.Add Peers    127.0.0.3    127.0.0.5
     SxpLib.Add PeerGroup    GROUP    ${peers}
     ${entry1} =    Sxp.Get Filter Entry    10    permit    sgt=30    pl=10.10.10.0/24
@@ -70,7 +71,7 @@ Prefix List Sgt Filtering
 
 Access List Filtering Legacy
     [Documentation]    Test ACL filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     Setup Nodes Legacy Par Two
     ${peers} =    Sxp.Add Peers    127.0.0.2    127.0.0.4
     SxpLib.Add PeerGroup    GROUP    ${peers}
@@ -84,7 +85,7 @@ Access List Filtering Legacy
 
 Access List Sgt Filtering Legacy
     [Documentation]    Test ACL and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers} =    Sxp.Add Peers    127.0.0.3    127.0.0.5
     SxpLib.Add PeerGroup    GROUP    ${peers}
     ${entry1} =    Sxp.Get Filter Entry    10    permit    sgt=30    acl=10.10.10.0,0.0.0.255
@@ -98,7 +99,7 @@ Access List Sgt Filtering Legacy
 
 Prefix List Filtering Legacy
     [Documentation]    Test Prefix List filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     Setup Nodes Legacy Par Two
     ${peers} =    Sxp.Add Peers    127.0.0.2    127.0.0.4
     SxpLib.Add PeerGroup    GROUP    ${peers}
@@ -112,7 +113,7 @@ Prefix List Filtering Legacy
 
 Prefix List Sgt Filtering Legacy
     [Documentation]    Test Prefix List and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers} =    Sxp.Add Peers    127.0.0.3    127.0.0.5
     SxpLib.Add PeerGroup    GROUP    ${peers}
     ${entry1} =    Sxp.Get Filter Entry    10    permit    sgt=30    pl=10.10.10.0/24
@@ -124,6 +125,7 @@ Prefix List Sgt Filtering Legacy
     SxpLib.Delete Filter    GROUP    inbound-discarding
     BuiltIn.Wait Until Keyword Succeeds    4    2    Check One Group 5-3
 
+
 *** Keywords ***
 Setup Nodes
     [Arguments]    ${version}=version4    ${password}=none
index 168c93c4994e51bb11952df694df70a83c775062..d4e67de8e995c7415f2522e3ce1e308a239f1f3c 100644 (file)
@@ -1,18 +1,21 @@
 *** Settings ***
-Documentation     Test suite to verify PeerSequence filtering functionality
-Suite Setup       Setup SXP Environment    5
-Suite Teardown    Clean SXP Environment    5
-Test Teardown     Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Library           ../../../libraries/Common.py
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to verify PeerSequence filtering functionality
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Library             ../../../libraries/Common.py
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         Setup SXP Environment    5
+Suite Teardown      Clean SXP Environment    5
+Test Teardown       Clean Nodes
+
 
 *** Test Cases ***
 Peer Sequence Filtering
     [Documentation]    Test PeerSequence filter behaviour
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers} =    Sxp.Add Peers    127.0.0.2
     SxpLib.Add PeerGroup    GROUP    ${peers}
     ${entry1} =    Sxp.Get Filter Entry    10    permit    ps=le,0
@@ -40,7 +43,7 @@ Peer Sequence Filtering
 
 Inbound PL Combinations Filtering
     [Documentation]    Test PeerSequence filter combined with PrefixList filter
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     @{scopes} =    BuiltIn.Create List    inbound    inbound-discarding
     FOR    ${scope}    IN    @{scopes}
         SxpLib.Add PeerGroup    GROUP
@@ -59,13 +62,13 @@ Inbound PL Combinations Filtering
 
 Inbound ACL Combinations Filtering
     [Documentation]    Test PeerSequence filter combined with ACL filter
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     @{scopes} =    BuiltIn.Create List    inbound    inbound-discarding
     FOR    ${scope}    IN    @{scopes}
         ${peers} =    Sxp.Add Peers    127.0.0.2
         SxpLib.Add PeerGroup    GROUP2    ${peers}
         ${entry1} =    Sxp.Get Filter Entry    10    permit    ps=le,2
-        ${entries}    Common.Combine Strings    ${entry1}
+        ${entries}    Common.Combine Strings    ${entry1}
         SxpLib.Add Filter    GROUP2    ${scope}    ${entries}
         Setup Nodes Inbound Test
         ${entry1} =    Sxp.Get Filter Entry    10    permit    acl=1.1.1.0,0.0.0.255
@@ -82,7 +85,7 @@ Inbound ACL Combinations Filtering
 
 Outbound PL Combinations Filtering
     [Documentation]    Test PeerSequence filter combined with PrefixList filter
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     SxpLib.Add PeerGroup    GROUP
     ${entry1} =    Sxp.Get Filter Entry    10    permit    pl=1.1.1.0/24
     ${entries} =    Common.Combine Strings    ${entry1}
@@ -97,7 +100,7 @@ Outbound PL Combinations Filtering
 
 Outbound ACL Combinations Filtering
     [Documentation]    Test PeerSequence filter combined with ACL filter
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     SxpLib.Add PeerGroup    GROUP
     ${entry1} =    Sxp.Get Filter Entry    10    permit    ps=eq,0
     ${entry2} =    Sxp.Get Filter Entry    20    permit    ps=ge,2
@@ -111,10 +114,11 @@ Outbound ACL Combinations Filtering
     SxpLib.Add Filter    GROUP2    outbound    ${entries}
     BuiltIn.Wait Until Keyword Succeeds    4    2    Check Outbound ACL Combinations Filtering
 
+
 *** Keywords ***
 Setup Nodes
-    [Arguments]    ${version}=version4    ${password}=none
     [Documentation]    Setup Topology for PeerSequence tests
+    [Arguments]    ${version}=version4    ${password}=none
     SxpLib.Add Bindings    10    10.10.10.10/32    127.0.0.1
     SxpLib.Add Bindings    10    10.10.10.0/24    127.0.0.1
     SxpLib.Add Bindings    10    10.10.0.0/16    127.0.0.1
@@ -141,8 +145,8 @@ Setup Nodes
     ...    64999    127.0.0.4
 
 Setup Nodes Inbound Test
-    [Arguments]    ${version}=version4    ${password}=none
     [Documentation]    Setup Topology for inbound PeerSequence and other filters tests
+    [Arguments]    ${version}=version4    ${password}=none
     FOR    ${node}    IN RANGE    2    6
         SxpLib.Add Bindings    ${node}0    1.1.1.${node}/32    127.0.0.${node}
         SxpLib.Add Bindings    ${node}0    1.1.${node}.0/24    127.0.0.${node}
@@ -169,8 +173,8 @@ Setup Nodes Inbound Test
     ...    64999    127.0.0.4
 
 Setup Nodes Outbound Test
-    [Arguments]    ${version}=version4    ${password}=none
     [Documentation]    Setup Topology for outbound PeerSequence and other filters tests
+    [Arguments]    ${version}=version4    ${password}=none
     SxpLib.Add Bindings    10    1.1.1.1/32    127.0.0.1
     SxpLib.Add Bindings    10    1.1.1.0/24    127.0.0.1
     SxpLib.Add Bindings    10    1.1.0.0/16    127.0.0.1
index f34667719601333ab71e72a693d690523f65ad10..3772e49f2de29033b667b49c8f18f5ccdd743759 100644 (file)
@@ -1,24 +1,28 @@
 *** Settings ***
-Documentation     Test suite to verify Domain data filtering
-Test Setup        Setup Nodes Local
-Test Teardown     Clean SXP Environment    9
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Library           ../../../libraries/Common.py
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to verify Domain data filtering
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Library             ../../../libraries/Common.py
+Resource            ../../../libraries/SxpLib.robot
+
+Test Setup          Setup Nodes Local
+Test Teardown       Clean SXP Environment    9
+
 
 *** Variables ***
-${DOMAIN_1}       guest
-${DOMAIN_2}       trusted
-${DOMAIN_3}       semitrusted
-${DOMAIN_4}       secure
-${version}        version4
+${DOMAIN_1}     guest
+${DOMAIN_2}     trusted
+${DOMAIN_3}     semitrusted
+${DOMAIN_4}     secure
+${version}      version4
+
 
 *** Test Cases ***
 Non Transitivity Test
     [Documentation]    Test if Bindings are shared according to associated filters
-    [Tags]    SXP    Domains    Filtering
+    [Tags]    sxp    domains    filtering
     Wait Until Keyword Succeeds    15    1    Check Initialized
     Add Filters
     Wait Until Keyword Succeeds    15    1    Check Domain Sharing
@@ -27,7 +31,7 @@ Non Transitivity Test
 
 Update Messages Test
     [Documentation]    Test if Bindings are shared according to associated filters while bindings are removed/added
-    [Tags]    SXP    Domains    Filtering
+    [Tags]    sxp    domains    filtering
     Wait Until Keyword Succeeds    15    1    Check Initialized
     Add Filters
     Wait Until Keyword Succeeds    15    1    Check Domain Sharing
@@ -45,7 +49,7 @@ Update Messages Test
 Local Binding Non Transitivity Test
     [Documentation]    Test if Local Bindings are shared according to associated filters,
     ...    and does not colide with other Bindings
-    [Tags]    SXP    Domains    Filtering
+    [Tags]    sxp    domains    filtering
     Wait Until Keyword Succeeds    15    1    Check Initialized Local
     Add Filters
     Wait Until Keyword Succeeds    15    1    Check Domain Sharing Local
@@ -54,7 +58,7 @@ Local Binding Non Transitivity Test
 
 Local Binding Update Test
     [Documentation]    Test if Local Bindings are shared according to associated filters while bindings are removed/added
-    [Tags]    SXP    Domains    Filtering
+    [Tags]    sxp    domains    filtering
     Wait Until Keyword Succeeds    15    1    Check Initialized Local
     Add Filters
     Wait Until Keyword Succeeds    15    1    Check Domain Sharing Local
@@ -70,7 +74,7 @@ Local Binding Update Test
 Binding Replacement Test
     [Documentation]    Test situation where Local binding is replaced by other shared local binding,
     ...    after shared binding is removed the original binding must be propagated to Peers
-    [Tags]    SXP    Domains    Filtering
+    [Tags]    sxp    domains    filtering
     Wait Until Keyword Succeeds    15    1    Check Initialized After Update
     Add Bindings    400    35.35.35.35/32    127.0.0.4
     Add Bindings    450    35.35.35.35/32    127.0.0.1    domain=${DOMAIN_3}
@@ -80,6 +84,7 @@ Binding Replacement Test
     Delete Bindings    450    35.35.35.35/32    127.0.0.1    ${DOMAIN_3}
     Wait Until Keyword Succeeds    15    1    Check After Update Part Three
 
+
 *** Keywords ***
 Setup Nodes Local
     [Documentation]    Setups Multi domain topology consisting of 3 specific domains and 1 default, data will be shared by filter.
index 4e4a7b35029017d91ec494652b8f9258c9044006..eee3919176618e5111f0717b1f6c0b73b88460d7 100644 (file)
@@ -1,22 +1,23 @@
 *** Settings ***
-Documentation     Test suite to verify Inbound filtering functionality using manual policy
-Suite Setup       Setup SXP Environment    5
-Suite Teardown    Clean SXP Environment    5
-Test Teardown     Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Library           ../../../libraries/Common.py
-Resource          ../../../libraries/SxpLib.robot
-Resource          ../../../libraries/WaitForFailure.robot
-Resource          ../../../libraries/SXP/FilteringResources.robot
+Documentation       Test suite to verify Inbound filtering functionality using manual policy
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Library             ../../../libraries/Common.py
+Resource            ../../../libraries/SxpLib.robot
+Resource            ../../../libraries/WaitForFailure.robot
+Resource            ../../../libraries/SXP/FilteringResources.robot
+
+Suite Setup         Setup SXP Environment    5
+Suite Teardown      Clean SXP Environment    5
+Test Teardown       Clean Nodes
 
-*** Variables ***
 
 *** Test Cases ***
 Access List Filtering
     [Documentation]    Test ACL filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.2    127.0.0.4
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    acl=10.10.10.0,0.0.0.255
@@ -42,7 +43,7 @@ Access List Filtering
 
 Access List Sgt Filtering
     [Documentation]    Test ACL and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.3    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    sgt=30    acl=10.10.10.0,0.0.0.255
@@ -61,7 +62,7 @@ Access List Sgt Filtering
 
 Prefix List Filtering
     [Documentation]    Test Prefix List filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.2    127.0.0.4
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    pl=10.10.10.0/24
@@ -87,7 +88,7 @@ Prefix List Filtering
 
 Prefix List Sgt Filtering
     [Documentation]    Test Prefix List and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.3    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    sgt=30    pl=10.10.10.0/24
@@ -104,10 +105,11 @@ Prefix List Sgt Filtering
     Reconnect Peers
     Wait Until Keyword Succeeds    4    2    Check Two Group 5-3
 
+
 *** Keywords ***
 Reconnect Peers
-    [Arguments]    ${version}=version4    ${PASSWORD}=none
     [Documentation]    Reconnect all peers connected to node containing filters
+    [Arguments]    ${version}=version4    ${PASSWORD}=none
     Clean Connections    127.0.0.1
     FOR    ${node}    IN RANGE    2    6
         Add Connection    ${version}    both    127.0.0.${node}    64999    127.0.0.1
index 71224a582820c4a3e0d40dc96c9eb76868785e6a..fb8ce1e965fc078b141a456c1c4fde7f8e4bd464 100644 (file)
@@ -1,22 +1,23 @@
 *** Settings ***
-Documentation     Test suite to verify Outbound filtering functionality using manual policy
-Suite Setup       Setup SXP Environment    5
-Suite Teardown    Clean SXP Environment    5
-Test Teardown     Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Library           ../../../libraries/Common.py
-Resource          ../../../libraries/SxpLib.robot
-Resource          ../../../libraries/WaitForFailure.robot
-Resource          ../../../libraries/SXP/FilteringResources.robot
+Documentation       Test suite to verify Outbound filtering functionality using manual policy
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Library             ../../../libraries/Common.py
+Resource            ../../../libraries/SxpLib.robot
+Resource            ../../../libraries/WaitForFailure.robot
+Resource            ../../../libraries/SXP/FilteringResources.robot
+
+Suite Setup         Setup SXP Environment    5
+Suite Teardown      Clean SXP Environment    5
+Test Teardown       Clean Nodes
 
-*** Variables ***
 
 *** Test Cases ***
 Access List Filtering
     [Documentation]    Test ACL filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.4    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    acl=10.10.10.0,0.0.0.255
@@ -38,7 +39,7 @@ Access List Filtering
 
 Access List Sgt Filtering
     [Documentation]    Test ACL and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.2    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    deny    acl=10.10.20.0,0.0.0.255
@@ -58,7 +59,7 @@ Access List Sgt Filtering
 
 Prefix List Filtering
     [Documentation]    Test Prefix List filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.4    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    permit    pl=10.10.10.0/24
@@ -80,7 +81,7 @@ Prefix List Filtering
 
 Prefix List Sgt Filtering
     [Documentation]    Test Prefix List and SGT filter behaviour during filter update
-    [Tags]    SXP    Filtering
+    [Tags]    sxp    filtering
     ${peers}    Add Peers    127.0.0.2    127.0.0.5
     Add PeerGroup    GROUP    ${peers}
     ${entry1}    Get Filter Entry    10    deny    pl=10.10.20.0/24
@@ -98,10 +99,11 @@ Prefix List Sgt Filtering
     Reconnect Peers
     Wait Until Keyword Succeeds    4    2    Check Two Group 2-5
 
+
 *** Keywords ***
 Reconnect Peers
-    [Arguments]    ${version}=version4    ${password}=none
     [Documentation]    Reconnect all peers connected to node containing filters
+    [Arguments]    ${version}=version4    ${password}=none
     Clean Connections    127.0.0.1
     Add Connection    ${version}    both    127.0.0.2    64999    127.0.0.1    ${password}
     Add Connection    ${version}    listener    127.0.0.3    64999    127.0.0.1    ${password}
index ebee39b5367c1f10c1af18c848f6890585dae372..26a374fe2f9e83c332961c75226a0722c43b6f7b 100644 (file)
@@ -1,14 +1,18 @@
 *** Settings ***
-Documentation     Test suite measuring connectivity speed.
-Suite Setup       Setup SXP Environment
-Suite Teardown    Clean SXP Environment
-Test Teardown     Test Clean
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
-Library           Remote    http://${ODL_SYSTEM_IP}:8270/ConnectionTestLibrary    WITH NAME    ConnectionTestLibrary
+Documentation       Test suite measuring connectivity speed.
+
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+Library             Remote    http://${ODL_SYSTEM_IP}:8270/ConnectionTestLibrary    WITH NAME    ConnectionTestLibrary
+
+Suite Setup         Setup SXP Environment
+Suite Teardown      Clean SXP Environment
+Test Teardown       Test Clean
+
 
 *** Variables ***
-${TEST_SAMPLES}    5
+${TEST_SAMPLES}     5
+
 
 *** Test Cases ***
 Connectivity Test
@@ -19,10 +23,11 @@ Connectivity TCP-MD5 Test
     [Documentation]    Test covering speed of connecting to remote peers with TCP-MD5
     Check Connectivity    80    70    10    passwd
 
+
 *** Keywords ***
 Setup Topology
-    [Arguments]    ${connections}    ${PASSWORD}    ${version}
     [Documentation]    Adds connections to local and remote nodes
+    [Arguments]    ${connections}    ${PASSWORD}    ${version}
     FOR    ${num}    IN RANGE    0    ${connections}
         ${address}    Get Ip From Number    ${num}    2130771968
         Add Connection    ${version}    listener    ${address}    64999    password=${PASSWORD}
@@ -32,8 +37,8 @@ Setup Topology
     END
 
 Check Connectivity
-    [Arguments]    ${peers}    ${min_peers}    ${min_speed}    ${PASSWORD}=${EMPTY}    ${version}=version4
     [Documentation]    Starts SXP nodes and checks if peers are already connected, this is repeated N times
+    [Arguments]    ${peers}    ${min_peers}    ${min_speed}    ${PASSWORD}=${EMPTY}    ${version}=version4
     @{ITEMS}    Create List
     FOR    ${num}    IN RANGE    0    ${TEST_SAMPLES}
         Setup Topology    ${peers}    ${PASSWORD}    ${version}
@@ -53,7 +58,7 @@ Check Connections Connected
     ${connect_time}    ConnectionTestLibrary.Get Connect Time
     Should Not Be Equal As Numbers    ${connect_time}    0
     ${connectivity_speed}    Evaluate    ${peers_connected}/${connect_time}
-    [Return]    ${connectivity_speed}
+    RETURN    ${connectivity_speed}
 
 Test Clean
     ConnectionTestLibrary.Clean Library
index d5cec0c57a85b988c3f3a75a667ba240dbe9ddc4..a57e6217c0cde7dad77d2afae2a27dc9f4639c8d 100644 (file)
@@ -1,22 +1,26 @@
 *** Settings ***
-Documentation     Test suite measuring binding export and forwarding speed.
-Test Setup        Setup SXP Environment
-Test Teardown     Clean Custom SXP Environment
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
-Library           Remote    http://${ODL_SYSTEM_IP}:8270/ExportTestLibrary    WITH NAME    ExportLibrary
+Documentation       Test suite measuring binding export and forwarding speed.
+
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+Library             Remote    http://${ODL_SYSTEM_IP}:8270/ExportTestLibrary    WITH NAME    ExportLibrary
+
+Test Setup          Setup SXP Environment
+Test Teardown       Clean Custom SXP Environment
+
 
 *** Variables ***
 # Tested Nodes IPs
-${SOURCE_IP}      127.1.0.1
-${DESTINATION_IP}    127.2.0.1
+${SOURCE_IP}            127.1.0.1
+${DESTINATION_IP}       127.2.0.1
 # Testing variables
-${EXPORT_AMOUNT}    65536
-${TEST_SAMPLES}    5
-${MINIMAL_SPEED}    2000
+${EXPORT_AMOUNT}        65536
+${TEST_SAMPLES}         5
+${MINIMAL_SPEED}        2000
 # Testing Domains
-${DOMAIN_0}       global
-${DOMAIN_1}       test-domain
+${DOMAIN_0}             global
+${DOMAIN_1}             test-domain
+
 
 *** Test Cases ***
 Binding Export Test
@@ -121,11 +125,17 @@ Binding Combined Filter Forwarding Export Test
         Should Be True    ${export_speed} > ${MINIMAL_SPEED}
     END
 
+
 *** Keywords ***
 Setup Binding Export Topology
-    [Arguments]    ${version}=version4    ${PASSWORD}=${EMPTY}    ${destination_nodes}=3    ${destination_domain}=global
     [Documentation]    Adds connections to local and remote nodes and wait until they are connected
-    Setup Simple Binding Export Topology    ${version}    ${PASSWORD}    ${destination_nodes}    1    ${destination_domain}
+    [Arguments]    ${version}=version4    ${PASSWORD}=${EMPTY}    ${destination_nodes}=3    ${destination_domain}=global
+    Setup Simple Binding Export Topology
+    ...    ${version}
+    ...    ${PASSWORD}
+    ...    ${destination_nodes}
+    ...    1
+    ...    ${destination_domain}
     FOR    ${num}    IN RANGE    0    ${destination_nodes}
         ${DESTINATION_NODE}    Get Ip From Number And Ip    ${num}    ${DESTINATION_IP}
         ExportLibrary.Add Connection    ${version}    listener    127.0.0.1    64999    ${PASSWORD}
@@ -135,8 +145,8 @@ Setup Binding Export Topology
     END
 
 Setup Simple Binding Export Topology
-    [Arguments]    ${version}=version4    ${PASSWORD}=${EMPTY}    ${destination_nodes}=3    ${source_nodes}=1    ${destination_domain}=global
     [Documentation]    Adds connections to local and remote nodes and wait until they are connected
+    [Arguments]    ${version}=version4    ${PASSWORD}=${EMPTY}    ${destination_nodes}=3    ${source_nodes}=1    ${destination_domain}=global
     FOR    ${num}    IN RANGE    0    ${source_nodes}
         ${SOURCE_NODE}    Get Ip From Number And Ip    ${num}    ${SOURCE_IP}
         ExportLibrary.Add Node    ${SOURCE_NODE}    ${version}    64999    ${PASSWORD}
@@ -158,8 +168,8 @@ Setup Simple Binding Export Topology
     END
 
 Simple Export
-    [Arguments]    ${check_amount}    ${samples}=10    ${destination_domain}=global
     [Documentation]    Starts SXP nodes and checks if bindings are already exported, this is repeated N times
+    [Arguments]    ${check_amount}    ${samples}=10    ${destination_domain}=global
     @{ITEMS}    Create List
     FOR    ${num}    IN RANGE    0    ${samples}
         Setup Simple Binding Export Topology    destination_domain=${destination_domain}
@@ -171,11 +181,11 @@ Simple Export
     END
     Log    ${ITEMS}
     ${export_speed}    Get Average Of Items    ${ITEMS}
-    [Return]    ${export_speed}
+    RETURN    ${export_speed}
 
 Forwarding Export
-    [Arguments]    ${check_amount}    ${samples}=10    ${destination_domain}=global
     [Documentation]    Starts SXP nodes and checks if bindings are already forwarded, this is repeated N times
+    [Arguments]    ${check_amount}    ${samples}=10    ${destination_domain}=global
     @{ITEMS}    Create List
     FOR    ${num}    IN RANGE    0    ${samples}
         Setup Binding Export Topology    destination_domain=${destination_domain}
@@ -187,7 +197,7 @@ Forwarding Export
     END
     Log    ${ITEMS}
     ${export_speed}    Get Average Of Items    ${ITEMS}
-    [Return]    ${export_speed}
+    RETURN    ${export_speed}
 
 Check Bindings Exported
     [Documentation]    Checking if bindings were exported and return export speed
@@ -199,18 +209,18 @@ Check Bindings Exported
     Log    ${export_time}
     ${export_speed}    Evaluate    ${bindings_exported}/${export_time}
     Log    ${export_speed}
-    [Return]    ${export_speed}
+    RETURN    ${export_speed}
 
 Setup Filter
-    [Arguments]    ${bits}    ${type}
     [Documentation]    Creates peer-group and its filter with specific matching.
+    [Arguments]    ${bits}    ${type}
     Add PeerGroup    GROUP    ${EMPTY}
     ${entry}    Get Filter Entry    10    permit    pl=132.5.0.0/${bits}
     Add Filter    GROUP    ${type}    ${entry}
 
 Setup Domain Filter
-    [Arguments]    ${bits}    ${domain}
     [Documentation]    Creates domain and its filter with specific matching.
+    [Arguments]    ${bits}    ${domain}
     Add Domain    ${domain}
     ${domains}    Add Domains    ${domain}
     ${entry}    Get Filter Entry    10    permit    pl=132.5.0.0/${bits}
index 84a13dd2b04874606827734c596dff2fb38448d7..dfb6e206394cb48af71fd85f5d68654a596b09c0 100644 (file)
@@ -1,19 +1,20 @@
 *** Settings ***
-Documentation     Test suite to verify Behaviour in different topologies
-Suite Setup       Setup SXP Environment    5
-Suite Teardown    Clean SXP Environment    5
-Test Teardown     Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to verify Behaviour in different topologies
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         Setup SXP Environment    5
+Suite Teardown      Clean SXP Environment    5
+Test Teardown       Clean Nodes
 
-*** Variables ***
 
 *** Test Cases ***
 Export Test
     [Documentation]    Test behaviour after shutting down connections in Version4
-    [Tags]    SXP    TopoBuiltIn.Logy
+    [Tags]    sxp    topobuiltin.logy
     Setup TopoBuiltIn.Logy Triangel    version4
     BuiltIn.Wait Until Keyword Succeeds    4    1    Check Export Part One
     SxpLib.Delete Connections    127.0.0.1    64999    127.0.0.3
@@ -25,7 +26,7 @@ Export Test
 
 Export Test Legacy
     [Documentation]    Test behaviour after shutting down connections in Legacy versions
-    [Tags]    SXP    TopoBuiltIn.Logy
+    [Tags]    sxp    topobuiltin.logy
     @{list} =    Create List    version1
     FOR    ${version}    IN    @{list}
         Setup TopoBuiltIn.Logy Triangel    ${version}
@@ -41,25 +42,25 @@ Export Test Legacy
 
 Forwarding Test V2=>V1
     [Documentation]    Version 2 => 1 functionality
-    [Tags]    SXP    TopoBuiltIn.Logy
+    [Tags]    sxp    topobuiltin.logy
     Setup TopoBuiltIn.Logy Linear    version2    version1
     BuiltIn.Wait Until Keyword Succeeds    4    1    Check Forwarding V2=>V1
 
 Forwarding Test V3=>V2
     [Documentation]    Version 3 => 2 functionality
-    [Tags]    SXP    TopoBuiltIn.Logy
+    [Tags]    sxp    topobuiltin.logy
     Setup TopoBuiltIn.Logy Linear    version3    version2
     BuiltIn.Wait Until Keyword Succeeds    4    1    Check Forwarding V3=>V2
 
 Forwarding Test V4=>V3
     [Documentation]    Version 4 => 3 functionality
-    [Tags]    SXP    TopoBuiltIn.Logy
+    [Tags]    sxp    topobuiltin.logy
     Setup TopoBuiltIn.Logy Linear    version4    version3
     BuiltIn.Wait Until Keyword Succeeds    4    1    Check Forwarding V4=>V3
 
 Most Recent Rule Test
     [Documentation]    Most Recent Rule
-    [Tags]    SXP    TopoBuiltIn.Logy
+    [Tags]    sxp    topobuiltin.logy
     Setup TopoBuiltIn.Logy Fork    version4
     SxpLib.Add Bindings    542    5.5.5.5/32    127.0.0.2
     BuiltIn.Sleep    2s
@@ -71,7 +72,7 @@ Most Recent Rule Test
 
 Shorthest Path Test
     [Documentation]    Shorthes Path over Most Recent
-    [Tags]    SXP    TopoBuiltIn.Logy
+    [Tags]    sxp    topobuiltin.logy
     SxpLib.Add Connection    version4    listener    127.0.0.5    64999    127.0.0.3
     SxpLib.Add Connection    version4    speaker    127.0.0.3    64999    127.0.0.5
     BuiltIn.Wait Until Keyword Succeeds    15    1    Verify Connection    version4    listener    127.0.0.5
@@ -84,10 +85,11 @@ Shorthest Path Test
     SxpLib.Add Bindings    95    15.15.15.15/32    127.0.0.5
     BuiltIn.Wait Until Keyword Succeeds    4    1    Check Shorthest Path
 
+
 *** Keywords ***
 Setup TopoBuiltIn.Logy Triangel
-    [Arguments]    ${version}
     [Documentation]    Setup 3 nodes connected to each other
+    [Arguments]    ${version}
     SxpLib.Add Bindings    542    5.5.5.5/32    127.0.0.2
     SxpLib.Add Bindings    543    5.5.5.5/32    127.0.0.3
     SxpLib.Add Bindings    99    15.15.15.15/32    127.0.0.3
@@ -104,8 +106,8 @@ Setup TopoBuiltIn.Logy Triangel
     ...    64999    127.0.0.3
 
 Setup TopoBuiltIn.Logy Linear
-    [Arguments]    ${version}    ${r_version}
     [Documentation]    Setup 3 nodes connected linearly
+    [Arguments]    ${version}    ${r_version}
     SxpLib.Add Bindings    6    56.56.56.0/24    127.0.0.2
     SxpLib.Add Bindings    66    9.9.9.9/32    127.0.0.2
     SxpLib.Add Bindings    666    2001:db8:0:0:0:0:1428:57ab/128    127.0.0.2
@@ -118,8 +120,8 @@ Setup TopoBuiltIn.Logy Linear
     BuiltIn.Wait Until Keyword Succeeds    15    1    Verify Connection    ${r_version}    speaker    127.0.0.3
 
 Setup TopoBuiltIn.Logy Fork
-    [Arguments]    ${version}
     [Documentation]    Setup 4 nodes in to T topoBuiltIn.Logy
+    [Arguments]    ${version}
     SxpLib.Add Connection    ${version}    speaker    127.0.0.1    64999    127.0.0.3
     SxpLib.Add Connection    ${version}    listener    127.0.0.3    64999    127.0.0.1
     BuiltIn.Wait Until Keyword Succeeds    15    1    Verify Connection    ${version}    listener    127.0.0.3
index 12635ae59b3a75c90c7512490bca47410339eaf3..07776d2ebd040a1f940af5f557f9b4128bf6128b 100644 (file)
@@ -1,31 +1,32 @@
 *** Settings ***
-Documentation     Test suite to test scalability of SXP
-Suite Setup       Setup SXP Environment    31
-Suite Teardown    Clean SXP Environment    31
-Test Setup        Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to test scalability of SXP
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         Setup SXP Environment    31
+Suite Teardown      Clean SXP Environment    31
+Test Setup          Clean Nodes
 
-*** Variables ***
 
 *** Test Cases ***
 Test Mega Topology
     [Documentation]    Stress test that contains of connecting 20 Nodes and exporting their bindings
-    [Tags]    SXP    Scalability
+    [Tags]    sxp    scalability
     Setup Mega Topology
     BuiltIn.Wait Until Keyword Succeeds    10    1    Check Binding Range    2    22
 
 Test Complex Mega Topology
     [Documentation]    Stress test that contains of connecting 30 Nodes and exporting their bindings
-    [Tags]    SXP    Scalability
+    [Tags]    sxp    scalability
     Setup Complex Mega Topology
     BuiltIn.Wait Until Keyword Succeeds    10    1    Check Binding Range    22    32
 
 Text Bindings export
     [Documentation]    Stress test that consist of exporting 500 Bindings under 5s
-    [Tags]    SXP    Scalability
+    [Tags]    sxp    scalability
     FOR    ${num}    IN RANGE    2    502
         ${ip} =    Sxp.Get Ip From Number    ${num}
         SxpLib.Add Bindings    ${num}    ${ip}/32    127.0.0.2
@@ -35,6 +36,7 @@ Text Bindings export
     BuiltIn.Wait Until Keyword Succeeds    15    1    Verify Connection    version4    listener    127.0.0.2
     BuiltIn.Wait Until Keyword Succeeds    10    1    Check Binding Range    2    102
 
+
 *** Keywords ***
 Setup Mega Topology
     [Arguments]    ${version}=version4
@@ -50,7 +52,7 @@ Setup Mega Topology
 Setup Complex Mega Topology
     [Arguments]    ${version}=version4
     Setup Mega Topology    ${version}
-    ${second_num}    Convert To Integer    2
+    ${second_num}    Convert To Integer    2
     FOR    ${num}    IN RANGE    22    32
         ${ip} =    Sxp.Get Ip From Number    ${num}
         ${second_ip} =    Sxp.Get Ip From Number    ${second_num}
@@ -68,8 +70,8 @@ Setup Complex Mega Topology
     END
 
 Check Binding Range
-    [Arguments]    ${start}    ${end}    ${node}=127.0.0.1
     [Documentation]    Check if binding range is contained by node
+    [Arguments]    ${start}    ${end}    ${node}=127.0.0.1
     ${resp} =    SxpLib.Get Bindings    ${node}
     FOR    ${num}    IN RANGE    ${start}    ${end}
         ${ip} =    Sxp.Get Ip From Number    ${num}
index 6079b76dfb1b7a22c0214782b3262dd63148d42e..f72db63a7628f97063dfffd0ead8146647fcdf3f 100644 (file)
@@ -1,21 +1,25 @@
 *** Settings ***
-Documentation     Test suite to verify Domain data separation
-Suite Setup       Setup Nodes Local
-Suite Teardown    Clean SXP Environment    14
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to verify Domain data separation
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         Setup Nodes Local
+Suite Teardown      Clean SXP Environment    14
+
 
 *** Variables ***
-${DOMAIN_1}       guest
-${DOMAIN_2}       trusted
-${DOMAIN_3}       secure
+${DOMAIN_1}     guest
+${DOMAIN_2}     trusted
+${DOMAIN_3}     secure
+
 
 *** Test Cases ***
 Export Separation Node 7 Test
     [Documentation]    Test if Node 7 contains only bindings from global domain
-    [Tags]    SXP    Domains
+    [Tags]    sxp    domains
     Check Binding Range    20    2000    2300    127.0.0.7
     Check Binding Range Negative    30    3000    3300    127.0.0.7
     Check Binding Range Negative    40    4000    4300    127.0.0.7
@@ -28,7 +32,7 @@ Export Separation Node 7 Test
 
 Export Separation Node 8-9 Test
     [Documentation]    Test if Nodes 8,9 contains only bindings from guest domain
-    [Tags]    SXP    Domains
+    [Tags]    sxp    domains
     FOR    ${node}    IN RANGE    8    10
         Check Binding Range Negative    20    2000    2300    127.0.0.${node}
         Check Binding Range    30    3000    3300    127.0.0.${node}
@@ -43,7 +47,7 @@ Export Separation Node 8-9 Test
 
 Export Separation Node 10 Test
     [Documentation]    Test if Node 10 contains only bindings from trusted domain
-    [Tags]    SXP    Domains
+    [Tags]    sxp    domains
     Check Binding Range Negative    20    2000    2300    127.0.0.10
     Check Binding Range Negative    30    3000    3300    127.0.0.10
     Check Binding Range Negative    40    4000    4300    127.0.0.10
@@ -56,7 +60,7 @@ Export Separation Node 10 Test
 
 Export Separation Node 11-14 Test
     [Documentation]    Test if Nodes 11-14 contains only bindings from secure domain
-    [Tags]    SXP    Domains
+    [Tags]    sxp    domains
     FOR    ${node}    IN RANGE    11    15
         Check Binding Range Negative    20    2000    2300    127.0.0.${node}
         Check Binding Range Negative    30    3000    3300    127.0.0.${node}
@@ -69,10 +73,11 @@ Export Separation Node 11-14 Test
         Check Binding Range    140    14000    14300    127.0.0.${node}
     END
 
+
 *** Keywords ***
 Setup Nodes Local
-    [Arguments]    ${version}=version4
     [Documentation]    Setups Multi domain topology consisting of 3 specific domains and 1 default, data between domains must remain separated.
+    [Arguments]    ${version}=version4
     Setup SXP Environment    14
     FOR    ${node}    IN RANGE    2    7
         Add Connection    ${version}    speaker    127.0.0.1    64999    127.0.0.${node}
index 75dcfe9f6ecc074f99a9135f3b1025b2adc1ec3c..defdde40e92739845174bf789d65dd6377ec45bf 100644 (file)
@@ -1,21 +1,25 @@
 *** Settings ***
-Documentation     Test suite to verify Domain data consistency during data change
-Test Setup        Setup Nodes Local
-Test Teardown     Clean SXP Environment    14
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to verify Domain data consistency during data change
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+
+Test Setup          Setup Nodes Local
+Test Teardown       Clean SXP Environment    14
+
 
 *** Variables ***
-${DOMAIN_1}       guest
-${DOMAIN_2}       trusted
-${DOMAIN_3}       secure
+${DOMAIN_1}     guest
+${DOMAIN_2}     trusted
+${DOMAIN_3}     secure
+
 
 *** Test Cases ***
 Export Separation Node 7 Test
     [Documentation]    Test if Node 7 contains only bindings from global domain and is not affected by changes from other nodes
-    [Tags]    SXP    Domains
+    [Tags]    sxp    domains
     Check Binding Range    20    0    300    127.0.0.7
     Check Binding Range Negative    40    0    300    127.0.0.7
     Check Binding Range Negative    60    0    300    127.0.0.7
@@ -29,7 +33,7 @@ Export Separation Node 7 Test
 
 Export Separation Node 8-9 Test
     [Documentation]    Test if Nodes 8,9 contains consistent data during its update
-    [Tags]    SXP    Domains
+    [Tags]    sxp    domains
     FOR    ${node}    IN RANGE    8    10
         Check Binding Range Negative    20    0    300    127.0.0.${node}
         Check Binding Range    40    0    300    127.0.0.${node}
@@ -49,7 +53,7 @@ Export Separation Node 8-9 Test
 
 Export Separation Node 10 Test
     [Documentation]    Test if Node 10 contains consistent data during its update
-    [Tags]    SXP    Domains
+    [Tags]    sxp    domains
     Check Binding Range Negative    20    0    300    127.0.0.10
     Check Binding Range Negative    40    0    300    127.0.0.10
     Check Binding Range    60    0    300    127.0.0.10
@@ -63,7 +67,7 @@ Export Separation Node 10 Test
 
 Export Separation Node 11-14 Test
     [Documentation]    Test if Nodes 11-14 contains consistent data during its update
-    [Tags]    SXP    Domains
+    [Tags]    sxp    domains
     FOR    ${node}    IN RANGE    11    15
         Check Binding Range Negative    20    0    300    127.0.0.${node}
         Check Binding Range Negative    40    0    300    127.0.0.${node}
@@ -81,10 +85,11 @@ Export Separation Node 11-14 Test
         ...    300    127.0.0.${node}
     END
 
+
 *** Keywords ***
 Setup Nodes Local
-    [Arguments]    ${version}=version4
     [Documentation]    Setups Multi domain topology consisting of 3 specific domains and 1 default, data between domains must remain separated.
+    [Arguments]    ${version}=version4
     Setup SXP Environment    14
     FOR    ${node}    IN RANGE    2    7
         Add Connection    ${version}    speaker    127.0.0.1    64999    127.0.0.${node}