Adjust PCEP module names
[integration/test.git] / csit / suites / bgpcep / throughpcep / cases.robot
index 96d77298bcea844c48ba0e89191aa02d796587c6..c92c16b595225d85abc72a89a13645f1fba9a5d1 100644 (file)
@@ -1,41 +1,41 @@
 *** Settings ***
 Documentation     PCEP performance suite, uses restconf with configurable authentication.
-...
+...           
 ...               Copyright (c) 2015 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
-...
-...
+...           
+...           
 ...               General Overview:
-...
+...           
 ...               This is a suite which has both scale and performance aspects.
 ...               Given scale target, suite reports failures if functional error
 ...               is detected, or if various time limits expire.
 ...               For passing test cases, their duration is the performance metric.
-...
+...           
 ...               ODL acts as a translation layer between PCEP capable devices
 ...               and users employing RESTCONF.
 ...               Performance measurement focuses on two different workflows.
-...
+...           
 ...               The first workflow is initial synchronization, when ODL learns
 ...               the state of PCEP topology as devices connect to it,
 ...               while restconf user reads the state repeatedly.
 ...               The second workflow is mass update, when restconf users issue RPCs
 ...               to updale Layer Switched Paths on Path Computation Clients.
-...
+...           
 ...               This suite uses pcc-mock (downloaded from Nexus) to simulate PCCs.
 ...               It needs segment of bindable IP addresses,
 ...               one for each simulated PCC; so running pcc-mock from remote machine
 ...               is only viable when just single PCC is simulated.
 ...               Testing with multiple PCCs works best when pcc-mock
 ...               runs on the same VM as ODL, so 127.0.0.0/8 subnet can be used.
-...
+...           
 ...               Library AuthStandalone is used directly for restconf reads
 ...               in the first workflow. That library transparently handles several
 ...               http authentication methods, based on credentials and pybot arguments.
-...
+...           
 ...               In the second workflow, updater.py utility is used for issuing
 ...               rapid restconf requests. It can use multiple worker threads,
 ...               as http requests are blocking.
@@ -45,10 +45,10 @@ Documentation     PCEP performance suite, uses restconf with configurable authen
 ...               being more limiting factor than CPU).
 ...               This suite starts updater utility bound to single CPU,
 ...               as this setup was the most performant in other tests.
-...
+...           
 ...               In case of failed test case, other tests are skipped (unless
 ...               this is overriden by [Setup]) to finish test run sooner.
-...
+...           
 ...               Variables and test case names refer to Controller(ODL_SYSTEM) and Mininet
 ...               (TOOLS_SYSTEM), those are assumed to be separate remote VMs, one to host ODL,
 ...               other to host tools.
@@ -57,25 +57,26 @@ Documentation     PCEP performance suite, uses restconf with configurable authen
 ...               values as default.
 ...               If both updater VM and pcc-mock VM parameters are specified,
 ...               Mininet(TOOLS_SYSTEM) parameters may be skipped.
-...
+...               Variable ${USE_TOOLS_SYSTEM} decides the pcc-mock running machine.
+...           
 ...               Some launch scripts put restrictions on how pybot options
 ...               can be specified, so there are utility variables to help with
 ...               copying Controller related value to apply fo updater of pccmock.
 ...               Having a tool co-located with ODL reduces network latency,
 ...               but puts more pressure on CPU and memory on Controller VM.
-...
+...           
 ...               In some environments, issues with TIME-WAIT prevent high restconf rates,
 ...               so TCP reuse is temporarily allowed during the suite run, if possible
 ...               (and if not disabled by UPDATERVM_ENABLE_TCP_RW_REUSE option value).
 ...               See http://vincent.bernat.im/en/blog/2014-tcp-time-wait-state-linux.html
 ...               This suite ignores possible failures when changing reuse.
-...
+...           
 ...               Similarly, in some environments, handling of requests.Session object matters
 ...               try changing RESTCONF_REUSE value to see if it helps.
-...
+...           
 ...               Variables to override (only if needed) in pybot command:
 ...               (Look into Variables table to see the default values.)
-...
+...           
 ...               FIRST_PCC_IP: Set in case bind address is different from public pcc-mock VM address.
 ...               LOG_NAME: Filename (without path) to save pcc-mock output into.
 ...               LOG_PATH: Override if not the same as pccmock VM workspace.
