updating bgpingest suites to support openconfig for carbon 11/48311/9
authorPeter Gubka <pgubka@cisco.com>
Mon, 14 Nov 2016 11:22:11 +0000 (12:22 +0100)
committerLuis Gomez <ecelgp@gmail.com>
Fri, 18 Nov 2016 15:29:48 +0000 (15:29 +0000)
the support of openconfig in carbon happenes on getting the content
for PUT(or any other rest) messages inside TemplatedRequests

in the csit/variables/bgpuser|bgpingest are already direcotries such as
bgp_peer or bgp_peer.boron. TempletedRequests will take the rest requests
contetnt from appropriate directory. For default directories (applied for
carbon) openconfig is used. For directory.B|Be netconfconnector is used.

Simple change of ConfigViaRestonf towards TempletedRequests makes the suite
ready for openconfig.

Change-Id: I99cd2be0bf94b4234473af5f38e654c5bbaa9a9e
Signed-off-by: Peter Gubka <pgubka@cisco.com>
15 files changed:
csit/libraries/ChangeCounter.robot
csit/suites/bgpcep/bgpingest/bgp_app_peer_prefixcount.robot
csit/suites/bgpcep/bgpingest/manypeers_changecount.robot
csit/suites/bgpcep/bgpingest/manypeers_peercount.robot
csit/suites/bgpcep/bgpingest/manypeers_prefixcount.robot
csit/suites/bgpcep/bgpingest/singlepeer_changecount.robot
csit/suites/bgpcep/bgpingest/singlepeer_prefixcount.robot
csit/variables/bgpuser/change_counter.beryllium/data.xml [moved from csit/variables/bgpuser/change_counter/data.xml.beryllium with 100% similarity]
csit/variables/bgpuser/change_counter.beryllium/location.uri [new file with mode: 0644]
csit/variables/bgpuser/change_counter.boron/data.xml [moved from csit/variables/bgpuser/change_counter/data.xml.stable-lithium with 79% similarity]
csit/variables/bgpuser/change_counter.boron/location.uri [new file with mode: 0644]
csit/variables/bgpuser/change_counter/config.uri.beryllium [deleted file]
csit/variables/bgpuser/change_counter/config.uri.boron [deleted file]
csit/variables/bgpuser/change_counter/config.uri.stable-lithium [deleted file]
csit/variables/bgpuser/change_counter/location.uri [new file with mode: 0644]

index e2f1bf99773ed29d727a932d92ab3fe72f55af5c..c2c7d116b53742a0b88583b6641a588594d2a6ca 100644 (file)
@@ -8,11 +8,11 @@ Documentation     Robot keyword library (Resource) for common handling of data c
 ...               and is available at http://www.eclipse.org/legal/epl-v10.html
 ...
 ...
-...               This resource assumes that RequestsLibrary has open a connection named "operational"
-...               which points to (an analogue of) http://${ODL_SYSTEM_IP}:${RESTCONFPORT}/${OPERATIONAL_API}
+...               This resource creates a "default" session using TemplatedRequests.Create_Default_Session
+...               which points to (an analogue of) http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
 Library           RequestsLibrary
-Resource          ${CURDIR}/ConfigViaRestconf.robot
 Resource          ${CURDIR}/ScalarClosures.robot
+Resource          ${CURDIR}/TemplatedRequests.robot
 Resource          ${CURDIR}/WaitUtils.robot
 
 *** Variables ***
@@ -21,7 +21,7 @@ ${CHANGE_COUNTER_TEMPLATE_FOLDER}    ${CURDIR}/../variables/bgpuser
 *** Keywords ***
 CC_Setup
     [Documentation]    Initialize dependency libraries.
-    ConfigViaRestconf.Setup_Config_Via_Restconf
+    TemplatedRequests.Create_Default_Session
     WaitUtils.WU_Setup    # includes ScalarClosures.SC_Setup
     ${counter} =    ScalarClosures.Closure_From_Keyword_And_Arguments    Get_Change_Count
     BuiltIn.Set_Suite_Variable    ${ChangeCounter__getter}    ${counter}
@@ -40,8 +40,8 @@ Reconfigure_Topology_Name
     [Arguments]    ${topology_name}=example-linkstate-topology
     [Documentation]    Configure data change counter to count transactions affecting
     ...    ${topology_name} instead of previously configured topology name.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'TOPOLOGY_NAME': '${topology_name}'}
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${CHANGE_COUNTER_TEMPLATE_FOLDER}${/}change_counter    ${template_as_string}
+    &{mapping}    Create Dictionary    DEVICE_NAME=${DEVICE_NAME}    TOPOLOGY_NAME=${topology_name}
+    TemplatedRequests.Put_As_Xml_Templated    ${CHANGE_COUNTER_TEMPLATE_FOLDER}${/}change_counter    mapping=${mapping}
 
 Wait_For_Change_Count_To_Become_Stable
     [Arguments]    ${timeout}=60s    ${period}=1s    ${repetitions}=4    ${count_to_overcome}=-1
