Local address peer test 37/70837/27
authorTomas Markovic <tomas.markovic@pantheon.tech>
Thu, 12 Apr 2018 10:20:39 +0000 (12:20 +0200)
committerJamo Luhrsen <jluhrsen@redhat.com>
Mon, 30 Apr 2018 16:39:34 +0000 (16:39 +0000)
Test case meant for validation of
local-address functionality.
When set, bgp peer can connect only
on this address.

Refactor test suite for newer approach
to comparing topology with
TemplatedRequests robot library.
Remove unnecessary code.

Change-Id: I2e2ba913db0be84584740c51f97a25e154f9863e
Signed-off-by: Tomas Markovic <tomas.markovic@pantheon.tech>
csit/libraries/BGPSpeaker.robot
csit/suites/bgpcep/bgpuser/basic.robot
csit/variables/bgpuser/empty_topology/data.json [new file with mode: 0644]
csit/variables/bgpuser/empty_topology/location.uri [new file with mode: 0644]
csit/variables/bgpuser/filled_topology/data.json [new file with mode: 0644]
csit/variables/bgpuser/filled_topology/location.uri [new file with mode: 0644]
csit/variables/bgpuser/ibgp_local_address/data.xml [new file with mode: 0644]
csit/variables/bgpuser/ibgp_local_address/location.uri [new file with mode: 0644]

index 053debd06aea0929313a86a45e07ced470d44640..de5f2a8cd29263059848c7b4b2c0358c8d650b11 100644 (file)
@@ -26,10 +26,11 @@ Documentation     Robot keyword library (Resource) for handling the BGP speaker
 Library           SSHLibrary
 Library           RequestsLibrary
 Resource          RemoteBash.robot
+Resource          ../variables/Variables.robot
 
 *** Variables ***
 ${BGPSpeaker__OUTPUT_LOG}    play.py.out
-${PEER_URL}       /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F
+${PEER_URL}       restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F
 
 *** Keywords ***
 Start_BGP_Speaker
index 7d81884ca992d1739347120d5eafa575e51102ad..c06a069e83a6f5c5655ae0d716df5ec04a94f05a 100644 (file)
@@ -17,12 +17,19 @@ Documentation     Basic tests for odl-bgpcep-bgp-all feature.
 ...               - introduce 3 prefixes and try to withdraw the first one
 ...               (to be ignored by controller) in a single update message
 ...
-...               For versions Oxygen and further, there are TC_R (test case reset) which
+...               For versions Oxygen and above, there are TC_R (test case reset) which
 ...               test session-reset functionality.
 ...               Resets the session, and than verifies that example-ipv4-topology is empty again.
 ...
-...               For versions Fluorine and further, there are TC_PG (test case peer group) which
-...               test configuration and reconfiguration of peer-groups and neighbors configured by them.
+...               For versions Fluorine and above, there are test cases:
+...               TC_LA (test case local address)
+...               test configuration of internal peer with local-address configured
+...               - configure peer with local-address and connect bgp-speaker to it
+...               with tools_system_ip
+...               - check filled topology
+...
+...               TC_PG (test case peer group) which
+...               tests configuration and reconfiguration of peer-groups and neighbors configured by them.
 ...               - configure peer-group, and assign neighbor to this peer-group
 ...               - check filled topology
 ...               - reconfigure peer-group without ipv4 unicast afi-safi
@@ -31,10 +38,6 @@ Documentation     Basic tests for odl-bgpcep-bgp-all feature.
 ...
 ...               Brief description how to perform BGP functional test:
 ...               https://wiki.opendaylight.org/view/BGP_LS_PCEP:Lithium_Feature_Tests#How_to_test_2
-...
-...               Reported bugs:
-...               https://bugs.opendaylight.org/show_bug.cgi?id=4409
-...               https://bugs.opendaylight.org/show_bug.cgi?id=4634
 Suite Setup       Setup_Everything
 Suite Teardown    Teardown_Everything
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
@@ -42,41 +45,69 @@ Test Teardown     FailFast.Start_Failing_Fast_If_This_Failed
 Library           OperatingSystem
 Library           SSHLibrary    timeout=10s
 Library           RequestsLibrary
