Update Robot Framework format - step 6 36/102336/8
authorSangwook Ha <sangwook.ha@verizon.com>
Sat, 10 Sep 2022 02:15:23 +0000 (19:15 -0700)
committerSangwook Ha <sangwook.ha@verizon.com>
Fri, 7 Oct 2022 02:12:06 +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/daexim
- csit/suites/didm
- csit/suites/distribution
- csit/suites/dluxapps
- csit/suites/examples
- csit/suites/genius

JIRA: INTTEST-132
Change-Id: I26e9e23b5e76c37fcdc2bbb779f42d8fe95e7a59
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
24 files changed:
csit/suites/daexim/010-special-export.robot
csit/suites/daexim/020-import-basic.robot
csit/suites/daexim/030-export-basic.robot
csit/suites/daexim/040-export-inclusions.robot
csit/suites/daexim/110-cluster-local-export-basic.robot
csit/suites/daexim/120-cluster-export-basic.robot
csit/suites/daexim/130-cluster-import-basic.robot
csit/suites/didm/basic/010_Didm.robot
csit/suites/didm/discovery/device_discovery.robot
csit/suites/distribution/karaf_sequence_install.robot
csit/suites/distribution/karaf_stop.robot
csit/suites/distribution/size.robot
csit/suites/distribution/version.robot
csit/suites/dluxapps/yangman/502__yangman.robot
csit/suites/dluxapps/yangman/505__yangmam_modules_loading.robot
csit/suites/examples/2016_Summit_Tutorial_Example.robot
csit/suites/genius/BFD_monitoring.robot
csit/suites/genius/Configure_ITM.robot
csit/suites/genius/ID_manager.robot
csit/suites/genius/ITM_Direct_Tunnels.robot
csit/suites/genius/ITM_Vtep_Auto_Tunnel.robot
csit/suites/genius/Interface_manager.robot
csit/suites/genius/OF_Tunnels.robot
csit/suites/genius/Service_Recovery.robot

index 95e7c22feb9d9b1644d12c248f037a4d45a1638a..8a63cc3153ab86bd480f6c381b54ccc7fb888cdc 100644 (file)
@@ -1,10 +1,13 @@
 *** Settings ***
-Documentation     Test suite for verifying basic variations of export API including checking statuses
-Suite Setup       ClusterManagement Setup
-Suite Teardown    Delete All Sessions
-Library           OperatingSystem
-Library           DateTime
-Resource          ../../libraries/DaeximKeywords.robot
+Documentation       Test suite for verifying basic variations of export API including checking statuses
+
+Library             OperatingSystem
+Library             DateTime
+Resource            ../../libraries/DaeximKeywords.robot
+
+Suite Setup         ClusterManagement Setup
+Suite Teardown      Delete All Sessions
+
 
 *** Test Cases ***
 Create and Cancel Export
@@ -21,8 +24,18 @@ Schedule Absolute Time Export With UTC
     [Tags]    absolute time export
     ${time}    DateTime.Get Current Date    UTC    00:00:10    %Y-%m-%dT%H:%M:%SZ    ${FALSE}
     DaeximKeywords.Schedule Export    ${FIRST_CONTROLLER_INDEX}    ${time}
-    BuiltIn.Wait Until Keyword Succeeds    20 sec    5 sec    DaeximKeywords.Verify Scheduled Export Timestamp    ${FIRST_CONTROLLER_INDEX}    ${time}
-    Builtin.Wait Until Keyword Succeeds    20 sec    5 sec    DaeximKeywords.Verify Export Status    ${EXPORT_COMPLETE_STATUS}    ${FIRST_CONTROLLER_INDEX}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    20 sec
+    ...    5 sec
+    ...    DaeximKeywords.Verify Scheduled Export Timestamp
+    ...    ${FIRST_CONTROLLER_INDEX}
+    ...    ${time}
+    Builtin.Wait Until Keyword Succeeds
+    ...    20 sec
+    ...    5 sec
+    ...    DaeximKeywords.Verify Export Status
+    ...    ${EXPORT_COMPLETE_STATUS}
+    ...    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Verify Export Files    ${FIRST_CONTROLLER_INDEX}
 
 Schedule Absolute Time Export With Localtime
@@ -43,7 +56,10 @@ Create Module Exclude Export
     ${file1}    DaeximKeywords.Schedule Exclude Export    ${FIRST_CONTROLLER_INDEX}    config    network-topology
     ${lines1}    OperatingSystem.Grep File    ${file1}    network-topology:
     Builtin.Should Be Empty    ${lines1}
-    ${file2}    DaeximKeywords.Schedule Exclude Export    ${FIRST_CONTROLLER_INDEX}    operational    opendaylight-inventory
+    ${file2}    DaeximKeywords.Schedule Exclude Export
+    ...    ${FIRST_CONTROLLER_INDEX}
+    ...    operational
+    ...    opendaylight-inventory
     ${lines2}    OperatingSystem.Grep File    ${file2}    opendaylight-inventory:
     Builtin.Should Be Empty    ${lines2}
 
index 0fdd8194baa097e2df1923670e391aae33d72dbd..d5c862f411351409cda5bcec005b9fdc04c78cf6 100644 (file)
@@ -1,8 +1,11 @@
 *** Settings ***
-Documentation     Test suite for verifying basic import
-Suite Setup       ClusterManagement Setup
-Suite Teardown    Delete All Sessions
-Resource          ../../libraries/DaeximKeywords.robot
+Documentation       Test suite for verifying basic import
+
+Resource            ../../libraries/DaeximKeywords.robot
+
+Suite Setup         ClusterManagement Setup
+Suite Teardown      Delete All Sessions
+
 
 *** Test Cases ***
 Create Basic Import
@@ -13,4 +16,9 @@ Create Basic Import
     ClusterManagement.Start_Members_From_List_Or_All
     DaeximKeywords.Copy Config Data To Controller    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Schedule Import    ${FIRST_CONTROLLER_INDEX}
-    Builtin.Wait Until Keyword Succeeds    30 sec    5 sec    DaeximKeywords.Verify Netconf Mount    ${NETCONF_EP_NAME}    ${FIRST_CONTROLLER_INDEX}
+    Builtin.Wait Until Keyword Succeeds
+    ...    30 sec
+    ...    5 sec
+    ...    DaeximKeywords.Verify Netconf Mount
+    ...    ${NETCONF_EP_NAME}
+    ...    ${FIRST_CONTROLLER_INDEX}
index 963d1037eb4460d528d4f63800bc05feabdf14ae..e8a18713d28bd2170cc41f4a3c34c6836ea843f8 100644 (file)
@@ -1,8 +1,11 @@
 *** Settings ***
-Documentation     Test suite for verifying basic export with a netconf mount
-Suite Setup       ClusterManagement Setup
-Suite Teardown    Delete All Sessions
-Resource          ../../libraries/DaeximKeywords.robot
+Documentation       Test suite for verifying basic export with a netconf mount
+
+Resource            ../../libraries/DaeximKeywords.robot
+
+Suite Setup         ClusterManagement Setup
+Suite Teardown      Delete All Sessions
+
 
 *** Test Cases ***
 Create Basic Export
@@ -11,6 +14,11 @@ Create Basic Export
     DaeximKeywords.Mount Netconf Endpoint    ${NETCONF_EP_NAME}    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Schedule Export    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Verify Export Status    ${EXPORT_SCHEDULED_STATUS}    ${FIRST_CONTROLLER_INDEX}
-    Builtin.Wait Until Keyword Succeeds    10 sec    5 sec    DaeximKeywords.Verify Export Status    ${EXPORT_COMPLETE_STATUS}    ${FIRST_CONTROLLER_INDEX}
+    Builtin.Wait Until Keyword Succeeds
+    ...    10 sec
+    ...    5 sec
+    ...    DaeximKeywords.Verify Export Status
+    ...    ${EXPORT_COMPLETE_STATUS}
+    ...    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Verify Export Files    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Verify Netconf Mount    ${NETCONF_EP_NAME}    ${FIRST_CONTROLLER_INDEX}
index 3e2116a8964963f581a0898331152830793a2dd0..5fb6598d9b9fb04b6f21821a257c55127c574de5 100644 (file)
@@ -1,18 +1,29 @@
 *** Settings ***
-Documentation     Test suite for verifying basic export with inclusions
-Suite Setup       ClusterManagement Setup
-Suite Teardown    Delete All Sessions
-Resource          ../../libraries/DaeximKeywords.robot
+Documentation       Test suite for verifying basic export with inclusions
+
+Resource            ../../libraries/DaeximKeywords.robot
+
+Suite Setup         ClusterManagement Setup
+Suite Teardown      Delete All Sessions
+
 
 *** Test Cases ***
 Create Module Include Export
     [Documentation]    schedule a basic export/backup with applied inclusion pattern
     [Tags]    inclusions    export
     # Module is just included
-    ${file1}    DaeximKeywords.Schedule Include Export    ${FIRST_CONTROLLER_INDEX}    config    network-topology    ${FALSE}
+    ${file1}    DaeximKeywords.Schedule Include Export
+    ...    ${FIRST_CONTROLLER_INDEX}
+    ...    config
+    ...    network-topology
+    ...    ${FALSE}
     ${lines1}    OperatingSystem.Grep File    ${file1}    network-topology:
     Builtin.Should Not Be Empty    ${lines1}
     # Module is both included and excluded
-    ${file1}    DaeximKeywords.Schedule Include Export    ${FIRST_CONTROLLER_INDEX}    config    network-topology    ${TRUE}
+    ${file1}    DaeximKeywords.Schedule Include Export
+    ...    ${FIRST_CONTROLLER_INDEX}
+    ...    config
+    ...    network-topology
+    ...    ${TRUE}
     ${lines1}    OperatingSystem.Grep File    ${file1}    network-topology:
     Builtin.Should Be Empty    ${lines1}
index 1416cc85be0130536451010323e377983e7e51b9..0643e38037a606a1f60f1e37ccde6bb231891bc4 100644 (file)
@@ -1,8 +1,11 @@
 *** Settings ***
-Documentation     Test suite for verifying basic export only on a local node with a netconf mount on a cluster
-Suite Setup       ClusterManagement Setup
-Suite Teardown    Delete All Sessions
-Resource          ../../libraries/DaeximKeywords.robot
+Documentation       Test suite for verifying basic export only on a local node with a netconf mount on a cluster
+
+Resource            ../../libraries/DaeximKeywords.robot
+
+Suite Setup         ClusterManagement Setup
+Suite Teardown      Delete All Sessions
+
 
 *** Test Cases ***
 Create Basic Local Export
@@ -13,7 +16,12 @@ Create Basic Local Export
     DaeximKeywords.Schedule Export    ${FIRST_CONTROLLER_INDEX}    500    ${FALSE}    ${EMPTY}    ${EMPTY}    true
     DaeximKeywords.Verify Export Status    ${EXPORT_SCHEDULED_STATUS}    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Verify Export Status    ${EXPORT_SKIPPED_STATUS}    ${SECOND_CONTROLLER_INDEX}
-    Builtin.Wait Until Keyword Succeeds    10 sec    5 sec    DaeximKeywords.Verify Export Status    ${EXPORT_COMPLETE_STATUS}    ${FIRST_CONTROLLER_INDEX}
+    Builtin.Wait Until Keyword Succeeds
+    ...    10 sec
+    ...    5 sec
+    ...    DaeximKeywords.Verify Export Status
+    ...    ${EXPORT_COMPLETE_STATUS}
+    ...    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Verify Export Files    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Verify Export Files Not Present    ${THIRD_CONTROLLER_INDEX}
     DaeximKeywords.Verify Export Files Not Present    ${SECOND_CONTROLLER_INDEX}
index 8d25115e5bd5e3344ff49e4005b4a45c424b4752..6e2797d8d5791279d929da60bb4896691e82e0a7 100644 (file)
@@ -1,8 +1,11 @@
 *** Settings ***
-Documentation     Test suite for verifying basic export with a netconf mount on a cluster
-Suite Setup       ClusterManagement Setup
-Suite Teardown    Delete All Sessions
-Resource          ../../libraries/DaeximKeywords.robot
+Documentation       Test suite for verifying basic export with a netconf mount on a cluster
+
+Resource            ../../libraries/DaeximKeywords.robot
+
+Suite Setup         ClusterManagement Setup
+Suite Teardown      Delete All Sessions
+
 
 *** Test Cases ***
 Create Basic Export
@@ -12,6 +15,11 @@ Create Basic Export
     DaeximKeywords.Cleanup Cluster Export Files
     DaeximKeywords.Schedule Export    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Verify Export Status    ${EXPORT_SCHEDULED_STATUS}    ${SECOND_CONTROLLER_INDEX}
-    Builtin.Wait Until Keyword Succeeds    10 sec    5 sec    DaeximKeywords.Verify Export Status    ${EXPORT_COMPLETE_STATUS}    ${FIRST_CONTROLLER_INDEX}
+    Builtin.Wait Until Keyword Succeeds
+    ...    10 sec
+    ...    5 sec
+    ...    DaeximKeywords.Verify Export Status
+    ...    ${EXPORT_COMPLETE_STATUS}
+    ...    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Verify Export Files    ${SECOND_CONTROLLER_INDEX}
     DaeximKeywords.Verify Netconf Mount    ${NETCONF_EP_NAME}    ${THIRD_CONTROLLER_INDEX}
index 0eadb59737570c5195ca268912e3a62b1dedd7c7..7b070ceb9ac626e69b19265a9b4f088f242f4501 100644 (file)
@@ -1,8 +1,11 @@
 *** Settings ***
-Documentation     Test suite for verifying basic import on a cluster
-Suite Setup       ClusterManagement Setup
-Suite Teardown    Delete All Sessions
-Resource          ../../libraries/DaeximKeywords.robot
+Documentation       Test suite for verifying basic import on a cluster
+
+Resource            ../../libraries/DaeximKeywords.robot
+
+Suite Setup         ClusterManagement Setup
+Suite Teardown      Delete All Sessions
+
 
 *** Test Cases ***
 Create Basic Import
@@ -13,4 +16,9 @@ Create Basic Import
     ClusterManagement.Start_Members_From_List_Or_All
     DaeximKeywords.Copy Config Data To Controller    ${FIRST_CONTROLLER_INDEX}
     DaeximKeywords.Schedule Import    ${FIRST_CONTROLLER_INDEX}
-    Builtin.Wait Until Keyword Succeeds    30 sec    5 sec    DaeximKeywords.Verify Netconf Mount    ${NETCONF_EP_NAME}    ${THIRD_CONTROLLER_INDEX}
+    Builtin.Wait Until Keyword Succeeds
+    ...    30 sec
+    ...    5 sec
+    ...    DaeximKeywords.Verify Netconf Mount
+    ...    ${NETCONF_EP_NAME}
+    ...    ${THIRD_CONTROLLER_INDEX}
index ad11c15365263c7d7121e57bcc7f76415baaa870..daaae96c71ad7017d41c48c8c64b5368cbf0446c 100644 (file)
@@ -1,35 +1,40 @@
 *** Settings ***
-Documentation     Basic Tests for Device Identification and Driver Management.
+Documentation       Basic Tests for Device Identification and Driver Management.
 ...
-...               Copyright (c) 2015 Hewlett-Packard Development Company, L.P. and others. All rights reserved.
+...                 Copyright (c) 2015 Hewlett-Packard Development Company, L.P. and others. All rights reserved.
 ...
-...               This program and the accompanying materials are made available under the
-...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
-...               and is available at http://www.eclipse.org/legal/epl-v10.html
-Suite Setup       Setup Didm Environment
-Suite Teardown    Delete All Sessions
-Library           SSHLibrary
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           ../../../libraries/Common.py
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/Utils.robot
-Variables         ../../../variables/Variables.py
+...                 This program and the accompanying materials are made available under the
+...                 terms of the Eclipse Public License v1.0 which accompanies this distribution,
+...                 and is available at http://www.eclipse.org/legal/epl-v10.html
+
+Library             SSHLibrary
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             ../../../libraries/Common.py
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/Utils.robot
+Variables           ../../../variables/Variables.py
+
+Suite Setup         Setup Didm Environment
+Suite Teardown      Delete All Sessions
+
 
 *** Variables ***
-${DIDM_ID}        "didm-identification:device-type"
-${DEVICE_TYPE}    "mininet-didm:mininet-device-type"
+${DIDM_ID}          "didm-identification:device-type"
+${DEVICE_TYPE}      "mininet-didm:mininet-device-type"
+
 
 *** Test Cases ***
 Verify Device Identification
     [Documentation]    Verification of Device type identification feature with device driver installed.
-    [Tags]    DIDM
+    [Tags]    didm
     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_NODES_API}
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    ${DIDM_ID}
     Should Contain    ${resp.content}    ${DEVICE_TYPE}
 
+
 *** Keywords ***
 Setup Didm Environment
     [Documentation]    Installing DIDM related features, mininet driver, hp3800 driver
index db7f3bd019cca838786343748c9c3d597c99f1c8..175edb8a85198aed9c972faf90506f84ab6249c7 100644 (file)
@@ -1,74 +1,78 @@
 *** Settings ***
-Documentation     Basic Tests for DIDM in Beryllium.
+Documentation       Basic Tests for DIDM in Beryllium.
 ...
-...               Copyright (c) 2015 Hewlett Packard Enterprise Development LP and others. All rights reserved.
-...               This program and the accompanying materials are made available under the terms of the Eclipse
-...               Public License v1.0 which accompanies this distribution, and is available at
-...               http://www.eclipse.org/legal/ep1-v10.html
-Suite Setup       Setup DIDM Environment
-Suite Teardown    DIDM Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Library           SSHLibrary
-Library           Collections
-Library           RequestsLibrary
-Resource          ../../../variables/DIDM/Variables.robot
-Variables         ../../../variables/Variables.py
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/MininetKeywords.robot
-Resource          ../../../libraries/DIDMKeywords.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/SetupUtils.robot
+...                 Copyright (c) 2015 Hewlett Packard Enterprise Development LP and others. All rights reserved.
+...                 This program and the accompanying materials are made available under the terms of the Eclipse
+...                 Public License v1.0 which accompanies this distribution, and is available at
+...                 http://www.eclipse.org/legal/ep1-v10.html
+
+Library             SSHLibrary
+Library             Collections
+Library             RequestsLibrary
+Resource            ../../../variables/DIDM/Variables.robot
+Variables           ../../../variables/Variables.py
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/MininetKeywords.robot
+Resource            ../../../libraries/DIDMKeywords.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/SetupUtils.robot
+
+Suite Setup         Setup DIDM Environment
+Suite Teardown      DIDM Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
 
 *** Test Cases ***
 Identifying Unknown Device
     [Documentation]    Verify other devices are identified as unknown
