L3vpn test update 29/75529/23
authorTomas Markovic <tomas.markovic@pantheon.tech>
Mon, 27 Aug 2018 07:19:50 +0000 (09:19 +0200)
committerLuis Gomez <ecelgp@gmail.com>
Fri, 7 Sep 2018 17:25:55 +0000 (17:25 +0000)
Additional configuration is necessary due
to policy changes in bgpcep implementation.

BGP policies require route target argument in
order for application peer to distribute routes
back to internal bgp peer. So we have to first
send route containg route-target argument from
ibgp, and then we can send l3vpn route to app
peer so it can identify ibgp as appropriate
for advertizement of such route.

Switched from using exabgp to play.py for sending
route from internal peer to application peer in
odl versions fluorine and further.

Change-Id: Id3570b421491a8c906f3e848fef6922d6812e07c
Signed-off-by: Tomas Markovic <tomas.markovic@pantheon.tech>
csit/libraries/BgpOperations.robot
csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot
csit/variables/bgpfunctional/l3vpn_ipv4/bgp_peer/data.xml [new file with mode: 0644]
csit/variables/bgpfunctional/l3vpn_ipv4/bgp_peer/location.uri [new file with mode: 0644]
csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/announce_l3vpn_rt_arg.hex [new file with mode: 0644]
csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/app/location.uri [new file with mode: 0644]
csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/app/post_data.xml [new file with mode: 0644]
csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/rib/data.json [new file with mode: 0644]
csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/rib/location.uri [new file with mode: 0644]
csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/withdraw_l3vpn_rt_arg.hex [new file with mode: 0644]
csit/variables/bgpfunctional/rt_constrain/rt_constrain_type_0/app/location.uri

index 8929146633951bd3996beb31709201c97b6359f7..45342ff1100bcb2baadac62e46b838a9834eaf2e 100644 (file)
@@ -1,6 +1,7 @@
 *** Settings ***
 Documentation     This library contains keywords related to the BGP functionality.
 Library           SSHLibrary
+Library           String
 Library           BgpRpcClient.py    ${TOOLS_SYSTEM_IP}
 Resource          ../variables/Variables.robot
 Resource          Utils.robot
@@ -306,12 +307,12 @@ Bmp_Monitor_Postcondition
     BuiltIn.Log    ${output}
 
 Odl_To_Play_Template
-    [Arguments]    ${totest}    ${dir}
+    [Arguments]    ${totest}    ${dir}    ${remove}=True
     ${announce_hex} =    OperatingSystem.Get_File    ${dir}/${totest}/announce_${totest}.hex
     ${announce_hex} =    String.Remove_String    ${announce_hex}    \n
     ${withdraw_hex} =    OperatingSystem.Get_File    ${dir}/${totest}/withdraw_${totest}.hex
     ${withdraw_hex} =    String.Remove_String    ${withdraw_hex}    \n
-    BgpRpcClient.play_clean
+    BuiltIn.Run_Keyword_If    '${remove}' == 'True'    BgpRpcClient.play_clean
     TemplatedRequests.Post_As_Xml_Templated    ${dir}/${totest}/app    mapping=${APP_PEER}    session=${CONFIG_SESSION}
     ${update}    BuiltIn.Wait_Until_Keyword_Succeeds    3x    2s    Get_Update_Message
     BuiltIn.Should_Be_Equal_As_Strings    ${update}    ${announce_hex}
@@ -323,8 +324,8 @@ Odl_To_Play_Template
 
 Play_To_Odl_Template
     [Arguments]    ${totest}    ${dir}    ${ipv}=ipv4
-    ${announce_hex} =    OperatingSystem.Get_File    ${dir}/${totest}/announce_${totest}.hex
-    ${withdraw_hex} =    OperatingSystem.Get_File    ${dir}/${totest}/withdraw_${totest}.hex
+    ${announce_hex}=    OperatingSystem.Get_File    ${dir}/${totest}/announce_${totest}.hex
+    ${withdraw_hex}=    OperatingSystem.Get_File    ${dir}/${totest}/withdraw_${totest}.hex
     BgpRpcClient.play_clean
     BgpRpcClient.play_send    ${announce_hex}
     BuiltIn.Wait_Until_Keyword_Succeeds    3x    2s    TemplatedRequests.Get_As_Json_Templated    ${dir}/${totest}/rib    mapping=${ADJ_RIB_IN}    session=${CONFIG_SESSION}