index 69a478b0b6bf612244943742955304b9322b0e17..8e679019066b74a3f6475ff909918a2a446bf148 100644 (file)
@@ -20,6 +20,11 @@ Documentation     BGP performance of ingesting from 1 BGP application peer
 ...               how to use restconf application peer interface:
 ...               https://wiki.opendaylight.org/view/BGP_LS_PCEP:User_Guide#BGP_Application_Peer
 ...               https://wiki.opendaylight.org/view/BGP_LS_PCEP:Programmer_Guide#BGP
+...               http://docs.opendaylight.org/en/stable-boron/user-guide/bgp-user-guide.html#bgp-peering
+...               http://docs.opendaylight.org/en/stable-boron/user-guide/bgp-user-guide.html#application-peer-configuration
+...
+...               The bgp peer configuration depends on the ${ODL_STREAM}. For "boron" and older streams it uses netconf connector and
+...               for carbon and further it configures peer via openconfig.
 ...
 ...               Reported bugs:
 ...               Bug 4689 - Not a reasonable duration of 1M prefix introduction from BGP application peer via restconf
@@ -34,12 +39,12 @@ Library           RequestsLibrary
 Variables         ${CURDIR}/../../../variables/Variables.py
 Resource          ${CURDIR}/../../../libraries/BGPcliKeywords.robot
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
-Resource          ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
 Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
+Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 
 *** Variables ***
 ${BGP_VARIABLES_FOLDER}    ${CURDIR}/../../../variables/bgpuser/
@@ -65,6 +70,10 @@ ${BGP_APP_PEER_GET_COMMAND}    python bgp_app_peer.py --host ${ODL_SYSTEM_IP} --
 ${BGP_APP_PEER_OPTIONS}    &>bgp_app_peer.log
 ${TEST_DURATION_MULTIPLIER}    30
 ${last_prefix_count}    -1
+${DEVICE_NAME}    controller-config
+${BGP_PEER_NAME}    example-bgp-peer
+${RIB_INSTANCE}    example-bgp-rib
+${PROTOCOL_OPENCONFIG}    ${RIB_INSTANCE}
 
 *** Test Cases ***
 Check_For_Empty_Ipv4_Topology_Before_Starting
@@ -73,13 +82,14 @@ Check_For_Empty_Ipv4_Topology_Before_Starting
 
 Reconfigure_ODL_To_Accept_Connection
     [Documentation]    Configure BGP peer module with initiate-connection set to false.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME_APP_PEER_PREFIX_COUNT}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'INITIATE': 'false'}
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    ${template_as_string}
+    &{mapping}    Create Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${BGP_PEER_NAME}    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME_APP_PEER_PREFIX_COUNT}    PEER_PORT=${BGP_TOOL_PORT}
+    ...    INITIATE=false    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=true    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    RIB_INSTANCE_NAME=${RIB_INSTANCE}
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
 Reconfigure_ODL_To_Accept_BGP_Application_Peer
     [Documentation]    Configure BGP application peer module.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer-app', 'IP': '${BGP_APP_PEER_ID}'}
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_application_peer    ${template_as_string}
+    &{mapping}    Create Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=example-bgp-peer-app    RIB_INSTANCE_NAME=${RIB_INSTANCE}    IP=${BGP_APP_PEER_ID}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_application_peer    mapping=${mapping}
 
 Connect_BGP_Peer
     [Documentation]    Start BGP peer tool
@@ -164,13 +174,13 @@ Stop_BGP_Peer
 
 Delete_Bgp_Peer_Configuration
     [Documentation]    Revert the BGP configuration to the original state: without any configured peers.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer'}
-    ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    ${template_as_string}
+    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=${BGP_PEER_NAME}    IP=${TOOLS_SYSTEM_IP}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
 Delete_Bgp_Application_Peer_Configuration
     [Documentation]    Revert the BGP configuration to the original state: without any configured peers.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer-app'}
-    ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_application_peer    ${template_as_string}
+    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=example-bgp-peer-app    IP=${TOOLS_SYSTEM_IP}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_application_peer    mapping=${mapping}
 
 Check_Bug_4791
     [Documentation]    Check controller's log for errors