-    [Tags]    DIDM
+    [Tags]    didm
     ${unknown_device_ip}=    Set Variable    1.1.1.1
     ${device_ip}=    Check Device IP
     Should Not Match    ${device_ip}    ${unknown_device_ip}
 
 Identifying Device Type
     [Documentation]    Verify device type
-    [Tags]    DIDM
+    [Tags]    didm
     ${device_type}=    Find Device Type
     Log    ${device_type}
     Should Match    ${DEVICE_TYPE}    ${device_type}
 
 Identifying Hardware Information
     [Documentation]    Verify device hardware information
-    [Tags]    DIDM
+    [Tags]    didm
     ${device_hw}=    Find Device Hardware
     Log    ${device_hw}
     Should Match    ${DEVICE_HW_INFO}    ${device_hw}
 
 Identifying Manufacturer
     [Documentation]    Verify device manufacturer
-    [Tags]    DIDM
+    [Tags]    didm
     ${manufacture}=    Find Device Manufacturer
     Log    ${manufacture}
     Should Match    ${DEVICE_MANUFACTURE}    ${manufacture}
 
 Identifying Serial Number
     [Documentation]    Verify device serial number
-    [Tags]    DIDM
+    [Tags]    didm
     ${serial_number}=    Find Serial Number
     Log    ${serial_number}
     Should Match    ${DEVICE_SERIAL_NUMBER}    ${serial_number}
 
 Identifying Software Information
     [Documentation]    Verify device software information
-    [Tags]    DIDM
+    [Tags]    didm
     ${device_sw}=    Find Device Software
     Log    ${device_sw}
     Should Match    ${DEVICE_SW_INFO}    ${device_sw}
 
 Identifying Description
     [Documentation]    Verify device description
-    [Tags]    DIDM
+    [Tags]    didm
     ${device_description}=    Find Device Description
     Log    ${device_description}
     Should Match    ${DEVICE_DESCRIPTION}    ${device_description}
 
+
 *** Keywords ***
 DIDM Suite Teardown
     [Documentation]    Cleanup and exit device
@@ -93,6 +97,9 @@ Setup DIDM Environment
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
     Log    Start device
     ${mininet_topo_opt}=    Set Variable    --topo linear,1
-    ${mininet_conn_id}=    Start Mininet Single Controller    ${TOOLS_SYSTEM_IP}    ${ODL_SYSTEM_IP}    ${mininet_topo_opt}
+    ${mininet_conn_id}=    Start Mininet Single Controller
+    ...    ${TOOLS_SYSTEM_IP}
+    ...    ${ODL_SYSTEM_IP}
+    ...    ${mininet_topo_opt}
     Wait Until Keyword Succeeds    11s    1s    Check DIDM Registered With Device
     Set Suite Variable    ${mininet_conn_id}
index accd7c8339eb6e5f808be45eefc37909381d6f9a..d0986d79422df82b27830b1f6debc09a3cee87d8 100644 (file)
@@ -1,28 +1,33 @@
 *** Settings ***
-Documentation     Bug 4462 test suite.
+Documentation       Bug 4462 test suite.
 ...
-...               Copyright (c) 2016-2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2016-2017 Cisco Systems, Inc. and others. All rights reserved.
 ...
-...               This program and the accompanying materials are made available under the
-...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
-...               and is available at http://www.eclipse.org/legal/epl-v10.html
+...                 This program and the accompanying materials are made available under the
+...                 terms of the Eclipse Public License v1.0 which accompanies this distribution,
+...                 and is available at http://www.eclipse.org/legal/epl-v10.html
 ...
 ...
-...               Try to detect whether Karaf hangs when trying to install
-...               list of features one by one. Default list is odl-integration-compatible-with-all.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown
-Default Tags      critical    distribution    features
-Resource          ${CURDIR}/../../libraries/distribution/StreamDistro.robot
-Resource          ${CURDIR}/../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../libraries/SSHKeywords.robot
-Resource          ${CURDIR}/../../variables/Variables.robot
-Library           XML
-Library           SSHLibrary
+...                 Try to detect whether Karaf hangs when trying to install
+...                 list of features one by one. Default list is odl-integration-compatible-with-all.
+
+Resource            ${CURDIR}/../../libraries/distribution/StreamDistro.robot
+Resource            ${CURDIR}/../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../libraries/SSHKeywords.robot
+Resource            ${CURDIR}/../../variables/Variables.robot
+Library             XML
+Library             SSHLibrary
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown
+
+Default Tags        critical    distribution    features
+
 
 *** Variables ***
-${FEATURES_LIST_NAME}    odl-integration-compatible-with-all
-${FEATURE_INSTALL_TIMEOUT}    10m
+${FEATURES_LIST_NAME}           odl-integration-compatible-with-all
+${FEATURE_INSTALL_TIMEOUT}      10m
+
 
 *** Test Cases ***
 Install_Features_One_By_One
@@ -31,7 +36,9 @@ Install_Features_One_By_One
     ${filename_prefix} =    StreamDistro.Compose_Zip_Filename_Prefix
     ${actual_version} =    BuiltIn.Evaluate    '''${BUNDLEFOLDER}'''[len("${filename_prefix}-"):]
     ${features_test} =    StreamDistro.Compose_Test_Feature_Repo_Name
-    SSHLibrary.Get_File    ${WORKSPACE}/${BUNDLEFOLDER}/system/org/opendaylight/integration/${features_test}/${actual_version}/${features_test}-${actual_version}-features.xml    features.xml
+    SSHLibrary.Get_File
+    ...    ${WORKSPACE}/${BUNDLEFOLDER}/system/org/opendaylight/integration/${features_test}/${actual_version}/${features_test}-${actual_version}-features.xml
+    ...    features.xml
     @{features} =    XML.Get_Elements_Texts    features.xml    .feature[@name="${FEATURES_LIST_NAME}"]/feature
     Collections.Log_List    ${features}
     KarafKeywords.Open_Controller_Karaf_Console_With_Timeout    ${1}    ${FEATURE_INSTALL_TIMEOUT}
index 40b2efb9ebb65c188e3fc279fe26e09e0fe9d536..6386bbfb89e94df1930bd90ce3924814ea337a32 100644 (file)
@@ -1,26 +1,31 @@
 *** Settings ***
-Documentation     Karaf stop suite.
+Documentation       Karaf stop suite.
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
 ...
-...               This program and the accompanying materials are made available under the
-...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
-...               and is available at http://www.eclipse.org/legal/epl-v10.html
+...                 This program and the accompanying materials are made available under the
+...                 terms of the Eclipse Public License v1.0 which accompanies this distribution,
+...                 and is available at http://www.eclipse.org/legal/epl-v10.html
 ...
 ...
-...               Try to test whether Karaf stops correctly when stop script is used.
+...                 Try to test whether Karaf stops correctly when stop script is used.
 ...
-...               This suite should run as the last one, because it stops the karaf and does
-...               not start again. And should try to stop karaf when enough features are installed.
-...               Because of that it will be run after the karaf_sequence_install.robot
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown
-Default Tags      critical    distribution    features
-Resource          ${CURDIR}/../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../variables/Variables.robot
+...                 This suite should run as the last one, because it stops the karaf and does
+...                 not start again. And should try to stop karaf when enough features are installed.
+...                 Because of that it will be run after the karaf_sequence_install.robot
+
+Resource            ${CURDIR}/../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../variables/Variables.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown
+
+Default Tags        critical    distribution    features
+
 
 *** Variables ***
-${STOP_TIMEOUT}    180s
+${STOP_TIMEOUT}     180s
+
 
 *** Test Cases ***
 Stop_Karaf_Within_Timeout
index 879afa7b951106f4fa6cc032494f99401ee7cf83..3f926a2b124c13136d78583d26e2974bfd5c9391 100644 (file)
@@ -1,27 +1,32 @@
 *** Settings ***
-Documentation     Suite for testing ODL distribution zip file size.
+Documentation       Suite for testing ODL distribution zip file size.
 ...
-...               Copyright (c) 2016-2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2016-2017 Cisco Systems, Inc. and others. All rights reserved.
 ...
-...               This program and the accompanying materials are made available under the
-...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
-...               and is available at http://www.eclipse.org/legal/epl-v10.html
+...                 This program and the accompanying materials are made available under the
+...                 terms of the Eclipse Public License v1.0 which accompanies this distribution,
+...                 and is available at http://www.eclipse.org/legal/epl-v10.html
 ...
 ...
-...               Variables needed to be rovided on pybot invocation:
-...               ${BUNDLEFOLDER} (directory name of ODL installation, as it is suffxed by the distribution version).
-...               This suite assumes the .zip file is stll present on ${ODL_SYSTEM_IP} in ${WORKSPACE} directory.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical    distribution    size
-Resource          ${CURDIR}/../../libraries/distribution/StreamDistro.robot
-Resource          ${CURDIR}/../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../libraries/SSHKeywords.robot
+...                 Variables needed to be rovided on pybot invocation:
+...                 ${BUNDLEFOLDER} (directory name of ODL installation, as it is suffxed by the distribution version).
+...                 This suite assumes the .zip file is stll present on ${ODL_SYSTEM_IP} in ${WORKSPACE} directory.
+
+Resource            ${CURDIR}/../../libraries/distribution/StreamDistro.robot
+Resource            ${CURDIR}/../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../libraries/SSHKeywords.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical    distribution    size
+
 
 *** Variables ***
-${BUNDLE_SUFFIX}    .zip
-${DISTRIBUTION_SIZE_LIMIT}    469762048    # == 7 * 64 MiB, Nexus limit is 8 * 64 MiB.
+${BUNDLE_SUFFIX}                .zip
+${DISTRIBUTION_SIZE_LIMIT}      469762048    # == 7 * 64 MiB, Nexus limit is 8 * 64 MiB.
+
 
 *** Test Cases ***
 Distribution_Size
@@ -29,7 +34,10 @@ Distribution_Size
     SSHKeywords.Open_Connection_To_ODL_System
     ${bundle_prefix} =    StreamDistro.Compose_Zip_Filename_Prefix
     # TODO: 'du -b' is shorter, but gives less info. Is that better than ls?
-    ${ls_output} =    SSHKeywords.Execute_Command_Should_Pass    command=bash -c 'ls -lAn ${WORKSPACE}/${bundle_prefix}*${BUNDLE_SUFFIX}'
+    ${ls_output} =    SSHKeywords.Execute_Command_Should_Pass
+    ...    command=bash -c 'ls -lAn ${WORKSPACE}/${bundle_prefix}*${BUNDLE_SUFFIX}'
     ${size} =    SSHKeywords.Execute_Command_Should_Pass    command=echo '${ls_output}' | cut -d ' ' -f 5
     # The following probably fails of there were multiple *.zip files listed.
-    BuiltIn.Should_Be_True    ${size} < ${DISTRIBUTION_SIZE_LIMIT}    Distribution size ${size} is not smaller than limit ${DISTRIBUTION_SIZE_LIMIT}.
+    BuiltIn.Should_Be_True
+    ...    ${size} < ${DISTRIBUTION_SIZE_LIMIT}
+    ...    Distribution size ${size} is not smaller than limit ${DISTRIBUTION_SIZE_LIMIT}.
index 5cfbb3d040b69561b35ae453306b8ff872d54cf8..75ad550f617f85cb186df8d8fae76f3606060459 100644 (file)
@@ -1,40 +1,45 @@
 *** Settings ***
-Documentation     Suite for testing ODL distribution ability to report ist version via Restconf.
+Documentation       Suite for testing ODL distribution ability to report ist version via Restconf.
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
 ...
-...               This program and the accompanying materials are made available under the
-...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
-...               and is available at http://www.eclipse.org/legal/epl-v10.html
+...                 This program and the accompanying materials are made available under the
+...                 terms of the Eclipse Public License v1.0 which accompanies this distribution,
+...                 and is available at http://www.eclipse.org/legal/epl-v10.html
 ...
 ...
-...               Features needed to be installed:
-...               odl-distribution-version (the main feature, defines the version string holder as a config module)
-...               odl-netconf-connector (controller-config device is used to access the config subsystem)
-...               odl-restconf (or odl-restconf-noauth, to get restconf access to the data mounted by controller-config)
+...                 Features needed to be installed:
+...                 odl-distribution-version (the main feature, defines the version string holder as a config module)
+...                 odl-netconf-connector (controller-config device is used to access the config subsystem)
+...                 odl-restconf (or odl-restconf-noauth, to get restconf access to the data mounted by controller-config)
 ...
-...               Variables needed to be rovided on pybot invocation:
-...               ${BUNDLEFOLDER} (directory name of ODL installation, as it is suffxed by the distribution version)
+...                 Variables needed to be rovided on pybot invocation:
+...                 ${BUNDLEFOLDER} (directory name of ODL installation, as it is suffxed by the distribution version)
 ...
-...               This suite require both Restconf and Netconf-connector to be ready,
-...               so it is recommended to run netconfready.robot before running this suite.
+...                 This suite require both Restconf and Netconf-connector to be ready,
+...                 so it is recommended to run netconfready.robot before running this suite.
 ...
-...               TODO: Figure out a way to reliably predict Odlparent version.
-...               Possibly, inspection of system/org/opendaylight/odlparent/ would be required.
-Suite Setup       Suite_Setup
-Suite Teardown    Suite_Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical    distribution    version
-Resource          ${CURDIR}/../../libraries/distribution/StreamDistro.robot
-Resource          ${CURDIR}/../../libraries/TemplatedRequests.robot
-Resource          ${CURDIR}/../../libraries/SetupUtils.robot
+...                 TODO: Figure out a way to reliably predict Odlparent version.
+...                 Possibly, inspection of system/org/opendaylight/odlparent/ would be required.
+
+Resource            ${CURDIR}/../../libraries/distribution/StreamDistro.robot
+Resource            ${CURDIR}/../../libraries/TemplatedRequests.robot
+Resource            ${CURDIR}/../../libraries/SetupUtils.robot
+
+Suite Setup         Suite_Setup
+Suite Teardown      Suite_Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical    distribution    version
+
 
 *** Variables ***
-${VERSION_VARDIR}    ${CURDIR}/../../variables/distribution/version
-${DEVICE_NAME}    controller-config
-${NETCONF_DEV_FOLDER}    ${CURDIR}/../../variables/netconf/device/full-uri-device
-${NETCONF_MOUNT_FOLDER}    ${CURDIR}/../../variables/netconf/device/full-uri-mount
+${VERSION_VARDIR}           ${CURDIR}/../../variables/distribution/version
+${DEVICE_NAME}              controller-config
+${NETCONF_DEV_FOLDER}       ${CURDIR}/../../variables/netconf/device/full-uri-device
+${NETCONF_MOUNT_FOLDER}     ${CURDIR}/../../variables/netconf/device/full-uri-mount
+
 
 *** Test Cases ***
 Distribution_Version
@@ -42,22 +47,41 @@ Distribution_Version
     # ${BUNDLEFOLDER} typically looks like this: karaf-0.8.0-SNAPSHOT
     ${filename_prefix} =    StreamDistro.Compose_Zip_Filename_Prefix
     ${version} =    BuiltIn.Evaluate    """${BUNDLEFOLDER}"""[len("""${filename_prefix}-"""):]
-    BuiltIn.Wait_Until_Keyword_Succeeds    60x    3s    TemplatedRequests.Get_As_Json_Templated    folder=${VERSION_VARDIR}    mapping={"VERSION":"${version}"}    verify=True
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60x
+    ...    3s
+    ...    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VERSION_VARDIR}
+    ...    mapping={"VERSION":"${version}"}
+    ...    verify=True
+
 
 *** Keywords ***
 Suite_Setup
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
     TemplatedRequests.Create_Default_Session
-    BuiltIn.Run_Keyword_If    """${USE_NETCONF_CONNECTOR}""" == """False"""    Configure_Netconf_Device
+    IF    """${USE_NETCONF_CONNECTOR}""" == """False"""
+        Configure_Netconf_Device
+    END
 
 Suite_Teardown
-    BuiltIn.Run_Keyword_If    """${USE_NETCONF_CONNECTOR}""" == """False"""    Remove_Netconf_Device
+    IF    """${USE_NETCONF_CONNECTOR}""" == """False"""    Remove_Netconf_Device
 
 Configure_Netconf_Device
     [Documentation]    Configures netconf device if ${USE_NETCONF_CONNECTOR} is False.
-    &{mapping} =    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    DEVICE_PORT=1830    DEVICE_IP=${ODL_SYSTEM_IP}    DEVICE_USER=admin    DEVICE_PASSWORD=admin
+    &{mapping} =    BuiltIn.Create_Dictionary
+    ...    DEVICE_NAME=${DEVICE_NAME}
+    ...    DEVICE_PORT=1830
+    ...    DEVICE_IP=${ODL_SYSTEM_IP}
+    ...    DEVICE_USER=admin
+    ...    DEVICE_PASSWORD=admin
     TemplatedRequests.Put_As_Xml_Templated    ${NETCONF_DEV_FOLDER}    mapping=${mapping}
-    BuiltIn.Wait_Until_Keyword_Succeeds    10x    3s    TemplatedRequests.Get_As_Xml_Templated    ${NETCONF_MOUNT_FOLDER}    mapping=${mapping}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    10x
+    ...    3s
+    ...    TemplatedRequests.Get_As_Xml_Templated
+    ...    ${NETCONF_MOUNT_FOLDER}
+    ...    mapping=${mapping}
 
 Remove_Netconf_Device
     [Documentation]    Removes netconf device if ${USE_NETCONF_CONNECTOR} is False.