-Library           ../../../libraries/norm_json.py
-Variables         ../../../variables/bgpuser/variables.py    ${TOOLS_SYSTEM_IP}    ${ODL_STREAM}
-Resource          ../../../variables/Variables.robot
 Resource          ../../../libraries/BGPcliKeywords.robot
 Resource          ../../../libraries/BGPSpeaker.robot
+Resource          ../../../libraries/CompareStream.robot
 Resource          ../../../libraries/FailFast.robot
+Resource          ../../../libraries/KarafKeywords.robot
 Resource          ../../../libraries/KillPythonTool.robot
 Resource          ../../../libraries/SetupUtils.robot
 Resource          ../../../libraries/SSHKeywords.robot
 Resource          ../../../libraries/TemplatedRequests.robot
-Resource          ../../../libraries/Utils.robot
+Resource          ../../../variables/Variables.robot
 Resource          ../../../libraries/WaitForFailure.robot
-Resource          ../../../libraries/CompareStream.robot
 
 *** Variables ***
-${ACTUAL_RESPONSES_FOLDER}    ${TEMPDIR}/actual
-${EXPECTED_RESPONSES_FOLDER}    ${TEMPDIR}/expected
+${BGP_PEER_NAME}    example-bgp-peer
+${BGP_TOOL_LOG_LEVEL}    info
 ${BGP_VARIABLES_FOLDER}    ${CURDIR}/../../../variables/bgpuser/
-${TOOLS_SYSTEM_PROMPT}    ${DEFAULT_LINUX_PROMPT}
+${CONFIG_SESSION}    session
+${DEVICE_NAME}    controller-config
 ${HOLDTIME}       180
-${BGP_TOOL_LOG_LEVEL}    info
-${ODL_LOG_LEVEL}    INFO
 ${ODL_BGP_LOG_LEVEL}    DEFAULT
-${CONFIG_SESSION}    session
+${ODL_LOG_LEVEL}    INFO
 ${PEER_GROUP}     internal-neighbors
 ${PROTOCOL_OPENCONFIG}    ${RIB_INSTANCE}
-${DEVICE_NAME}    controller-config
-${BGP_PEER_NAME}    example-bgp-peer
 ${RIB_INSTANCE}    example-bgp-rib
+${TOOLS_SYSTEM_PROMPT}    ${DEFAULT_LINUX_PROMPT}
 
 *** Test Cases ***
 Check_For_Empty_Topology_Before_Talking
     [Documentation]    Sanity check example-ipv4-topology is up but empty.
     [Tags]    critical