@@ -181,7 +191,7 @@ Setup_Everything
     [Documentation]    Setup imported resources, SSH-login to tools system,
     ...    create HTTP session, put Python tool to tools system.
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
-    ConfigViaRestconf.Setup_Config_Via_Restconf
+    TemplatedRequests.Create_Default_Session
     PrefixCounting.PC_Setup
     SSHLibrary.Set_Default_Configuration    prompt=${TOOLS_SYSTEM_PROMPT}
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
@@ -211,7 +221,6 @@ Teardown_Everything
     SSHLibrary.Switch Connection    bgp_peer_console
     KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
     KillPythonTool.Search_And_Kill_Remote_Python    'bgp_app_peer\.py'
-    ConfigViaRestconf.Teardown_Config_Via_Restconf
     RequestsLibrary.Delete_All_Sessions
     SSHLibrary.Close_All_Connections
 
index 2da53ea040c3a17e9f5570c1b8525bf82a4c19f6..b2e556325f4f0d61ad33e2e5414396dd0c37c774 100644 (file)
@@ -38,6 +38,12 @@ Documentation     BGP performance of ingesting from many iBGP peers, data change
 ...               TODO: Figure out how to make it configurable.
 ...               As peer IP adresses are set incrementally, we need ipaddr to be used in Robot somehow.
 ...
+...               Brief description how to configure BGP peer can be found here:
+...               https://wiki.opendaylight.org/view/BGP_LS_PCEP:User_Guide#BGP_Peer
+...               http://docs.opendaylight.org/en/stable-boron/user-guide/bgp-user-guide.html#bgp-peering
+...               The peer configuration depends on the ${ODL_STREAM}. For "boron" and older streams it uses netconf connector and
+...               for carbon and further it configures peer via openconfig.
+...
 ...               TODO: Is there a need for version of this suite where ODL connects to pers?
 ...               Note that configuring ODL is slow, which may affect measured performance singificantly.
 ...               Advanced TODO: Give manager ability to start pushing on trigger long after connections are established.
@@ -51,12 +57,12 @@ Library           SSHLibrary    timeout=10s
 Variables         ${CURDIR}/../../../variables/Variables.py
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
 Resource          ${CURDIR}/../../../libraries/ChangeCounter.robot
-Resource          ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
 Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
+Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 
 *** Variables ***
 ${BGP_TOOL_LOG_LEVEL}    info
@@ -83,6 +89,9 @@ ${REPETITIONS_CHANGE_COUNT_MANY}    ${REPETITIONS_CHANGE_COUNT}
 ${TEST_DURATION_MULTIPLIER}    1
 ${TEST_DURATION_MULTIPLIER_CHANGE_COUNT}    ${TEST_DURATION_MULTIPLIER}
 ${TEST_DURATION_MULTIPLIER_CHANGE_COUNT_MANY}    ${TEST_DURATION_MULTIPLIER_CHANGE_COUNT}
+${RIB_INSTANCE}    example-bgp-rib
+${PROTOCOL_OPENCONFIG}    ${RIB_INSTANCE}
+${DEVICE_NAME}    controller-config
 # TODO: Option names can be better.
 ${last_change_count_many}    -1
 
@@ -98,8 +107,10 @@ Reconfigure_ODL_To_Accept_Connections
     : FOR    ${index}    IN RANGE    1    ${MULTIPLICITY_CHANGE_COUNT_MANY}+1
     \    ${peer_name} =    BuiltIn.Set_Variable    example-bgp-peer-${index}
     \    ${peer_ip} =    BuiltIn.Evaluate    str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1)    modules=ipaddr
-    \    ${template_as_string} =    BuiltIn.Set_Variable    {'NAME': '${peer_name}', 'IP': '${peer_ip}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'HOLDTIME': '${HOLDTIME_CHANGE_COUNT_MANY}', 'INITIATE': 'false'}
-    \    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    ${template_as_string}
+    \    &{mapping}    Create Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${peer_name}    IP=${peer_ip}    HOLDTIME=${HOLDTIME_CHANGE_COUNT_MANY}
+    \    ...    PEER_PORT=${BGP_TOOL_PORT}    INITIATE=false    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=true    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    \    ...    RIB_INSTANCE_NAME=${RIB_INSTANCE}
+    \    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
     # FIXME: Add testcase to change bgpcep and protocol log levels, when a Keyword that does it without messing with current connection is ready.
 
 Wait_For_Data_Change_Counter_Ready
@@ -164,15 +175,17 @@ Delete_Bgp_Peer_Configuration
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     # TODO: Is it useful to extract peer naming logic to separate Keyword?
     : FOR    ${index}    IN RANGE    1    ${MULTIPLICITY_CHANGE_COUNT_MANY}+1
-    \    ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer-${index}'}
-    \    ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLESFOLDER}${/}bgp_peer    ${template_as_string}
+    \    ${peer_name} =    BuiltIn.Set_Variable    example-bgp-peer-${index}
+    \    ${peer_ip} =    BuiltIn.Evaluate    str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1)    modules=ipaddr
+    \    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${peer_name}    IP=${peer_ip}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    \    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
 *** Keywords ***
 Setup_Everything
     [Documentation]    Setup imported resources, SSH-login to ODL system,
     ...    create HTTP session, put Python tool to ODL system.
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
-    ConfigViaRestconf.Setup_Config_Via_Restconf
+    TemplatedRequests.Create_Default_Session
     ChangeCounter.CC_Setup
     PrefixCounting.PC_Setup
     KarafKeywords.Open Controller Karaf Console On Background