@@ -113,25 +114,34 @@ Suite Setup       FailFast.Do_Not_Fail_Fast_From_Now_On
 Suite Teardown    Disconnect
 Test Setup        FailFast.Fail_This_Fast_On_Previous_Error
 Test Teardown     FailFast.Start_Failing_Fast_If_This_Failed
-Variables         ${CURDIR}/../../../variables/Variables.robot
 Library           SSHLibrary    timeout=10s
 Library           RequestsLibrary
 Library           ${CURDIR}/../../../libraries/AuthStandalone.py
+Resource          ${CURDIR}/../../../variables/Variables.robot
+Resource          ${CURDIR}/../../../libraries/BGPcliKeywords.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/NexusKeywords.robot    # for Deploy_Artifact
-Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot    # for Require_* and Assure_*
-Resource          ${CURDIR}/../../../libraries/Utils.robot    # for Flexible_SSH_Login
+Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot    # for Require_* and Assure_*, Flexible_SSH_Login
 
 *** Variables ***
+# This Variable decides the pcc mock to run in ODL system or tools system.
+${USE_TOOLS_SYSTEM}    False
 # This table acts as an exhaustive list of variables users can modify on pybot invocation.
 # It also contains commented-out lines for variables defined elswhere.
 # Keep this list in alphabetical order.
+${BLOCKING-THREAD}    1
+${DELAY_TIME}     10
 ${FIRST_PCC_IP}    ${PCCMOCKVM_IP}
 # ${LOG_FILE} is reserved for location of pybot-created log.html
+${INIT_PCC_DEVICE_COUNT}    ${100}
 ${LOG_NAME}       throughpcep.log
 ${LOG_PATH}       ${PCCMOCKVM_WORKSPACE}
 ${LSPS}           65535
+#Reduced max pcc device count to 100 for BGPCEP-901
+${MAX_PCC_DEVICE_COUNT}    ${100}
 ${ODL_SYSTEM_WORKSPACE}    /tmp
+${PARALLEL_ITERATION}    10
+${PCC_DEVICE_INCREMENT}    ${50}
 ${PCCDOWNLOAD_HOSTHEADER}    nexus.opendaylight.org
 ${PCCDOWNLOAD_URLBASE}    http://${PCCDOWNLOAD_HOSTHEADER}/content/repositories/opendaylight.snapshot/org/opendaylight/bgpcep/pcep-pcc-mock/
 ${PCCMOCK_COLOCATED}    False
@@ -143,14 +153,16 @@ ${PCCMOCKVM_WORKSPACE}    ${TOOLS_SYSTEM_WORKSPACE}
 ${PCCS}           1
 ${PCEP_READY_VERIFY_TIMEOUT}    300s
 # Yes, the default timeout is 5 minutes, as this suite might be started eagerly just after ODL starts booting up.
-${RESTCONF_PASSWORD}    ${PWD}    # from Variables.py
+${RESTCONF_PASSWORD}    ${PWD}    # from Variables.robot
 ${RESTCONF_REUSE}    True
 ${RESTCONF_SCOPE}    ${EMPTY}
-${RESTCONF_USER}    ${USER}    # from Variables.py
+${RESTCONF_USER}    ${USER}    # from Variables.robot
+${SEQUENTIAL_ITERATION}    15
 ${TOOLS_SYSTEM_WORKSPACE}    /tmp
 ${UPDATER_COLOCATED}    False
 ${UPDATER_ODLADDRESS}    ${ODL_SYSTEM_IP}
 ${UPDATER_REFRESH}    0.1
+# Updater timeout is overwritten in releng/builder
 ${UPDATER_TIMEOUT}    300
 ${UPDATERVM_ENABLE_TCP_RW_REUSE}    True
 ${UPDATERVM_IP}    ${TOOLS_SYSTEM_IP}
@@ -159,15 +171,16 @@ ${UPDATERVM_PROMPT}    ${TOOLS_SYSTEM_PROMPT}
 ${UPDATERVM_USER}    ${TOOLS_SYSTEM_USER}
 ${UPDATERVM_WORKSPACE}    ${TOOLS_SYSTEM_WORKSPACE}
 