-    Wait_For_Topology_To_Change_To    ${empty_json}    010_Empty.json    timeout=180s
+    Wait_For_Topology_To_Change_To    empty_topology    timeout=180s
+
+TC_LA_Reconfigure_Odl_To_Initiate_Connection
+    [Documentation]    Configure ibgp peer with local-address.
+    CompareStream.Run_Keyword_If_Less_Than_Fluorine    BuiltIn.Pass_Execution    Test case valid only for versions fluorine and above.
+    &{mapping}    Create Dictionary    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}    PASSIVE_MODE=false    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    ...    LOCAL=${ODL_SYSTEM_IP}
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}ibgp_local_address    mapping=${mapping}    session=${CONFIG_SESSION}
+    [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+TC_LA_Start_Bgp_Speaker_And_Verify_Connected
+    [Documentation]    Verify that peer is present in odl's rib under local-address ip.
+    [Tags]    critical
+    CompareStream.Run_Keyword_If_Less_Than_Fluorine    BuiltIn.Pass_Execution    Test case valid only for versions fluorine and above.
+    ${speaker_args}    BuiltIn.Set_Variable    --amount 3 --listen --myip=${TOOLS_SYSTEM_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --debug
+    ${output}    BGPSpeaker.Start_BGP_Speaker_And_Verify_Connected    ${speaker_args}    session=${CONFIG_SESSION}    speaker_ip=${TOOLS_SYSTEM_IP}
+    BuiltIn.Log    ${output}
+
+TC_LA_Kill_Bgp_Speaker
+    [Documentation]    Abort the Python speaker. Also, attempt to stop failing fast.
+    [Tags]    critical
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+    CompareStream.Run_Keyword_If_Less_Than_Fluorine    BuiltIn.Pass_Execution    Test case valid only for versions fluorine and above.
+    BGPSpeaker.Kill_BGP_Speaker
+    FailFast.Do_Not_Fail_Fast_From_Now_On
+    # NOTE: It is still possible to remain failing fast, if both previous and this test have failed.
+    [Teardown]    FailFast.Do_Not_Start_Failing_If_This_Failed
+
+TC_LA_Delete_Bgp_Peer_Configuration
+    [Documentation]    Delete peer configuration.
+    CompareStream.Run_Keyword_If_Less_Than_Fluorine    BuiltIn.Pass_Execution    Test case valid only for versions fluorine and above.
+    &{mapping}    Create Dictionary    IP=${TOOLS_SYSTEM_IP}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}ibgp_local_address    mapping=${mapping}    session=${CONFIG_SESSION}
 
 Reconfigure_ODL_To_Accept_Connection
     [Documentation]    Configure BGP peer module with initiate-connection set to false.
@@ -95,12 +126,11 @@ Check_Talking_Connection_Is_Established
     [Documentation]    See TCP (BGP) connection in established state.
     # This case is separate from the previous one, to resemble structure of the second half of this suite more closely.
     Check_Speaker_Is_Connected
-    [Teardown]    Utils.Report_Failure_Due_To_Bug    5171
 
 Check_Talking_Topology_Is_Filled
     [Documentation]    See new routes in example-ipv4-topology as a proof that synchronization was correct.
     [Tags]    critical
-    Wait_For_Topology_To_Change_To    ${filled_json}    020_Filled.json
+    Wait_For_Topology_To_Change_To    filled_topology
 
 TC_R_Reset_Bgp_Peer_Session
     [Documentation]    Reset Peer Session
@@ -113,7 +143,7 @@ TC_R_Check_For_Empty_Topology_After_Resetting
     [Documentation]    See example-ipv4-topology empty after resetting session
     [Tags]    critical
     CompareStream.Run_Keyword_If_Less_Than_Oxygen    BuiltIn.Pass_Execution    Test case valid only for versions oxygen and above.
-    Wait_For_Topology_To_Change_To    ${empty_json}    030_Empty.json
+    Wait_For_Topology_To_Change_To    empty_topology
 
 TC_PG_Reconfigure_ODL_With_Peer_Group_To_Accept_Connection
     [Documentation]    Configure BGP peer module with initiate-connection set to false.
@@ -138,7 +168,7 @@ TC_PG_Check_Talking_Topology_Is_Filled
     [Documentation]    See new routes in example-ipv4-topology as a proof that synchronization was correct.
     [Tags]    critical
     CompareStream.Run_Keyword_If_Less_Than_Fluorine    BuiltIn.Pass_Execution    Test case valid only for versions fluorine and above.
-    Wait_For_Topology_To_Change_To    ${filled_json}    021_Filled.json
+    Wait_For_Topology_To_Change_To    filled_topology
 
 TC_PG_Reconfigure_ODL_With_Peer_Group_Without_Ipv4_Unicast
     [Documentation]    Configure BGP peer module with initiate-connection set to false. (Fluorine only)
@@ -150,7 +180,7 @@ TC_PG_Check_For_Empty_Topology_After_Deconfiguration
     [Documentation]    See example-ipv4-topology empty after resetting session (Fluorine only)
     [Tags]    critical
     CompareStream.Run_Keyword_If_Less_Than_Fluorine    BuiltIn.Pass_Execution    Test case valid only for versions fluorine and above.
-    Wait_For_Topology_To_Change_To    ${empty_json}    031_Empty.json
+    Wait_For_Topology_To_Change_To    empty_topology
 
 TC_PG_Reconfigure_ODL_To_Accept_Connection
     [Documentation]    Configure BGP peer module with initiate-connection set to false. (Fluorine only)
@@ -174,7 +204,7 @@ Kill_Talking_BGP_Speaker
 Check_For_Empty_Topology_After_Talking
     [Documentation]    See example-ipv4-topology empty again.
     [Tags]    critical
-    Wait_For_Topology_To_Change_To    ${empty_json}    030_Empty.json
+    Wait_For_Topology_To_Change_To    empty_topology
 
 Start_Listening_BGP_Speaker
     [Documentation]    Start Python speaker in listening mode, verify that the tool does not exit quickly.
@@ -188,7 +218,7 @@ Check_Listening_Connection_Is_Not_Established_Yet
 Check_For_Empty_Topology_Before_Listening
     [Documentation]    Sanity check example-ipv4-topology is still empty.
     [Tags]    critical
-    Verify_That_Topology_Does_Not_Change_From    ${empty_json}    040_Empty.json
+    Verify_That_Topology_Does_Not_Change_From    empty_topology
 
 Reconfigure_ODL_To_Initiate_Connection
     [Documentation]    Replace BGP peer config module, now with initiate-connection set to true.
@@ -203,7 +233,7 @@ Check_Listening_Connection_Is_Established
 Check_Listening_Topology_Is_Filled
     [Documentation]    See new routes in example-ipv4-topology as a proof that synchronization was correct.
     [Tags]    critical
-    Wait_For_Topology_To_Change_To    ${filled_json}    050_Filled.json
+    Wait_For_Topology_To_Change_To    filled_topology
 
 Kill_Listening_BGP_Speaker
     [Documentation]    Abort the Python speaker. Also, attempt to stop failing fast.
@@ -217,7 +247,7 @@ Kill_Listening_BGP_Speaker
 Check_For_Empty_Topology_After_Listening
     [Documentation]    Post-condition: Check example-ipv4-topology is empty again.
     [Tags]    critical
-    Wait_For_Topology_To_Change_To    ${empty_json}    060_Empty.json
+    Wait_For_Topology_To_Change_To    empty_topology
 
 Start_Listening_BGP_Speaker_Case_2
     [Documentation]    BGP Speaker introduces 2 prefixes in the first update & another 2 prefixes while the very first is withdrawn in 2nd update
@@ -231,8 +261,7 @@ Check_Listening_Connection_Is_Established_Case_2
 Check_Listening_Topology_Is_Filled_Case_2
     [Documentation]    See new routes in example-ipv4-topology as a proof that synchronization was correct.
     [Tags]    critical
-    Wait_For_Topology_To_Change_To    ${filled_json}    050_Filled.json
-    [Teardown]    Report_Failure_Due_To_Bug    4409
+    Wait_For_Topology_To_Change_To    filled_topology
 
 Kill_Listening_BGP_Speaker_Case_2
     [Documentation]    Abort the Python speaker. Also, attempt to stop failing fast.
@@ -246,10 +275,10 @@ Kill_Listening_BGP_Speaker_Case_2
 Check_For_Empty_Topology_After_Listening_Case_2
     [Documentation]    Post-condition: Check example-ipv4-topology is empty again.
     [Tags]    critical
-    Wait_For_Topology_To_Change_To    ${empty_json}    060_Empty.json
+    Wait_For_Topology_To_Change_To    empty_topology
 
 Start_Listening_BGP_Speaker_Case_3
-    [Documentation]    BGP Speaker introduces 3 prefixes while the first one occures again in the withdrawn list (to be ignored bu controller)
+    [Documentation]    BGP Speaker introduces 3 prefixes while the first one occures again in the withdrawn list (to be ignored by controller)
     BGPSpeaker.Start_BGP_Speaker    --amount 2 --listen --myip=${TOOLS_SYSTEM_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --prefill=0 --insert=3 --withdraw=1 --updates=single --${BGP_TOOL_LOG_LEVEL}
     Read_And_Fail_If_Prompt_Is_Seen
 
@@ -260,8 +289,7 @@ Check_Listening_Connection_Is_Established_Case_3
 Check_Listening_Topology_Is_Filled_Case_3
     [Documentation]    See new routes in example-ipv4-topology as a proof that synchronization was correct.
     [Tags]    critical
-    Wait_For_Topology_To_Change_To    ${filled_json}    050_Filled.json
-    [Teardown]    Report_Failure_Due_To_Bug    4634
+    Wait_For_Topology_To_Change_To    filled_topology
 
 Kill_Listening_BGP_Speaker_Case_3
     [Documentation]    Abort the Python speaker. Also, attempt to stop failing fast.
@@ -275,29 +303,19 @@ Kill_Listening_BGP_Speaker_Case_3
 Check_For_Empty_Topology_After_Listening_Case_3
     [Documentation]    Post-condition: Check example-ipv4-topology is empty again.
     [Tags]    critical
-    Wait_For_Topology_To_Change_To    ${empty_json}    060_Empty.json
+    Wait_For_Topology_To_Change_To    empty_topology
 
 Delete_Bgp_Peer_Configuration
     [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}    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 ***
 Setup_Everything
     [Documentation]    Initialize SetupUtils. SSH-login to mininet machine, create HTTP session,
-    ...    prepare directories for responses, put Python tool to mininet machine, setup imported resources.
+    ...    put Python tool to mininet machine, setup imported resources.
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
     SSHLibrary.Set_Default_Configuration    prompt=${TOOLS_SYSTEM_PROMPT}
-    RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API}    auth=${AUTH}
-    # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
-    # TODO: Alternatively, create variable in Variables which starts with http.
-    # Both TODOs would probably need to update every suite relying on current Variables.
-    OperatingSystem.Remove_Directory    ${EXPECTED_RESPONSES_FOLDER}    recursive=True
-    OperatingSystem.Remove_Directory    ${ACTUAL_RESPONSES_FOLDER}    recursive=True
-    # The previous suite may have been using the same directories.
-    OperatingSystem.Create_Directory    ${EXPECTED_RESPONSES_FOLDER}
-    OperatingSystem.Create_Directory    ${ACTUAL_RESPONSES_FOLDER}
     SSHLibrary.Open_Connection    ${TOOLS_SYSTEM_IP}
     SSHKeywords.Flexible_Mininet_Login
     SSHKeywords.Require_Python
@@ -309,47 +327,25 @@ Setup_Everything
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.protocol
 
 Teardown_Everything
-    [Documentation]    Create and Log the diff between expected and actual responses, make sure Python tool was killed.
-    ...    Tear down imported Resources.
-    ${diff}=    OperatingSystem.Run    diff -dur ${EXPECTED_RESPONSES_FOLDER} ${ACTUAL_RESPONSES_FOLDER}
-    BuiltIn.Log    ${diff}
+    [Documentation]    Make sure Python tool was killed, delete all sessions, tear down imported Resources.
     KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
     RequestsLibrary.Delete_All_Sessions
     SSHLibrary.Close_All_Connections
 
 Wait_For_Topology_To_Change_To
-    [Arguments]    ${json_topology}    ${filename}    ${timeout}=10s    ${refresh}=1s
-    [Documentation]    Normalize the expected json topology and save it to ${EXPECTED_RESPONSES_FOLDER}.
-    ...    Wait until Compare_Topology matches. ${ACTUAL_RESPONSES_FOLDER} will hold its last result.
-    ${topology_normalized}=    Normalize_And_Save_Expected_Json    ${json_topology}    ${filename}    ${EXPECTED_RESPONSES_FOLDER}
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${timeout}    ${refresh}    Compare_Topology    ${topology_normalized}    ${filename}
+    [Arguments]    ${folder_name}    ${timeout}=10s    ${refresh}=1s
+    [Documentation]    Wait until Compare_Topology matches expected result.
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${timeout}    ${refresh}    Compare_Topology    ${folder_name}
 
 Verify_That_Topology_Does_Not_Change_From
-    [Arguments]    ${json_topology}    ${filename}    ${timeout}=10s    ${refresh}=1s
-    [Documentation]    Normalize the expected json topology and save it to ${EXPECTED_RESPONSES_FOLDER}.
-    ...    Verify that Compare_Topology keeps passing. ${ACTUAL_RESPONSES_FOLDER} will hold its last result.
-    ${topology_normalized}=    Normalize_And_Save_Expected_Json    ${json_topology}    ${filename}    ${EXPECTED_RESPONSES_FOLDER}
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${timeout}    ${refresh}    Compare_Topology    ${topology_normalized}    ${filename}
+    [Arguments]    ${folder_name}    ${timeout}=10s    ${refresh}=1s
+    [Documentation]    Verify that Compare_Topology keeps passing, it will hold its last result.
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${timeout}    ${refresh}    Compare_Topology    ${folder_name}
 
 Compare_Topology
-    [Arguments]    ${expected_normalized}    ${filename}
-    [Documentation]    Get current example-ipv4-topology as json, normalize it, save to ${ACTUAL_RESPONSES_FOLDER}.
-    ...    Check that status code is 200, check that normalized jsons match exactly.
-    ${response}=    RequestsLibrary.Get Request    operational    topology/example-ipv4-topology
-    BuiltIn.Log    ${response.status_code}
-    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}
-
-Normalize_And_Save_Expected_Json
-    [Arguments]    ${json_text}    ${filename}    ${directory}
-    [Documentation]    Normalize given json using norm_json library. Log and save the result to given filename under given directory.
-    ${json_normalized}=    norm_json.normalize_json_text    ${json_text}
-    BuiltIn.Log    ${json_normalized}
-    OperatingSystem.Create_File    ${directory}${/}${filename}    ${json_normalized}
-    # TODO: Should we prepend .json to the filename? When we detect it is not already prepended?
-    [Return]    ${json_normalized}
+    [Arguments]    ${folder_name}
+    [Documentation]    Get current example-ipv4-topology as json, and compare it to expected result.
+    TemplatedRequests.Get_As_Json_Templated    ${BGP_VARIABLES_FOLDER}${/}${folder_name}    session=${CONFIG_SESSION}    verify=True
 
 Check_Speaker_Is_Not_Connected
     [Documentation]    Give it a few tries to see zero established connections.