@@ -198,7 +211,6 @@ Teardown_Everything
     [Documentation]    Make sure Python tool was killed and tear down imported Resources.
     # Environment issue may have dropped the SSH connection, but we do not want Teardown to fail.
     BuiltIn.Run_Keyword_And_Ignore_Error    KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
-    ConfigViaRestconf.Teardown_Config_Via_Restconf
     RequestsLibrary.Delete_All_Sessions
     SSHLibrary.Close_All_Connections
 
index 215b9272e4dba7a53f2eb7bfbd771f59d0d637f2..c09ab4d45927768e59056baab85d116f1b8a581a 100644 (file)
@@ -16,6 +16,12 @@ Documentation     BGP performance of ingesting from many iBGP rrc peers, iBGPs r
 ...               ODL distinguishes peers by their IP addresses.
 ...               Currently, this suite requires python utils to be started on ODL System,
 ...               to guarantee IP address block is available for them to bind to.
+...
+...               Brief description how to configure BGP peer can be found here:
+...               https://wiki.opendaylight.org/view/BGP_LS_PCEP:User_Guide#BGP_Peer
+...               http://docs.opendaylight.org/en/stable-boron/user-guide/bgp-user-guide.html#bgp-peering
+...               The peer configuration depends on the ${ODL_STREAM}. For "boron" and older streams it uses netconf connector and
+...               for carbon and further it configures peer via openconfig.
 Suite Setup       Setup_Everything
 Suite Teardown    Teardown_Everything
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
@@ -25,12 +31,12 @@ Library           RequestsLibrary
 Library           SSHLibrary    timeout=10s
 Variables         ${CURDIR}/../../../variables/Variables.py
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
-Resource          ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
 Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
+Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 
 *** Variables ***
 ${BGP_TOOL_LOG_LEVEL}    info
@@ -49,6 +55,9 @@ ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}    10
 ${REPETITIONS_PREFIX_COUNT_MANY_RRC}    10
 ${TEST_DURATION_MULTIPLIER}    1
 ${TEST_DURATION_MULTIPLIER_PREFIX_COUNT_MANY_RRC}    ${TEST_DURATION_MULTIPLIER}
+${RIB_INSTANCE}    example-bgp-rib
+${PROTOCOL_OPENCONFIG}    ${RIB_INSTANCE}
+${DEVICE_NAME}    controller-config
 
 *** Test Cases ***
 Check_For_Empty_Ipv4_Topology_Before_Talking
@@ -63,8 +72,10 @@ Reconfigure_ODL_To_Accept_Connections
     : FOR    ${index}    IN RANGE    1    ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}+1
     \    ${peer_name} =    BuiltIn.Set_Variable    example-bgp-peer-${index}
     \    ${peer_ip} =    BuiltIn.Evaluate    str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1)    modules=ipaddr
-    \    ${template_as_string} =    BuiltIn.Set_Variable    {'NAME': '${peer_name}', 'IP': '${peer_ip}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'HOLDTIME': '${HOLDTIME_PREFIX_COUNT_MANY_RRC}', 'PEER_ROLE': 'rr-client', 'INITIATE': 'false'}
-    \    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}ibgp_peers    ${template_as_string}
+    \    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=${peer_name}    IP=${peer_ip}    HOLDTIME=${HOLDTIME_PREFIX_COUNT_MANY_RRC}
+    \    ...    PEER_PORT=${BGP_TOOL_PORT}    PEER_ROLE=rr-client    INITIATE=false    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=true
+    \    ...    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    RIB_INSTANCE_NAME=${RIB_INSTANCE}    RR_CLIENT=true
+    \    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}ibgp_peers    mapping=${mapping}
 
 Start_Talking_BGP_Manager
     [Documentation]    Start Python manager to connect speakers to ODL.