-*** TestCases ***
+*** Test Cases ***
 Download_Pcc_Mock
     [Documentation]    SSH login to pcc-mock VM, download latest pcc-mock executable from Nexus.
+    [Setup]    Select_MOCK_Machine
     BuiltIn.Run_Keyword_If    ${PCCMOCK_COLOCATED}    Pccmock_From_Controller
     NexusKeywords.Initialize_Artifact_Deployment_And_Usage    tools_system_connect=False
     SSHLibrary.Open_Connection    ${PCCMOCKVM_IP}    alias=pccmock
     SSHLibrary.Set_Client_Configuration    timeout=10s
     SSHLibrary.Set_Client_Configuration    prompt=${PCCMOCKVM_PROMPT}
-    Utils.Flexible_SSH_Login    ${PCCMOCKVM_USER}    ${PCCMOCKVM_PASSWORD}    delay=4s
+    SSHKeywords.Flexible_SSH_Login    ${PCCMOCKVM_USER}    ${PCCMOCKVM_PASSWORD}    delay=4s
     ${file_name} =    NexusKeywords.Deploy_Test_Tool    bgpcep    pcep-pcc-mock
     BuiltIn.Set_Suite_Variable    ${mock_location}    ${file_name}
 
@@ -177,7 +190,7 @@ Put_Updater
     SSHLibrary.Open_Connection    ${UPDATERVM_IP}    alias=updater
     SSHLibrary.Set_Client_Configuration    timeout=20s
     SSHLibrary.Set_Client_Configuration    prompt=${UPDATERVM_PROMPT}
-    Utils.Flexible_SSH_Login    ${UPDATERVM_USER}    ${UPDATERVM_PASSWORD}    delay=4s
+    SSHKeywords.Flexible_SSH_Login    ${UPDATERVM_USER}    ${UPDATERVM_PASSWORD}    delay=4s
     SSHKeywords.Require_Python
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/pcep_updater/updater.py    ${UPDATERVM_WORKSPACE}/
     SSHLibrary.Put_File    ${CURDIR}/../../../libraries/AuthStandalone.py    ${UPDATERVM_WORKSPACE}/
@@ -207,19 +220,10 @@ Topology_Precondition
     Builtin.Wait_Until_Keyword_Succeeds    ${PCEP_READY_VERIFY_TIMEOUT}    1s    Pcep_Off
     # Yes, timeout is 5 minutes, as this suite might be started eagerly just after ODL starts booting up.
 
-Start_Pcc_Mock
-    [Documentation]    Launch pcc-mock on background so simulated PCCs start connecting to controller.
-    SSHLibrary.Switch_Connection    pccmock
-    ${command} =    NexusKeywords.Compose_Full_Java_Command    -jar ${mock_location} --local-address ${FIRST_PCC_IP} --remote-address ${ODL_SYSTEM_IP} --pcc ${PCCS} --lsp ${LSPS} &> ${LOG_PATH}/${LOG_NAME}
-    BuiltIn.Log    ${command}
-    SSHLibrary.Write    ${command}
-    # The pccmock SSH session is left alive, but no data will be exchanged for a while.
-    # We need this connection to stay alive to send ctrl+c later.
-    # SSHLibrary.Start_Command would not do that for us.
-
 Topology_Intercondition
     [Documentation]    Verify that within timeout, PCEP topology contains correct numbers of LSPs.
     [Tags]    critical
+    [Setup]    Start_Pcc_Mock
     ${localsize} =    Evaluate    int(${PCCS})*int(${LSPS})
     Builtin.Set_Suite_Variable    ${size}    ${localsize}
     BuiltIn.Log    ${size}
@@ -229,7 +233,7 @@ Topology_Intercondition
 Updater_1
     [Documentation]    Run updater tool to change hops, using 1 blocking http thread.
     [Tags]    critical
-    Updater    1
+    Updater    1    1
     [Teardown]    Do_Not_Start_Failing_If_This_Failed
 
 Verify_1
@@ -240,7 +244,7 @@ Verify_1
 Updater_2
     [Documentation]    Run updater tool to change hops again, using 2 blocking http threads.
     [Tags]    critical
-    Updater    2
+    Updater    2    1
     [Teardown]    Do_Not_Start_Failing_If_This_Failed
 
 Verify_2