index 9a030e8249c27b00476ec57948a7f4d002f5aa1d..2c0b80f07eeab2f1d9b528ce2013b66023f62d30 100644 (file)
@@ -1,11 +1,12 @@
 *** Settings ***
-Documentation     Verification that DLUX cotains Yangman submenu when logged in.
-...               Verification that when Yangman submenu entered, there are certain elements displayed.
-...               Verification that the selected operation is displayed and relevant code mirror(s) is/are displayed.
-Suite Teardown    Close Browser
-Resource          ${CURDIR}/../../../libraries/YangmanKeywords.robot
+Documentation       Verification that DLUX cotains Yangman submenu when logged in.
+...                 Verification that when Yangman submenu entered, there are certain elements displayed.
+...                 Verification that the selected operation is displayed and relevant code mirror(s) is/are displayed.
+
+Resource            ${CURDIR}/../../../libraries/YangmanKeywords.robot
+
+Suite Teardown      Close Browser
 
-*** Variables ***
 
 *** Test Cases ***
 Open dlux and login and verify yangman submenu has been loaded
@@ -23,6 +24,7 @@ Verify operation selection and code mirror displaying works correctly
 Verify that selecting/deselecting show data checkboxes in json view results in displaying/hiding the corresponding code mirror
     Verify Displaying And Hiding Of CMs When Selecting Show Data Checkboxes
 
+
 *** Keywords ***
 Verify Operations Presence In Operation Select Menu
     YangmanKeywords.Expand Operation Select Menu
@@ -38,9 +40,15 @@ Select Each Operation And Verify That Code Mirrors Has Been Displayed Correctly
         ${operation_id}=    Collections.Get From List    ${operation_ids}    ${i}
         ${operation_name}=    Collections.Get From List    ${operation_names}    ${i}
         YangmanKeywords.Expand Operation Select Menu And Select Operation    ${operation_id}    ${operation_name}
-        Run Keyword If    "${operation_name}"=="PUT" or "${operation_name}"=="POST"    BuiltIn.Run Keywords    YangmanKeywords.Verify Sent Data CM Is Displayed
-        ...    AND    YangmanKeywords.Verify Received Data CM Is Displayed
-        Run Keyword If    "${operation_name}"=="GET" or "${operation_name}"=="DELETE"    YangmanKeywords.Verify Received Data CM Is Displayed
+        IF    "${operation_name}"=="PUT" or "${operation_name}"=="POST"
+            BuiltIn.Run Keywords
+            ...    YangmanKeywords.Verify Sent Data CM Is Displayed
+            ...    AND
+            ...    YangmanKeywords.Verify Received Data CM Is Displayed
+        END
+        IF    "${operation_name}"=="GET" or "${operation_name}"=="DELETE"
+            YangmanKeywords.Verify Received Data CM Is Displayed
+        END
     END
 
 Verify Displaying And Hiding Of CMs When Selecting Show Data Checkboxes
index 981c9a0aab4dc4ef817a93deb62137ec5dda7da9..556ef6006084a5a5b49ecc15962828249f930e6c 100644 (file)
@@ -1,14 +1,15 @@
 *** Settings ***
-Documentation     Verification that Yangman Modules tab contains at least 1 module loaded.
-...               Verification that each loaded module can be expanded and collapsed.
-...               Verification that each module contains operations, or operational, or config list items when it is extended.
-...               Verification that when operations or operational or config of in modules list is clicked, the name of the module in module detail is the same as the name of the module in module list.
-...               Verification that when operations or operational or config is clicked, module detail tab contains chosen tab in selected mode.
-Suite Setup       YangmanKeywords.Open DLUX And Login And Navigate To Yangman URL
-Suite Teardown    Close Browser
-Resource          ${CURDIR}/../../../libraries/YangmanKeywords.robot
+Documentation       Verification that Yangman Modules tab contains at least 1 module loaded.
+...                 Verification that each loaded module can be expanded and collapsed.
+...                 Verification that each module contains operations, or operational, or config list items when it is extended.
+...                 Verification that when operations or operational or config of in modules list is clicked, the name of the module in module detail is the same as the name of the module in module list.
+...                 Verification that when operations or operational or config is clicked, module detail tab contains chosen tab in selected mode.
+
+Resource            ${CURDIR}/../../../libraries/YangmanKeywords.robot
+
+Suite Setup         YangmanKeywords.Open DLUX And Login And Navigate To Yangman URL
+Suite Teardown      Close Browser
 
-*** Variables ***
 
 *** Test Cases ***
 Verify that any module has been loaded
@@ -31,15 +32,18 @@ Verify that each loaded module contains either operations, or operational and co
 Verify that when operations or operational and config in modules list is clicked, module detail with chosen tab is displayed
     Click Operations Or Operational And Config Of All Modules And Verify Chosen Tab Is Selected    ${number_of_modules}
 
+
 *** Keywords ***
 Verify Each Loaded Module Is Collapsed
     ${number_of_modules_loaded}=    YangmanKeywords.Return Number Of Modules Loaded    ${MODULE_LIST_ITEM}
-    ${number_of_modules_loaded_collapsed}=    YangmanKeywords.Return Number Of Modules Loaded    ${MODULE_LIST_ITEM_COLLAPSED}
+    ${number_of_modules_loaded_collapsed}=    YangmanKeywords.Return Number Of Modules Loaded
+    ...    ${MODULE_LIST_ITEM_COLLAPSED}
     BuiltIn.Should Be Equal    ${number_of_modules_loaded}    ${number_of_modules_loaded_collapsed}
 
 Verify Each Loaded Module Is Expanded
     ${number_of_modules_loaded}=    YangmanKeywords.Return Number Of Modules Loaded    ${MODULE_LIST_ITEM}
-    ${number_of_modules_loaded_expanded}=    YangmanKeywords.Return Number Of Modules Loaded    ${MODULE_LIST_ITEM_EXPANDED}
+    ${number_of_modules_loaded_expanded}=    YangmanKeywords.Return Number Of Modules Loaded
+    ...    ${MODULE_LIST_ITEM_EXPANDED}
     BuiltIn.Should Be Equal    ${number_of_modules_loaded}    ${number_of_modules_loaded_expanded}
 
 Expand Each Loaded Module
@@ -47,8 +51,12 @@ Expand Each Loaded Module
     FOR    ${index}    IN RANGE    0    ${number_of_modules_loaded}
         ${module_list_item_collapsed_indexed}=    YangmanKeywords.Return Module List Item Collapsed Indexed    ${index}
         ${indexed_module_expander_icon}=    YangmanKeywords.Return Indexed Module Expander Icon    ${index}
-        ${status}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${module_list_item_collapsed_indexed}
-        BuiltIn.Run Keyword If    "${status}"=="True"    GUIKeywords.Focus And Click Element    ${indexed_module_expander_icon}
+        ${status}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Wait Until Page Contains Element
+        ...    ${module_list_item_collapsed_indexed}
+        IF    "${status}"=="True"
+            GUIKeywords.Focus And Click Element    ${indexed_module_expander_icon}
+        END
         Selenium2Library.Wait Until Page Does Not Contain Element    ${module_list_item_collapsed_indexed}
     END
 
@@ -57,8 +65,12 @@ Collapse Each Expanded Module
     FOR    ${index}    IN RANGE    0    ${number_of_modules_loaded}
         ${module_list_item_expanded_indexed}=    YangmanKeywords.Return Module List Item Expanded Indexed    ${index}
         ${indexed_module_expander_icon}=    YangmanKeywords.Return Indexed Module Expander Icon    ${index}
-        ${status}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${module_list_item_expanded_indexed}
-        BuiltIn.Run Keyword If    "${status}"=="True"    Run Keyword    GUIKeywords.Focus And Click Element    ${indexed_module_expander_icon}
+        ${status}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Wait Until Page Contains Element
+        ...    ${module_list_item_expanded_indexed}
+        IF    "${status}"=="True"
+            Run Keyword    GUIKeywords.Focus And Click Element    ${indexed_module_expander_icon}
+        END
         Selenium2Library.Wait Until Page Does Not Contain Element    ${module_list_item_expanded_indexed}
     END
 
@@ -68,10 +80,19 @@ Verify Each Loaded Module Contains Operational Or Config Or Operations
         ${indexed_module_operations}=    YangmanKeywords.Return Indexed Module Operations Label    ${index}
         ${indexed_module_operational}=    YangmanKeywords.Return Indexed Module Operational Label    ${index}
         ${indexed_module_config}=    YangmanKeywords.Return Indexed Module Config Label    ${index}
-        ${contains_operational}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${indexed_module_operational}
-        ${contains_operations}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${indexed_module_operations}
-        ${contains_config}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${indexed_module_config}
-        @{states}=    BuiltIn.Create List    "${contains_operational}"    "${contains_operations}"    "${contains_config}"
+        ${contains_operational}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Page Should Contain Element
+        ...    ${indexed_module_operational}
+        ${contains_operations}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Page Should Contain Element
+        ...    ${indexed_module_operations}
+        ${contains_config}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Page Should Contain Element
+        ...    ${indexed_module_config}
+        @{states}=    BuiltIn.Create List
+        ...    "${contains_operational}"
+        ...    "${contains_operations}"
+        ...    "${contains_config}"
         Collections.List Should Contain Value    ${states}    "True"
     END
 
@@ -82,30 +103,94 @@ Compare Module Name In Module List And Module Detail
         ${indexed_module_operations}=    YangmanKeywords.Return Indexed Module Operations Label    ${index}
         ${indexed_module_operational}=    YangmanKeywords.Return Indexed Module Operational Label    ${index}
         ${indexed_module_config}=    YangmanKeywords.Return Indexed Module Config Label    ${index}
-        ${contains_operational}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_operational}
-        ${contains_operations}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_operations}
-        ${contains_config}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_config}
+        ${contains_operational}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Wait Until Page Contains Element
+        ...    ${indexed_module_operational}
+        ${contains_operations}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Wait Until Page Contains Element
+        ...    ${indexed_module_operations}
+        ${contains_config}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Wait Until Page Contains Element
+        ...    ${indexed_module_config}
         ${module_list_module_name}=    Selenium2Library.Get Text    ${indexed_module}//p
-        BuiltIn.Run Keyword If    "${contains_operations}"=="True"    BuiltIn.Run Keywords    GUIKeywords.Focus And Click Element    ${indexed_module_operations}
-        ...    AND    Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_MODULE_NAME_LABEL}
-        ${module_detail_module_name}=    BuiltIn.Run Keyword If    "${contains_operations}"=="True"    Selenium2Library.Get Text    ${MODULE_DETAIL_MODULE_NAME_LABEL}
-        BuiltIn.Run Keyword If    "${contains_operations}"=="True"    BuiltIn.Run Keywords    BuiltIn.Should Contain    ${module_detail_module_name}    ${module_list_module_name}
-        ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
-        ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_operations}
-        ${contains_operational}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${indexed_module_operational}
-        BuiltIn.Run Keyword If    "${contains_operational}"=="True"    BuiltIn.Run Keywords    GUIKeywords.Focus And Click Element    ${indexed_module_operational}
-        ...    AND    Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_MODULE_NAME_LABEL}
-        ${module_detail_module_name}=    BuiltIn.Run Keyword If    "${contains_operational}"=="True"    Selenium2Library.Get Text    ${MODULE_DETAIL_MODULE_NAME_LABEL}
-        BuiltIn.Run Keyword If    "${contains_operational}"=="True"    BuiltIn.Run Keywords    BuiltIn.Should Contain    ${module_detail_module_name}    ${module_list_module_name}
-        ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
-        ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_operational}
-        ${contains_config}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${indexed_module_config}
-        BuiltIn.Run Keyword If    "${contains_config}"=="True"    BuiltIn.Run Keywords    GUIKeywords.Focus And Click Element    ${indexed_module_config}
-        ...    AND    Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_MODULE_NAME_LABEL}
-        ${module_detail_module_name}=    BuiltIn.Run Keyword If    "${contains_config}"=="True"    Selenium2Library.Get Text    ${MODULE_DETAIL_MODULE_NAME_LABEL}
-        BuiltIn.Run Keyword If    "${contains_config}"=="True"    BuiltIn.Run Keywords    BuiltIn.Should Contain    ${module_detail_module_name}    ${module_list_module_name}
-        ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
-        ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_config}
+        IF    "${contains_operations}"=="True"
+            BuiltIn.Run Keywords
+            ...    GUIKeywords.Focus And Click Element
+            ...    ${indexed_module_operations}
+            ...    AND
+            ...    Selenium2Library.Wait Until Page Contains Element
+            ...    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+        END
+        IF    "${contains_operations}"=="True"
+            ${module_detail_module_name}=    Selenium2Library.Get Text    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+        ELSE
+            ${module_detail_module_name}=    Set Variable    ${None}
+        END
+        IF    "${contains_operations}"=="True"
+            BuiltIn.Run Keywords
+            ...    BuiltIn.Should Contain
+            ...    ${module_detail_module_name}
+            ...    ${module_list_module_name}
+            ...    AND
+            ...    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+            ...    AND
+            ...    Selenium2Library.Wait Until Element Is Visible
+            ...    ${indexed_module_operations}
+        END
+        ${contains_operational}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Page Should Contain Element
+        ...    ${indexed_module_operational}
+        IF    "${contains_operational}"=="True"
+            BuiltIn.Run Keywords
+            ...    GUIKeywords.Focus And Click Element
+            ...    ${indexed_module_operational}
+            ...    AND
+            ...    Selenium2Library.Wait Until Page Contains Element
+            ...    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+        END
+        IF    "${contains_operational}"=="True"
+            ${module_detail_module_name}=    Selenium2Library.Get Text    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+        ELSE
+            ${module_detail_module_name}=    Set Variable    ${None}
+        END
+        IF    "${contains_operational}"=="True"
+            BuiltIn.Run Keywords
+            ...    BuiltIn.Should Contain
+            ...    ${module_detail_module_name}
+            ...    ${module_list_module_name}
+            ...    AND
+            ...    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+            ...    AND
+            ...    Selenium2Library.Wait Until Element Is Visible
+            ...    ${indexed_module_operational}
+        END
+        ${contains_config}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Page Should Contain Element
+        ...    ${indexed_module_config}
+        IF    "${contains_config}"=="True"
+            BuiltIn.Run Keywords
+            ...    GUIKeywords.Focus And Click Element
+            ...    ${indexed_module_config}
+            ...    AND
+            ...    Selenium2Library.Wait Until Page Contains Element
+            ...    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+        END
+        IF    "${contains_config}"=="True"
+            ${module_detail_module_name}=    Selenium2Library.Get Text    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+        ELSE
+            ${module_detail_module_name}=    Set Variable    ${None}
+        END
+        IF    "${contains_config}"=="True"
+            BuiltIn.Run Keywords
+            ...    BuiltIn.Should Contain
+            ...    ${module_detail_module_name}
+            ...    ${module_list_module_name}
+            ...    AND
+            ...    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+            ...    AND
+            ...    Selenium2Library.Wait Until Element Is Visible
+            ...    ${indexed_module_config}
+        END
     END
 
 Click Operations Or Operational And Config Of All Modules And Verify Chosen Tab Is Selected
@@ -114,16 +199,38 @@ Click Operations Or Operational And Config Of All Modules And Verify Chosen Tab
         ${indexed_module_operations}=    YangmanKeywords.Return Indexed Module Operations Label    ${index}
         ${indexed_module_operational}=    YangmanKeywords.Return Indexed Module Operational Label    ${index}
         ${indexed_module_config}=    YangmanKeywords.Return Indexed Module Config Label    ${index}
-        ${contains_operational}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_operational}
-        ${contains_operations}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_operations}
-        ${contains_config}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_config}
-        BuiltIn.Run Keyword If    "${contains_operations}"=="True"    Run Keywords    YangmanKeywords.Click Indexed Module Operations To Load Module Detail Operations Tab    ${index}
-        ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
-        ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_operations}
-        BuiltIn.Run Keyword If    "${contains_operational}"=="True"    BuiltIn.Run Keywords    YangmanKeywords.Click Indexed Module Operational To Load Module Detail Operational Tab    ${index}
-        ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
-        ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_operational}
-        BuiltIn.Run Keyword If    "${contains_config}"=="True"    BuiltIn.Run Keywords    YangmanKeywords.Click Indexed Module Config To Load Module Detail Config Tab    ${index}
-        ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
-        ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_config}
+        ${contains_operational}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Wait Until Page Contains Element
+        ...    ${indexed_module_operational}
+        ${contains_operations}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Wait Until Page Contains Element
+        ...    ${indexed_module_operations}
+        ${contains_config}=    BuiltIn.Run Keyword And Return Status
+        ...    Selenium2Library.Wait Until Page Contains Element
+        ...    ${indexed_module_config}
+        IF    "${contains_operations}"=="True"
+            YangmanKeywords.Click Indexed Module Operations To Load Module Detail Operations Tab    ${index}
+            YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+            Selenium2Library.Wait Until Element Is Visible    ${indexed_module_operations}
+        END
+        IF    "${contains_operational}"=="True"
+            BuiltIn.Run Keywords
+            ...    YangmanKeywords.Click Indexed Module Operational To Load Module Detail Operational Tab
+            ...    ${index}
+            ...    AND
+            ...    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+            ...    AND
+            ...    Selenium2Library.Wait Until Element Is Visible
+            ...    ${indexed_module_operational}
+        END
+        IF    "${contains_config}"=="True"
+            BuiltIn.Run Keywords
+            ...    YangmanKeywords.Click Indexed Module Config To Load Module Detail Config Tab
+            ...    ${index}
+            ...    AND
+            ...    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+            ...    AND
+            ...    Selenium2Library.Wait Until Element Is Visible
+            ...    ${indexed_module_config}
+        END
     END
index 6d118690bb7d87ce014caa1a44251eb5cf238e92..71a73150955074f1310f2d713be3bd0eca200eaf 100644 (file)
@@ -1,15 +1,19 @@
 *** Settings ***