@@ -118,15 +129,17 @@ Delete_Bgp_Peer_Configuration
     [Tags]    critical
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     : FOR    ${index}    IN RANGE    1    ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}+1
-    \    ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer-${index}'}
-    \    ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLESFOLDER}${/}ibgp_peers    ${template_as_string}
+    \    ${peer_name} =    BuiltIn.Set_Variable    example-bgp-peer-${index}
+    \    ${peer_ip} =    BuiltIn.Evaluate    str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1)    modules=ipaddr
+    \    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=${peer_name}    IP=${peer_ip}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    \    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}ibgp_peers    mapping=${mapping}
 
 *** Keywords ***
 Setup_Everything
     [Documentation]    Setup imported resources, SSH-login to ODL system,
     ...    create HTTP session, put Python tool to ODL system.
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
-    ConfigViaRestconf.Setup_Config_Via_Restconf
+    TemplatedRequests.Create_Default_Session
     PrefixCounting.PC_Setup
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
@@ -150,7 +163,6 @@ Teardown_Everything
     [Documentation]    Make sure Python tool was killed and tear down imported Resources.
     # Environment issue may have dropped the SSH connection, but we do not want Teardown to fail.
     BuiltIn.Run_Keyword_And_Ignore_Error    KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
-    ConfigViaRestconf.Teardown_Config_Via_Restconf
     RequestsLibrary.Delete_All_Sessions
     SSHLibrary.Close_All_Connections
 
index aaba751868059a8e6c81017e5968c79d7195ff5f..3bacf56b8b4d62afeec2eefd1e9908f03f945207 100644 (file)
@@ -35,6 +35,12 @@ Documentation     BGP performance of ingesting from many iBGP peers, data change
 ...               TODO: Figure out how to make it configurable.
 ...               As peer IP adresses are set incrementally, we need ipaddr to be used in Robot somehow.
 ...
+...               Brief description how to configure BGP peer can be found here:
+...               https://wiki.opendaylight.org/view/BGP_LS_PCEP:User_Guide#BGP_Peer
+...               http://docs.opendaylight.org/en/stable-boron/user-guide/bgp-user-guide.html#bgp-peering
+...               The peer configuration depends on the ${ODL_STREAM}. For "boron" and older streams it uses netconf connector and
+...               for carbon and further it configures peer via openconfig.
+...
 ...               TODO: Is there a need for version of this suite where ODL connects to pers?
 ...               Note that configuring ODL is slow, which may affect measured performance singificantly.
 ...               Advanced TODO: Give manager ability to start pushing on trigger long after connections are established.
@@ -47,12 +53,12 @@ Library           RequestsLibrary
 Library           SSHLibrary    timeout=10s
 Variables         ${CURDIR}/../../../variables/Variables.py
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
-Resource          ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
 Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
+Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 
 *** Variables ***
 ${BGP_TOOL_LOG_LEVEL}    info
@@ -79,6 +85,9 @@ ${REPETITIONS_PREFIX_COUNT_MANY}    ${REPETITIONS_PREFIX_COUNT}
 ${TEST_DURATION_MULTIPLIER}    1
 ${TEST_DURATION_MULTIPLIER_PREFIX_COUNT}    ${TEST_DURATION_MULTIPLIER}
 ${TEST_DURATION_MULTIPLIER_PREFIX_COUNT_MANY}    ${TEST_DURATION_MULTIPLIER_PREFIX_COUNT}
+${RIB_INSTANCE}    example-bgp-rib
+${PROTOCOL_OPENCONFIG}    ${RIB_INSTANCE}
+${DEVICE_NAME}    controller-config
 # TODO: Option names can be better.
 
 *** Test Cases ***
@@ -93,8 +102,10 @@ Reconfigure_ODL_To_Accept_Connections
     : FOR    ${index}    IN RANGE    1    ${MULTIPLICITY_PREFIX_COUNT_MANY}+1
     \    ${peer_name} =    BuiltIn.Set_Variable    example-bgp-peer-${index}
     \    ${peer_ip} =    BuiltIn.Evaluate    str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1)    modules=ipaddr