@@ -251,7 +255,7 @@ Verify_2
 Updater_3
     [Documentation]    Run updater tool to change hops again, using 4 blocking http threads.
     [Tags]    critical
-    Updater    3
+    Updater    3    4
     [Teardown]    Do_Not_Start_Failing_If_This_Failed
 
 Verify_3
@@ -262,7 +266,7 @@ Verify_3
 Updater_4
     [Documentation]    Run updater tool to change hops again, using 8 blocking http threads.
     [Tags]    critical
-    Updater    4
+    Updater    4    8
     [Teardown]    Do_Not_Start_Failing_If_This_Failed
 
 Verify_4
@@ -273,7 +277,7 @@ Verify_4
 Updater_5
     [Documentation]    Run updater tool to change hops again, using 16 blocking http threads.
     [Tags]    critical
-    Updater    5
+    Updater    5    16
     [Teardown]    Do_Not_Start_Failing_If_This_Failed
 
 Verify_5
@@ -284,7 +288,7 @@ Verify_5
 Updater_6
     [Documentation]    Run updater tool to change hops again, using 32 blocking http threads.
     [Tags]    critical
-    Updater    6
+    Updater    6    32
     [Teardown]    Do_Not_Start_Failing_If_This_Failed
 
 Verify_6
@@ -295,7 +299,7 @@ Verify_6
 Updater_7
     [Documentation]    Run updater tool to change hops again, using 64 blocking http threads.
     [Tags]    critical
-    Updater    7
+    Updater    7    64
     [Teardown]    Do_Not_Start_Failing_If_This_Failed
 
 Verify_7
@@ -306,7 +310,7 @@ Verify_7
 Updater_8
     [Documentation]    Run updater tool to change hops again, using 128 blocking http threads.
     [Tags]    critical
-    Updater    8
+    Updater    8    128
     [Teardown]    Do_Not_Start_Failing_If_This_Failed
 
 Verify_8
@@ -317,7 +321,7 @@ Verify_8
 Updater_9
     [Documentation]    Run updater tool to change hops again, using 256 blocking http threads.
     [Tags]    critical
-    Updater    9
+    Updater    9    256
     [Teardown]    Do_Not_Start_Failing_If_This_Failed
 
 Verify_9
@@ -328,7 +332,7 @@ Verify_9
 Updater_10
     [Documentation]    Run updater tool to change hops again, using 512 blocking http threads.
     [Tags]    critical
-    Updater    10
+    Updater    10    512
     [Teardown]    Do_Not_Start_Failing_If_This_Failed
 
 Verify_10
@@ -336,28 +340,48 @@ Verify_10
     [Tags]    critical
     Verify    10
 
+Updater_with delegate
+    [Documentation]    Run updater tool to revoke the delegate for the given hop, using 1 blocking http thread.
+    [Tags]    critical
+    Updater    10    1    127.1.0.0    ${PCCS}    ${LSPS}    True    false    127.1.0.1    2
+    Verify    10
+    [Teardown]    Do_Not_Start_Failing_If_This_Failed
+
 Stop_Pcc_Mock
     [Documentation]    Send ctrl+c to pcc-mock, see prompt again within timeout.
     [Setup]    Run_Even_When_Failing_Fast
-    # TODO: This should be in a library similar to BGPSpeaker.robot
     SSHLibrary.Switch_Connection    pccmock