-Documentation     Example Robot suite used for the CSIT tutorial at the 2016 OpenDaylight Summit
-Suite Setup       Local Suite Setup
-Suite Teardown    Local Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Library           RequestsLibrary
-Variables         ../../variables/Variables.py
-Resource          ../../libraries/OVSDB.robot
-Resource          ../../libraries/SetupUtils.robot
+Documentation       Example Robot suite used for the CSIT tutorial at the 2016 OpenDaylight Summit
+
+Library             RequestsLibrary
+Variables           ../../variables/Variables.py
+Resource            ../../libraries/OVSDB.robot
+Resource            ../../libraries/SetupUtils.robot
+
+Suite Setup         Local Suite Setup
+Suite Teardown      Local Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
 
 *** Variables ***
-${switch_name}    odl_summit_switch
+${switch_name}      odl_summit_switch
+
 
 *** Test Cases ***
 Verify Ovs Is Discovered In Operational
@@ -19,7 +23,12 @@ Verify Ovs Is Discovered In Operational
     Wait Until Keyword Succeeds    5s    1s    Verify Ovs Reports Connected
     # very basic list of things we expect to find in the output of from operational's topology response
     @{elements_to_verify}    Create List    openflow:    node-id
-    Wait Until Keyword Succeeds    5s    1s    Check For Elements At URI    ${OPERATIONAL_TOPO_API}    ${elements_to_verify}
+    Wait Until Keyword Succeeds
+    ...    5s
+    ...    1s
+    ...    Check For Elements At URI
+    ...    ${OPERATIONAL_TOPO_API}
+    ...    ${elements_to_verify}
 
 Verify There Is No Topology In Config Store
     [Documentation]    Only the operational store should have any topology info at this point, as it was
@@ -36,12 +45,15 @@ Delete Openflow Rule
     [Tags]    exclude
     Log    This test case is not implemented yet
 
+
 *** Keywords ***
 Connect Ovs To Controller
     [Documentation]    Will set the ovs manager to point at the ODL IP on the openflow port
     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl add-br ${switch_name}
     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set bridge ${switch_name} protocols=OpenFlow13
-    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set bridge ${switch_name} other-config:hwaddr=00:00:00:00:00:01
+    Run Command On Remote System
+    ...    ${TOOLS_SYSTEM_IP}
+    ...    sudo ovs-vsctl set bridge ${switch_name} other-config:hwaddr=00:00:00:00:00:01
     Set Controller In OVS Bridge    ${TOOLS_SYSTEM_IP}    ${switch_name}    tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}
 
 Local Suite Setup
index ef611273af30a2ea463a52642645ba1103503659..dcfcaecdcfebfd86fc814fe812138832f1d4f6bc 100644 (file)
@@ -1,40 +1,46 @@
 *** Settings ***
-Documentation     Test Suite for BFD tunnel monitoring
-Suite Setup       Genius Suite Setup
-Suite Teardown    BFD Suite Teardown
-Test Setup        Genius Test Setup
-Test Teardown     Genius Test Teardown    ${data_models}
-Library           OperatingSystem
-Library           String
-Library           RequestsLibrary
-Library           Collections
-Library           SSHLibrary
-Resource          ../../libraries/DataModels.robot
-Resource          ../../libraries/Genius.robot
-Resource          ../../libraries/KarafKeywords.robot
-Resource          ../../libraries/OVSDB.robot
-Resource          ../../libraries/ToolsSystem.robot
-Resource          ../../libraries/Utils.robot
-Resource          ../../libraries/VpnOperations.robot
-Resource          ../../variables/netvirt/Variables.robot
-Resource          ../../variables/Variables.robot
-Resource          ../../libraries/CompareStream.robot
-Variables         ../../variables/genius/Modules.py
+Documentation       Test Suite for BFD tunnel monitoring
+
+Library             OperatingSystem
+Library             String
+Library             RequestsLibrary
+Library             Collections
+Library             SSHLibrary
+Resource            ../../libraries/DataModels.robot
+Resource            ../../libraries/Genius.robot
+Resource            ../../libraries/KarafKeywords.robot
+Resource            ../../libraries/OVSDB.robot
+Resource            ../../libraries/ToolsSystem.robot
+Resource            ../../libraries/Utils.robot
+Resource            ../../libraries/VpnOperations.robot
+Resource            ../../variables/netvirt/Variables.robot
+Resource            ../../variables/Variables.robot
+Resource            ../../libraries/CompareStream.robot
+Variables           ../../variables/genius/Modules.py
+
+Suite Setup         Genius Suite Setup
+Suite Teardown      BFD Suite Teardown
+Test Setup          Genius Test Setup
+Test Teardown       Genius Test Teardown    ${data_models}
+
 
 *** Variables ***
-${TUNNEL_MONITOR_ON}    Tunnel Monitoring (for VXLAN tunnels): On
-${DEFAULT_MONITORING_INTERVAL}    Tunnel Monitoring Interval (for VXLAN tunnels): 1000
-${TUNNEL_MONITOR_OFF}    Tunnel Monitoring (for VXLAN tunnels): Off
-${INTERVAL_5000}    {"tunnel-monitor-interval":{"interval":5000}}
-${ENABLE_MONITORING}    {"tunnel-monitor-params":{"enabled":true,"monitor-protocol":"odl-interface:tunnel-monitoring-type-bfd"}}
-${DISABLE_MONITORING}    {"tunnel-monitor-params":{"enabled":"false","monitor-protocol":"odl-interface:tunnel-monitoring-type-bfd"}}
-${TUNNEL_MONI_PARAMS_TRUE}    true
-${TUNNEL_MONI_PARAMS_FALSE}    false
-${INTERFACE_DS_MONI_FALSE}    "odl-interface:monitor-enabled": false
-${INTERFACE_DS_MONI_TRUE}    "odl-interface:monitor-enabled": true
-${INTERFACE_DS_MONI_INT_1000}    "odl-interface:monitor-interval": 1000
-${INTERFACE_DS_MONI_INT_5000}    "odl-interface:monitor-interval": 5000
-${TUNNEL_MONI_PROTO}    tunnel-monitoring-type-bfd
+${TUNNEL_MONITOR_ON}                Tunnel Monitoring (for VXLAN tunnels): On
+${DEFAULT_MONITORING_INTERVAL}      Tunnel Monitoring Interval (for VXLAN tunnels): 1000
+${TUNNEL_MONITOR_OFF}               Tunnel Monitoring (for VXLAN tunnels): Off
+${INTERVAL_5000}                    {"tunnel-monitor-interval":{"interval":5000}}
+${ENABLE_MONITORING}
+...                                 {"tunnel-monitor-params":{"enabled":true,"monitor-protocol":"odl-interface:tunnel-monitoring-type-bfd"}}
+${DISABLE_MONITORING}
+...                                 {"tunnel-monitor-params":{"enabled":"false","monitor-protocol":"odl-interface:tunnel-monitoring-type-bfd"}}
+${TUNNEL_MONI_PARAMS_TRUE}          true
+${TUNNEL_MONI_PARAMS_FALSE}         false
+${INTERFACE_DS_MONI_FALSE}          "odl-interface:monitor-enabled": false
+${INTERFACE_DS_MONI_TRUE}           "odl-interface:monitor-enabled": true
+${INTERFACE_DS_MONI_INT_1000}       "odl-interface:monitor-interval": 1000
+${INTERFACE_DS_MONI_INT_5000}       "odl-interface:monitor-interval": 5000
+${TUNNEL_MONI_PROTO}                tunnel-monitoring-type-bfd
+
 
 *** Test Cases ***
 BFD_TC00 Create ITM between DPNs
@@ -44,16 +50,40 @@ BFD_TC00 Create ITM between DPNs
 
 BFD_TC01 Verify default BFD monitoring status on Controller
     [Documentation]    Verify the default value of BFD monitoring \ on the Controller
-    CompareStream.Run_Keyword_If_At_Least_Neon    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Genius.Verify Tunnel Monitoring Status    ${TUNNEL_MONITOR_OFF}
-    CompareStream.Run_Keyword_If_Less_Than_Neon    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Genius.Verify Tunnel Monitoring Status    ${TUNNEL_MONITOR_ON}
-    CompareStream.Run_Keyword_If_At_Least_Neon    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Config Ietf Interface Output    ${INTERFACE_DS_MONI_FALSE}    ${INTERFACE_DS_MONI_INT_1000}
+    CompareStream.Run_Keyword_If_At_Least_Neon
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Genius.Verify Tunnel Monitoring Status
+    ...    ${TUNNEL_MONITOR_OFF}
+    CompareStream.Run_Keyword_If_Less_Than_Neon
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Genius.Verify Tunnel Monitoring Status
+    ...    ${TUNNEL_MONITOR_ON}
+    CompareStream.Run_Keyword_If_At_Least_Neon
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Verify Config Ietf Interface Output
+    ...    ${INTERFACE_DS_MONI_FALSE}
+    ...    ${INTERFACE_DS_MONI_INT_1000}
     ...    ${TUNNEL_MONI_PROTO}
-    CompareStream.Run_Keyword_If_Less_Than_Neon    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Config Ietf Interface Output    ${INTERFACE_DS_MONI_TRUE}    ${INTERFACE_DS_MONI_INT_1000}
+    CompareStream.Run_Keyword_If_Less_Than_Neon
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Verify Config Ietf Interface Output
+    ...    ${INTERFACE_DS_MONI_TRUE}
+    ...    ${INTERFACE_DS_MONI_INT_1000}
     ...    ${TUNNEL_MONI_PROTO}
 
 BFD_TC02 Enable BFD Monitoring And Verify On Controller
     [Documentation]    Enable BFD monitoring in branches greater than neon and verify that BFD is enabled in the controller.
-    CompareStream.Run_Keyword_If_Less_Than_Neon    BuiltIn.Pass Execution    Test case valid only for versions Neon and above
+    CompareStream.Run_Keyword_If_Less_Than_Neon
+    ...    BuiltIn.Pass Execution
+    ...    Test case valid only for versions Neon and above
     Enable BFD And Verify    ${INTERFACE_DS_MONI_INT_1000}
 
 BFD_TC03 Verify that BFD tunnel monitoring interval is set with appropriate default value i.e.,1000
@@ -61,23 +91,54 @@ BFD_TC03 Verify that BFD tunnel monitoring interval is set with appropriate defa
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW}
     ${tunnel_monitoring} =    String.Get Lines Containing String    ${output}    Tunnel Monitoring Interval
     BuiltIn.Should Be Equal    ${tunnel_monitoring}    ${DEFAULT_MONITORING_INTERVAL}
-    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Config Ietf Interface Output    ${INTERFACE_DS_MONI_TRUE}    ${INTERFACE_DS_MONI_INT_1000}    ${TUNNEL_MONI_PROTO}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Verify Config Ietf Interface Output
+    ...    ${INTERFACE_DS_MONI_TRUE}
+    ...    ${INTERFACE_DS_MONI_INT_1000}
+    ...    ${TUNNEL_MONI_PROTO}
 
 BFD_TC04 Verify that in controller tunnel status is up when ITM tunnel interface is brought up.
     [Documentation]    Verify that in controller tunnel status is up when ITM tunnel interface is brought up.
     BuiltIn.Wait Until Keyword Succeeds    10s    2s    Genius.Verify Tunnel Monitoring Status    ${TUNNEL_MONITOR_ON}
     BuiltIn.Wait Until Keyword Succeeds    10s    1s    Genius.Verify Tunnel Status As Up
-    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Config Ietf Interface Output    ${INTERFACE_DS_MONI_TRUE}    ${INTERFACE_DS_MONI_INT_1000}    ${TUNNEL_MONI_PROTO}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Verify Config Ietf Interface Output
+    ...    ${INTERFACE_DS_MONI_TRUE}
+    ...    ${INTERFACE_DS_MONI_INT_1000}
+    ...    ${TUNNEL_MONI_PROTO}
 
 BFD_TC05 Verify BFD tunnel monitoring interval can be changed.
     [Documentation]    Verify BFD tunnel monitoring interval can be changed.
-    ${oper_int} =    RequestsLibrary.Put Request    session    ${CONFIG_API}/itm-config:tunnel-monitor-interval/    data=${INTERVAL_5000}
-    ${Bfd_updated_value}=    BuiltIn.Create List    5000
-    Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${OPERATIONAL_API}/itm-config:tunnel-monitor-interval/    ${Bfd_updated_value}
-    Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${CONFIG_API}/itm-config:tunnel-monitor-interval/    ${Bfd_updated_value}
-    Wait Until Keyword Succeeds    10s    2s    Verify Config Ietf Interface Output    ${INTERFACE_DS_MONI_TRUE}    ${INTERFACE_DS_MONI_INT_5000}    ${TUNNEL_MONI_PROTO}
+    ${oper_int} =    RequestsLibrary.Put Request
+    ...    session
+    ...    ${CONFIG_API}/itm-config:tunnel-monitor-interval/
+    ...    data=${INTERVAL_5000}
+    ${Bfd_updated_value} =    BuiltIn.Create List    5000
+    Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${OPERATIONAL_API}/itm-config:tunnel-monitor-interval/
+    ...    ${Bfd_updated_value}
+    Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${CONFIG_API}/itm-config:tunnel-monitor-interval/
+    ...    ${Bfd_updated_value}
+    Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Verify Config Ietf Interface Output
+    ...    ${INTERFACE_DS_MONI_TRUE}
+    ...    ${INTERFACE_DS_MONI_INT_5000}
+    ...    ${TUNNEL_MONI_PROTO}
     FOR    ${tool_system_index}    IN RANGE    ${NUM_TOOLS_SYSTEM}
-        ${tun_names}    Genius.Get Tunnels On OVS    ${TOOLS_SYSTEM_ALL_CONN_IDS[${tool_system_index}]}
+        ${tun_names}    Genius.Get Tunnels On OVS    ${TOOLS_SYSTEM_ALL_CONN_IDS[${tool_system_index}]}
         Verify ovs-vsctl Output For Each Tunnel    ${tun_names}    ${tool_system_index}
     END
 
@@ -85,20 +146,34 @@ BFD_TC06 Verify that the tunnel state goes to UNKNOWN when DPN is disconnected
     [Documentation]    Verify that the tunnel state goes to UNKNOWN when DPN is disconnected
     ToolsSystem.Run Command On All Tools Systems    sudo ovs-vsctl del-controller ${Bridge}
     BuiltIn.Wait Until Keyword Succeeds    10s    1s    VpnOperations.Verify Tunnel Status as UNKNOWN
-    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Config Ietf Interface Output    ${INTERFACE_DS_MONI_TRUE}    ${INTERFACE_DS_MONI_INT_5000}    ${TUNNEL_MONI_PROTO}
-    ToolsSystem.Run Command On All Tools Systems    sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Verify Config Ietf Interface Output
+    ...    ${INTERFACE_DS_MONI_TRUE}
+    ...    ${INTERFACE_DS_MONI_INT_5000}
+    ...    ${TUNNEL_MONI_PROTO}
+    ToolsSystem.Run Command On All Tools Systems
+    ...    sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}
     BuiltIn.Wait Until Keyword Succeeds    10s    1s    Genius.Verify Tunnel Status As Up
-    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Config Ietf Interface Output    ${INTERFACE_DS_MONI_TRUE}    ${INTERFACE_DS_MONI_INT_5000}    ${TUNNEL_MONI_PROTO}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Verify Config Ietf Interface Output
+    ...    ${INTERFACE_DS_MONI_TRUE}
+    ...    ${INTERFACE_DS_MONI_INT_5000}
+    ...    ${TUNNEL_MONI_PROTO}
 
 BFD_TC07 Set BFD monitoring To Default Value
     [Documentation]    Disable BFD monitoring(setting it to default value) and verify that BFD is disabled on the controller.
     CompareStream.Run_Keyword_If_At_Least_Neon    Disable BFD And Verify
     CompareStream.Run_Keyword_If_Less_Than_Neon    Enable BFD And Verify    ${INTERFACE_DS_MONI_INT_5000}
 
+
 *** Keywords ***
 Verify Config Ietf Interface Output
-    [Arguments]    ${state}    ${interval}    ${proto}
     [Documentation]    This keyword will get request from config ietf interface and verifies state, interval and proto are present
+    [Arguments]    ${state}    ${interval}    ${proto}
     ${int_resp} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/ietf-interfaces:interfaces/
     ${respjson} =    RequestsLibrary.To Json    ${int_resp.content}    pretty_print=True
     BuiltIn.Should Contain    ${respjson}    ${state}
@@ -106,44 +181,67 @@ Verify Config Ietf Interface Output
     BuiltIn.Should Contain    ${respjson}    ${proto}
 
 Ovs Tunnel Get
-    [Arguments]    ${tools_ip}
     [Documentation]    This keyword will return the tunnel name on OVS
+    [Arguments]    ${tools_ip}
     ${list_interface} =    Utils.Run Command On Remote System    ${tools_ip}    sudo ovs-vsctl list interface
-    ${tun_line} =    ${tun_name}    BuiltIn.Should Match Regexp    ${list_interface}    name\\s+: "(tun.*)"
+    ${tun_line} =    ${tun_name}    BuiltIn.Should Match Regexp    ${list_interface}    name\\s+: "(tun.*)"
     BuiltIn.Log    ${tun_name}
     BuiltIn.Should Not Be Empty    ${tun_name}
-    [Return]    ${tun_name}
+    RETURN    ${tun_name}
 
 Verify Tunnel Monitoring Params
-    [Arguments]    ${flag}
     [Documentation]    This keyword will verify the tunnel monitoring is true or false
-    @{checklist}    BuiltIn.Create List    ${flag}
+    [Arguments]    ${flag}
+    @{checklist} =    BuiltIn.Create List    ${flag}
     Utils.Check For Elements At URI    ${OPERATIONAL_API}/itm-config:tunnel-monitor-params/    ${checklist}
 
 Enable BFD And Verify
-    [Arguments]    ${interface_ds_moni_int}
     [Documentation]    Enable BFD Monitoring And Verify On Controller.
-    ${resp} =    RequestsLibrary.Put Request    session    ${CONFIG_API}/itm-config:tunnel-monitor-params/    data=${ENABLE_MONITORING}
+    [Arguments]    ${interface_ds_moni_int}
+    ${resp} =    RequestsLibrary.Put Request
+    ...    session
+    ...    ${CONFIG_API}/itm-config:tunnel-monitor-params/
+    ...    data=${ENABLE_MONITORING}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    201
     BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Tunnel Monitoring Params    ${TUNNEL_MONI_PARAMS_TRUE}
     BuiltIn.Wait Until Keyword Succeeds    10s    2s    Genius.Verify Tunnel Monitoring Status    ${TUNNEL_MONITOR_ON}