@@ -338,6 +339,14 @@ Play_To_Odl_Template
     ...    verify=True
     [Teardown]    BgpRpcClient.play_send    ${withdraw_hex}
 
+Play_To_Odl_Non_Removal_Template
+    [Arguments]    ${totest}    ${dir}    ${ipv}=ipv4
+    ${announce_hex}=    OperatingSystem.Get_File    ${dir}/${totest}/announce_${totest}.hex
+    BgpRpcClient.play_clean
+    BgpRpcClient.play_send    ${announce_hex}
+    BuiltIn.Wait_Until_Keyword_Succeeds    3x    2s    TemplatedRequests.Get_As_Json_Templated    ${dir}/${totest}/rib    mapping=${LOC_RIB}    session=${CONFIG_SESSION}
+    ...    verify=True
+
 Get_Update_Message
     [Documentation]    Returns hex update message.
     ${update} =    BgpRpcClient.play_get
index e4e8423332ae8317904d12ced2608ed30dffe643..bbbbf73a779cf875b2e78822aa31303cf0137466 100644 (file)
@@ -11,53 +11,61 @@ Documentation     Functional test suite for bgp - l3vpn-ipv4
 ...               It uses odl and exabgp as bgp peers. Routes advertized from odl
 ...               are configured via application peer. Routes advertised from exabgp is
 ...               statically configured in exabgp config file.
+...
+...               For fluorine and further, instead of exabgp, play.py is used. When sending
+...               routes from odl to peer, first route containg route-target argument have to
+...               be send from peer to odl, so odl can identify this peer. Than it sends l3vpn
+...               route containg this argument to odl app peer, and we check that app peer
+...               advertizes this route back to the peer.
 Suite Setup       Start_Suite
 Suite Teardown    Stop_Suite
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
 Library           RequestsLibrary
 Library           SSHLibrary
-Resource          ${CURDIR}/../../../variables/Variables.robot
-Resource          ${CURDIR}/../../../libraries/ExaBgpLib.robot
-Resource          ${CURDIR}/../../../libraries/Utils.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
-Resource          ${CURDIR}/../../../libraries/CompareStream.robot
-Library           ${CURDIR}/../../../libraries/BgpRpcClient.py    ${TOOLS_SYSTEM_IP}
+Library           ../../../libraries/BgpRpcClient.py    ${TOOLS_SYSTEM_IP}
+Resource          ../../../libraries/BGPcliKeywords.robot
+Resource          ../../../libraries/BgpOperations.robot
+Resource          ../../../libraries/BGPSpeaker.robot
+Resource          ../../../libraries/CompareStream.robot
+Resource          ../../../libraries/ExaBgpLib.robot
+Resource          ../../../libraries/KarafKeywords.robot
+Resource          ../../../libraries/SetupUtils.robot
+Resource          ../../../libraries/SSHKeywords.robot
+Resource          ../../../libraries/TemplatedRequests.robot
+Resource          ../../../libraries/Utils.robot
+Resource          ../../../variables/Variables.robot
 
 *** Variables ***
-${HOLDTIME}       180
-${DEVICE_NAME}    controller-config
-${BGP_PEER_NAME}    example-bgp-peer
-${RIB_INSTANCE}    example-bgp-rib
-${PROTOCOL_OPENCONFIG}    ${RIB_INSTANCE}
-${APP_PEER_NAME}    example-bgp-peer-app
-${BGP_VAR_FOLDER}    ${CURDIR}/../../../variables/bgpfunctional
 ${BGP_L3VPN_DIR}    ${BGP_VAR_FOLDER}/l3vpn_ipv4