-    # FIXME: send_ctrl should be in some library.
-    ${command} =    BuiltIn.Evaluate    chr(int(3))
-    BuiltIn.Log    ${command}
-    SSHLibrary.Write    ${command}
-    ${response} =    SSHLibrary.Read_Until_Prompt
-    BuiltIn.Log    ${response}
+    BGPcliKeywords.Stop_Console_Tool_And_Wait_Until_Prompt
+    [Teardown]    Run Keywords    Kill all pcc mock simulator processes    AND    Builtin.Wait_Until_Keyword_Succeeds    ${PCEP_READY_VERIFY_TIMEOUT}    5s    Pcep_Off
+
+PCEP Sessions Flapped with LSP updates
+    [Documentation]    Flapping PCEP sessions and perform LSP updates within flapping
+    Run Keyword If    '${USE_TOOLS_SYSTEM}' == 'True'    BuiltIn.Pass Execution    Pcc Mock should not run in ODL System
+    FOR    ${devices}    IN RANGE    ${INIT_PCC_DEVICE_COUNT}    ${MAX_PCC_DEVICE_COUNT+1}    ${PCC_DEVICE_INCREMENT}
+        Flap Pcc Mock sessions continuously with LSP updates    127.1.0.0    ${devices}    150
+    END
+    [Teardown]    Run Keywords    Kill all pcc mock simulator processes    AND    BGPcliKeywords.Stop_Console_Tool_And_Wait_Until_Prompt
+
+PCEP Sessions Flapped alongside LSP updates
+    [Documentation]    Flapping PCEP sessions and perform LSP updates alongside flapping
+    Run Keyword If    '${USE_TOOLS_SYSTEM}' == 'True'    BuiltIn.Pass Execution    Pcc Mock should not run in ODL System
+    FOR    ${devices}    IN RANGE    ${INIT_PCC_DEVICE_COUNT}    ${MAX_PCC_DEVICE_COUNT+1}    ${PCC_DEVICE_INCREMENT}
+        Flap Pcc Mock sessions parallelly with LSP updates    127.1.0.0    ${devices}    150
+        BGPcliKeywords.Stop_Console_Tool_And_Wait_Until_Prompt
+    END
+    [Teardown]    Run Keywords    Kill all pcc mock simulator processes    AND    BGPcliKeywords.Stop_Console_Tool_And_Wait_Until_Prompt
 
 Download_Pccmock_Log
     [Documentation]    Transfer pcc-mock output from pcc-mock VM to robot VM.
     [Setup]    Run_Even_When_Failing_Fast
-    SSHLibrary.Get_File    ${LOG_PATH}/${LOG_NAME}    ${LOG_NAME}
+    SSHLibrary.Execute Command    zip ${LOG_PATH}/mock_log.zip /tmp/throughpcep*
+    SSHLibrary.Get_File    ${LOG_PATH}/mock_log.zip    mock_log.zip
 
 Topology_Postcondition
     [Documentation]    Verify that within timeout, PCEP topology contains no PCCs again.
     [Tags]    critical
     [Setup]    Run_Even_When_Failing_Fast
-    Builtin.Wait_Until_Keyword_Succeeds    30s    1s    Pcep_Off_Again
+    Builtin.Wait_Until_Keyword_Succeeds    90s    5s    Pcep_Off_Again
 
 Restore_Tcp_Rw_Reuse
     [Documentation]    If requested, restore the old value if enabling TCP reuse was successful on Updater VM.
@@ -369,6 +393,22 @@ Restore_Tcp_Rw_Reuse
     BuiltIn.Should_Be_Equal    ${rc}    ${0}
 
 *** Keywords ***
+Select_MOCK_Machine
+    [Documentation]    Check the tools system variable and assigns the PCC Mock
+    Run Keyword If    '${USE_TOOLS_SYSTEM}' == 'False'    Run Keywords    Pccmock_From_Odl_System    AND    Updater_From_Odl_System
+    BuiltIn.Set_Suite_Variable    ${FIRST_PCC_IP}    ${PCCMOCKVM_IP}
+
+Start_Pcc_Mock
+    [Arguments]    ${mock-ip}=${FIRST_PCC_IP}    ${pccs}=${PCCS}    ${lsps}=${LSPS}    ${log_name}=${LOG_NAME}
+    [Documentation]    Launch pcc-mock on background so simulated PCCs start connecting to controller.
+    SSHLibrary.Switch_Connection    pccmock
+    ${command} =    NexusKeywords.Compose_Full_Java_Command    -jar ${mock_location} --local-address ${mock-ip} --remote-address ${ODL_SYSTEM_IP} --pcc ${pccs} --lsp ${lsps} &> ${LOG_PATH}/${log_name}
+    BuiltIn.Log    ${command}
+    SSHLibrary.Write    ${command}
+    # The pccmock SSH session is left alive, but no data will be exchanged for a while.
+    # We need this connection to stay alive to send ctrl+c later.
+    # SSHLibrary.Start_Command would not do that for us.
+
 Pccmock_From_Odl_System
     [Documentation]    Copy Odl_System values to Pccmock VM variables.
     BuiltIn.Set_Suite_Variable    ${PCCMOCKVM_IP}    ${ODL_SYSTEM_IP}