-    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Config Ietf Interface Output    ${INTERFACE_DS_MONI_TRUE}    ${interface_ds_moni_int}    ${TUNNEL_MONI_PROTO}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Verify Config Ietf Interface Output
+    ...    ${INTERFACE_DS_MONI_TRUE}
+    ...    ${interface_ds_moni_int}
+    ...    ${TUNNEL_MONI_PROTO}
     BuiltIn.Wait Until Keyword Succeeds    10s    1s    Genius.Verify Tunnel Status As Up
 
 Disable BFD And Verify
     [Documentation]    Disable BFD Monitoring And Verify On Controller.
-    ${resp} =    RequestsLibrary.Put Request    session    ${CONFIG_API}/itm-config:tunnel-monitor-params/    data=${DISABLE_MONITORING}
+    ${resp} =    RequestsLibrary.Put Request
+    ...    session
+    ...    ${CONFIG_API}/itm-config:tunnel-monitor-params/
+    ...    data=${DISABLE_MONITORING}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
     BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Tunnel Monitoring Params    ${TUNNEL_MONI_PARAMS_FALSE}
     BuiltIn.Wait Until Keyword Succeeds    10s    2s    Genius.Verify Tunnel Monitoring Status    ${TUNNEL_MONITOR_OFF}
-    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Config Ietf Interface Output    ${INTERFACE_DS_MONI_FALSE}    ${INTERFACE_DS_MONI_INT_5000}    ${TUNNEL_MONI_PROTO}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Verify Config Ietf Interface Output
+    ...    ${INTERFACE_DS_MONI_FALSE}
+    ...    ${INTERFACE_DS_MONI_INT_5000}
+    ...    ${TUNNEL_MONI_PROTO}
     BuiltIn.Wait Until Keyword Succeeds    10s    1s    Genius.Verify Tunnel Status As Up
 
 Verify ovs-vsctl Output For Each Tunnel
     [Arguments]    ${tun_names}    ${tool_system_index}
     ${no of tunnels} =    BuiltIn.Get Length    ${tun_names}
     FOR    ${each_tun}    IN RANGE    ${no of tunnels}
-        ${tun}    Collections.Get From List    ${tun_names}    ${each_tun}
-        BuiltIn.Wait Until Keyword Succeeds    20    5    OVSDB.Verify Ovs-vsctl Output    list interface ${tun}    5000
+        ${tun} =    Collections.Get From List    ${tun_names}    ${each_tun}
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    20
+        ...    5
+        ...    OVSDB.Verify Ovs-vsctl Output
+        ...    list interface ${tun}
+        ...    5000
         ...    ovs_system=${TOOLS_SYSTEM_ALL_IPS}[${tool_system_index}]
     END
index df9d8419235a994721cb8c158ceca557e81aa590..e0c3fd420e3d6cc9937294bb52a79a12b408880d 100644 (file)
@@ -1,25 +1,30 @@
 *** Settings ***
-Documentation     Test Suite for ITM
-Suite Setup       Genius Suite Setup
-Suite Teardown    Genius Suite Teardown
-Test Setup        Genius Test Setup
-Test Teardown     Genius Test Teardown    ${data_models}
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           String
-Resource          ../../libraries/DataModels.robot
-Resource          ../../libraries/Genius.robot
-Resource          ../../libraries/KarafKeywords.robot
-Resource          ../../libraries/ToolsSystem.robot
-Resource          ../../libraries/Utils.robot
-Resource          ../../variables/netvirt/Variables.robot
-Resource          ../../variables/Variables.robot
-Variables         ../../variables/genius/Modules.py
+Documentation       Test Suite for ITM
+
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             String
+Resource            ../../libraries/DataModels.robot
+Resource            ../../libraries/Genius.robot
+Resource            ../../libraries/KarafKeywords.robot
+Resource            ../../libraries/ToolsSystem.robot
+Resource            ../../libraries/Utils.robot
+Resource            ../../variables/netvirt/Variables.robot
+Resource            ../../variables/Variables.robot
+Variables           ../../variables/genius/Modules.py
+
+Suite Setup         Genius Suite Setup
+Suite Teardown      Genius Suite Teardown
+Test Setup          Genius Test Setup
+Test Teardown       Genius Test Teardown    ${data_models}
+
 
 *** Variables ***
-${gateway_regex_IPV4}    [0-9]\{1,3}\.[0-9]\{1,3}\.[0-9]\{1,3}\.
-${gateway_regex_IPV6}    [0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:
+${gateway_regex_IPV4}       [0-9]\{1,3}\.[0-9]\{1,3}\.[0-9]\{1,3}\.
+${gateway_regex_IPV6}
+...                         [0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:
+
 
 *** Test Cases ***
 Create and Verify VTEP -No Vlan
@@ -43,15 +48,24 @@ Delete and Verify VTEP -No Vlan
     [Documentation]    This Delete testcase , deletes the ITM tunnel created between 2 dpns.
     ${tunnel_list} =    Genius.Get Tunnels List
     FOR    ${dpn_id}    IN    @{DPN_ID_LIST}
-        CompareStream.Run_Keyword_If_Less_Than_Sodium    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
-        CompareStream.Run_Keyword_If_At_Least_Sodium    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+        CompareStream.Run_Keyword_If_Less_Than_Sodium
+        ...    Utils.Remove All Elements At URI And Verify
+        ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
+        CompareStream.Run_Keyword_If_At_Least_Sodium
+        ...    Utils.Remove All Elements At URI And Verify
+        ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
     END
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW}
     BuiltIn.Should Not Contain    ${output}    ${itm_created[0]}
     Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
     ${resp} =    Utils.Get Data From URI    session    ${CONFIG_API}/itm:transport-zones/
     BuiltIn.Should Not Contain    ${resp} =    ${itm_created[0]}
-    BuiltIn.Wait Until Keyword Succeeds    40    10    Genius.Verify Deleted Tunnels On OVS    ${tunnel_list}    ${resp}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    10
+    ...    Genius.Verify Deleted Tunnels On OVS
+    ...    ${tunnel_list}
+    ...    ${resp}
     BuiltIn.Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${tunnel_list}
 
 Create and Verify VTEP IPv6 - No Vlan
@@ -63,7 +77,12 @@ Create and Verify VTEP IPv6 - No Vlan
     ${type} =    BuiltIn.Set Variable    odl-interface:tunnel-type-vxlan
     Genius.Update Dpn id list and get tunnels    ${type}
     FOR    ${dpn}    IN    @{DPN_ID_LIST}
-        BuiltIn.Wait Until Keyword Succeeds    40    5    Utils.Get Data From URI    session    ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn}/
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    40
+        ...    5
+        ...    Utils.Get Data From URI
+        ...    session
+        ...    ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn}/
         ...    headers=${ACCEPT_XML}
     END
     BuiltIn.Wait Until Keyword Succeeds    40    10    OVS Verification Between IPV6
@@ -74,22 +93,38 @@ Create and Verify VTEP IPv6 - No Vlan
     END
     @{network_topology_list} =    BuiltIn.Create List    @{all_tunnels}
     @{network_topology_list} =    Collections.Append To List    ${network_topology_list}    ${Bridge}
-    ${resp} =    BuiltIn.Wait Until Keyword Succeeds    40    10    Get Network Topology with Tunnel    ${OPERATIONAL_TOPO_API}    ${network_topology_list}
+    ${resp} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    10
+    ...    Get Network Topology with Tunnel
+    ...    ${OPERATIONAL_TOPO_API}
+    ...    ${network_topology_list}
 
 Delete and Verify VTEP IPv6 -No Vlan
     [Documentation]    This Delete testcase , deletes the ITM tunnel created between 2 dpns.
     ${type} =    BuiltIn.Set Variable    odl-interface:tunnel-type-vxlan
     ${tunnel_list} =    Genius.Get Tunnels List
     FOR    ${dpn_id}    IN    @{DPN_ID_LIST}
-        CompareStream.Run_Keyword_If_Less_Than_Sodium    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET_IPV6}%2F16/vteps/${dpn_id}/${port_name}
-        CompareStream.Run_Keyword_If_At_Least_Sodium    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+        CompareStream.Run_Keyword_If_Less_Than_Sodium
+        ...    Utils.Remove All Elements At URI And Verify
+        ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET_IPV6}%2F16/vteps/${dpn_id}/${port_name}
+        CompareStream.Run_Keyword_If_At_Least_Sodium
+        ...    Utils.Remove All Elements At URI And Verify
+        ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
     END
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW}
     BuiltIn.Should Not Contain    ${output}    ${itm_created[0]}
-    BuiltIn.Run Keyword And Ignore Error    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
+    BuiltIn.Run Keyword And Ignore Error
+    ...    Utils.Remove All Elements At URI And Verify
+    ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
     ${resp} =    Utils.Get Data From URI    session    ${CONFIG_API}/itm:transport-zones/
     BuiltIn.Should Not Contain    ${resp}    ${itm_created[0]}
-    BuiltIn.Wait Until Keyword Succeeds    40    10    Genius.Verify Deleted Tunnels On OVS    ${tunnel_list}    ${resp}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    10
+    ...    Genius.Verify Deleted Tunnels On OVS
+    ...    ${tunnel_list}
+    ...    ${resp}
     BuiltIn.Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${tunnel_list}
 
 Create and Verify VTEP-Vlan
@@ -109,15 +144,24 @@ Delete and Verify VTEP -Vlan
     ${type} =    BuiltIn.Set Variable    odl-interface:tunnel-type-vxlan
     ${tunnel_list} =    Genius.Get Tunnels List
     FOR    ${dpn_id}    IN    @{DPN_ID_LIST}
-        CompareStream.Run_Keyword_If_Less_Than_Sodium    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
-        CompareStream.Run_Keyword_If_At_Least_Sodium    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+        CompareStream.Run_Keyword_If_Less_Than_Sodium
+        ...    Utils.Remove All Elements At URI And Verify
+        ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
+        CompareStream.Run_Keyword_If_At_Least_Sodium
+        ...    Utils.Remove All Elements At URI And Verify
+        ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
     END
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW}
     BuiltIn.Should Not Contain    ${output}    ${itm_created[0]}
     Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
     ${resp} =    Utils.Get Data From URI    session    ${CONFIG_API}/itm:transport-zones/
     BuiltIn.Should Not Contain    ${resp}    ${itm_created[0]}
-    BuiltIn.Wait Until Keyword Succeeds    40    10    Genius.Verify Deleted Tunnels On OVS    ${tunnel_list}    ${resp}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    10
+    ...    Genius.Verify Deleted Tunnels On OVS
+    ...    ${tunnel_list}
+    ...    ${resp}
     BuiltIn.Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${tunnel_list}
 
 Create VTEP - Vlan and Gateway
@@ -141,21 +185,31 @@ Delete VTEP -Vlan and gateway
     ${type} =    BuiltIn.Set Variable    odl-interface:tunnel-type-vxlan
     ${tunnel_list} =    Genius.Get Tunnels List
     FOR    ${dpn_id}    IN    @{DPN_ID_LIST}
-        CompareStream.Run_Keyword_If_Less_Than_Sodium    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
-        CompareStream.Run_Keyword_If_At_Least_Sodium    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+        CompareStream.Run_Keyword_If_Less_Than_Sodium
+        ...    Utils.Remove All Elements At URI And Verify
+        ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
+        CompareStream.Run_Keyword_If_At_Least_Sodium
+        ...    Utils.Remove All Elements At URI And Verify
+        ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
     END
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW}
     BuiltIn.Should Not Contain    ${output}    ${itm_created[0]}
     Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
     ${resp} =    Utils.Get Data From URI    session    ${CONFIG_API}/itm:transport-zones/
     BuiltIn.Should Not Contain    ${resp}    ${itm_created[0]}
-    BuiltIn.Wait Until Keyword Succeeds    40    10    Genius.Verify Deleted Tunnels On OVS    ${tunnel_list}    ${resp}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    10
+    ...    Genius.Verify Deleted Tunnels On OVS
+    ...    ${tunnel_list}
+    ...    ${resp}
     BuiltIn.Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${tunnel_list}
 
+
 *** Keywords ***
 Create Vteps IPv6
-    [Arguments]    ${vlan}    ${gateway_ip}    ${tools_ips}
     [Documentation]    This keyword creates VTEPs between IPV6 ip's
+    [Arguments]    ${vlan}    ${gateway_ip}    ${tools_ips}
     ${substr} =    BuiltIn.Should Match Regexp    ${tools_ips}[0]    ${gateway_regex_IPV6}
     ${SUBNET_IPV6} =    BuiltIn.Catenate    ${substr}0
     BuiltIn.Set Suite Variable    ${SUBNET_IPV6}
@@ -163,16 +217,18 @@ Create Vteps IPv6
     Utils.Post Log Check    ${CONFIG_API}/itm:transport-zones/    ${body}    status_codes=${204}
 
 Get Network Topology with Tunnel
-    [Arguments]    ${url}    ${network_topology_list}
     [Documentation]    Returns the Network topology with Tunnel info in it.
+    [Arguments]    ${url}    ${network_topology_list}
     Utils.Check For Elements At URI    ${url}    ${network_topology_list}
 
 Get ITM IPV6
-    [Arguments]    ${itm_created[0]}
     [Documentation]    It returns the created ITM Transport zone with the passed values during the creation is done.
+    [Arguments]    ${itm_created[0]}
     @{Itm-no-vlan} =    Collections.Combine Lists    ${TOOLS_SYSTEM_IPV6_LIST}    ${DPN_ID_LIST}
     Collections.Append To List    ${Itm-no-vlan}    ${itm_created[0]}
-    Utils.Check For Elements At URI    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}    ${Itm-no-vlan}
+    Utils.Check For Elements At URI
+    ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}
+    ...    ${Itm-no-vlan}
 
 OVS Verification Between IPV6
     [Documentation]    This keyword will verify tunnels available on ovs
@@ -186,12 +242,25 @@ Verify Network Topology
     @{network_topology_list} =    BuiltIn.Create List
     @{network_topology_list} =    Collections.Append To List    ${network_topology_list}    ${Bridge}
     @{network_topology_list} =    Collections.Combine Lists    ${network_topology_list}    ${all_tunnels}
-    ${resp} =    BuiltIn.Wait Until Keyword Succeeds    40    10    Get Network Topology with Tunnel    ${OPERATIONAL_TOPO_API}    ${network_topology_list}
+    ${resp} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    10
+    ...    Get Network Topology with Tunnel
+    ...    ${OPERATIONAL_TOPO_API}
+    ...    ${network_topology_list}
 
 Verify Ietf Interface State
-    Utils.Check For Elements At URI    ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/    ${DPN_ID_LIST}    session    True
+    Utils.Check For Elements At URI
+    ...    ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/
+    ...    ${DPN_ID_LIST}
+    ...    session
+    ...    True
     ${all_tunnels} =    Genius.Get Tunnels List
-    Utils.Check For Elements At URI    ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/    ${all_tunnels}    session    True
+    Utils.Check For Elements At URI
+    ...    ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/
+    ...    ${all_tunnels}
+    ...    session
+    ...    True
 
 Build Tools System IPV6 List
     [Documentation]    Create a list of tools system ips with IPV6.
index 58b1ea78d9445b6af80e6cdfcfd2bd0d213a55b5..f648ed8e825b470b72ca3f208b6571505d804703 100644 (file)
@@ -1,36 +1,44 @@
 *** Settings ***
-Documentation     Test Suite for IdManager
-Suite Setup       Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}    timeout=5
-Suite Teardown    Delete All Sessions
-Test Setup        Genius Test Setup
-Test Teardown     Get Model Dump    ${ODL_SYSTEM_IP}    ${idmanager_data_models}
-Library           OperatingSystem
-Library           String
-Library           RequestsLibrary
-Library           Collections
-Library           re
-Variables         ../../variables/genius/Modules.py
-Resource          ../../libraries/DataModels.robot
-Resource          ../../libraries/Utils.robot
-Resource          ../../libraries/Genius.robot
-Resource          ../../variables/Variables.robot
+Documentation       Test Suite for IdManager
+
+Library             OperatingSystem
+Library             String
+Library             RequestsLibrary
+Library             Collections
+Library             re
+Variables           ../../variables/genius/Modules.py
+Resource            ../../libraries/DataModels.robot
+Resource            ../../libraries/Utils.robot
+Resource            ../../libraries/Genius.robot
+Resource            ../../variables/Variables.robot
+
+Suite Setup         Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}    timeout=5
+Suite Teardown      Delete All Sessions
+Test Setup          Genius Test Setup
+Test Teardown       Get Model Dump    ${ODL_SYSTEM_IP}    ${idmanager_data_models}
+
 
 *** Variables ***
-${genius_config_dir}    ${CURDIR}/../../variables/genius
-${pool-name}      test-pool
-@{test_keys}      test-key1    test-key2    test-key3
-${create_json}    createIdpool.json
-${allocaterange_json}    allocateIdRange.json
-${OPERATIONS_API}    /restconf/operations
+${genius_config_dir}        ${CURDIR}/../../variables/genius
+${pool-name}                test-pool
+@{test_keys}                test-key1    test-key2    test-key3
+${create_json}              createIdpool.json
+${allocaterange_json}       allocateIdRange.json
+${OPERATIONS_API}           /restconf/operations
+
 
 *** Test Cases ***
 Create ID pool in range 10:20
     [Documentation]    This testcase creates Id pool in range 10 to 20.
-    Utils.Post Elements To URI From File    ${OPERATIONS_API}/id-manager:createIdPool    ${genius_config_dir}/${create_json}
+    Utils.Post Elements To URI From File
+    ...    ${OPERATIONS_API}/id-manager:createIdPool
+    ...    ${genius_config_dir}/${create_json}
     @{poolrange} =    BuiltIn.Create list    ${pool-name}    10    20
     Utils.Check For Elements At URI    ${CONFIG_API}/id-manager:id-pools/id-pool/${pool-name}/    ${poolrange}
     @{availiable_pool} =    BuiltIn.Create list    10    20    10
