From 92a9a3499391a1872758368ada382d0588706404 Mon Sep 17 00:00:00 2001 From: Peter Gubka Date: Wed, 9 Nov 2016 12:01:37 +0100 Subject: [PATCH] updating bgp userfeatures suites to support openconfig peer configuration Change-Id: Ib25b49fb6870b7206f053d97732535096b550c2a Signed-off-by: Peter Gubka --- .../bgpcep/bgpuser/bgp_app_peer_basic.robot | 44 ++++++---- csit/suites/bgpcep/bgpuser/cases.robot | 25 ++++-- .../bgpcep/bgpuser/ebgp_peers_basic.robot | 48 +++++----- .../suites/bgpcep/bgpuser/ibgp_peer_lsp.robot | 23 +++-- .../bgpcep/bgpuser/ibgp_peer_lsp_Be.robot | 13 ++- .../bgpcep/bgpuser/ibgp_peers_basic.robot | 88 +++++++++---------- .../bgp_application_peer.beryllium/data.xml | 14 +++ .../location.uri | 1 + .../bgp_application_peer.boron/data.xml | 14 +++ .../bgp_application_peer.boron/location.uri | 1 + .../bgpuser/bgp_application_peer/config.uri | 1 - .../bgpuser/bgp_application_peer/data.xml | 20 ++--- .../bgpuser/bgp_application_peer/location.uri | 1 + .../bgpuser/bgp_peer.beryllium/data.xml | 28 ++++++ .../bgpuser/bgp_peer.beryllium/location.uri | 1 + .../variables/bgpuser/bgp_peer.boron/data.xml | 28 ++++++ .../bgpuser/bgp_peer.boron/location.uri | 1 + csit/variables/bgpuser/bgp_peer/config.uri | 1 - csit/variables/bgpuser/bgp_peer/data.xml | 62 +++++++------ csit/variables/bgpuser/bgp_peer/location.uri | 1 + .../bgpuser/ebgp_peers.beryllium/data.xml | 31 +++++++ .../bgpuser/ebgp_peers.beryllium/location.uri | 1 + .../bgpuser/ebgp_peers.boron/data.xml | 31 +++++++ .../bgpuser/ebgp_peers.boron/location.uri | 1 + csit/variables/bgpuser/ebgp_peers/config.uri | 1 - csit/variables/bgpuser/ebgp_peers/data.xml | 61 +++++++------ .../variables/bgpuser/ebgp_peers/location.uri | 1 + .../bgpuser/ibgp_peers.beryllium/data.xml | 29 ++++++ .../bgpuser/ibgp_peers.beryllium/location.uri | 1 + .../bgpuser/ibgp_peers.boron/data.xml | 29 ++++++ .../bgpuser/ibgp_peers.boron/location.uri | 1 + csit/variables/bgpuser/ibgp_peers/config.uri | 1 - csit/variables/bgpuser/ibgp_peers/data.xml | 63 +++++++------ .../variables/bgpuser/ibgp_peers/location.uri | 1 + 34 files changed, 447 insertions(+), 220 deletions(-) create mode 100644 csit/variables/bgpuser/bgp_application_peer.beryllium/data.xml create mode 100644 csit/variables/bgpuser/bgp_application_peer.beryllium/location.uri create mode 100644 csit/variables/bgpuser/bgp_application_peer.boron/data.xml create mode 100644 csit/variables/bgpuser/bgp_application_peer.boron/location.uri delete mode 100644 csit/variables/bgpuser/bgp_application_peer/config.uri create mode 100644 csit/variables/bgpuser/bgp_application_peer/location.uri create mode 100644 csit/variables/bgpuser/bgp_peer.beryllium/data.xml create mode 100644 csit/variables/bgpuser/bgp_peer.beryllium/location.uri create mode 100644 csit/variables/bgpuser/bgp_peer.boron/data.xml create mode 100644 csit/variables/bgpuser/bgp_peer.boron/location.uri delete mode 100644 csit/variables/bgpuser/bgp_peer/config.uri create mode 100644 csit/variables/bgpuser/bgp_peer/location.uri create mode 100644 csit/variables/bgpuser/ebgp_peers.beryllium/data.xml create mode 100644 csit/variables/bgpuser/ebgp_peers.beryllium/location.uri create mode 100644 csit/variables/bgpuser/ebgp_peers.boron/data.xml create mode 100644 csit/variables/bgpuser/ebgp_peers.boron/location.uri delete mode 100644 csit/variables/bgpuser/ebgp_peers/config.uri create mode 100644 csit/variables/bgpuser/ebgp_peers/location.uri create mode 100644 csit/variables/bgpuser/ibgp_peers.beryllium/data.xml create mode 100644 csit/variables/bgpuser/ibgp_peers.beryllium/location.uri create mode 100644 csit/variables/bgpuser/ibgp_peers.boron/data.xml create mode 100644 csit/variables/bgpuser/ibgp_peers.boron/location.uri delete mode 100644 csit/variables/bgpuser/ibgp_peers/config.uri create mode 100644 csit/variables/bgpuser/ibgp_peers/location.uri diff --git a/csit/suites/bgpcep/bgpuser/bgp_app_peer_basic.robot b/csit/suites/bgpcep/bgpuser/bgp_app_peer_basic.robot index d3ffec9f4c..9fedca2201 100644 --- a/csit/suites/bgpcep/bgpuser/bgp_app_peer_basic.robot +++ b/csit/suites/bgpcep/bgpuser/bgp_app_peer_basic.robot @@ -59,13 +59,14 @@ Variables ${CURDIR}/../../../variables/Variables.py Variables ${CURDIR}/../../../variables/bgpuser/variables.py ${TOOLS_SYSTEM_IP} ${ODL_STREAM} Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot -Resource ${CURDIR}/../../../libraries/ConfigViaRestconf.robot +Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot Resource ${CURDIR}/../../../libraries/FailFast.robot Resource ${CURDIR}/../../../libraries/KillPythonTool.robot Resource ${CURDIR}/../../../libraries/SetupUtils.robot Resource ${CURDIR}/../../../libraries/SSHKeywords.robot Resource ${CURDIR}/../../../libraries/Utils.robot Resource ${CURDIR}/../../../libraries/WaitForFailure.robot +Resource ${CURDIR}/../../../libraries/CompareStream.robot *** Variables *** ${ACTUAL_RESPONSES_FOLDER} ${TEMPDIR}/actual @@ -79,7 +80,7 @@ ${CONTROLLER_LOG_LEVEL} INFO ${CONTROLLER_BGP_LOG_LEVEL} DEFAULT ${BGP_PEER_COMMAND} python play.py --amount 0 --myip=${TOOLS_SYSTEM_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --${BGP_PEER_LOG_LEVEL} ${BGP_PEER_OPTIONS} ${EMPTY} -${BGP_APP_PEER_ID} 10.0.0.10 +${BGP_APP_PEER_ID} ${ODL_SYSTEM_IP} ${BGP_APP_PEER_POST_COMMAND} python bgp_app_peer.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} --command post --count 3 --prefix 8.0.1.0 --prefixlen 28 --${BGP_APP_PEER_LOG_LEVEL} --stream=${ODL_STREAM} ${BGP_APP_PEER_PUT_COMMAND} python bgp_app_peer.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} --command put --count 3 --prefix 8.0.1.0 --prefixlen 28 --${BGP_APP_PEER_LOG_LEVEL} --stream=${ODL_STREAM} ${BGP_APP_PEER_DELETE_COMMAND} python bgp_app_peer.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} --command delete --count 3 --prefix 8.0.1.0 --prefixlen 28 --${BGP_APP_PEER_LOG_LEVEL} --stream=${ODL_STREAM} @@ -87,19 +88,27 @@ ${BGP_APP_PEER_DELETE_ALL_COMMAND} python bgp_app_peer.py --host ${ODL_SYSTEM ${BGP_APP_PEER_GET_COMMAND} python bgp_app_peer.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} --command get --${BGP_APP_PEER_LOG_LEVEL} --stream=${ODL_STREAM} ${BGP_APP_PEER_OPTIONS} &>/dev/null ${BGP_APP_PEER_TIMEOUT} 30s +${BGP_PEER_APP_NAME} example-bgp-peer-app +${CONFIG_SESSION} session +${RIB_INSTANCE} example-bgp-rib +${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} +${DEVICE_NAME} controller-config +${BGP_PEER_NAME} example-bgp-peer +${RIB_INSTANCE} example-bgp-rib *** Test Cases *** Reconfigure_ODL_To_Accept_BGP_Peer_Connection [Documentation] Configure BGP peer module with initiate-connection set to false. [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME}', '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} 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} session=${CONFIG_SESSION} Reconfigure_ODL_To_Accept_BGP_Application_Peer [Documentation] Configure BGP application peer module. [Tags] critical - ${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=${BGP_PEER_APP_NAME} 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} session=${CONFIG_SESSION} Check_For_Empty_Example-IPv4-Topology [Documentation] Sanity check example-ipv4-topology is up but empty. @@ -110,7 +119,7 @@ TC1_BGP_Application_Peer_Post_3_Initial_Routes [Documentation] Start BGP application peer tool and give it ${BGP_APP_PEER_TIMEOUT} [Tags] critical Switch_To_BGP_Application_Peer_Console - Start_Console_Tool ${BGP_APP_PEER_POST_COMMAND} ${BGP_APP_PEER_OPTIONS} + Start_Console_Tool ${BGP_APP_PEER_POST_COMMAND} ${scritp_uri_opt} ${BGP_APP_PEER_OPTIONS} Wait_Until_Console_Tool_Finish ${BGP_APP_PEER_TIMEOUT} Store_File_To_Workspace bgp_app_peer.log bgp_app_peer_initial_post_tc1.log @@ -141,7 +150,7 @@ TC1_BGP_Application_Peer_Delete_3_Initial_Routes [Documentation] Start BGP application peer tool and give him ${BGP_APP_PEER_TIMEOUT} [Tags] critical Switch_To_BGP_Application_Peer_Console - Start_Console_Tool ${BGP_APP_PEER_DELETE_COMMAND} ${BGP_APP_PEER_OPTIONS} + Start_Console_Tool ${BGP_APP_PEER_DELETE_COMMAND} ${scritp_uri_opt} ${BGP_APP_PEER_OPTIONS} Wait_Until_Console_Tool_Finish ${BGP_APP_PEER_TIMEOUT} Store_File_To_Workspace bgp_app_peer.log bgp_app_peer_delete_tc1.log @@ -181,7 +190,7 @@ TC2_BGP_Application_Peer_Put_3_Routes [Documentation] Start BGP application peer tool and give him ${BGP_APP_PEER_TIMEOUT} [Tags] critical Switch_To_BGP_Application_Peer_Console - Start_Console_Tool ${BGP_APP_PEER_PUT_COMMAND} ${BGP_APP_PEER_OPTIONS} + Start_Console_Tool ${BGP_APP_PEER_PUT_COMMAND} ${scritp_uri_opt} ${BGP_APP_PEER_OPTIONS} Wait_Until_Console_Tool_Finish ${BGP_APP_PEER_TIMEOUT} Store_File_To_Workspace bgp_app_peer.log bgp_app_peer_put_tc2.log @@ -204,7 +213,7 @@ TC2_BGP_Application_Peer_Delete_All_Routes [Documentation] Start BGP application peer tool and give him ${BGP_APP_PEER_TIMEOUT} [Tags] critical Switch_To_BGP_Application_Peer_Console - Start_Console_Tool ${BGP_APP_PEER_DELETE_ALL_COMMAND} ${BGP_APP_PEER_OPTIONS} + Start_Console_Tool ${BGP_APP_PEER_DELETE_ALL_COMMAND} ${scritp_uri_opt} ${BGP_APP_PEER_OPTIONS} Wait_Until_Console_Tool_Finish ${BGP_APP_PEER_TIMEOUT} Store_File_To_Workspace bgp_app_peer.log bgp_app_peer_delete_all_tc2.log @@ -289,14 +298,14 @@ TC3_Stop_BGP_Peer Delete_Bgp_Peer_Configuration [Documentation] Revert the BGP configuration to the original state: without any configured peers. [Tags] critical - ${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} session=${CONFIG_SESSION} Delete_Bgp_Application_Peer_Configuration [Documentation] Revert the BGP configuration to the original state: without any configured peers. [Tags] critical - ${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=${BGP_PEER_APP_NAME} IP=${TOOLS_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_application_peer mapping=${mapping} session=${CONFIG_SESSION} *** Keywords *** Setup_Everything @@ -317,10 +326,12 @@ Setup_Everything OperatingSystem.Create_Directory ${EXPECTED_RESPONSES_FOLDER} OperatingSystem.Create_Directory ${ACTUAL_RESPONSES_FOLDER} RequestsLibrary.Create_Session operational http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API} auth=${AUTH} - ConfigViaRestconf.Setup_Config_Via_Restconf + RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.bgpcep KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.protocol + ${scritp_uri_opt}= CompareStream.Set_Variable_If_At_Most_Boron ${Empty} --uri config/bgp-rib:application-rib/${TOOLS_SYSTEM_IP}/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/ + BuiltIn.Set_Suite_Variable ${scritp_uri_opt} Teardown_Everything [Documentation] Create and Log the diff between expected and actual responses, make sure Python tool was killed. @@ -329,7 +340,6 @@ Teardown_Everything BuiltIn.Log ${diff} 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 @@ -372,7 +382,7 @@ Compare_Topology BuiltIn.Log ${response.text} ${actual_normalized}= Normalize_And_Save_Expected_Json ${response.text} ${filename} ${ACTUAL_RESPONSES_FOLDER} BuiltIn.Should_Be_Equal_As_Strings ${response.status_code} 200 - BuiltIn.Should_Be_Equal ${actual_normalized} ${expected_normalized} + BuiltIn.Should_Be_Equal ${expected_normalized} ${actual_normalized} Normalize_And_Save_Expected_Json [Arguments] ${json_text} ${filename} ${directory} diff --git a/csit/suites/bgpcep/bgpuser/cases.robot b/csit/suites/bgpcep/bgpuser/cases.robot index 023381548e..14349ea8d2 100644 --- a/csit/suites/bgpcep/bgpuser/cases.robot +++ b/csit/suites/bgpcep/bgpuser/cases.robot @@ -37,11 +37,11 @@ Variables ${CURDIR}/../../../variables/Variables.py Variables ${CURDIR}/../../../variables/bgpuser/variables.py ${TOOLS_SYSTEM_IP} ${ODL_STREAM} 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/SetupUtils.robot Resource ${CURDIR}/../../../libraries/SSHKeywords.robot +Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot Resource ${CURDIR}/../../../libraries/Utils.robot Resource ${CURDIR}/../../../libraries/WaitForFailure.robot @@ -54,6 +54,11 @@ ${HOLDTIME} 180 ${BGP_TOOL_LOG_LEVEL} info ${CONTROLLER_LOG_LEVEL} INFO ${CONTROLLER_BGP_LOG_LEVEL} DEFAULT +${CONFIG_SESSION} session +${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} +${DEVICE_NAME} controller-config +${BGP_PEER_NAME} example-bgp-peer +${RIB_INSTANCE} example-bgp-rib *** Test Cases *** Check_For_Empty_Topology_Before_Talking @@ -64,8 +69,10 @@ 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 {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME}', '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} 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} session=${CONFIG_SESSION} + [Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed Start_Talking_BGP_speaker [Documentation] Start Python speaker to connect to ODL, verify that the tool does not promptly exit. @@ -114,8 +121,9 @@ 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 {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME}', '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} 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} session=${CONFIG_SESSION} Check_Listening_Connection_Is_Established [Documentation] See TCP (BGP) connection in established state. @@ -200,8 +208,8 @@ Check_For_Empty_Topology_After_Listening_Case_3 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} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping} session=${CONFIG_SESSION} # TODO: Do we need to check something else? *** Keywords *** @@ -224,7 +232,7 @@ Setup_Everything SSHKeywords.Require_Python SSHKeywords.Assure_Library_Ipaddr target_dir=. SSHLibrary.Put_File ${CURDIR}/../../../../tools/fastbgp/play.py - ConfigViaRestconf.Setup_Config_Via_Restconf + RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.bgpcep KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.protocol @@ -235,7 +243,6 @@ Teardown_Everything ${diff}= OperatingSystem.Run diff -dur ${EXPECTED_RESPONSES_FOLDER} ${ACTUAL_RESPONSES_FOLDER} BuiltIn.Log ${diff} 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/suites/bgpcep/bgpuser/ebgp_peers_basic.robot b/csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot index 58b4b9ace1..8f5e2b9763 100644 --- a/csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot +++ b/csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot @@ -26,11 +26,11 @@ Variables ${CURDIR}/../../../variables/Variables.py Variables ${CURDIR}/../../../variables/bgpuser/variables.py ${TOOLS_SYSTEM_IP} ${ODL_STREAM} 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/SetupUtils.robot Resource ${CURDIR}/../../../libraries/SSHKeywords.robot +Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot Resource ${CURDIR}/../../../libraries/Utils.robot Resource ${CURDIR}/../../../libraries/WaitForFailure.robot @@ -73,26 +73,27 @@ ${DEFAULT_LOG_CHECK_TIMEOUT} 20s ${DEFAULT_LOG_CHECK_PERIOD} 1s ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} 10s ${DEFAULT_TOPOLOGY_CHECK_PERIOD} 1s +${CONFIG_SESSION} session +${RIB_INSTANCE} example-bgp-rib +${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} +${DEVICE_NAME} controller-config *** Test Cases *** Configure_BGP_Peers [Documentation] Configure an iBGP and two eBGP peers [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-ibgp-peer1', 'IP': '${iBGP_PEER1_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'ibgp', 'INITIATE': 'false'} - ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-ebgp-peer1', 'IP': '${eBGP_PEER1_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'PEER_ROLE': 'ebgp', 'AS_NUMBER': '${eBGP_PEER1_AS}', 'INITIATE': 'false'} - ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ebgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-ebgp-peer2', 'IP': '${eBGP_PEER2_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'ebgp', 'AS_NUMBER': '${eBGP_PEER2_AS}', 'INITIATE': 'false'} - ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ebgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-ibgp-peer1'} - ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - BuiltIn.Log ${result} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-ebgp-peer1'} - ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ebgp_peers ${template_as_string} - BuiltIn.Log ${result} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-ebgp-peer2'} - ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ebgp_peers ${template_as_string} - BuiltIn.Log ${result} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-ibgp-peer1 IP=${iBGP_PEER1_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... PEER_ROLE=ibgp INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} RIB_INSTANCE_NAME=${RIB_INSTANCE} + ... RR_CLIENT=false + TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-ebgp-peer1 IP=${eBGP_PEER1_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... PEER_ROLE=ebgp INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} RIB_INSTANCE_NAME=${RIB_INSTANCE} + ... RR_CLIENT=false AS_NUMBER=${eBGP_PEER1_AS} + TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}ebgp_peers mapping=${mapping} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-ebgp-peer2 IP=${eBGP_PEER2_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... PEER_ROLE=ebgp INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} RIB_INSTANCE_NAME=${RIB_INSTANCE} + ... RR_CLIENT=false AS_NUMBER=${eBGP_PEER2_AS} + TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}ebgp_peers mapping=${mapping} session=${CONFIG_SESSION} Connect_iBGP_Peer1 [Documentation] Connect BGP peer @@ -186,12 +187,12 @@ Disconnect_iBGP_Peer1 Delete_BGP_Peers_Configuration [Documentation] Delete all previously configured BGP peers. [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-ibgp-peer1'} - ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-ebgp-peer1'} - ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ebgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-ebgp-peer2'} - ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ebgp_peers ${template_as_string} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-ibgp-peer1 IP=${iBGP_PEER1_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-ebgp-peer1 IP=${eBGP_PEER1_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ebgp_peers mapping=${mapping} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-ebgp-peer2 IP=${eBGP_PEER2_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ebgp_peers mapping=${mapping} session=${CONFIG_SESSION} *** Keywords *** Setup_Everything @@ -209,7 +210,7 @@ Setup_Everything SSHKeywords.Assure_Library_Ipaddr target_dir=. SSHLibrary.Put_File ${CURDIR}/../../../../tools/fastbgp/play.py RequestsLibrary.Create_Session operational http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API} auth=${AUTH} - ConfigViaRestconf.Setup_Config_Via_Restconf + RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.bgpcep KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.protocol @@ -218,7 +219,6 @@ Teardown_Everything [Documentation] Create and Log the diff between expected and actual responses, make sure Python tool was killed. ... Tear down imported Resources. 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/suites/bgpcep/bgpuser/ibgp_peer_lsp.robot b/csit/suites/bgpcep/bgpuser/ibgp_peer_lsp.robot index 7a51f413b9..20701f447b 100644 --- a/csit/suites/bgpcep/bgpuser/ibgp_peer_lsp.robot +++ b/csit/suites/bgpcep/bgpuser/ibgp_peer_lsp.robot @@ -21,11 +21,11 @@ Variables ${CURDIR}/../../../variables/Variables.py Variables ${CURDIR}/../../../variables/bgpuser/variables.py ${TOOLS_SYSTEM_IP} ${ODL_STREAM} 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/SetupUtils.robot Resource ${CURDIR}/../../../libraries/SSHKeywords.robot +Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot Resource ${CURDIR}/../../../libraries/Utils.robot Resource ${CURDIR}/../../../libraries/WaitForFailure.robot @@ -45,16 +45,17 @@ ${JSONKEYSTR} "linkstate-route" ${BGP_PEER_NAME} example-bgp-peer ${DEVICE_NAME} controller-config ${CONFIG_SESSION} config-session -${BGP_VAR_FOLDER} ${CURDIR}/../../../variables/bgpfunctional ${SKIP_PARAMS} --skipattr ${RIB_INSTANCE} example-bgp-rib +${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} *** Test Cases *** TC1_Configure_iBGP_Peer [Documentation] Configure BGP peer module with initiate-connection set to false. [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME}', '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} 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} session=${CONFIG_SESSION} TC1_Check_Example_Bgp_Rib_Is_Empty [Documentation] Check RIB for none linkstate-routes @@ -84,14 +85,14 @@ TC1_Disconnect_BGP_Peer TC1_Deconfigure_iBGP_Peer [Documentation] Revert the BGP configuration to the original state: without any configured peers. - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} - TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} + &{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} session=${CONFIG_SESSION} TC2_Configure_iBGP_Peer [Documentation] Configures BGP peer module with initiate-connection set to false. &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} - ... INITIATE=false RIB_INSTANCE_NAME=${RIB_INSTANCE} - TemplatedRequests.Put_As_Xml_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} + ... INITIATE=false RIB_INSTANCE_NAME=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} TC2_Check_Example_Bgp_Rib_Is_Empty [Documentation] Check RIB for none linkstate-routes @@ -121,8 +122,8 @@ TC2_Disconnect_BGP_Peer TC2_Deconfigure_iBGP_Peer [Documentation] Revert the BGP configuration to the original state: without any configured peers. - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} - TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} + &{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} session=${CONFIG_SESSION} *** Keywords *** Setup_Everything @@ -137,7 +138,6 @@ Setup_Everything SSHLibrary.Put_File ${CURDIR}/../../../../tools/fastbgp/play.py RequestsLibrary.Create_Session operational http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH} RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} - ConfigViaRestconf.Setup_Config_Via_Restconf KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.bgpcep KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.protocol @@ -146,7 +146,6 @@ Teardown_Everything [Documentation] Create and Log the diff between expected and actual responses, make sure Python tool was killed. ... Tear down imported Resources. 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/suites/bgpcep/bgpuser/ibgp_peer_lsp_Be.robot b/csit/suites/bgpcep/bgpuser/ibgp_peer_lsp_Be.robot index ed3d8a05be..d625aab836 100644 --- a/csit/suites/bgpcep/bgpuser/ibgp_peer_lsp_Be.robot +++ b/csit/suites/bgpcep/bgpuser/ibgp_peer_lsp_Be.robot @@ -21,12 +21,12 @@ Variables ${CURDIR}/../../../variables/Variables.py Variables ${CURDIR}/../../../variables/bgpuser/variables.py ${TOOLS_SYSTEM_IP} ${ODL_STREAM} Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot -Resource ${CURDIR}/../../../libraries/ConfigViaRestconf.robot Resource ${CURDIR}/../../../libraries/FailFast.robot Resource ${CURDIR}/../../../libraries/KarafKeywords.robot Resource ${CURDIR}/../../../libraries/KillPythonTool.robot Resource ${CURDIR}/../../../libraries/SetupUtils.robot Resource ${CURDIR}/../../../libraries/SSHKeywords.robot +Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot Resource ${CURDIR}/../../../libraries/Utils.robot Resource ${CURDIR}/../../../libraries/WaitForFailure.robot @@ -46,14 +46,15 @@ ${JSONKEYSTR} "linkstate-route" ${BGP_PEER_NAME} example-bgp-peer ${DEVICE_NAME} controller-config ${CONFIG_SESSION} config-session -${BGP_VAR_FOLDER} ${CURDIR}/../../../variables/bgpfunctional +${RIB_INSTANCE} example-bgp-rib *** Test Cases *** TC1_Configure_iBGP_Peer [Documentation] Configure BGP peer module with initiate-connection set to false. [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME}', '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} PEER_PORT=${BGP_TOOL_PORT} + ... INITIATE=false RIB_INSTANCE_NAME=${RIB_INSTANCE} + TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping} session=${CONFIG_SESSION} TC1_Check_Example_Bgp_Rib_Is_Empty [Documentation] Check RIB for none linkstate-routes @@ -86,7 +87,7 @@ TC1_Deconfigure_iBGP_Peer [Documentation] Revert the BGP configuration to the original state: without any configured peers. KarafKeywords.Log_Testcase_Start_To_Controller_Karaf &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} - TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} *** Keywords *** Setup_Everything @@ -101,7 +102,6 @@ Setup_Everything SSHLibrary.Put_File ${CURDIR}/../../../../tools/fastbgp/play.py RequestsLibrary.Create_Session operational http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH} RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} - ConfigViaRestconf.Setup_Config_Via_Restconf KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.bgpcep KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.protocol @@ -110,7 +110,6 @@ Teardown_Everything [Documentation] Create and Log the diff between expected and actual responses, make sure Python tool was killed. ... Tear down imported Resources. 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/suites/bgpcep/bgpuser/ibgp_peers_basic.robot b/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot index f6ca256f38..78695b0cbe 100644 --- a/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot +++ b/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot @@ -35,11 +35,11 @@ Variables ${CURDIR}/../../../variables/Variables.py Variables ${CURDIR}/../../../variables/bgpuser/variables.py ${TOOLS_SYSTEM_IP} ${ODL_STREAM} 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/SetupUtils.robot Resource ${CURDIR}/../../../libraries/SSHKeywords.robot +Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot Resource ${CURDIR}/../../../libraries/Utils.robot Resource ${CURDIR}/../../../libraries/WaitForFailure.robot @@ -49,6 +49,7 @@ ${HOLDTIME} 180 ${BGP_PEER_LOG_LEVEL} debug ${CONTROLLER_LOG_LEVEL} INFO ${CONTROLLER_BGP_LOG_LEVEL} DEFAULT +${DEVICE_NAME} controller-config ${BGP_PEER1_IP} 127.0.0.1 ${BGP_PEER2_IP} 127.0.0.2 ${BGP_PEER1_FIRST_PREFIX_IP} 8.1.0.0 @@ -69,21 +70,23 @@ ${DEFAULT_LOG_CHECK_TIMEOUT} 20s ${DEFAULT_LOG_CHECK_PERIOD} 1s ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} 10s ${DEFAULT_TOPOLOGY_CHECK_PERIOD} 1s +${CONFIG_SESSION} session +${RIB_INSTANCE} example-bgp-rib +${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} +${DEVICE_NAME} controller-config *** Test Cases *** TC1_Configure_Two_iBGP_Route_Reflector_Client_Peers [Documentation] Configure two iBGP peers as routing reflector clients. [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1', 'IP': '${BGP_PEER1_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'rr-client', 'INITIATE': 'false'} - ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2', 'IP': '${BGP_PEER2_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'rr-client', 'INITIATE': 'false'} - ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'} - ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - BuiltIn.Log ${result} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'} - ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - BuiltIn.Log ${result} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer1 IP=${BGP_PEER1_IP} HOLDTIME=${HOLDTIME} 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} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer2 IP=${BGP_PEER2_IP} HOLDTIME=${HOLDTIME} 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} session=${CONFIG_SESSION} TC1_Connect_BGP_Peer1 [Documentation] Connect BGP peer @@ -145,24 +148,22 @@ TC_1_Check_for_Empty_IPv4_Topology TC1_Delete_BGP_Peers_Configuration [Documentation] Delete all previously configured BGP peers. [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'} - ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'} - ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer1 IP=${BGP_PEER1_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer2 IP=${BGP_PEER2_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} TC2_Configure_One_iBGP_Route_Reflector_Client_And_One_iBGP_Non_Client [Documentation] Configure iBGP peers: 1st one as RR client, 2nd one as RR non-client. [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1', 'IP': '${BGP_PEER1_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'rr-client', 'INITIATE': 'false'} - ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2', 'IP': '${BGP_PEER2_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'ibgp', 'INITIATE': 'false'} - ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'} - ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - BuiltIn.Log ${result} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'} - ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - BuiltIn.Log ${result} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer1 IP=${BGP_PEER1_IP} HOLDTIME=${HOLDTIME} 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} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer2 IP=${BGP_PEER2_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... PEER_ROLE=ibgp INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} RIB_INSTANCE_NAME=${RIB_INSTANCE} + ... RR_CLIENT=false + TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} TC2_Connect_BGP_Peer1 [Documentation] Connect BGP peer @@ -222,24 +223,22 @@ TC_2_Check_for_Empty_IPv4_Topology TC2_Delete_BGP_Peers_Configuration [Documentation] Delete all previously configured BGP peers. [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'} - ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'} - ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer1 IP=${BGP_PEER1_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer2 IP=${BGP_PEER2_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} TC3_Configure_Two_iBGP_Non_Client_Peers [Documentation] Configure iBGP peers: 1st one as RR client, 2nd one as RR non-client. [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1', 'IP': '${BGP_PEER1_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'ibgp', 'INITIATE': 'false'} - ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2', 'IP': '${BGP_PEER2_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'ibgp', 'INITIATE': 'false'} - ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'} - ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - BuiltIn.Log ${result} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'} - ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - BuiltIn.Log ${result} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer1 IP=${BGP_PEER1_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... PEER_ROLE=ibgp INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} RIB_INSTANCE_NAME=${RIB_INSTANCE} + ... RR_CLIENT=false + TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer2 IP=${BGP_PEER2_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... PEER_ROLE=ibgp INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} RIB_INSTANCE_NAME=${RIB_INSTANCE} + ... RR_CLIENT=false + TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} TC3_Connect_BGP_Peer1 [Documentation] Connect BGP peer @@ -288,10 +287,10 @@ TC_3_Check_for_Empty_IPv4_Topology TC3_Delete_BGP_Peers_Configuration [Documentation] Delete all previously configured BGP peers. [Tags] critical - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'} - ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'} - ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer1 IP=${BGP_PEER1_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=example-bgp-peer2 IP=${BGP_PEER2_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping} session=${CONFIG_SESSION} *** Keywords *** Setup_Everything @@ -308,7 +307,7 @@ Setup_Everything SSHKeywords.Assure_Library_Ipaddr target_dir=. SSHLibrary.Put_File ${CURDIR}/../../../../tools/fastbgp/play.py RequestsLibrary.Create_Session operational http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API} auth=${AUTH} - ConfigViaRestconf.Setup_Config_Via_Restconf + RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.bgpcep KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.protocol @@ -317,7 +316,6 @@ Teardown_Everything [Documentation] Create and Log the diff between expected and actual responses, make sure Python tool was killed. ... Tear down imported Resources. 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/bgp_application_peer.beryllium/data.xml b/csit/variables/bgpuser/bgp_application_peer.beryllium/data.xml new file mode 100644 index 0000000000..5cc23e3bc0 --- /dev/null +++ b/csit/variables/bgpuser/bgp_application_peer.beryllium/data.xml @@ -0,0 +1,14 @@ + + x:bgp-application-peer + example-bgp-peer-app + $IP + + x:rib-instance + example-bgp-rib + + example-app-rib + + x:dom-async-data-broker + pingpong-broker + + diff --git a/csit/variables/bgpuser/bgp_application_peer.beryllium/location.uri b/csit/variables/bgpuser/bgp_application_peer.beryllium/location.uri new file mode 100644 index 0000000000..9797aba4f5 --- /dev/null +++ b/csit/variables/bgpuser/bgp_application_peer.beryllium/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-application-peer/$NAME diff --git a/csit/variables/bgpuser/bgp_application_peer.boron/data.xml b/csit/variables/bgpuser/bgp_application_peer.boron/data.xml new file mode 100644 index 0000000000..5cc23e3bc0 --- /dev/null +++ b/csit/variables/bgpuser/bgp_application_peer.boron/data.xml @@ -0,0 +1,14 @@ + + x:bgp-application-peer + example-bgp-peer-app + $IP + + x:rib-instance + example-bgp-rib + + example-app-rib + + x:dom-async-data-broker + pingpong-broker + + diff --git a/csit/variables/bgpuser/bgp_application_peer.boron/location.uri b/csit/variables/bgpuser/bgp_application_peer.boron/location.uri new file mode 100644 index 0000000000..9797aba4f5 --- /dev/null +++ b/csit/variables/bgpuser/bgp_application_peer.boron/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-application-peer/$NAME diff --git a/csit/variables/bgpuser/bgp_application_peer/config.uri b/csit/variables/bgpuser/bgp_application_peer/config.uri deleted file mode 100644 index 5459eea0e9..0000000000 --- a/csit/variables/bgpuser/bgp_application_peer/config.uri +++ /dev/null @@ -1 +0,0 @@ -config:modules/module/odl-bgp-rib-impl-cfg:bgp-application-peer/$NAME diff --git a/csit/variables/bgpuser/bgp_application_peer/data.xml b/csit/variables/bgpuser/bgp_application_peer/data.xml index 623bb889ab..3b1b32f147 100644 --- a/csit/variables/bgpuser/bgp_application_peer/data.xml +++ b/csit/variables/bgpuser/bgp_application_peer/data.xml @@ -1,14 +1,6 @@ - - x:bgp-application-peer - example-bgp-peer-app - $IP - - x:rib-instance - example-bgp-rib - - example-app-rib - - x:dom-async-data-broker - pingpong-broker - - + + $IP + + application-peers + + diff --git a/csit/variables/bgpuser/bgp_application_peer/location.uri b/csit/variables/bgpuser/bgp_application_peer/location.uri new file mode 100644 index 0000000000..d713ddf1ec --- /dev/null +++ b/csit/variables/bgpuser/bgp_application_peer/location.uri @@ -0,0 +1 @@ +restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB_OPENCONFIG/bgp/neighbors/neighbor/$IP diff --git a/csit/variables/bgpuser/bgp_peer.beryllium/data.xml b/csit/variables/bgpuser/bgp_peer.beryllium/data.xml new file mode 100644 index 0000000000..234b39a24f --- /dev/null +++ b/csit/variables/bgpuser/bgp_peer.beryllium/data.xml @@ -0,0 +1,28 @@ + + prefix:bgp-peer + $BGP_NAME + $IP + $PEER_PORT + $HOLDTIME + $INITIATE + + prefix:rib-instance + $RIB_INSTANCE_NAME + + + prefix:bgp-peer-registry + global-bgp-peer-registry + + + prefix:bgp-table-type + ipv4-unicast + + + prefix:bgp-table-type + ipv6-unicast + + + prefix:bgp-table-type + linkstate + + diff --git a/csit/variables/bgpuser/bgp_peer.beryllium/location.uri b/csit/variables/bgpuser/bgp_peer.beryllium/location.uri new file mode 100644 index 0000000000..b88d6eb86c --- /dev/null +++ b/csit/variables/bgpuser/bgp_peer.beryllium/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$BGP_NAME diff --git a/csit/variables/bgpuser/bgp_peer.boron/data.xml b/csit/variables/bgpuser/bgp_peer.boron/data.xml new file mode 100644 index 0000000000..234b39a24f --- /dev/null +++ b/csit/variables/bgpuser/bgp_peer.boron/data.xml @@ -0,0 +1,28 @@ + + prefix:bgp-peer + $BGP_NAME + $IP + $PEER_PORT + $HOLDTIME + $INITIATE + + prefix:rib-instance + $RIB_INSTANCE_NAME + + + prefix:bgp-peer-registry + global-bgp-peer-registry + + + prefix:bgp-table-type + ipv4-unicast + + + prefix:bgp-table-type + ipv6-unicast + + + prefix:bgp-table-type + linkstate + + diff --git a/csit/variables/bgpuser/bgp_peer.boron/location.uri b/csit/variables/bgpuser/bgp_peer.boron/location.uri new file mode 100644 index 0000000000..b88d6eb86c --- /dev/null +++ b/csit/variables/bgpuser/bgp_peer.boron/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$BGP_NAME diff --git a/csit/variables/bgpuser/bgp_peer/config.uri b/csit/variables/bgpuser/bgp_peer/config.uri deleted file mode 100644 index 383950a4f1..0000000000 --- a/csit/variables/bgpuser/bgp_peer/config.uri +++ /dev/null @@ -1 +0,0 @@ -config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME diff --git a/csit/variables/bgpuser/bgp_peer/data.xml b/csit/variables/bgpuser/bgp_peer/data.xml index f3bc823539..b436e9a2ce 100644 --- a/csit/variables/bgpuser/bgp_peer/data.xml +++ b/csit/variables/bgpuser/bgp_peer/data.xml @@ -1,28 +1,34 @@ - - prefix:bgp-peer - $NAME - $IP - $PEER_PORT - $HOLDTIME - $INITIATE - - prefix:rib-instance - example-bgp-rib - - - prefix:bgp-peer-registry - global-bgp-peer-registry - - - prefix:bgp-table-type - ipv4-unicast - - - prefix:bgp-table-type - ipv6-unicast - - - prefix:bgp-table-type - linkstate - - + + $IP + + + false + + + + + $HOLDTIME + 5 + + + + + $PEER_PORT + $PASSIVE_MODE + + + + INTERNAL + + + + x:IPV4-UNICAST + + + x:IPV6-UNICAST + + + LINKSTATE + + + diff --git a/csit/variables/bgpuser/bgp_peer/location.uri b/csit/variables/bgpuser/bgp_peer/location.uri new file mode 100644 index 0000000000..d713ddf1ec --- /dev/null +++ b/csit/variables/bgpuser/bgp_peer/location.uri @@ -0,0 +1 @@ +restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB_OPENCONFIG/bgp/neighbors/neighbor/$IP diff --git a/csit/variables/bgpuser/ebgp_peers.beryllium/data.xml b/csit/variables/bgpuser/ebgp_peers.beryllium/data.xml new file mode 100644 index 0000000000..74c0028c07 --- /dev/null +++ b/csit/variables/bgpuser/ebgp_peers.beryllium/data.xml @@ -0,0 +1,31 @@ + + prefix:bgp-peer + $NAME + $IP + $PEER_PORT + $PEER_ROLE + $AS_NUMBER + $HOLDTIME + $INITIATE + + prefix:rib-instance + example-bgp-rib + + + prefix:bgp-peer-registry + global-bgp-peer-registry + + + prefix:bgp-table-type + ipv4-unicast + + + prefix:bgp-table-type + ipv6-unicast + + + prefix:bgp-table-type + linkstate + + + diff --git a/csit/variables/bgpuser/ebgp_peers.beryllium/location.uri b/csit/variables/bgpuser/ebgp_peers.beryllium/location.uri new file mode 100644 index 0000000000..b367efd4e2 --- /dev/null +++ b/csit/variables/bgpuser/ebgp_peers.beryllium/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME diff --git a/csit/variables/bgpuser/ebgp_peers.boron/data.xml b/csit/variables/bgpuser/ebgp_peers.boron/data.xml new file mode 100644 index 0000000000..74c0028c07 --- /dev/null +++ b/csit/variables/bgpuser/ebgp_peers.boron/data.xml @@ -0,0 +1,31 @@ + + prefix:bgp-peer + $NAME + $IP + $PEER_PORT + $PEER_ROLE + $AS_NUMBER + $HOLDTIME + $INITIATE + + prefix:rib-instance + example-bgp-rib + + + prefix:bgp-peer-registry + global-bgp-peer-registry + + + prefix:bgp-table-type + ipv4-unicast + + + prefix:bgp-table-type + ipv6-unicast + + + prefix:bgp-table-type + linkstate + + + diff --git a/csit/variables/bgpuser/ebgp_peers.boron/location.uri b/csit/variables/bgpuser/ebgp_peers.boron/location.uri new file mode 100644 index 0000000000..b367efd4e2 --- /dev/null +++ b/csit/variables/bgpuser/ebgp_peers.boron/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME diff --git a/csit/variables/bgpuser/ebgp_peers/config.uri b/csit/variables/bgpuser/ebgp_peers/config.uri deleted file mode 100644 index 383950a4f1..0000000000 --- a/csit/variables/bgpuser/ebgp_peers/config.uri +++ /dev/null @@ -1 +0,0 @@ -config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME diff --git a/csit/variables/bgpuser/ebgp_peers/data.xml b/csit/variables/bgpuser/ebgp_peers/data.xml index 74c0028c07..afb75c3cba 100644 --- a/csit/variables/bgpuser/ebgp_peers/data.xml +++ b/csit/variables/bgpuser/ebgp_peers/data.xml @@ -1,31 +1,30 @@ - - prefix:bgp-peer - $NAME - $IP - $PEER_PORT - $PEER_ROLE - $AS_NUMBER - $HOLDTIME - $INITIATE - - prefix:rib-instance - example-bgp-rib - - - prefix:bgp-peer-registry - global-bgp-peer-registry - - - prefix:bgp-table-type - ipv4-unicast - - - prefix:bgp-table-type - ipv6-unicast - - - prefix:bgp-table-type - linkstate - - - + + $IP + + + $HOLDTIME + 5 + + + + + $PEER_PORT + $PASSIVE_MODE + + + + EXTERNAL + $AS_NUMBER + + + + x:IPV4-UNICAST + + + x:IPV6-UNICAST + + + LINKSTATE + + + diff --git a/csit/variables/bgpuser/ebgp_peers/location.uri b/csit/variables/bgpuser/ebgp_peers/location.uri new file mode 100644 index 0000000000..d713ddf1ec --- /dev/null +++ b/csit/variables/bgpuser/ebgp_peers/location.uri @@ -0,0 +1 @@ +restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB_OPENCONFIG/bgp/neighbors/neighbor/$IP diff --git a/csit/variables/bgpuser/ibgp_peers.beryllium/data.xml b/csit/variables/bgpuser/ibgp_peers.beryllium/data.xml new file mode 100644 index 0000000000..a7e01bc0aa --- /dev/null +++ b/csit/variables/bgpuser/ibgp_peers.beryllium/data.xml @@ -0,0 +1,29 @@ + + prefix:bgp-peer + $NAME + $IP + $PEER_PORT + $PEER_ROLE + $HOLDTIME + $INITIATE + + prefix:rib-instance + example-bgp-rib + + + prefix:bgp-peer-registry + global-bgp-peer-registry + + + prefix:bgp-table-type + ipv4-unicast + + + prefix:bgp-table-type + ipv6-unicast + + + prefix:bgp-table-type + linkstate + + diff --git a/csit/variables/bgpuser/ibgp_peers.beryllium/location.uri b/csit/variables/bgpuser/ibgp_peers.beryllium/location.uri new file mode 100644 index 0000000000..b367efd4e2 --- /dev/null +++ b/csit/variables/bgpuser/ibgp_peers.beryllium/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME diff --git a/csit/variables/bgpuser/ibgp_peers.boron/data.xml b/csit/variables/bgpuser/ibgp_peers.boron/data.xml new file mode 100644 index 0000000000..a7e01bc0aa --- /dev/null +++ b/csit/variables/bgpuser/ibgp_peers.boron/data.xml @@ -0,0 +1,29 @@ + + prefix:bgp-peer + $NAME + $IP + $PEER_PORT + $PEER_ROLE + $HOLDTIME + $INITIATE + + prefix:rib-instance + example-bgp-rib + + + prefix:bgp-peer-registry + global-bgp-peer-registry + + + prefix:bgp-table-type + ipv4-unicast + + + prefix:bgp-table-type + ipv6-unicast + + + prefix:bgp-table-type + linkstate + + diff --git a/csit/variables/bgpuser/ibgp_peers.boron/location.uri b/csit/variables/bgpuser/ibgp_peers.boron/location.uri new file mode 100644 index 0000000000..b367efd4e2 --- /dev/null +++ b/csit/variables/bgpuser/ibgp_peers.boron/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME diff --git a/csit/variables/bgpuser/ibgp_peers/config.uri b/csit/variables/bgpuser/ibgp_peers/config.uri deleted file mode 100644 index 383950a4f1..0000000000 --- a/csit/variables/bgpuser/ibgp_peers/config.uri +++ /dev/null @@ -1 +0,0 @@ -config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME diff --git a/csit/variables/bgpuser/ibgp_peers/data.xml b/csit/variables/bgpuser/ibgp_peers/data.xml index a7e01bc0aa..01a1fa4d92 100644 --- a/csit/variables/bgpuser/ibgp_peers/data.xml +++ b/csit/variables/bgpuser/ibgp_peers/data.xml @@ -1,29 +1,34 @@ - - prefix:bgp-peer - $NAME - $IP - $PEER_PORT - $PEER_ROLE - $HOLDTIME - $INITIATE - - prefix:rib-instance - example-bgp-rib - - - prefix:bgp-peer-registry - global-bgp-peer-registry - - - prefix:bgp-table-type - ipv4-unicast - - - prefix:bgp-table-type - ipv6-unicast - - - prefix:bgp-table-type - linkstate - - + + $IP + + + $RR_CLIENT + + + + + $HOLDTIME + 5 + + + + + $PEER_PORT + $PASSIVE_MODE + + + + INTERNAL + + + + x:IPV4-UNICAST + + + x:IPV6-UNICAST + + + LINKSTATE + + + diff --git a/csit/variables/bgpuser/ibgp_peers/location.uri b/csit/variables/bgpuser/ibgp_peers/location.uri new file mode 100644 index 0000000000..d713ddf1ec --- /dev/null +++ b/csit/variables/bgpuser/ibgp_peers/location.uri @@ -0,0 +1 @@ +restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB_OPENCONFIG/bgp/neighbors/neighbor/$IP -- 2.36.6