diff --git a/csit/variables/bgpuser/empty_topology/data.json b/csit/variables/bgpuser/empty_topology/data.json
new file mode 100644 (file)
index 0000000..e9b7b90
--- /dev/null
@@ -0,0 +1,11 @@
+{
+ "topology": [
+  {
+   "server-provided": true,
+   "topology-id": "example-ipv4-topology",
+   "topology-types": {
+       "odl-bgp-topology-types:bgp-ipv4-reachability-topology": {}
+   }
+  }
+ ]
+}
diff --git a/csit/variables/bgpuser/empty_topology/location.uri b/csit/variables/bgpuser/empty_topology/location.uri
new file mode 100644 (file)
index 0000000..69f1f7b
--- /dev/null
@@ -0,0 +1 @@
+restconf/operational/network-topology:network-topology/topology/example-ipv4-topology
diff --git a/csit/variables/bgpuser/filled_topology/data.json b/csit/variables/bgpuser/filled_topology/data.json
new file mode 100644 (file)
index 0000000..f9eb256
--- /dev/null
@@ -0,0 +1,29 @@
+{
+ "topology": [
+  {
+   "node": [
+    {
+     "l3-unicast-igp-topology:igp-node-attributes": {
+      "prefix": [
+       {
+        "prefix": "8.0.1.0/28"
+       },
+       {
+        "prefix": "8.0.1.16/28"
+       },
+       {
+        "prefix": "8.0.1.32/28"
+       }
+      ]
+     },
+     "node-id": "192.0.2.1"
+    }
+   ],
+   "server-provided": true,
+   "topology-id": "example-ipv4-topology",
+   "topology-types": {
+       "odl-bgp-topology-types:bgp-ipv4-reachability-topology": {}
+   }
+  }
+ ]
+}
diff --git a/csit/variables/bgpuser/filled_topology/location.uri b/csit/variables/bgpuser/filled_topology/location.uri
new file mode 100644 (file)
index 0000000..69f1f7b
--- /dev/null
@@ -0,0 +1 @@
+restconf/operational/network-topology:network-topology/topology/example-ipv4-topology
diff --git a/csit/variables/bgpuser/ibgp_local_address/data.xml b/csit/variables/bgpuser/ibgp_local_address/data.xml
new file mode 100644 (file)
index 0000000..e1028d0
--- /dev/null
@@ -0,0 +1,35 @@
+<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+    <neighbor-address>$IP</neighbor-address>
+    <route-reflector>
+        <config>
+            <route-reflector-client>false</route-reflector-client>
+        </config>
+    </route-reflector>
+    <timers>
+        <config>
+            <hold-time>$HOLDTIME</hold-time>
+            <connect-retry>5</connect-retry>
+        </config>
+    </timers>
+    <transport>
+        <config>
+            <remote-port>$PEER_PORT</remote-port>
+            <passive-mode>$PASSIVE_MODE</passive-mode>
+            <local-address>$LOCAL</local-address>
+        </config>
+    </transport>
+    <config>
+        <peer-type>INTERNAL</peer-type>
+    </config>
+    <afi-safis>
+        <afi-safi>
+            <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
+        </afi-safi>
+        <afi-safi>
+            <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
+        </afi-safi>
+        <afi-safi>
+            <afi-safi-name>LINKSTATE</afi-safi-name>
+        </afi-safi>
+    </afi-safis>
+</neighbor>
diff --git a/csit/variables/bgpuser/ibgp_local_address/location.uri b/csit/variables/bgpuser/ibgp_local_address/location.uri
new file mode 100644 (file)
index 0000000..d713ddf
--- /dev/null
@@ -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