-${DEFAUTL_EXA_CFG}    exa.cfg
+${BGP_VAR_FOLDER}    ${CURDIR}/../../../variables/bgpfunctional
+${CONFIG_SESSION}    config-session
+${DEFAULT_BGPCEP_LOG_LEVEL}    INFO
+${DEFAULT_EXA_CFG}    exa.cfg
+${EXARPCSCRIPT}    ${CURDIR}/../../../../tools/exabgp_files/exarpc.py
+${HOLDTIME}       180
 ${L3VPN_EXA_CFG}    bgp-l3vpn-ipv4.cfg
-${L3VPN_RSPEMPTY}    ${BGP_L3VPN_DIR}/bgp-l3vpn-ipv4-empty.json
+${L3VPN_EXP}      ${BGP_L3VPN_DIR}/route_expected/exa-expected.json
 ${L3VPN_RSP}      ${BGP_L3VPN_DIR}/bgp-l3vpn-ipv4.json
+${L3VPN_RSPEMPTY}    ${BGP_L3VPN_DIR}/bgp-l3vpn-ipv4-empty.json
 ${L3VPN_RSP_PATH}    ${BGP_L3VPN_DIR}/bgp-l3vpn-ipv4-path.json
 ${L3VPN_URL}      /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes
-${L3VPN_EXP}      ${BGP_L3VPN_DIR}/route_expected/exa-expected.json
-${CONFIG_SESSION}    config-session
-${EXARPCSCRIPT}    ${CURDIR}/../../../../tools/exabgp_files/exarpc.py
 ${PEER_CHECK_URL}    /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F
-${DEFAULT_BGPCEP_LOG_LEVEL}    INFO
+${PLAY_SCRIPT}    ${CURDIR}/../../../../tools/fastbgp/play.py
+${RIB_INSTANCE}    example-bgp-rib
+${RT_CONSTRAIN_DIR}    ${CURDIR}/../../../variables/bgpfunctional/rt_constrain
 
 *** Test Cases ***
 Configure_App_Peer
     [Documentation]    Configures bgp application peer. Openconfig is used for carbon and above.
-    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    APP_PEER_NAME=${APP_PEER_NAME}    RIB_INSTANCE_NAME=${RIB_INSTANCE}    APP_PEER_ID=${ODL_SYSTEM_IP}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
-    ...    IP=${ODL_SYSTEM_IP}
-    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VAR_FOLDER}/app_peer    mapping=${mapping}    session=${CONFIG_SESSION}
+    &{mapping}    BuiltIn.Create_Dictionary    BGP_RIB=${RIB_INSTANCE}    IP=${ODL_SYSTEM_IP}
+    TemplatedRequests.Put_As_Xml_Templated    ${RT_CONSTRAIN_DIR}/app_peer    mapping=${mapping}    session=${CONFIG_SESSION}
 
 Reconfigure_ODL_To_Accept_Connection
     [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}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    PASSIVE_MODE=true
-    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VAR_FOLDER}/bgp_peer    mapping=${mapping}    session=${CONFIG_SESSION}
+    &{mapping}    BuiltIn.Create_Dictionary    IP=${TOOLS_SYSTEM_IP}    BGP_RIB=${RIB_INSTANCE}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}    INITIATE=false
+    ...    BGP_RIB_OPENCONFIG=${RIB_INSTANCE}    PASSIVE_MODE=true
+    CompareStream.Run_Keyword_If_At_Least_Fluorine    TemplatedRequests.Put_As_Xml_Templated    ${RT_CONSTRAIN_DIR}/bgp_peer    mapping=${mapping}    session=${CONFIG_SESSION}
+    CompareStream.Run_Keyword_If_Less_Than_Fluorine    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VAR_FOLDER}/bgp_peer    mapping=${mapping}    session=${CONFIG_SESSION}
 
 L3vpn_Ipv4_To_Odl
     [Documentation]    Testing mpls vpn ipv4 routes reported to odl from exabgp
@@ -66,25 +74,49 @@ L3vpn_Ipv4_To_Odl
     BuiltIn.Wait_Until_Keyword_Succeeds    15s    1s    Verify Reported Data    ${L3VPN_URL}    ${L3VPN_RESPONSE}
     [Teardown]    Teardown_Simple
 