-    \    ${template_as_string} =    BuiltIn.Set_Variable    {'NAME': '${peer_name}', 'IP': '${peer_ip}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'HOLDTIME': '${HOLDTIME_PREFIX_COUNT_MANY}', 'INITIATE': 'false'}
-    \    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    ${template_as_string}
+    \    &{mapping}    Create Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${peer_name}    IP=${peer_ip}    HOLDTIME=${HOLDTIME_PREFIX_COUNT_MANY}
+    \    ...    PEER_PORT=${BGP_TOOL_PORT}    INITIATE=false    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=true    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    \    ...    RIB_INSTANCE_NAME=${RIB_INSTANCE}
+    \    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
     # FIXME: Add testcase to change bgpcep and protocol log levels, when a Keyword that does it without messing with current connection is ready.
 
 Change_Karaf_Logging_Levels
@@ -147,15 +158,17 @@ Delete_Bgp_Peer_Configuration
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     # TODO: Is it useful to extract peer naming logic to separate Keyword?
     : FOR    ${index}    IN RANGE    1    ${MULTIPLICITY_PREFIX_COUNT_MANY}+1
-    \    ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer-${index}'}
-    \    ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLESFOLDER}${/}bgp_peer    ${template_as_string}
+    \    ${peer_name} =    BuiltIn.Set_Variable    example-bgp-peer-${index}
+    \    ${peer_ip} =    BuiltIn.Evaluate    str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1)    modules=ipaddr
+    \    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${peer_name}    IP=${peer_ip}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    \    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
 *** Keywords ***
 Setup_Everything
     [Documentation]    Setup imported resources, SSH-login to ODL system,
     ...    create HTTP session, put Python tool to ODL system.
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
-    ConfigViaRestconf.Setup_Config_Via_Restconf
+    TemplatedRequests.Create_Default_Session
     PrefixCounting.PC_Setup
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
@@ -179,6 +192,5 @@ Teardown_Everything
     [Documentation]    Make sure Python tool was killed and tear down imported Resources.
     # Environment issue may have dropped the SSH connection, but we do not want Teardown to fail.
     BuiltIn.Run_Keyword_And_Ignore_Error    KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
-    ConfigViaRestconf.Teardown_Config_Via_Restconf
     RequestsLibrary.Delete_All_Sessions
     SSHLibrary.Close_All_Connections
index 968f3629f86de7e12b999ed177f299b549d70ce7..5859bb21e266fea6ee7d0b4348aeeb9adc3dd4f7 100644 (file)
@@ -22,6 +22,12 @@ Documentation     BGP performance of ingesting from 1 iBGP peer, data change cou
 ...               The time for Wait_For_Stable_* cases to finish is the main performance metric.
 ...               After waiting for stability is done, full check on number of prefixes present is performed.
 ...
+...               Brief description how to configure BGP peer can be found here:
+...               https://wiki.opendaylight.org/view/BGP_LS_PCEP:User_Guide#BGP_Peer
+...               http://docs.opendaylight.org/en/stable-boron/user-guide/bgp-user-guide.html#bgp-peering
+...               The peer configuration depends on the ${ODL_STREAM}. For "boron" and older streams it uses netconf connector and
+...               for carbon and further it configures peer via openconfig.
+...
 ...               TODO: Currently, if a bug causes zero increase of data changes,
 ...               affected test cases will wait for max time. Reconsider.
 ...               If zero increase is allowed as stable, higher number of repetitions should be required.
@@ -38,12 +44,12 @@ Library           RequestsLibrary
 Variables         ${CURDIR}/../../../variables/Variables.py
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
 Resource          ${CURDIR}/../../../libraries/ChangeCounter.robot
-Resource          ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
 Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
+Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 
 *** Variables ***
 ${BGP_TOOL_LOG_LEVEL}    info
@@ -71,6 +77,10 @@ ${TEST_DURATION_MULTIPLIER_CHANGE_COUNT}    ${TEST_DURATION_MULTIPLIER}
 ${TEST_DURATION_MULTIPLIER_CHANGE_COUNT_SINGLE}    ${TEST_DURATION_MULTIPLIER_CHANGE_COUNT}
 ${UPDATE}         single
 ${WITHDRAW}       0
+${RIB_INSTANCE}    example-bgp-rib
+${PROTOCOL_OPENCONFIG}    ${RIB_INSTANCE}
+${DEVICE_NAME}    controller-config
+${BGP_PEER_NAME}    example-bgp-peer
 # TODO: Option names can be better.
 ${last_change_count_single}    -1
 
@@ -83,8 +93,9 @@ Check_For_Empty_Ipv4_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    {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME_CHANGE_COUNT_SINGLE}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'INITIATE': 'false'}
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    ${template_as_string}
+    &{mapping}    Create Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${BGP_PEER_NAME}    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME_CHANGE_COUNT_SINGLE}    PEER_PORT=${BGP_TOOL_PORT}
+    ...    INITIATE=false    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=true    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    RIB_INSTANCE_NAME=${RIB_INSTANCE}
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
 Wait_For_Data_Change_Counter_Ready
     [Documentation]    Data change counter might have been slower to start than ipv4 topology, wait for it.
