X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftest_data%2Fhoneycomb%2Fbgp.py;h=f514d83289531888146db6215ca3bd963cd5fb51;hb=40f43968c59bfc40d899cb87bc454af442f17191;hp=84c9431e6bb3e8fb5af67fd3377d6a28e811d608;hpb=56dd61dee872da788e578129eed48a3158a5b566;p=csit.git diff --git a/resources/test_data/honeycomb/bgp.py b/resources/test_data/honeycomb/bgp.py index 84c9431e6b..f514d83289 100644 --- a/resources/test_data/honeycomb/bgp.py +++ b/resources/test_data/honeycomb/bgp.py @@ -39,9 +39,7 @@ peer_internal = { }, "afi-safis": { "afi-safi": [{ - "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST", - "receive": True, - "send-max": 0 + "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST" }] } }] @@ -67,9 +65,7 @@ peer_internal_update = { }, "afi-safis": { "afi-safi": [{ - "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST", - "receive": False, - "send-max": 1 + "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST" }] } }] @@ -90,15 +86,11 @@ peer_application = { "afi-safis": { "afi-safi": [ { - "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST", - "receive": True, - "send-max": 0 + "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST" }, { "afi-safi-name": - "openconfig-bgp-types:IPV4-LABELLED-UNICAST", - "receive": True, - "send-max": 0 + "openconfig-bgp-types:IPV4-LABELLED-UNICAST" }] } }] @@ -109,6 +101,7 @@ route_address_ipv4 = "192.168.0.5/32" route_id_ipv4 = 0 route_data_ipv4 = { "bgp-inet:ipv4-route": [{ + "route-key": route_address_ipv4, "path-id": route_id_ipv4, "prefix": route_address_ipv4, "attributes": { @@ -126,9 +119,29 @@ route_data_ipv4 = { }] } +route_data_ipv4_oper = { + "bgp-inet:ipv4-route": [{ + "route-key": route_address_ipv4, + "path-id": route_id_ipv4, + "prefix": route_address_ipv4, + "attributes": { + "origin": { + "value": "igp" + }, + "local-pref": { + "pref": 100 + }, + "ipv4-next-hop": { + "global": "192.168.1.1" + } + } + }] +} + # IPv4 route for testing Update operation route_data_ipv4_update = { "bgp-inet:ipv4-route": [{ + "route-key": route_address_ipv4, "path-id": route_id_ipv4, "prefix": route_address_ipv4, "attributes": { @@ -145,12 +158,31 @@ route_data_ipv4_update = { } }] } +route_data_ipv4_update_oper = { + "bgp-inet:ipv4-route": [{ + "route-key": route_address_ipv4, + "path-id": route_id_ipv4, + "prefix": route_address_ipv4, + "attributes": { + "origin": { + "value": "egp" + }, + "local-pref": { + "pref": 200 + }, + "ipv4-next-hop": { + "global": "192.168.1.2" + } + } + }] +} # IPv4 route for testing multiple routes route_address_ipv4_2 = "192.168.0.6/32" route_id_ipv4_2 = 1 route_data_ipv4_2 = { "bgp-inet:ipv4-route": [{ + "route-key": route_address_ipv4_2, "path-id": route_id_ipv4_2, "prefix": route_address_ipv4_2, "attributes": { @@ -168,11 +200,31 @@ route_data_ipv4_2 = { }] } +route_data_ipv4_2_oper = { + "bgp-inet:ipv4-route": [{ + "route-key": route_address_ipv4_2, + "path-id": route_id_ipv4_2, + "prefix": route_address_ipv4_2, + "attributes": { + "origin": { + "value": "igp" + }, + "local-pref": { + "pref": 100 + }, + "ipv4-next-hop": { + "global": "192.168.1.2" + } + } + }] +} + # IPv6 route for CRUD test route_address_ipv6 = "3ffe:62::1/64" route_id_ipv6 = 0 route_data_ipv6 = { "bgp-inet:ipv6-route": [{ + "route-key": route_address_ipv6, "path-id": route_id_ipv6, "prefix": route_address_ipv6, "attributes": { @@ -194,7 +246,7 @@ route_data_ipv6 = { table1_oper = { "destination-prefix": route_address_ipv4, "next-hop": "192.168.1.1", - "vpp-ipv4-route-state": {} + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {} } # Peer configurations for traffic test @@ -219,13 +271,11 @@ dut1_peer = { "afi-safis": { "afi-safi": [ { - "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST", - "receive": True, - "send-max": 0}, + "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST" + }, { - "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST", - "receive": True, - "send-max": 0}, + "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST" + }, { "afi-safi-name": "LINKSTATE" } @@ -255,13 +305,11 @@ dut2_peer = { "afi-safis": { "afi-safi": [ { - "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST", - "receive": True, - "send-max": 0}, + "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST" + }, { - "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST", - "receive": True, - "send-max": 0}, + "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST" + }, { "afi-safi-name": "LINKSTATE" } @@ -272,9 +320,10 @@ dut2_peer = { # IPv4 route for traffic test dut1_route_address = "192.168.0.5/32" -dut1_route_id = 1 +dut1_route_id = 0 dut1_route = { "bgp-inet:ipv4-route": [{ + "route-key": dut1_route_address, "path-id": dut1_route_id, "prefix": dut1_route_address, "attributes": { @@ -292,6 +341,25 @@ dut1_route = { }] } +dut1_route_oper = { + "bgp-inet:ipv4-route": [{ + "route-key": dut1_route_address, + "path-id": dut1_route_id, + "prefix": dut1_route_address, + "attributes": { + "origin": { + "value": "igp" + }, + "local-pref": { + "pref": 100 + }, + "ipv4-next-hop": { + "global": "192.168.1.3" + } + } + }] +} + # IPv4 route in peer operational data rib_operational = { "loc-rib": {"tables": [ @@ -299,25 +367,25 @@ rib_operational = { "afi": "bgp-types:ipv4-address-family", "safi": "bgp-types:unicast-subsequent-address-family", "bgp-inet:ipv4-routes": { - "ipv4-route": dut1_route["bgp-inet:ipv4-route"] + "ipv4-route": dut1_route_oper["bgp-inet:ipv4-route"] } } ]} } route_operational = { - "vpp-ipv4-route-state": {}, - "next-hop": "192.168.1.3", + "next-hop": {"next-hop-address": "192.168.1.3"}, "destination-prefix": dut1_route_address } # IPv6 route for traffic test -dut1_route_ip6_address = "3ffe:62::1/64" -dut1_route_ip6_id = 1 +dut1_route_ip6_prefix = "3ffe:62::/64" +dut1_route_ip6_id = 0 dut1_route_ip6 = { "bgp-inet:ipv6-route": [{ + "route-key": dut1_route_ip6_prefix, "path-id": dut1_route_ip6_id, - "prefix": dut1_route_ip6_address, + "prefix": dut1_route_ip6_prefix, "attributes": { "as-path": {}, "origin": { @@ -332,6 +400,24 @@ dut1_route_ip6 = { } }] } +dut1_route_ip6_oper = { + "bgp-inet:ipv6-route": [{ + "route-key": dut1_route_ip6_prefix, + "path-id": dut1_route_ip6_id, + "prefix": dut1_route_ip6_prefix, + "attributes": { + "origin": { + "value": "igp" + }, + "local-pref": { + "pref": 100 + }, + "ipv6-next-hop": { + "global": "3ffe:63::1" + } + } + }] +} # IPv6 route in peer operational data rib_ip6_operational = { @@ -340,14 +426,13 @@ rib_ip6_operational = { "afi": "bgp-types:ipv6-address-family", "safi": "bgp-types:unicast-subsequent-address-family", "bgp-inet:ipv6-routes": { - "ipv6-route": dut1_route_ip6["bgp-inet:ipv6-route"] + "ipv6-route": dut1_route_ip6_oper["bgp-inet:ipv6-route"] } } ]} } route_ip6_operational = { - "vpp-ipv6-route-state": {}, - "next-hop": "3ffe:63::1", - "destination-prefix": dut1_route_ip6_address + "next-hop": {"next-hop-address": "3ffe:63::1"}, + "destination-prefix": dut1_route_ip6_prefix }