-    Utils.Check For Elements At URI    ${CONFIG_API}/id-manager:id-pools/id-pool/${pool-name}/available-ids-holder/    ${availiable_pool}
+    Utils.Check For Elements At URI
+    ...    ${CONFIG_API}/id-manager:id-pools/id-pool/${pool-name}/available-ids-holder/
+    ...    ${availiable_pool}
 
 Allocate Ids from pool created within size as 5
     [Documentation]    This testcase allocated IDs of specified size for the pool created in 1st testcase.
@@ -47,18 +55,23 @@ Neg_Allocate ids of size 10 from the same pool
     ${body} =    String.Replace String    ${body}    5    6
     ${body} =    String.Replace String    ${body}    test-key    ${test_keys[1]}
     BuiltIn.Log    ${body}
-    ${resp} =    RequestsLibrary.Post Request    session    ${OPERATIONS_API}/id-manager:allocateIdRange    data=${body}
+    ${resp} =    RequestsLibrary.Post Request
+    ...    session
+    ...    ${OPERATIONS_API}/id-manager:allocateIdRange
+    ...    data=${body}
     BuiltIn.Log    ${resp.content}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    500
 
 Allocate IDs of size 3 from the pool
     [Documentation]    This testcase allocates 3 Ids from the created pool in test case 1
-    ${body}=    OperatingSystem.Get File    ${genius_config_dir}/${allocaterange_json}
+    ${body} =    OperatingSystem.Get File    ${genius_config_dir}/${allocaterange_json}
     ${body} =    String.Replace string    ${body}    test-key    ${test_keys[2]}
     ${body} =    String.Replace string    ${body}    5    3
     BuiltIn.Log    ${body}
     Utils.Post Elements To URI    ${OPERATIONS_API}/id-manager:allocateIdRange    ${body}