@@ -150,8 +161,9 @@ Start_Listening_BGP_Speaker
 Reconfigure_ODL_To_Initiate_Connection
     [Documentation]    Replace BGP peer config module, now with initiate-connection set to true.
     Store_Change_Count
-    ${template_as_string} =    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME_CHANGE_COUNT_SINGLE}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'INITIATE': 'true'}
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    ${template_as_string}
+    &{mapping}    Create Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${BGP_PEER_NAME}    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME_CHANGE_COUNT_SINGLE}    PEER_PORT=${BGP_TOOL_PORT}
+    ...    INITIATE=true    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=false    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    RIB_INSTANCE_NAME=${RIB_INSTANCE}
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
 Wait_For_Stable_Listening_Ipv4_Topology
     [Documentation]    Wait until example-ipv4-topology becomes stable.
@@ -204,15 +216,15 @@ Restore_Data_Change_Counter_Configuration
 Delete_Bgp_Peer_Configuration
     [Documentation]    Revert the BGP configuration to the original state: without any configured peers.
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-    ${template_as_string} =    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer'}
-    ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    ${template_as_string}
+    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${BGP_PEER_NAME}    IP=${TOOLS_SYSTEM_IP}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
 *** Keywords ***
 Setup_Everything
     [Documentation]    Setup imported resources, SSH-login to tools system,
     ...    create HTTP session, put Python tool to tools system.
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
-    ConfigViaRestconf.Setup_Config_Via_Restconf
+    TemplatedRequests.Create_Default_Session
     ChangeCounter.CC_Setup
     PrefixCounting.PC_Setup
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
@@ -236,7 +248,6 @@ Teardown_Everything
     [Documentation]    Make sure Python tool was killed and tear down imported Resources.
     # Environment issue may have dropped the SSH connection, but we do not want Teardown to fail.
     BuiltIn.Run_Keyword_And_Ignore_Error    KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
-    ConfigViaRestconf.Teardown_Config_Via_Restconf
     RequestsLibrary.Delete_All_Sessions
     SSHLibrary.Close_All_Connections
 
index 04e0eb4a9ce9e1c52d28138215c1a2912e376636..3147a393ae654c1430d41713489361c4038ff006 100644 (file)
@@ -16,6 +16,12 @@ Documentation     BGP performance of ingesting from 1 iBGP peer, data change cou
 ...               The time for Wait_For_Stable_* cases to finish is the main performance metric.
 ...               After waiting for stability is done, full check on number of prefixes present is performed.
 ...
+...               Brief description how to configure BGP peer can be found here:
+...               https://wiki.opendaylight.org/view/BGP_LS_PCEP:User_Guide#BGP_Peer
+...               http://docs.opendaylight.org/en/stable-boron/user-guide/bgp-user-guide.html#bgp-peering
+...               The peer configuration depends on the ${ODL_STREAM}. For "boron" and older streams it uses netconf connector and
+...               for carbon and further it configures peer via openconfig.
+...
 ...               TODO: Currently, if a bug causes prefix count to remain at zero,
 ...               affected test cases will wait for max time. Reconsider.
 ...               If zero is allowed as stable, higher period or repetitions would be required.
@@ -30,12 +36,12 @@ Library           SSHLibrary    timeout=10s
 Library           RequestsLibrary
 Variables         ${CURDIR}/../../../variables/Variables.py
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
-Resource          ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
 Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
+Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 
 *** Variables ***
 ${BGP_TOOL_LOG_LEVEL}    info
@@ -63,6 +69,10 @@ ${TEST_DURATION_MULTIPLIER_PREFIX_COUNT}    ${TEST_DURATION_MULTIPLIER}
 ${TEST_DURATION_MULTIPLIER_PREFIX_COUNT_SINGLE}    ${TEST_DURATION_MULTIPLIER_PREFIX_COUNT}
 ${UPDATE}         single
 ${WITHDRAW}       0
+${RIB_INSTANCE}    example-bgp-rib
+${PROTOCOL_OPENCONFIG}    ${RIB_INSTANCE}
+${DEVICE_NAME}    controller-config
+${BGP_PEER_NAME}    example-bgp-peer
 # TODO: Option names can be better.
 
 *** Test Cases ***
@@ -74,8 +84,9 @@ Check_For_Empty_Ipv4_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    {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME_PREFIX_COUNT_SINGLE}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'INITIATE': 'false'}
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    ${template_as_string}
+    &{mapping}    Create Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${BGP_PEER_NAME}    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME_PREFIX_COUNT_SINGLE}    PEER_PORT=${BGP_TOOL_PORT}
+    ...    INITIATE=false    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=true    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    RIB_INSTANCE_NAME=${RIB_INSTANCE}
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
 Change_Karaf_Logging_Levels
     [Documentation]    We may want to set more verbose logging here after configuration is done.
