Make hold time configurable via Robot variable
authorJozef Behran <jbehran@cisco.com>
Tue, 25 Aug 2015 05:57:22 +0000 (07:57 +0200)
committerJozef Behran <jbehran@cisco.com>
Tue, 25 Aug 2015 06:01:07 +0000 (08:01 +0200)
The default value for hold time is 180 seconds. If that is
not desired, another value can be passed via the ROBOT
variable HOLDTIME.

Change-Id: I21ee13d4a7810936a5de7b7f0b5d56ec904fa1fe
Signed-off-by: Jozef Behran <jbehran@cisco.com>
test/csit/suites/bgpcep/bgpuser/cases.robot
test/csit/variables/bgpuser/bgp_peer/data.xml

index 683770ab53850b32e8c90c7550566b818b8e5c2d..43f14ddaadbf76a3b56ae4be607852e1ddadc3ba 100644 (file)
@@ -30,6 +30,7 @@ Resource          ${CURDIR}/../../../libraries/Utils.robot
 ${directory_for_actual_responses}    ${TEMPDIR}/actual
 ${directory_for_expected_responses}    ${TEMPDIR}/expected
 ${directory_with_template_folders}    ${CURDIR}/../../../variables/bgpuser/
+${HOLDTIME}    180
 
 *** Test Cases ***
 Check_For_Empty_Topology_Before_Talking
@@ -40,7 +41,7 @@ Check_For_Empty_Topology_Before_Talking
 
 Reconfigure_ODL_To_Accept_Connection
     [Documentation]    Configure BGP peer module with initiate-connection set to false.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'IP': '${MININET}', 'INITIATE': 'false'}
+    ${template_as_string}=    BuiltIn.Set_Variable    {'IP': '${MININET}', 'HOLDTIME': '${HOLDTIME}', 'INITIATE': 'false'}
     Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}bgp_peer    ${template_as_string}
 
 Start_Talking_BGP_speaker
@@ -94,7 +95,7 @@ Check_For_Empty_Topology_Before_Listening
 
 Reconfigure_ODL_To_Initiate_Connection
     [Documentation]    Replace BGP peer config module, now with initiate-connection set to true.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'IP': '${MININET}', 'INITIATE': 'true'}
+    ${template_as_string}=    BuiltIn.Set_Variable    {'IP': '${MININET}', 'HOLDTIME': '${HOLDTIME}', 'INITIATE': 'true'}
     Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}bgp_peer    ${template_as_string}
 
 Check_Listening_Connection_Is_Established
index f0dad991243bf0580215b86b2d57c57fab592177..1bf8c6ef220ee3ce6acc0111d93519c082846d58 100644 (file)
@@ -3,7 +3,7 @@
     <name>example-bgp-peer</name>
     <host xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$IP</host>
     <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">17900</port>
-    <holdtimer xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">180</holdtimer>
+    <holdtimer xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$HOLDTIME</holdtimer>
     <initiate-connection xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$INITIATE</initiate-connection>
     <rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
         <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg">prefix:rib</type>