From: tomas.markovic Date: Tue, 6 Nov 2018 13:57:48 +0000 (+0100) Subject: Fix bgp default policies test X-Git-Tag: pre-potassium~492 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=eec25d2f527020b6c400cb565eb0a1ea09d2a860;p=integration%2Ftest.git Fix bgp default policies test Change-Id: I378ba8ba4d56a217cd43b555e3976d9183aa47ca Signed-off-by: tomas.markovic --- diff --git a/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot b/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot index ec711a3f60..32c22bda3b 100644 --- a/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot +++ b/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot @@ -17,6 +17,7 @@ Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing Library RequestsLibrary Library SSHLibrary Resource ../../../variables/Variables.robot +Resource ../../../libraries/CompareStream.robot Resource ../../../libraries/ExaBgpLib.robot Resource ../../../libraries/SetupUtils.robot Resource ../../../libraries/TemplatedRequests.robot @@ -30,6 +31,8 @@ ${CMD} env exabgp.tcp.port=1790 exabgp --debug ${HOLDTIME} 180 ${RIB_INSTANCE} example-bgp-rib ${CONFIG_SESSION} config-session +${OLD_AS_PATH} \n"as-path": {}, +${NEW_AS_PATH} ${EMPTY} *** Test Cases *** Verify_Rib_Empty @@ -109,11 +112,12 @@ Verify_Rib_Status # gets and outputs full rib output for debug purposes if one of the peers reports faulty data. ${output} TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/rib_state session=${CONFIG_SESSION} BuiltIn.Log ${output} + ${AS_PATH} = CompareStream.Set_Variable_If_At_Least_Neon ${NEW_AS_PATH} ${OLD_AS_PATH} : FOR ${index} IN @{NUMBERS} - \ &{mapping} BuiltIn.Create_Dictionary IP=127.0.0.${index} + \ &{mapping} BuiltIn.Create_Dictionary IP=127.0.0.${index} AS_PATH=${AS_PATH} \ BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/effective_rib_in/peer_${index} mapping=${mapping} \ ... session=${CONFIG_SESSION} verify=True - &{mapping} BuiltIn.Create_Dictionary IP=${ODL_SYSTEM_IP} + &{mapping} BuiltIn.Create_Dictionary IP=${ODL_SYSTEM_IP} AS_PATH=${AS_PATH} # application peer verification BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/app_peer_rib mapping=${mapping} session=${CONFIG_SESSION} ... verify=True diff --git a/csit/variables/bgpfunctional/bgppolicies/app_peer_rib/data.json b/csit/variables/bgpfunctional/bgppolicies/app_peer_rib/data.json index 2145c18604..202065676b 100644 --- a/csit/variables/bgpfunctional/bgppolicies/app_peer_rib/data.json +++ b/csit/variables/bgpfunctional/bgppolicies/app_peer_rib/data.json @@ -2,8 +2,7 @@ "bgp-inet:ipv4-routes": { "ipv4-route": [ { - "attributes": { - "as-path": {}, + "attributes": {$AS_PATH "ipv4-next-hop": { "global": "10.11.1.1" }, diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_1/data.json b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_1/data.json index e1fbdb7c8e..d7002a4093 100644 --- a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_1/data.json +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_1/data.json @@ -2,8 +2,7 @@ "bgp-inet:ipv4-routes": { "ipv4-route": [ { - "attributes": { - "as-path": {}, + "attributes": {$AS_PATH "communities": [ { "as-number": 30741, diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_2/data.json b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_2/data.json index 6a6636c958..f6796b9a97 100644 --- a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_2/data.json +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_2/data.json @@ -2,8 +2,7 @@ "bgp-inet:ipv4-routes": { "ipv4-route": [ { - "attributes": { - "as-path": {}, + "attributes": {$AS_PATH "ipv4-next-hop": { "global": "12.0.255.254" }, @@ -19,8 +18,7 @@ "route-key": "2.1.1.0/24" }, { - "attributes": { - "as-path": {}, + "attributes": {$AS_PATH "ipv4-next-hop": { "global": "12.1.255.254" }, @@ -36,8 +34,7 @@ "route-key": "2.2.1.0/24" }, { - "attributes": { - "as-path": {}, + "attributes": {$AS_PATH "ipv4-next-hop": { "global": "12.3.255.254" }, diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_5/data.json b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_5/data.json index ade0d26353..93a7e7ce83 100644 --- a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_5/data.json +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_5/data.json @@ -2,8 +2,7 @@ "bgp-inet:ipv4-routes": { "ipv4-route": [ { - "attributes": { - "as-path": {}, + "attributes": {$AS_PATH "extended-communities": [ { "route-target-extended-community": {