@@ -133,8 +144,9 @@ Start_Listening_BGP_Speaker
 
 Reconfigure_ODL_To_Initiate_Connection
     [Documentation]    Replace BGP peer config module, now with initiate-connection set to true.
-    ${template_as_string} =    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME_PREFIX_COUNT_SINGLE}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'INITIATE': 'true'}
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    ${template_as_string}
+    &{mapping}    Create Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${BGP_PEER_NAME}    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME_PREFIX_COUNT_SINGLE}    PEER_PORT=${BGP_TOOL_PORT}
+    ...    INITIATE=true    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=false    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    RIB_INSTANCE_NAME=${RIB_INSTANCE}
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
 Wait_For_Stable_Listening_Ipv4_Topology
     [Documentation]    Wait until example-ipv4-topology becomes stable.
@@ -181,15 +193,15 @@ Restore_Karaf_Logging_Levels
 Delete_Bgp_Peer_Configuration
     [Documentation]    Revert the BGP configuration to the original state: without any configured peers.
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-    ${template_as_string} =    BuiltIn.Set_Variable    {'NAME': 'example-bgp-peer'}
-    ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    ${template_as_string}
+    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${BGP_PEER_NAME}    IP=${TOOLS_SYSTEM_IP}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
 *** Keywords ***
 Setup_Everything
     [Documentation]    Setup imported resources, SSH-login to tools system,
     ...    create HTTP session, put Python tool to tools system.
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
-    ConfigViaRestconf.Setup_Config_Via_Restconf
+    TemplatedRequests.Create_Default_Session
     PrefixCounting.PC_Setup
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
@@ -211,7 +223,6 @@ Teardown_Everything
     [Documentation]    Make sure Python tool was killed and tear down imported Resources.
     # Environment issue may have dropped the SSH connection, but we do not want Teardown to fail.
     BuiltIn.Run_Keyword_And_Ignore_Error    KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
-    ConfigViaRestconf.Teardown_Config_Via_Restconf
     RequestsLibrary.Delete_All_Sessions
     SSHLibrary.Close_All_Connections
 
diff --git a/csit/variables/bgpuser/change_counter.beryllium/location.uri b/csit/variables/bgpuser/change_counter.beryllium/location.uri
new file mode 100644 (file)
index 0000000..624e0c8
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-data-change-counter-cfg:data-change-counter-impl/data-change-counter-singleton
similarity index 79%
rename from csit/variables/bgpuser/change_counter/data.xml.stable-lithium
rename to csit/variables/bgpuser/change_counter.boron/data.xml
index 1a9310070b77ed22a37b8a7b8b8dab39ef96c331..3bfead421690cc762958ccfcc6e83ba460c28019 100644 (file)
@@ -1,6 +1,7 @@
 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgpcep:data:change:counter">prefix:data-change-counter-impl</type>
-    <name>data-change-counter-singleton</name>
+    <name>data-change-counter</name>
+    <counter-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgpcep:data:change:counter">data-change-counter</counter-id>
     <data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgpcep:data:change:counter">
         <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
         <name>pingpong-binding-data-broker</name>
diff --git a/csit/variables/bgpuser/change_counter.boron/location.uri b/csit/variables/bgpuser/change_counter.boron/location.uri
new file mode 100644 (file)
index 0000000..fa7f634
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-data-change-counter-cfg:data-change-counter-impl/data-change-counter
diff --git a/csit/variables/bgpuser/change_counter/config.uri.beryllium b/csit/variables/bgpuser/change_counter/config.uri.beryllium
deleted file mode 100644 (file)
index 065e6c2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-data-change-counter-cfg:data-change-counter-impl/data-change-counter-singleton
diff --git a/csit/variables/bgpuser/change_counter/config.uri.boron b/csit/variables/bgpuser/change_counter/config.uri.boron
deleted file mode 100644 (file)
index 746ba0d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-data-change-counter-cfg:data-change-counter-impl/data-change-counter
diff --git a/csit/variables/bgpuser/change_counter/config.uri.stable-lithium b/csit/variables/bgpuser/change_counter/config.uri.stable-lithium
deleted file mode 100644 (file)
index 065e6c2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-data-change-counter-cfg:data-change-counter-impl/data-change-counter-singleton
diff --git a/csit/variables/bgpuser/change_counter/location.uri b/csit/variables/bgpuser/change_counter/location.uri
new file mode 100644 (file)
index 0000000..fa7f634
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-data-change-counter-cfg:data-change-counter-impl/data-change-counter