@@ -434,26 +474,91 @@ Set_Hop
     BuiltIn.Log    ${hop}
 
 Updater
-    [Arguments]    ${iteration}
+    [Arguments]    ${iteration}    ${workers}    ${mock-ip}=${FIRST_PCC_IP}    ${pccs}=${PCCS}    ${lsps}=${LSPS}    ${parallel}=False    ${delegate}=true    ${pccip}=${none}    ${tunnel_no}=${none}
     [Documentation]    Compute number of workers, call updater.py, assert its response.
     SSHLibrary.Switch_Connection    pccmock
     # In some systems, inactive SSH sessions get severed.
     ${command} =    BuiltIn.Set_Variable    echo "still alive"
     ${output} =    SSHLibrary.Execute_Command    bash -c '${command}'
     # The previous line relies on a fact that Execute_Command spawns separate shels, so running pcc-mock is not affected.
-    ${workers} =    Evaluate    2**int(${iteration} - 1)
-    # TODO: Provide ${workers} explicitly as an argument to avoid math?
-    BuiltIn.Log    ${workers}
     Set_Hop    ${iteration}
     SSHLibrary.Switch_Connection    updater
-    ${response} =    SSHLibrary.Execute_Command    bash -c "cd ${UPDATERVM_WORKSPACE}; taskset 0x00000001 python updater.py --workers '${workers}' --odladdress '${UPDATER_ODLADDRESS}' --user '${RESTCONF_USER}' --password '${RESTCONF_PASSWORD}' --scope '${RESTCONF_SCOPE}' --pccaddress '${FIRST_PCC_IP}' --pccs '${PCCS}' --lsps '${LSPS}' --hop '${hop}' --timeout '${UPDATER_TIMEOUT}' --refresh '${UPDATER_REFRESH}' --reuse '${RESTCONF_REUSE}' 2>&1"
+    ${response} =    SSHLibrary.Execute_Command    bash -c "cd ${UPDATERVM_WORKSPACE}; taskset 0x00000001 python updater.py --workers '${workers}' --odladdress '${UPDATER_ODLADDRESS}' --user '${RESTCONF_USER}' --password '${RESTCONF_PASSWORD}' --scope '${RESTCONF_SCOPE}' --pccaddress '${mock-ip}' --pccs '${pccs}' --lsps '${lsps}' --hop '${hop}' --timeout '${UPDATER_TIMEOUT}' --refresh '${UPDATER_REFRESH}' --reuse '${RESTCONF_REUSE}' --delegate '${delegate}' --pccip '${pccip}' --tunnelnumber '${tunnel_no}' 2>&1"
+    Check Updater response    ${response}    ${parallel}
+
+Check Updater response
+    [Arguments]    ${response}    ${parallel}
     BuiltIn.Log    ${response}
-    ${expected} =    BuiltIn.Set_Variable    Counter({'pass': ${size}})
-    BuiltIn.Log    ${expected}
-    BuiltIn.Should_Contain    ${response}    ${expected}
+    ${expected_value_continuous_execution} =    BuiltIn.Set_Variable    Counter({'pass': ${size}})
+    ${not_expected_value_for_parallel_execution} =    BuiltIn.Set_Variable    Counter({'pass': 0})
+    BuiltIn.Log    ${expected_value_continuous_execution}
+    Run Keyword If    '${parallel}' == 'False'    BuiltIn.Should_Contain    ${response}    ${expected_value_continuous_execution}
+    ...    ELSE    BuiltIn.Should_Not_Contain    ${response}    ${not_expected_value_for_parallel_execution}
 
 Verify
     [Arguments]    ${iteration}
     [Documentation]    Set hop and verify that within timeout, all LSPs in topology are updated.
     Set_Hop    ${iteration}
     Builtin.Wait_Until_Keyword_Succeeds    30s    1s    Pcep_On