-    ${get_resp} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/id-manager:id-pools/id-pool/${pool-name}/available-ids-holder/
+    ${get_resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${CONFIG_API}/id-manager:id-pools/id-pool/${pool-name}/available-ids-holder/
     ${respjson} =    RequestsLibrary.To Json    ${get_resp.content}    pretty_print=True
     BuiltIn.Log    ${respjson}
     BuiltIn.Should Contain    ${get_resp.text}    17
@@ -76,7 +89,9 @@ Release a block of IDs allocated using releaseIds RPC
     BuiltIn.Should Be Equal As Strings    ${get_resp.status_code}    200
     ${child-pool-name} =    BuiltIn.Should Match Regexp    ${get_resp.text}    ${pool-name}\.[-]?[0-9]+
     BuiltIn.Log    ${child-pool-name}
-    ${get_releasedIds} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/id-manager:id-pools/id-pool/${child-pool-name}/released-ids-holder/
+    ${get_releasedIds} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${CONFIG_API}/id-manager:id-pools/id-pool/${child-pool-name}/released-ids-holder/
     ${respjson} =    RequestsLibrary.To Json    ${get_releasedIds.text}    pretty_print=True
     BuiltIn.Log    ${respjson}
     Should Be Equal As Strings    ${get_releasedIds.status_code}    200
@@ -91,10 +106,13 @@ Delete the ID Pool using deleteIdPool RPC
     Utils.Post Elements To URI    ${OPERATIONS_API}/id-manager:deleteIdPool    ${body}
     Utils.No Content From URI    session    ${CONFIG_API}/id-manager:id-pools/id-pool/${pool-name}/
 
+
 *** Keywords ***
 get Id pool
     [Documentation]    This keyword checks the created ID pool by doing GET.
-    ${get_resp} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/id-manager:id-pools/id-pool/${pool-name}/available-ids-holder/
+    ${get_resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${CONFIG_API}/id-manager:id-pools/id-pool/${pool-name}/available-ids-holder/
     ${respjson} =    RequestsLibrary.To Json    ${get_resp.content}    pretty_print=True
     BuiltIn.Log    ${respjson}
     BuiltIn.Should Contain    ${get_resp.text}    14
index ccf21d1302b54e542fb8df351233fd3cf1aac675..25c0c326b65e9b620b2d0a851e641a88616c988c 100644 (file)
@@ -1,26 +1,27 @@
 *** Settings ***
-Documentation     This test suite is to by-pass interface manager and create/delete the tunnels between the switches directly inorder for ITM to scale and build mesh among more number of switches.
-Suite Setup       ITM Direct Tunnels Start Suite
-Suite Teardown    ITM Direct Tunnels Stop Suite
-Test Setup        Genius Test Setup
-Test Teardown     Genius Test Teardown    ${data_models}
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           String
-Resource          ../../libraries/ClusterManagement.robot
-Resource          ../../libraries/DataModels.robot
-Resource          ../../libraries/Genius.robot
-Resource          ../../libraries/KarafKeywords.robot
-Resource          ../../variables/netvirt/Variables.robot
-Resource          ../../libraries/OVSDB.robot
-Resource          ../../libraries/ToolsSystem.robot
-Resource          ../../libraries/Utils.robot
-Resource          ../../libraries/VpnOperations.robot
-Resource          ../../variables/Variables.robot
-Variables         ../../variables/genius/Modules.py
+Documentation       This test suite is to by-pass interface manager and create/delete the tunnels between the switches directly inorder for ITM to scale and build mesh among more number of switches.
+
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             String
+Resource            ../../libraries/ClusterManagement.robot
+Resource            ../../libraries/DataModels.robot
+Resource            ../../libraries/Genius.robot
+Resource            ../../libraries/KarafKeywords.robot
+Resource            ../../variables/netvirt/Variables.robot
+Resource            ../../libraries/OVSDB.robot
+Resource            ../../libraries/ToolsSystem.robot
+Resource            ../../libraries/Utils.robot
+Resource            ../../libraries/VpnOperations.robot
+Resource            ../../variables/Variables.robot
+Variables           ../../variables/genius/Modules.py
+
+Suite Setup         ITM Direct Tunnels Start Suite
+Suite Teardown      ITM Direct Tunnels Stop Suite
+Test Setup          Genius Test Setup
+Test Teardown       Genius Test Teardown    ${data_models}
 
-*** Variables ***
 
 *** Test Cases ***
 Create and Verify VTEP
@@ -46,7 +47,11 @@ Verify VTEP After Restarting Controller
     BuiltIn.Wait Until Keyword Succeeds    30    3    Genius.Verify Tunnel Status As Up
     ClusterManagement.Stop_Members_From_List_Or_All
     ClusterManagement.Start_Members_From_List_Or_All
-    BuiltIn.Wait Until Keyword Succeeds    60    3    ClusterManagement.Check Status Of Services Is OPERATIONAL    @{GENIUS_DIAG_SERVICES}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60
+    ...    3
+    ...    ClusterManagement.Check Status Of Services Is OPERATIONAL
+    ...    @{GENIUS_DIAG_SERVICES}
     BuiltIn.Wait Until Keyword Succeeds    30    3    Genius.Verify Tunnel Status As Up
 
 Verify Tunnels By Enabling/Disabling BFD
@@ -60,25 +65,35 @@ Delete and Verify VTEP
     [Documentation]    This Delete testcase , deletes the ITM tunnel created between 2 dpns.
     ${tunnel_list} =    Genius.Get Tunnels List
     FOR    ${dpn_id}    IN    @{DPN_ID_LIST}
-        CompareStream.Run_Keyword_If_Less_Than_Sodium    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
-        CompareStream.Run_Keyword_If_At_Least_Sodium    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+        CompareStream.Run_Keyword_If_Less_Than_Sodium
+        ...    Utils.Remove All Elements At URI And Verify
+        ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
+        CompareStream.Run_Keyword_If_At_Least_Sodium
+        ...    Utils.Remove All Elements At URI And Verify
+        ...    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
     END
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW}
     BuiltIn.Should Not Contain    ${output}    ${itm_created[0]}
     Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
     ${resp} =    Utils.Get Data From URI    session    ${CONFIG_API}/itm:transport-zones/
     BuiltIn.Should Not Contain    ${resp}    ${itm_created[0]}
-    BuiltIn.Wait Until Keyword Succeeds    40    10    Genius.Verify Deleted Tunnels On OVS    ${tunnel_list}    ${resp}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    10
+    ...    Genius.Verify Deleted Tunnels On OVS
+    ...    ${tunnel_list}
+    ...    ${resp}
     BuiltIn.Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${tunnel_list}
 
+
 *** Keywords ***
 Enable_Tunnel_Monitoring
     [Documentation]    In this we will enable tunnel monitoring by tep:enable command running in karaf console
     KarafKeywords.Issue_Command_On_Karaf_Console    tep:enable-tunnel-monitor true
 
 Verify Tunnel State After OVS Restart
-    [Arguments]    ${TOOLS_SYSTEM_IP}
     [Documentation]    In this we will Verify Tunnel State by Stopping/Starting Switch
+    [Arguments]    ${TOOLS_SYSTEM_IP}
     OVSDB.Stop OVS    ${TOOLS_SYSTEM_IP}
     BuiltIn.Wait Until Keyword Succeeds    2min    20 sec    Verify Tunnel Down
     OVSDB.Start OVS    ${TOOLS_SYSTEM_IP}
@@ -86,7 +101,7 @@ Verify Tunnel State After OVS Restart
 
 Verify Tunnel Down
     [Documentation]    In this we will check whether tunnel is in down or not
-    ${output}=    KarafKeywords.Issue_Command_On_Karaf_Console    ${TEP_SHOW_STATE}
+    ${output} =    KarafKeywords.Issue_Command_On_Karaf_Console    ${TEP_SHOW_STATE}
     BuiltIn.Should Contain    ${output}    DOWN
 
 Disable_Tunnel_Monitoring
@@ -95,8 +110,10 @@ Disable_Tunnel_Monitoring
 
 Verify Tunnels By Enabling BFD
     [Documentation]    Verify tunnel creation by enabling BFD monitoring.
-    ${result} =    BuiltIn.Run Keyword And Return Status    Genius.Verify Tunnel Monitoring Status    ${TUNNEL_MONITOR_ON}
-    BuiltIn.Run Keyword If    '${result}' == 'False'    Enable_Tunnel_monitoring
+    ${result} =    BuiltIn.Run Keyword And Return Status
+    ...    Genius.Verify Tunnel Monitoring Status
+    ...    ${TUNNEL_MONITOR_ON}
+    IF    '${result}' == 'False'    Enable_Tunnel_monitoring
     FOR    ${tools_ip}    IN    @{TOOLS_SYSTEM_ALL_IPS}
         Verify Tunnel State After OVS Restart    ${tools_ip}
     END
@@ -104,7 +121,7 @@ Verify Tunnels By Enabling BFD
 Verify Tunnels By Disabling BFD
     [Documentation]    Verify tunnel creation by disabling BFD monitoring.
     ${result} =    Run Keyword And Return Status    Genius.Verify Tunnel Monitoring Status    ${TUNNEL_MONITOR_ON}
-    BuiltIn.Run Keyword If    '${result}' == 'True'    Disable_Tunnel_Monitoring
+    IF    '${result}' == 'True'    Disable_Tunnel_Monitoring
     ${tunnels_on_OVS} =    Genius.Get Tunnels On OVS    ${TOOLS_SYSTEM_ALL_CONN_IDS[0]}
     OVSDB.Stop OVS    ${TOOLS_SYSTEM_IP}
     BuiltIn.Wait Until Keyword Succeeds    10s    1s    Genius.Verify Tunnel Status    UNKNOWN    ${tunnels_on_OVS}
index 62c12e87deea817fef5515fe6c619b447d820f30..68c96f82bedadaf9d9a348137b2e847436f2a0e3 100644 (file)
@@ -1,35 +1,39 @@
 *** Settings ***
-Documentation     Test suite to validate ITM VTEP auto-configuration functionality in openstack integrated environment.
-Suite Setup       BuiltIn.Run Keywords    Genius.Genius Suite Setup
-...               AND    OvsManager.Verify Ovs Version Greater Than Or Equal To    ${OVS_VERSION}    @{TOOLS_SYSTEM_ALL_IPS}
-Suite Teardown    Genius.Genius Suite Teardown
-Test Setup        Genius Test Setup
-Test Teardown     Genius Test Teardown    ${data_models}
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           String
-Resource          ../../libraries/Genius.robot
-Resource          ../../libraries/KarafKeywords.robot
-Resource          ../../libraries/OVSDB.robot
-Resource          ../../libraries/OvsManager.robot
-Resource          ../../libraries/Utils.robot
-Resource          ../../libraries/VpnOperations.robot
-Resource          ../../variables/netvirt/Variables.robot
-Resource          ../../variables/Variables.robot
-Variables         ../../variables/genius/Modules.py
+Documentation       Test suite to validate ITM VTEP auto-configuration functionality in openstack integrated environment.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             String
+Resource            ../../libraries/Genius.robot
+Resource            ../../libraries/KarafKeywords.robot
+Resource            ../../libraries/OVSDB.robot
+Resource            ../../libraries/OvsManager.robot
+Resource            ../../libraries/Utils.robot
+Resource            ../../libraries/VpnOperations.robot
+Resource            ../../variables/netvirt/Variables.robot
+Resource            ../../variables/Variables.robot
+Variables           ../../variables/genius/Modules.py
+
+Suite Setup         BuiltIn.Run Keywords    Genius.Genius Suite Setup
+...                     AND    OvsManager.Verify Ovs Version Greater Than Or Equal To    ${OVS_VERSION}    @{TOOLS_SYSTEM_ALL_IPS}
+Suite Teardown      Genius.Genius Suite Teardown
+Test Setup          Genius Test Setup
+Test Teardown       Genius Test Teardown    ${data_models}
+
 
 *** Variables ***
-${CHANGE_TRANSPORT_ZONE}    sudo ovs-vsctl set O . external_ids:transport-zone
-${TZA_JSON}       ${GENIUS_VAR_DIR}/Itm_Auto_Tunnel_Create.json
-${DELETE_TRANSPORT_ZONE}    sudo ovs-vsctl remove O . external_ids transport-zone
-${GET_EXTERNAL_IDS}    sudo ovsdb-client dump -f list Open_vSwitch | grep external_ids
-${GET_NETWORK_TOPOLOGY_URL}    ${OPERATIONAL_API}/network-topology:network-topology/topology/ovsdb:1/
-${OVS_VERSION}    2.5
-${SHOW_OTHER_CONFIG}    sudo ovsdb-client dump -f list Open_vSwitch | grep other_config
-${STATUS_CHECK}    DOWN
-${TRANSPORT_ZONE}    TZA
-${TRANSPORTZONE_POST_URL}    ${CONFIG_API}/itm:transport-zones
+${CHANGE_TRANSPORT_ZONE}        sudo ovs-vsctl set O . external_ids:transport-zone
+${TZA_JSON}                     ${GENIUS_VAR_DIR}/Itm_Auto_Tunnel_Create.json
+${DELETE_TRANSPORT_ZONE}        sudo ovs-vsctl remove O . external_ids transport-zone
+${GET_EXTERNAL_IDS}             sudo ovsdb-client dump -f list Open_vSwitch | grep external_ids
+${GET_NETWORK_TOPOLOGY_URL}     ${OPERATIONAL_API}/network-topology:network-topology/topology/ovsdb:1/
+${OVS_VERSION}                  2.5
+${SHOW_OTHER_CONFIG}            sudo ovsdb-client dump -f list Open_vSwitch | grep other_config
+${STATUS_CHECK}                 DOWN
+${TRANSPORT_ZONE}               TZA
+${TRANSPORTZONE_POST_URL}       ${CONFIG_API}/itm:transport-zones
+
 
 *** Test Cases ***
 Verify TEP in controller and transport zone in OVSDB table of compute nodes
@@ -48,7 +52,12 @@ Verify TEP in controller and transport zone in OVSDB table of compute nodes
 Verify TEPs with transport zone configured from OVS will be added to corresponding transport zone
     [Documentation]    To Verify transport zone name change in external id field of ovsdb and check status when moved from tep nohosted zone to TZA
     Change Transport Zone In Compute    ${TOOLS_SYSTEM_1_IP}    ${TRANSPORT_ZONE}
-    ${get_nohosted_data} =    BuiltIn.Wait Until Keyword Succeeds    3x    10 sec    Utils.Get Data From URI    session    ${TEP_NOT_HOSTED_ZONE_URL}
+    ${get_nohosted_data} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    10 sec
+    ...    Utils.Get Data From URI
+    ...    session
+    ...    ${TEP_NOT_HOSTED_ZONE_URL}
     BuiltIn.Should Contain    ${get_nohosted_data}    ${TRANSPORT_ZONE}
     BuiltIn.Should Contain    ${get_nohosted_data}    ${DPN_ID_LIST}[0]
     Utils.Post Elements To URI From File    ${TRANSPORTZONE_POST_URL}    ${TZA_JSON}
@@ -59,7 +68,12 @@ Verify TEPs with transport zone configured from OVS will be added to correspondi
         ${output} =    Utils.Run Command On Remote System    ${node}    ${GET_EXTERNAL_IDS}
         BuiltIn.Should Contain    ${output}    ${TRANSPORT_ZONE}
     END
-    ${get_hosted_data} =    BuiltIn.Wait Until Keyword Succeeds    3x    10 sec    Utils.Get Data From URI    session    ${TRANSPORT_ZONE_ENDPOINT_URL}/${TRANSPORT_ZONE}
+    ${get_hosted_data} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    10 sec
+    ...    Utils.Get Data From URI
+    ...    session
+    ...    ${TRANSPORT_ZONE_ENDPOINT_URL}/${TRANSPORT_ZONE}
     BuiltIn.Should Contain    ${get_hosted_data}    ${TRANSPORT_ZONE}
     BuiltIn.Should Contain    ${get_hosted_data}    ${DPN_ID_LIST}[0]
     BuiltIn.Wait Until Keyword Succeeds    3x    10 sec    Genius.Verify Tunnel Status as Up
@@ -82,10 +96,11 @@ Delete transport zone on OVS and check ovsdb update to controller
     BuiltIn.Wait Until Keyword Succeeds    3x    10 sec    Genius.Verify Tunnel Status as Up
     VpnOperations.ITM Delete Tunnel    ${TRANSPORT_ZONE}
 
+
 *** Keywords ***
 Change Transport Zone In Compute
-    [Arguments]    ${compute_ip}    ${zone_name}
     [Documentation]    Change transport zone in Compute and verify its configuration
+    [Arguments]    ${compute_ip}    ${zone_name}
     Utils.Run Command On Remote System    ${compute_ip}    ${CHANGE_TRANSPORT_ZONE}=${zone_name}
     ${output} =    Utils.Run Command On Remote System    ${compute_ip}    ${GET_EXTERNAL_IDS}
     BuiltIn.Should Contain    ${output}    ${zone_name}
index f071a62e1a701221e425df287bd08baea7d3c73f..b91db1ec82c6215396c6f19c4f8f9f5cc7d0cc9c 100644 (file)
@@ -1,24 +1,28 @@
 *** Settings ***
-Documentation     Test Suite for Interface manager
-Suite Setup       Genius Suite Setup
-Suite Teardown    Genius Suite Teardown
-Test Setup        Genius Test Setup
-Test Teardown     Genius Test Teardown    ${data_models}
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           String
-Resource          ../../libraries/DataModels.robot
-Resource          ../../libraries/Genius.robot
-Resource          ../../libraries/Utils.robot
-Resource          ../../variables/Variables.robot
-Variables         ../../variables/genius/Modules.py
+Documentation       Test Suite for Interface manager
+
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             String
+Resource            ../../libraries/DataModels.robot
+Resource            ../../libraries/Genius.robot
+Resource            ../../libraries/Utils.robot
+Resource            ../../variables/Variables.robot
+Variables           ../../variables/genius/Modules.py
+
+Suite Setup         Genius Suite Setup
+Suite Teardown      Genius Suite Teardown
+Test Setup          Genius Test Setup
+Test Teardown       Genius Test Teardown    ${data_models}
+
 
 *** Variables ***
-${interface_name}    l2vlan-trunk
-${trunk_json}     l2vlan.json
+${interface_name}       l2vlan-trunk
+${trunk_json}           l2vlan.json
 ${trunk_member_json}    l2vlan_member.json
 
+
 *** Test Cases ***
 Create l2vlan transparent interface
     [Documentation]    This testcase creates a l2vlan transparent interface between 2 dpns.
@@ -45,7 +49,10 @@ Create l2vlan trunk interface
 Create l2vlan Trunk member interface
     [Documentation]    This testcase creates a l2vlan Trunk member interface for the l2vlan trunk interface created in 1st testcase.
     ${body} =    OperatingSystem.Get File    ${genius_config_dir}/l2vlan_member.json
-    ${post_resp} =    RequestsLibrary.Post Request    session    ${CONFIG_API}/ietf-interfaces:interfaces/    data=${body}
+    ${post_resp} =    RequestsLibrary.Post Request
+    ...    session
+    ...    ${CONFIG_API}/ietf-interfaces:interfaces/
+    ...    data=${body}
     BuiltIn.Should Be Equal As Strings    ${post_resp.status_code}    204
     @{l2vlan} =    create list    l2vlan-trunk1    l2vlan    trunk-member    1000    l2vlan-trunk
     ...    true
@@ -60,11 +67,16 @@ Bind service on Interface
     ${body} =    String.Replace string    ${body}    service2    elan
     BuiltIn.Log    ${body}
     ${service_mode} =    BuiltIn.Set Variable    interface-service-bindings:service-mode-ingress
-    ${post_resp} =    RequestsLibrary.Post Request    session    ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/    data=${body}
+    ${post_resp} =    RequestsLibrary.Post Request
+    ...    session
+    ...    ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/
+    ...    data=${body}
     BuiltIn.Should Be Equal As Strings    ${post_resp.status_code}    204
     @{bind_array} =    BuiltIn.Create List    2    3    VPN    elan    50
     ...    21
-    Utils.Check For Elements At URI    ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/    ${bind_array}
+    Utils.Check For Elements At URI
+    ...    ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/
+    ...    ${bind_array}
     BuiltIn.Wait Until Keyword Succeeds    40    10    table entry
 
 unbind service on interface
@@ -72,11 +84,15 @@ unbind service on interface
     ${service-priority-1} =    BuiltIn.Set Variable    3
     ${service-priority-2} =    BuiltIn.Set Variable    4
     ${service_mode} =    BuiltIn.Set Variable    interface-service-bindings:service-mode-ingress
-    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/bound-services/${service-priority-1}/
+    Utils.Remove All Elements At URI And Verify
+    ...    ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/bound-services/${service-priority-1}/
     ${table-id} =    BuiltIn.Set Variable    21
     BuiltIn.Wait Until Keyword Succeeds    10    2    no goto_table entry    ${table-id}
-    Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/bound-services/${service-priority-2}/
-    Utils.No Content From URI    session    ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/bound-services/${service-priority-2}/
+    Utils.Remove All Elements At URI And Verify
+    ...    ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/bound-services/${service-priority-2}/
+    Utils.No Content From URI
+    ...    session
+    ...    ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/bound-services/${service-priority-2}/
     ${table-id} =    BuiltIn.Set Variable    50
     BuiltIn.Wait Until Keyword Succeeds    10    2    no goto_table entry    ${table-id}
 
@@ -86,11 +102,14 @@ Delete l2vlan trunk interface
     Utils.No Content From URI    session    ${OPERATIONAL_API}/ietf-interfaces:interfaces/
     BuiltIn.Wait Until Keyword Succeeds    30    10    no table0 entry
 
+
 *** Keywords ***
 get operational interface
-    [Arguments]    ${interface_name}
     [Documentation]    checks operational status of the interface.
-    ${get_oper_resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/interface/${interface_name}/
+    [Arguments]    ${interface_name}
+    ${get_oper_resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/interface/${interface_name}/
     ${respjson} =    RequestsLibrary.To Json    ${get_oper_resp.content}    pretty_print=True
     BuiltIn.Log    ${respjson}
     BuiltIn.Should Be Equal As Strings    ${get_oper_resp.status_code}    200
@@ -99,41 +118,54 @@ get operational interface
 
 table entry
     [Documentation]    Checks for tables entry wrt the service the Interface is binded.
-    ${result} =    Utils.Run Command On Remote System    ${TOOLS_SYSTEM_1_IP}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
+    ${result} =    Utils.Run Command On Remote System
+    ...    ${TOOLS_SYSTEM_1_IP}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
     BuiltIn.Should Contain    ${result}    table=17
     BuiltIn.Should Contain    ${result}    goto_table:21
     BuiltIn.Should Contain    ${result}    goto_table:50
 
 no table0 entry
     [Documentation]    After Deleting trunk interface, checking for absence of table 0 in the flow dumps
-    ${ovs-check} =    Utils.Run Command On Remote System    ${TOOLS_SYSTEM_1_IP}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
+    ${ovs-check} =    Utils.Run Command On Remote System
+    ...    ${TOOLS_SYSTEM_1_IP}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
     BuiltIn.Should Not Contain    ${ovs-check}    table=0
     BuiltIn.Should Not Contain    ${ovs-check}    goto_table:17
 
 no goto_table entry
-    [Arguments]    ${table-id}
     [Documentation]    Checks for absence of no goto_table after unbinding the service on the interface.
-    ${ovs-check1} =    Utils.Run Command On Remote System    ${TOOLS_SYSTEM_1_IP}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
+    [Arguments]    ${table-id}
+    ${ovs-check1} =    Utils.Run Command On Remote System
+    ...    ${TOOLS_SYSTEM_1_IP}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
     BuiltIn.Should Not Contain    ${ovs-check1}    goto_table:${table-id}
 
 table0 entry
-    [Arguments]    ${tools_ip}
     [Documentation]    After Creating the trunk interface , checking for table 0 entry exist in the flow dumps
-    ${ovs-check} =    Utils.Run Command On Remote System    ${tools_ip}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
+    [Arguments]    ${tools_ip}
+    ${ovs-check} =    Utils.Run Command On Remote System
+    ...    ${tools_ip}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
     BuiltIn.Should Contain    ${ovs-check}    table=0
 
 ovs check for member interface creation
-    [Arguments]    ${tools_ip}
     [Documentation]    This keyword verifies the member interface created on OVS by checking the table0 ,vlan and action=pop_vlan entries
-    ${ovs-check} =    Utils.Run Command On Remote System    ${tools_ip}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
+    [Arguments]    ${tools_ip}
+    ${ovs-check} =    Utils.Run Command On Remote System
+    ...    ${tools_ip}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
     BuiltIn.Should Contain    ${ovs-check}    table=0
     BuiltIn.Should Contain    ${ovs-check}    dl_vlan=1000
     BuiltIn.Should Contain    ${ovs-check}    actions=pop_vlan
 
 Create Interface
-    [Arguments]    ${json_file}    ${interface_mode}
     [Documentation]    Creates an trunk/transparent interface based on input provided to the json body
+    [Arguments]    ${json_file}    ${interface_mode}
     ${body} =    OperatingSystem.Get File    ${genius_config_dir}/${json_file}
     ${body} =    String.Replace String    ${body}    "l2vlan-mode":"trunk"    "l2vlan-mode":"${interface_mode}"
-    ${post_resp} =    RequestsLibrary.Post Request    session    ${CONFIG_API}/ietf-interfaces:interfaces/    data=${body}
+    ${post_resp} =    RequestsLibrary.Post Request
+    ...    session
+    ...    ${CONFIG_API}/ietf-interfaces:interfaces/
+    ...    data=${body}
     BuiltIn.Should Be Equal As Strings    ${post_resp.status_code}    204
index fe02b8cf2fa37ddb0842859050035b8cad7b2015..8887331776eac57da56617aeb40f549caac1fa20 100644 (file)
@@ -1,47 +1,62 @@
 *** Settings ***
-Documentation     This test suite is to verify working of OF based Tunnels
-Suite Setup       OF Tunnels Start Suite
-Suite Teardown    OF Tunnels Stop Suite
-Test Setup        Genius Test Setup
-Test Teardown     Genius Test Teardown    ${data_models}
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           String
-Resource          ../../libraries/ClusterManagement.robot
-Resource          ../../libraries/DataModels.robot
-Resource          ../../libraries/Genius.robot
-Resource          ../../libraries/KarafKeywords.robot
-Resource          ../../libraries/ODLTools.robot
-Resource          ../../libraries/OVSDB.robot
-Resource          ../../libraries/Utils.robot
-Resource          ../../libraries/VpnOperations.robot
-Resource          ../../variables/Variables.robot
-Variables         ../../variables/genius/Modules.py
-Resource          ../../variables/netvirt/Variables.robot
+Documentation       This test suite is to verify working of OF based Tunnels
+
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             String
+Resource            ../../libraries/ClusterManagement.robot
+Resource            ../../libraries/DataModels.robot
+Resource            ../../libraries/Genius.robot
+Resource            ../../libraries/KarafKeywords.robot
+Resource            ../../libraries/ODLTools.robot
+Resource            ../../libraries/OVSDB.robot
+Resource            ../../libraries/Utils.robot
+Resource            ../../libraries/VpnOperations.robot
+Resource            ../../variables/Variables.robot
+Variables           ../../variables/genius/Modules.py
+Resource            ../../variables/netvirt/Variables.robot
+
+Suite Setup         OF Tunnels Start Suite
+Suite Teardown      OF Tunnels Stop Suite
+Test Setup          Genius Test Setup
+Test Teardown       Genius Test Teardown    ${data_models}
+
 
 *** Variables ***
-${FLOWS_FILTER_TABLE0}    | grep table=0
-${FLOWS_FILTER_TABLE95}    | grep table=95
+${FLOWS_FILTER_TABLE0}      | grep table=0
+${FLOWS_FILTER_TABLE95}     | grep table=95
+
 
 *** Test Cases ***
 Create and Verify OFT TEPs
     [Documentation]    Create TEPs set to use OF based Tunnels and verify.
-    CompareStream.Run_Keyword_If_Less_Than_Sodium    BuiltIn.Pass Execution    Test case valid only for versions Sodium and above
+    CompareStream.Run_Keyword_If_Less_Than_Sodium
+    ...    BuiltIn.Pass Execution
+    ...    Test case valid only for versions Sodium and above
     OFT Create Vteps using Auto Tunnels    @{TOOLS_SYSTEM_ALL_IPS}
     OFT Verify Vteps Created    ${DPN_ID_LIST}    ${TOOLS_SYSTEM_ALL_IPS}
 
 Delete and Verify OFT TEPs
     [Documentation]    Delete TEPs set to use OF based Tunnels and verify.
-    CompareStream.Run_Keyword_If_Less_Than_Sodium    BuiltIn.Pass Execution    Test case valid only for versions Sodium and above
+    CompareStream.Run_Keyword_If_Less_Than_Sodium
+    ...    BuiltIn.Pass Execution
+    ...    Test case valid only for versions Sodium and above
     OFT Delete Vteps using Auto Tunnels    @{TOOLS_SYSTEM_ALL_IPS}
     OFT Verify Vteps Deleted    ${DPN_ID_LIST}    ${TOOLS_SYSTEM_ALL_IPS}
-    BuiltIn.Wait Until Keyword Succeeds    60    5    Utils.No Content From URI    session    ${OPERATIONAL_API}/itm-state:tunnels_state
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60
+    ...    5
+    ...    Utils.No Content From URI
+    ...    session
+    ...    ${OPERATIONAL_API}/itm-state:tunnels_state
 
 Create and Verify single OFT TEPs
     [Documentation]    Create single TEPs set to use OF based Tunnels and verify.
-    CompareStream.Run_Keyword_If_Less_Than_Sodium    BuiltIn.Pass Execution    Test case valid only for versions Sodium and above
+    CompareStream.Run_Keyword_If_Less_Than_Sodium
+    ...    BuiltIn.Pass Execution
+    ...    Test case valid only for versions Sodium and above
     ${tools_ips} =    BuiltIn.Create List    @{TOOLS_SYSTEM_ALL_IPS}
     Collections.Remove From List    ${tools_ips}    -1
     ${dpn_ids} =    BuiltIn.CreateList    @{DPN_ID_LIST}
@@ -53,30 +68,47 @@ Create and Verify single OFT TEPs
 
 Delete and Verify single OFT TEPs
     [Documentation]    Delete single TEPs set to use OF based Tunnels and verify.
-    CompareStream.Run_Keyword_If_Less_Than_Sodium    BuiltIn.Pass Execution    Test case valid only for versions Sodium and above
+    CompareStream.Run_Keyword_If_Less_Than_Sodium
+    ...    BuiltIn.Pass Execution
+    ...    Test case valid only for versions Sodium and above
     ${deleted_tools_ip_list} =    BuiltIn.Set Variable    ${TOOLS_SYSTEM_ALL_IPS}[0]
     OFT Delete Vteps using Auto Tunnels    ${deleted_tools_ip_list}
     ${deleted_tools_ip_list} =    BuiltIn.CreateList    ${TOOLS_SYSTEM_ALL_IPS}[0]
     ${deleted_dpn_id_list} =    BuiltIn.CreateList    ${DPN_ID_LIST}[0]
     OFT Verify Vteps Deleted    ${deleted_dpn_id_list}    ${deleted_tools_ip_list}
 
+
 *** Keywords ***
 OFT Create Vteps using Auto Tunnels
-    [Arguments]    @{tools_ip_list}
     [Documentation]    Create VTEPs for selected tools systems in ODL using Auto Tunnels.
+    [Arguments]    @{tools_ip_list}
     FOR    ${tools_ip}    IN    @{tools_ip_list}
         Utils.Run Command On Remote System And Log    ${tools_ip}    ${SET_LOCAL_IP}${tools_ip}
     END
 
 OFT Verify Vteps Created
-    [Arguments]    ${dpn_id_list}    ${tools_ip_list}
     [Documentation]    Verify if OFT VTEPs are created successfully or not for given Tools IPs and DPN-IDs.
+    [Arguments]    ${dpn_id_list}    ${tools_ip_list}
     ${switch_data} =    BuiltIn.Create List    @{dpn_id_list}    @{tools_ip_list}
     BuiltIn.Wait Until Keyword Succeeds    60    5    Genius.Get ITM    ${DEFAULT_TRANSPORT_ZONE}    ${switch_data}
-    ${tep_show_output} =    BuiltIn.Wait Until Keyword Succeeds    60    5    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW}
+    ${tep_show_output} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    60
+    ...    5
+    ...    KarafKeywords.Issue Command On Karaf Console
+    ...    ${TEP_SHOW}
     BuiltIn.Should Contain Any    ${tep_show_output}    ${DEFAULT_TRANSPORT_ZONE}    VXLAN    @{switch_data}
-    BuiltIn.Wait Until Keyword Succeeds    60    5    Genius.Update Dpn id List And Get Tunnels    odl-interface:tunnel-type-vxlan    dpn-teps-state    ${dpn_id_list}
-    BuiltIn.Wait Until Keyword Succeeds    60    5    Genius.Verify Response Code Of Dpn End Point Config API    ${dpn_id_list}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60
+    ...    5
+    ...    Genius.Update Dpn id List And Get Tunnels
+    ...    odl-interface:tunnel-type-vxlan
+    ...    dpn-teps-state
+    ...    ${dpn_id_list}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60
+    ...    5
+    ...    Genius.Verify Response Code Of Dpn End Point Config API
+    ...    ${dpn_id_list}
     ${num_switches} =    BuiltIn.Get Length    ${dpn_id_list}
     BuiltIn.Wait Until Keyword Succeeds    60    5    Genius.Verify Tunnel Status As Up    ${num_switches}
     BuiltIn.Wait Until Keyword Succeeds    40    10    OFT OVS Verify Tunnels Created    @{tools_ip_list}
@@ -84,28 +116,47 @@ OFT Verify Vteps Created
     FOR    ${tools_system_index}    IN RANGE    ${tools_system_len}
         ${tun_ip_list} =    BuiltIn.CreateList    @{tools_ip_list}
         Collections.Remove From List    ${tun_ip_list}    ${tools_system_index}
-        ${ports_output} =    Utils.Run Command On Remote System And Log    ${tools_ip_list}[${tools_system_index}]    sudo ovs-ofctl -Oopenflow13 dump-ports-desc ${Bridge}
+        ${ports_output} =    Utils.Run Command On Remote System And Log
+        ...    ${tools_ip_list}[${tools_system_index}]
+        ...    sudo ovs-ofctl -Oopenflow13 dump-ports-desc ${Bridge}
         ${port_numbers} =    String.Get Regexp Matches    ${ports_output}    (\\d+).of.*    ${1}
-        BuiltIn.Wait Until Keyword Succeeds    40    10    OFT OVS Verify Ingress Flows Created per Switch    ${tools_ip_list}[${tools_system_index}]    ${tun_ip_list}
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    40
+        ...    10
+        ...    OFT OVS Verify Ingress Flows Created per Switch
+        ...    ${tools_ip_list}[${tools_system_index}]
+        ...    ${tun_ip_list}
         ...    ${port_numbers}
-        BuiltIn.Wait Until Keyword Succeeds    40    10    OFT OVS Verify Egress Flows Created per Switch    ${tools_ip_list}[${tools_system_index}]    ${tun_ip_list}
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    40
+        ...    10
+        ...    OFT OVS Verify Egress Flows Created per Switch
+        ...    ${tools_ip_list}[${tools_system_index}]
+        ...    ${tun_ip_list}
         ...    ${port_numbers}
-        BuiltIn.Wait Until Keyword Succeeds    40    10    OFT OVS Verify Ingress Flows Created per Switch    ${tools_ip_list}[${tools_system_index}]    ${tun_ip_list}
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    40
+        ...    10
+        ...    OFT OVS Verify Ingress Flows Created per Switch
+        ...    ${tools_ip_list}[${tools_system_index}]
+        ...    ${tun_ip_list}
         ...    ${port_numbers}
     END
 
 OFT OVS Verify Tunnels Created
-    [Arguments]    @{tools_ip_list}
     [Documentation]    Verify if tunnels are created in OVS for selected tools systems.
+    [Arguments]    @{tools_ip_list}
     FOR    ${tools_ip}    IN    @{tools_ip_list}
         ${output} =    Utils.Run Command On Remote System And Log    ${tools_ip}    sudo ovs-vsctl show
         BuiltIn.Should Contain X Times    ${output}    local_ip="${tools_ip}", remote_ip=flow    ${1}
     END
 
 OFT OVS Verify Ingress Flows Created per Switch
-    [Arguments]    ${tools_ip}    ${tun_src_list}    ${port_numbers}
     [Documentation]    Verify if Ingress flow rules are created in OVS for a given switch.
-    ${flows_table0_output} =    Utils.Run Command On Remote System And Log    ${tools_ip}    sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE0}
+    [Arguments]    ${tools_ip}    ${tun_src_list}    ${port_numbers}
+    ${flows_table0_output} =    Utils.Run Command On Remote System And Log
+    ...    ${tools_ip}
+    ...    sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE0}
     BuiltIn.Should Not Contain    ${flows_table0_output}    tun_src=${tools_ip},
     FOR    ${tun_src}    IN    @{tun_src_list}
         BuiltIn.Should Contain    ${flows_table0_output}    tun_src=${tun_src},