-L3vpn_Ipv4_From_Odl
-    [Documentation]    Testing mpls vpn ipv4 routes reported from odl to exabgp
-    [Setup]    Setup_Testcase    ${DEFAUTL_EXA_CFG}
-    BgpRpcClient.exa_clean_update_message
-    &{mapping}    BuiltIn.Create_Dictionary    BGP_PEER_IP=${TOOLS_SYSTEM_IP}    APP_PEER_IP=${ODL_SYSTEM_IP}
-    ${BGP_L3VPN_DIR_ROUTE}    CompareStream.Set_Variable_If_At_Least_Fluorine    ${BGP_L3VPN_DIR}/route-path    ${BGP_L3VPN_DIR}/route
-    TemplatedRequests.Post_As_Xml_Templated    ${BGP_L3VPN_DIR_ROUTE}    mapping=${mapping}    session=${CONFIG_SESSION}
-    BuiltIn.Wait_Until_Keyword_Succeeds    5x    2s    Verify_ExaBgp_Received_Update    ${L3VPN_EXP}
-    [Teardown]    Teardowm_With_Remove_Route
+Start_Play
+    [Documentation]    Start Python speaker to connect to ODL. We need to do WUKS until odl really starts to accept incomming bgp connection. The failure happens if the incomming connection comes too quickly after configuring the peer in the previous test case.
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+    CompareStream.Run_Keyword_If_Less_Than_Fluorine    BuiltIn.Pass_Execution    "Only run on Fluorine and later"
+    SSHLibrary.Put File    ${PLAY_SCRIPT}    .
+    SSHKeywords.Assure_Library_Ipaddr    target_dir=.
+    SSHLibrary.Read
+    BuiltIn.Wait_Until_Keyword_Succeeds    3x    1s    Start_Bgp_Peer
+
+Play_To_Odl_rt_constrain_type_0
+    [Documentation]    This keyword sends route-target route containg route-target argument so odl
+    ...    can identify this peer as appropriate for advertizement when it recieves such route.
+    CompareStream.Run_Keyword_If_Less_Than_Fluorine    BuiltIn.Pass_Execution    "Only run on Fluorine and later"
+    BgpOperations.Play_To_Odl_Non_Removal_Template    rt_constrain_type_0    ${RT_CONSTRAIN_DIR}
+
+Odl_To_Play_l3vpn
+    [Documentation]    Send l3vpn route to app peer, and than checks that app peer advertizes this route.
+    CompareStream.Run_Keyword_If_At_Least_Fluorine    BuiltIn.Pass_Execution    "Only run on less than Fluorine"
+    Setup_Testcase    ${DEFAULT_EXA_CFG}
+    L3vpn_Ipv4_To_App
+    [Teardown]    CompareStream.Run_Keyword_If_Less_Than_Fluorine    Teardowm_With_Remove_Route
+
+Odl_To_Play_l3vpn_rt_arg
+    [Documentation]    Same as TC before but fluorine and further this l3vpn route also needs to contain route-target argument.
+    CompareStream.Run_Keyword_If_Less_Than_Fluorine    BuiltIn.Pass_Execution    "Only run on Fluorine and later"
+    BgpOperations.Odl_To_Play_Template    l3vpn_rt_arg    ${RT_CONSTRAIN_DIR}    False
+
+Kill_Talking_BGP_Speaker
+    [Documentation]    Abort the Python speaker
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+    CompareStream.Run_Keyword_If_Less_Than_Fluorine    BuiltIn.Pass_Execution    "Only run on Fluorine and later"
+    BGPSpeaker.Kill_BGP_Speaker
+    BGPcliKeywords.Store_File_To_Workspace    play.py.out    010_l3vpn_play.log
 
 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_VAR_FOLDER}/bgp_peer    mapping=${mapping}    session=${CONFIG_SESSION}
+    &{mapping}    BuiltIn.Create_Dictionary    IP=${TOOLS_SYSTEM_IP}    BGP_RIB=${RIB_INSTANCE}
+    TemplatedRequests.Delete_Templated    ${RT_CONSTRAIN_DIR}/bgp_peer    mapping=${mapping}    session=${CONFIG_SESSION}
 
 Deconfigure_App_Peer
     [Documentation]    Revert the BGP configuration to the original state: without application peer
