1 # Copyright (c) 2017 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
14 from copy import deepcopy
16 """Test variables for BGP test suite."""
18 # Internal BGP peers for CRUD tests
19 address_internal = "192.168.0.2"
20 address_internal2 = "192.168.0.3"
22 "bgp-openconfig-extensions:neighbor": [{
23 "neighbor-address": address_internal,
25 "peer-type": "INTERNAL"
41 "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST",
49 peer_internal_update = {
50 "bgp-openconfig-extensions:neighbor": [{
51 "neighbor-address": address_internal,
53 "peer-type": "INTERNAL"
69 "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST",
77 peer_internal2 = deepcopy(peer_internal)
78 peer_internal2["bgp-openconfig-extensions:neighbor"][0]["neighbor-address"] = \
81 # Application BGP peer for CRUD tests
82 address_application = "192.168.0.4"
84 "bgp-openconfig-extensions:neighbor": [{
85 "neighbor-address": address_application,
87 "peer-group": "application-peers"
92 "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST",
98 "openconfig-bgp-types:IPV4-LABELLED-UNICAST",
106 route_address_ipv4 = "192.168.0.5/32"
109 "bgp-inet:ipv4-route": [{
110 "path-id": route_id_ipv4,
111 "prefix": route_address_ipv4,
121 "global": "192.168.1.1"
127 route_data_ipv4_update = {
128 "bgp-inet:ipv4-route": [{
129 "path-id": route_id_ipv4,
130 "prefix": route_address_ipv4,
140 "global": "192.168.1.2"
146 route_address_ipv4_2 = "192.168.0.6/32"
148 route_data_ipv4_2 = {
149 "bgp-inet:ipv4-route": [{
150 "path-id": route_id_ipv4_2,
151 "prefix": route_address_ipv4_2,
161 "global": "192.168.1.2"
167 route_address_ipv6 = "3ffe:62::1/64"
170 "bgp-inet:ipv6-route": [{
171 "path-id": route_id_ipv6,
172 "prefix": route_address_ipv6,
182 "global": "3ffe:63::1"
189 "destination-prefix": route_address_ipv4,
190 "next-hop": "192.168.1.1",
191 "vpp-ipv4-route-state": {}