@@ -115,11 +166,15 @@ OFT OVS Verify Ingress Flows Created per Switch
     END
 
 OFT OVS Verify Egress Flows Created per Switch
-    [Arguments]    ${tools_ip}    ${tun_dst_list}    ${port_numbers}
     [Documentation]    Verify if Egress flow rules are created in OVS for a given switch.
-    ${flows_table95_output} =    Utils.Run Command On Remote System And Log    ${tools_ip}    sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE95}
+    [Arguments]    ${tools_ip}    ${tun_dst_list}    ${port_numbers}
+    ${flows_table95_output} =    Utils.Run Command On Remote System And Log
+    ...    ${tools_ip}
+    ...    sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE95}
     FOR    ${tun_dst}    IN    @{tun_dst_list}
-        ${tun_dst_hex} =    BuiltIn.Evaluate    hex(struct.unpack('!I',socket.inet_aton('${tun_dst}'))[0])    modules=socket,struct
+        ${tun_dst_hex} =    BuiltIn.Evaluate
+        ...    hex(struct.unpack('!I',socket.inet_aton('${tun_dst}'))[0])
+        ...    modules=socket,struct
         BuiltIn.Should Contain    ${flows_table95_output}    load:${tun_dst_hex}->NXM_NX_TUN_IPV4_DST[]
     END
     FOR    ${port_number}    IN    @{port_numbers}
@@ -127,18 +182,20 @@ OFT OVS Verify Egress Flows Created per Switch
     END
 
 OFT Delete Vteps using Auto Tunnels
-    [Arguments]    @{tools_ip_list}
     [Documentation]    Delete VTEPs for selected tools systems in ODL using Auto Tunnel.
+    [Arguments]    @{tools_ip_list}
     FOR    ${tools_ip}    IN    @{tools_ip_list}
         Utils.Run Command On Remote System And Log    ${tools_ip}    ${REMOVE_LOCAL_IP}
     END
 
 OFT Verify Vteps Deleted
-    [Arguments]    ${dpn_id_list}    ${tools_ip_list}
     [Documentation]    Verify if OFT Vteps are created successfully or not for given Tools IPs and DPN-IDs.
+    [Arguments]    ${dpn_id_list}    ${tools_ip_list}
     ${deleted_tep_len} =    BuiltIn.Get Length    ${dpn_id_list}
     ${existing_tep_len} =    BuiltIn.Evaluate    ${NUM_TOOLS_SYSTEM}-${deleted_tep_len}
-    BuiltIn.Run Keyword If    ${existing_tep_len} > 0    BuiltIn.Wait Until Keyword Succeeds    60    5    Genius.Verify Tunnel Status As Up    ${existing_tep_len}
+    IF    ${existing_tep_len} > 0
+        BuiltIn.Wait Until Keyword Succeeds    60    5    Genius.Verify Tunnel Status As Up    ${existing_tep_len}
+    END
     ${tep_show_output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW}
     ${tep_show_state_output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW_STATE}
     FOR    ${tools_system_index}    IN RANGE    ${deleted_tep_len}
@@ -146,36 +203,66 @@ OFT Verify Vteps Deleted
         BuiltIn.Log    ${tools_ip_list}[${tools_system_index}]
         BuiltIn.Should Not Contain    ${tep_show_output}    ${tools_ip_list}[${tools_system_index}]
         BuiltIn.Should Not Contain    ${tep_show_state_output}    ${tools_ip_list}[${tools_system_index}]
-        BuiltIn.Wait Until Keyword Succeeds    60    5    Utils.No Content From URI    session    ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn_id_list}[${tools_system_index}]/
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    60
+        ...    5
+        ...    Utils.No Content From URI
+        ...    session
+        ...    ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn_id_list}[${tools_system_index}]/
         ${dst_dpn_id_list} =    BuiltIn.Create List    @{DPN_ID_LIST}
         Collections.Remove From List    ${dst_dpn_id_list}    ${tools_system_index}
-        BuiltIn.Wait Until Keyword Succeeds    60    5    OFT Verify Vteps Deleted at Dpn Teps State per Interface    ${dpn_id_list}[${tools_system_index}]    ${dst_dpn_id_list}
-        ${ovs_vsctl_output} =    BuiltIn.Wait Until Keyword Succeeds    40    10    Utils.Run Command On Remote System And Log    ${tools_ip_list}[${tools_system_index}]
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    60
+        ...    5
+        ...    OFT Verify Vteps Deleted at Dpn Teps State per Interface
+        ...    ${dpn_id_list}[${tools_system_index}]
+        ...    ${dst_dpn_id_list}
+        ${ovs_vsctl_output} =    BuiltIn.Wait Until Keyword Succeeds
+        ...    40
+        ...    10
+        ...    Utils.Run Command On Remote System And Log
+        ...    ${tools_ip_list}[${tools_system_index}]
         ...    sudo ovs-vsctl show
         BuiltIn.Should Not Contain    ${ovs_vsctl_output}    remote_ip=flow
-        BuiltIn.Wait Until Keyword Succeeds    40    10    OFT OVS Verify Ingress Flows Deleted per Switch    ${tools_ip_list}[${tools_system_index}]
-        BuiltIn.Wait Until Keyword Succeeds    40    10    OFT OVS Verify Egress Flows Deleted per Switch    ${tools_ip_list}[${tools_system_index}]
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    40
+        ...    10
+        ...    OFT OVS Verify Ingress Flows Deleted per Switch
+        ...    ${tools_ip_list}[${tools_system_index}]
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    40
+        ...    10
+        ...    OFT OVS Verify Egress Flows Deleted per Switch
+        ...    ${tools_ip_list}[${tools_system_index}]
     END
 
 OFT Verify Vteps Deleted at Dpn Teps State per Interface
-    [Arguments]    ${src_dpn_id}    ${dst_dpn_id_list}
     [Documentation]    Verify if vteps are deleted for all src-dst intf pair at dpn-teps-state in ODL for a given src intf.
+    [Arguments]    ${src_dpn_id}    ${dst_dpn_id_list}
     FOR    ${dst_dpn_id}    IN    @{dst_dpn_id_list}
-        ${status} =    BuiltIn.Run Keyword And Return Status    Genius.Get Tunnel    ${src_dpn_id}    ${dst_dpn_id}    odl-interface:tunnel-type-vxlan
+        ${status} =    BuiltIn.Run Keyword And Return Status
+        ...    Genius.Get Tunnel
+        ...    ${src_dpn_id}
+        ...    ${dst_dpn_id}
+        ...    odl-interface:tunnel-type-vxlan
         ...    dpn-teps-state
         BuiltIn.Should Be True    ${status} == ${False}
     END
 
 OFT OVS Verify Ingress Flows Deleted per Switch
-    [Arguments]    ${tools_ip}
     [Documentation]    Verify if Ingress flow rules are deleted in OVS for a given switch.
-    ${flows_table0_output} =    Utils.Run Command On Remote System And Log    ${tools_ip}    sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE0}
+    [Arguments]    ${tools_ip}
+    ${flows_table0_output} =    Utils.Run Command On Remote System And Log
+    ...    ${tools_ip}
+    ...    sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE0}
     BuiltIn.Should Not Contain    ${flows_table0_output}    tun_src=
 
 OFT OVS Verify Egress Flows Deleted per Switch
-    [Arguments]    ${tools_ip}
     [Documentation]    Verify if Egress flow rules are deleted in OVS for a given switch.
-    ${flows_table95_output} =    Utils.Run Command On Remote System And Log    ${tools_ip}    sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE95}
+    [Arguments]    ${tools_ip}
+    ${flows_table95_output} =    Utils.Run Command On Remote System And Log
+    ...    ${tools_ip}
+    ...    sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE95}
     BuiltIn.Should Not Contain    ${flows_table95_output}    output:
 
 OF Tunnels Start Suite
@@ -183,8 +270,12 @@ OF Tunnels Start Suite
     ClusterManagement.ClusterManagement_Setup
     ClusterManagement.Stop_Members_From_List_Or_All
     FOR    ${controller_index}    IN RANGE    ${NUM_ODL_SYSTEM}
-        Run Command On Remote System And Log    ${ODL_SYSTEM_${controller_index+1}_IP}    sed -i -- 's/<itm-direct-tunnels>false/<itm-direct-tunnels>true/g' ${GENIUS_IFM_CONFIG_FLAG}
-        Run Command On Remote System And Log    ${ODL_SYSTEM_${controller_index+1}_IP}    sed -i -- 's/<use-of-tunnels>false/<use-of-tunnels>true/g' ${GENIUS_ITM_CONFIG_FLAG}
+        Run Command On Remote System And Log
+        ...    ${ODL_SYSTEM_${controller_index+1}_IP}
+        ...    sed -i -- 's/<itm-direct-tunnels>false/<itm-direct-tunnels>true/g' ${GENIUS_IFM_CONFIG_FLAG}
+        Run Command On Remote System And Log
+        ...    ${ODL_SYSTEM_${controller_index+1}_IP}
+        ...    sed -i -- 's/<use-of-tunnels>false/<use-of-tunnels>true/g' ${GENIUS_ITM_CONFIG_FLAG}
     END
     ClusterManagement.Start_Members_From_List_Or_All
     Genius Suite Setup
@@ -192,8 +283,12 @@ OF Tunnels Start Suite
 OF Tunnels Stop Suite
     [Documentation]    Stop suite for OF Tunnels.
     FOR    ${controller_index}    IN RANGE    ${NUM_ODL_SYSTEM}
-        Run Command On Remote System And Log    ${ODL_SYSTEM_${controller_index+1}_IP}    sed -i -- 's/<itm-direct-tunnels>true/<itm-direct-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
-        Run Command On Remote System And Log    ${ODL_SYSTEM_${controller_index+1}_IP}    sed -i -- 's/<itm-of-tunnels>true/<itm-of-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
+        Run Command On Remote System And Log
+        ...    ${ODL_SYSTEM_${controller_index+1}_IP}
+        ...    sed -i -- 's/<itm-direct-tunnels>true/<itm-direct-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
+        Run Command On Remote System And Log
+        ...    ${ODL_SYSTEM_${controller_index+1}_IP}
+        ...    sed -i -- 's/<itm-of-tunnels>true/<itm-of-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
     END
     ClusterManagement.Stop_Members_From_List_Or_All
     ClusterManagement.Start_Members_From_List_Or_All
index 52aa8706eaf0cdbc1cf88d8ed187dd7901417fa5..c3030f95d982987960703cd2cb1122440811b856 100644 (file)
@@ -1,17 +1,20 @@
 *** Settings ***
-Documentation     Test Suite for Service Recovery.
-...               Find detailed test plan here, http://docs.opendaylight.org/en/latest/submodules/genius/docs/testplans/service-recovery.html
-Suite Setup       Genius.SRM Start Suite
-Suite Teardown    Genius.SRM Stop Suite
-Test Setup        Genius Test Setup
-Test Teardown     Genius Test Teardown    ${data_models}
-Resource          ../../libraries/DataModels.robot
-Resource          ../../libraries/Genius.robot
-Resource          ../../libraries/OVSDB.robot
-Resource          ../../libraries/Utils.robot
-Resource          ../../libraries/VpnOperations.robot
-Resource          ../../variables/Variables.robot
-Variables         ../../variables/genius/Modules.py
+Documentation       Test Suite for Service Recovery.
+...                 Find detailed test plan here, http://docs.opendaylight.org/en/latest/submodules/genius/docs/testplans/service-recovery.html
+
+Resource            ../../libraries/DataModels.robot
+Resource            ../../libraries/Genius.robot
+Resource            ../../libraries/OVSDB.robot
+Resource            ../../libraries/Utils.robot
+Resource            ../../libraries/VpnOperations.robot
+Resource            ../../variables/Variables.robot
+Variables           ../../variables/genius/Modules.py
+
+Suite Setup         Genius.SRM Start Suite
+Suite Teardown      Genius.SRM Stop Suite
+Test Setup          Genius Test Setup
+Test Teardown       Genius Test Teardown    ${data_models}
+
 
 *** Test Cases ***
 ITM TZ Recovery
@@ -28,7 +31,12 @@ ITM TEP Recovery
 
 ITM Service Recovery
     [Documentation]    This test case recovers ITM Service.
-    ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds    40    20    Genius.Get Tunnel    ${DPN_ID_LIST[0]}    ${DPN_ID_LIST[1]}
+    ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    20
+    ...    Genius.Get Tunnel
+    ...    ${DPN_ID_LIST[0]}
+    ...    ${DPN_ID_LIST[1]}
     ...    odl-interface:tunnel-type-vxlan
     Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/ietf-interfaces:interfaces/interface/${tunnel}
     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Delete on DS    ${tunnel}
@@ -37,7 +45,12 @@ ITM Service Recovery
 
 IFM Instance Recovery
     [Documentation]    This test case recovers tunnel interface instance using interface name.
-    ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds    40    20    Genius.Get Tunnel    ${DPN_ID_LIST[0]}    ${DPN_ID_LIST[1]}
+    ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    20
+    ...    Genius.Get Tunnel
+    ...    ${DPN_ID_LIST[0]}
+    ...    ${DPN_ID_LIST[1]}
     ...    odl-interface:tunnel-type-vxlan
     Delete Tunnel on OVS
     KarafKeywords.Issue Command On Karaf Console    srm:recover INSTANCE IFM-IFACE ${tunnel}
@@ -45,20 +58,33 @@ IFM Instance Recovery
 
 IFM Service Recovery
     [Documentation]    This test case recovers IFM Service.
-    ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds    40    20    Genius.Get Tunnel    ${DPN_ID_LIST[0]}    ${DPN_ID_LIST[1]}
+    ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    20
+    ...    Genius.Get Tunnel
+    ...    ${DPN_ID_LIST[0]}
+    ...    ${DPN_ID_LIST[1]}
     ...    odl-interface:tunnel-type-vxlan
     SSHLibrary.Switch Connection    ${TOOLS_SYSTEM_ALL_CONN_IDS[0]}
     ${uuid}    ${bridge} =    OVSDB.Get Bridge Data
-    ${resp} =    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${uuid}%2Fbridge%2F${bridge}
+    ${resp} =    RequestsLibrary.Delete Request
+    ...    session
+    ...    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${uuid}%2Fbridge%2F${bridge}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    ${RESP_CODE}
     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Delete on DS    ${tunnel}
     KarafKeywords.Issue Command On Karaf Console    srm:recover SERVICE IFM
     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
 
+
 *** Keywords ***
 Delete Tunnel on OVS
     [Documentation]    Deletes a tunnel interface on switch and verify deletion on OVS.
-    ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds    40    20    Genius.Get Tunnel    ${DPN_ID_LIST[0]}    ${DPN_ID_LIST[1]}
+    ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    40
+    ...    20
+    ...    Genius.Get Tunnel
+    ...    ${DPN_ID_LIST[0]}
+    ...    ${DPN_ID_LIST[1]}
     ...    odl-interface:tunnel-type-vxlan
     Utils.Run Command On Remote System    ${TOOLS_SYSTEM_1_IP}    sudo ovs-vsctl del-port ${tunnel}
     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Delete on DS    ${tunnel}