-    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    APP_PEER_NAME=${APP_PEER_NAME}    IP=${ODL_SYSTEM_IP}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
-    TemplatedRequests.Delete_Templated    ${BGP_VAR_FOLDER}/app_peer    mapping=${mapping}    session=${CONFIG_SESSION}
+    &{mapping}    BuiltIn.Create_Dictionary    IP=${ODL_SYSTEM_IP}    BGP_RIB=${RIB_INSTANCE}
+    TemplatedRequests.Delete_Templated    ${RT_CONSTRAIN_DIR}/app_peer    mapping=${mapping}    session=${CONFIG_SESSION}
 
 *** Keywords ***
 Start_Suite
@@ -97,17 +129,15 @@ Start_Suite
     SSHKeywords.Virtual_Env_Install_Package    exabgp==3.4.16
     RequestsLibrary.Create_Session    ${CONFIG_SESSION}    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}
     Upload_Config_Files
-    KarafKeywords.Set_Bgpcep_Log_Levels    # ${DEFAULT_BGPCEP_LOG_LEVEL} is applied by default
 
 Stop_Suite
     [Documentation]    Suite teardown keyword
-    SSHKeywords.Virtual_Env_Delete
     SSHLibrary.Close_All_Connections
     RequestsLibrary.Delete_All_Sessions
 
 Upload_Config_Files
     [Documentation]    Uploads exabgp config files and needed scripts
-    SSHLibrary.Put_File    ${BGP_VAR_FOLDER}/${DEFAUTL_EXA_CFG}    .
+    SSHLibrary.Put_File    ${BGP_VAR_FOLDER}/${DEFAULT_EXA_CFG}    .
     SSHLibrary.Put_File    ${BGP_L3VPN_DIR}/${L3VPN_EXA_CFG}    .
     SSHLibrary.Put_File    ${EXARPCSCRIPT}    .
     @{cfgfiles}=    SSHLibrary.List_Files_In_Directory    .    *.cfg
@@ -159,3 +189,15 @@ Get_Expected_Response_From_File
     Return From Keyword If    '${status}' == 'PASS'    ${expresponse}
     ${expresponse}=    OperatingSystem.Get File    ${exprspfile}
     [Return]    ${expresponse}