+
+Flap Pcc Mock sessions continuously with LSP updates
+    [Arguments]    ${mock-ip}=${FIRST_PCC_IP}    ${pccs}=${PCCS}    ${lsps}=${LSPS}
+    ${localsize} =    Evaluate    int(${pccs})*int(${lsps})
+    Builtin.Set_Suite_Variable    ${size}    ${localsize}
+    ${workers} =    Set Variable    ${BLOCKING-THREAD}
+    FOR    ${i}    IN RANGE    ${SEQUENTIAL_ITERATION}
+        ${workers} =    Evaluate    ${workers}*${workers}
+        Set_Hop    0
+        Builtin.Wait_Until_Keyword_Succeeds    ${PCEP_READY_VERIFY_TIMEOUT}    5s    Pcep_Off
+        Start_Pcc_Mock    ${mock-ip}    ${pccs}    ${lsps}    serial_execution.log
+        Builtin.Wait_Until_Keyword_Succeeds    60s    5s    Pcep_On
+        ${i} =    Evaluate    ${i}+1
+        Updater    ${i}    ${workers}    127.1.0.0    ${pccs}    ${lsps}
+        Verify    ${i}
+        SSHLibrary.Switch_Connection    pccmock
+        BGPcliKeywords.Stop_Console_Tool_And_Wait_Until_Prompt
+    END
+    Check PCEP is stable
+
+Flap Pcc Mock sessions parallelly with LSP updates
+    [Arguments]    ${mock-ip}=${FIRST_PCC_IP}    ${pccs}=${PCCS}    ${lsps}=${LSPS}
+    SSHLibrary.Switch_Connection    pccmock
+    SSHLibrary.Put File    ${CURDIR}/../../../../tools/pcep_updater/mock.sh    /tmp/mock.sh
+    Set_Hop    0
+    Builtin.Wait_Until_Keyword_Succeeds    ${PCEP_READY_VERIFY_TIMEOUT}    5s    Pcep_Off
+    SSHLibrary.Start Command    sh /tmp/mock.sh ${mock_location} ${mock-ip} ${ODL_SYSTEM_IP} ${pccs} ${lsps} parallel_Execution ${DELAY_TIME} &>1
+    FOR    ${i}    IN RANGE    ${PARALLEL_ITERATION}
+        ${pid} =    SSHLibrary.Execute Command    ps -fu ${ODL_SYSTEM_USER} | grep "/home/${ODL_SYSTEM_USER}/${mock_location}" | grep -v "grep" | awk '{print $2}'
+        Run Keyword If    '${pid}'!= ""    Log    ${pid}
+        ${i} =    Evaluate    ${i}+1
+        Run Keyword If    '${pid}'!= ""    Updater    ${i}    1    127.1.0.0    ${pccs}    ${lsps}    True
+    END
+    BGPcliKeywords.Stop_Console_Tool_And_Wait_Until_Prompt
+    Kill all pcc mock simulator processes
+    Check PCEP is stable
+
+Check PCEP is stable
+    [Documentation]    Check PCEP topology with default pcc and lsp values
+    ${localsize} =    Evaluate    int(${PCCS})*int(${LSPS})
+    Builtin.Set_Suite_Variable    ${size}    ${localsize}
+    Builtin.Wait_Until_Keyword_Succeeds    90s    5s    Pcep_Off_Again
+    Start_Pcc_Mock
+    Builtin.Wait_Until_Keyword_Succeeds    60s    5s    Pcep_On
+    Updater    2    1
+    Verify    2
+    SSHLibrary.Switch_Connection    pccmock
+    BGPcliKeywords.Stop_Console_Tool_And_Wait_Until_Prompt
+
+Kill all pcc mock simulator processes
+    SSHLibrary.Switch_Connection    pccmock
+    ${mock_pid}    Get pid    /home/${ODL_SYSTEM_USER}/${mock_location}
+    SSHLibrary.Execute_Command    kill -9 ${mock_pid}
+    ${script_pid_1}    Get pid    bash -c sh /tmp/mock.sh
+    SSHLibrary.Execute_Command    kill -9 ${script_pid_1}
+    ${script_pid_2}    Get pid    sh /tmp/mock.sh
+    SSHLibrary.Execute_Command    kill -9 ${script_pid_2}
+
+Get pid
+    [Arguments]    ${process_name}
+    ${pid} =    SSHLibrary.Execute Command    ps -fu ${ODL_SYSTEM_USER} | grep "${process_name}" | grep -v "grep" | awk '{print $2}'
+    [Return]    ${pid}