+
+Start_Bgp_Peer
+    [Documentation]    Starts bgp peer and verifies that the peer runs.
+    BGPSpeaker.Start_BGP_Speaker    --amount 0 --myip=${TOOLS_SYSTEM_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --debug --allf --wfr 1
+    BGPcliKeywords.Read_And_Fail_If_Prompt_Is_Seen
+
+L3vpn_Ipv4_To_App
+    [Documentation]    Testing mpls vpn ipv4 routes reported to odl from exabgp
+    BgpRpcClient.exa_clean_update_message
+    &{mapping}    BuiltIn.Create_Dictionary    BGP_PEER_IP=${TOOLS_SYSTEM_IP}    APP_PEER_IP=${ODL_SYSTEM_IP}
+    TemplatedRequests.Post_As_Xml_Templated    ${BGP_L3VPN_DIR}/route    mapping=${mapping}    session=${CONFIG_SESSION}
+    BuiltIn.Wait_Until_Keyword_Succeeds    5x    2s    Verify_ExaBgp_Received_Update    ${L3VPN_EXP}
diff --git a/csit/variables/bgpfunctional/l3vpn_ipv4/bgp_peer/data.xml b/csit/variables/bgpfunctional/l3vpn_ipv4/bgp_peer/data.xml
new file mode 100644 (file)
index 0000000..a1f4368
--- /dev/null
@@ -0,0 +1,6 @@
+<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+    <neighbor-address>$IP</neighbor-address>
+    <config>
+        <peer-group>/bgp/neighbors/neighbor/bgp/peer-groups/peer-group[peer-group-name="internal-neighbor"]</peer-group>
+    </config>
+</neighbor>
diff --git a/csit/variables/bgpfunctional/l3vpn_ipv4/bgp_peer/location.uri b/csit/variables/bgpfunctional/l3vpn_ipv4/bgp_peer/location.uri
new file mode 100644 (file)
index 0000000..2e9bef7
--- /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/bgp/neighbors/neighbor/$IP
diff --git a/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/announce_l3vpn_rt_arg.hex b/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/announce_l3vpn_rt_arg.hex
new file mode 100644 (file)
index 0000000..e1ab917
--- /dev/null
@@ -0,0 +1 @@
+ffffffffffffffffffffffffffffffff0053020000003c4001010040020040050400000064800e200001800c00000000000000000a00fffe007005dc510001010203040001010101c010080002fbf000000065
diff --git a/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/app/location.uri b/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/app/location.uri
new file mode 100644 (file)
index 0000000..77394ca
--- /dev/null
@@ -0,0 +1 @@
+/restconf/config/bgp-rib:application-rib/$IP/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes
diff --git a/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/app/post_data.xml b/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/app/post_data.xml
new file mode 100644 (file)
index 0000000..ba03d91
--- /dev/null
@@ -0,0 +1,28 @@
+<vpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
+    <path-id>0</path-id>
+    <route-key>WAABAQIDBAABAQEB</route-key>
+    <label-stack>
+        <label-value>24005</label-value>
+    </label-stack>
+    <attributes>
+        <extended-communities>
+            <transitive>true</transitive>
+            <route-target-extended-community>
+                <global-administrator>64496</global-administrator>
+                <local-administrator>AAAAZQ==</local-administrator>
+            </route-target-extended-community>
+        </extended-communities>
+        <local-pref>
+            <pref>100</pref>
+        </local-pref>
+        <ipv4-next-hop>
+            <global>10.0.255.254</global>
+        </ipv4-next-hop>
+        <origin>
+            <value>igp</value>
+        </origin>
+        <as-path/>
+    </attributes>
+    <route-distinguisher>1.2.3.4:1</route-distinguisher>
+    <prefix>1.1.1.0/24</prefix>
+</vpn-route>
diff --git a/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/rib/data.json b/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/rib/data.json
new file mode 100644 (file)
index 0000000..d7152af
--- /dev/null
@@ -0,0 +1,38 @@
+{
+    "bgp-vpn-ipv4:vpn-ipv4-routes": {
+        "vpn-route": [
+            {
+                "route-key": "WAABAQIDBAABAQEB",
+                "path-id": 0,
+                "label-stack": [
+                    {
+                        "label-value": 24005
+                    }
+                ],
+                "route-distinguisher": "1.2.3.4:1",
+                "attributes": {
+                    "local-pref": {
+                        "pref": 100
+                    },
+                    "extended-communities": [
+                        {
+                            "transitive": true,
+                            "route-target-extended-community": {
+                                "global-administrator": 64496,
+                                "local-administrator": "AAAAZQ=="
+                            }
+                        }
+                    ],
+                    "ipv4-next-hop": {
+                        "global": "10.0.255.254"
+                    },
+                    "origin": {
+                        "value": "igp"
+                    },
+                    "as-path": {}
+                },
+                "prefix": "1.1.1.0/24"
+            }
+        ]
+    }
+}
diff --git a/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/rib/location.uri b/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/rib/location.uri
new file mode 100644 (file)
index 0000000..77394ca
--- /dev/null
@@ -0,0 +1 @@
+/restconf/config/bgp-rib:application-rib/$IP/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes
diff --git a/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/withdraw_l3vpn_rt_arg.hex b/csit/variables/bgpfunctional/rt_constrain/l3vpn_rt_arg/withdraw_l3vpn_rt_arg.hex
new file mode 100644 (file)
index 0000000..daabfbd
--- /dev/null
@@ -0,0 +1 @@
+ffffffffffffffffffffffffffffffff0045020000002e4001010040020040050400000064800f12000180708000000001010203040001010101c010080002fbf000000065
index 4d626ff7c0bf8be3f07a3a43a2b25c5388dfe4ee..77394ca8e6eba5f1ff8202b89517ba656837d888 100644 (file)
@@ -1 +1 @@
-/restconf/config/bgp-rib:application-rib/$IP/tables/bgp-types:ipv4-address-family/bgp-route-target-constrain:route-target-constrain-subsequent-address-family/bgp-route-target-constrain:route-target-constrain-routes
+/restconf/config/bgp-rib:application-rib/$IP/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes