summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_vrf/vars/main.yaml
blob: 9620cf32c096a1b4303270ac41e721f07e65ff91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
---
merged:
  before:
    bind_to_all: true
    instances:
      - name: "vrf-blue"
        description: "blue-vrf"
        disable: false
        table_id: 100
        vni: 1000
      - name: "vrf-red"
        description: "red-vrf"
        disable: true
        table_id: 101
        vni: 1001
        address_family:
          - afi: "ipv4"
            disable_forwarding: true
            route_maps:
              - rm_name: "rm1"
                protocol: "rip"
          - afi: "ipv6"
            nht_no_resolve_via_default: true
      - name: "vrf-green"
        description: "green-vrf"
        table_id: 110
        vni: 1010
        protocols:
          ospf:
            areas:
              - area_id: "4"
                area_type:
                  stub:
                    default_cost: 20
                network:
                  - address: 192.0.2.0/24
                range:
                  - address: 192.0.3.0/24
                    cost: 10
                  - address: 192.0.4.0/24
                    cost: 12
          ospfv3:
            areas:
              - area_id: "2"
                export_list: export1
                import_list: import1
                range:
                  - address: 2001:db10::/32
                  - address: 2001:db20::/32
                  - address: 2001:db30::/32
          static:
            - address_families:
                - afi: ipv4
                  routes:
                    - dest: "192.0.2.0/24"
                      blackhole_config:
                        distance: 10
                      next_hops:
                        - forward_router_address: "203.0.113.1"
                        - forward_router_address: "203.0.113.2"
                - afi: ipv6
                  routes:
                    - dest: "2001:db8::/32"
                      blackhole_config:
                        distance: 20
                      next_hops:
                        - forward_router_address: "2001:db8::1"
  commands:
    - set vrf name vrf-green table 110
    - set vrf name vrf-green vni 1010
    - set vrf name vrf-green description green-vrf
    - set vrf name vrf-pink protocols bgp system-as 65005
    - set vrf name vrf-pink protocols bgp neighbor 192.0.5.1 remote-as 65012
  after:
    bind_to_all: true
    instances:
      - name: "vrf-blue"
        description: "blue-vrf"
        disable: false
        table_id: 100
        vni: 1000
      - name: "vrf-red"
        description: "red-vrf"
        disable: true
        table_id: 101
        vni: 1001
        address_family:
          - afi: "ipv4"
            disable_forwarding: true
            route_maps:
              - rm_name: "rm1"
                protocol: "rip"
          - afi: "ipv6"
            nht_no_resolve_via_default: true
      - name: "vrf-green"
        description: "green-vrf"
        table_id: 110
        vni: 1010

replaced:
  commands:
    - delete vrf bind-to-all
    - set vrf name vrf-blue disable
    - set vrf name vrf-red vni 1011
    - set vrf name vrf-red description Vermillion_VRF
    - delete vrf name vrf-red disable
    - delete vrf name vrf-red ipv6 nht no-resolve-via-default
    - delete vrf name vrf-pink vni 1111
    - delete vrf name vrf-pink description pink-vrf
    - delete vrf name vrf-pink protocols ospf log-adjacency-changes 'detail'
    - delete vrf name vrf-pink protocols ospf auto-cost
    - delete vrf name vrf-pink protocols ospf max-metric
    - delete vrf name vrf-pink protocols ospf mpls-te
    - delete vrf name vrf-pink protocols ospf area
    - delete vrf name vrf-pink protocols ospf parameters
    - delete vrf name vrf-pink protocols ospf neighbor
    - delete vrf name vrf-pink protocols ospf redistribute
    - set vrf name vrf-pink protocols ospf default-information originate metric 20
    - set vrf name vrf-pink protocols ospf default-information originate metric-type 1
  after: []

overridden:
  commands:
    - delete vrf name vrf-blue
    - commit
    - delete vrf name vrf-pink
    - commit
    - set vrf name vrf-blue table 103
    - set vrf name vrf-blue vni 1002
    - set vrf name vrf-blue description blue-vrf
    - set vrf name vrf-blue disable
    - set vrf name vrf-pink table 111
    - set vrf name vrf-pink vni 1111
    - set vrf name vrf-pink description pink-vrf
    - set vrf name vrf-pink protocols bgp system-as 65005
    - set vrf name vrf-pink protocols bgp neighbor 192.0.2.1 remote-as 65002
    - delete vrf bind-to-all
  after: []

deleted:
  commands:
    - delete vrf
  after: []

rendered:
  commands:
    - set vrf bind-to-all
    - set vrf name vrf-green table 105
    - set vrf name vrf-green vni 1000
    - set vrf name vrf-green description green-vrf
    - set vrf name vrf-green disable
    - set vrf name vrf-green protocols bgp system-as 65000
    - set vrf name vrf-green protocols bgp neighbor 192.0.2.1 remote-as 65002
    - set vrf name vrf-green protocols bgp neighbor 1.1.1.3 passive
    - set vrf name vrf-green protocols bgp neighbor 1.1.1.3 remote-as 400
    - set vrf name vrf-green protocols ospf log-adjacency-changes 'detail'
    - set vrf name vrf-green protocols ospf max-metric router-lsa administrative
    - set vrf name vrf-green protocols ospf max-metric router-lsa on-shutdown 10
    - set vrf name vrf-green protocols ospf max-metric router-lsa on-startup 10
    - set vrf name vrf-green protocols ospf default-information originate always
    - set vrf name vrf-green protocols ospf default-information originate metric 10
    - set vrf name vrf-green protocols ospf default-information originate metric-type 2
    - set vrf name vrf-green protocols ospf mpls-te router-address '192.0.11.12'
    - set vrf name vrf-green protocols ospf auto-cost reference-bandwidth '2'
    - set vrf name vrf-green protocols ospf neighbor 192.0.11.12
    - set vrf name vrf-green protocols ospf neighbor 192.0.11.12 poll-interval 10
    - set vrf name vrf-green protocols ospf neighbor 192.0.11.12 priority 2
    - set vrf name vrf-green protocols ospf redistribute bgp
    - set vrf name vrf-green protocols ospf redistribute bgp metric 10
    - set vrf name vrf-green protocols ospf redistribute bgp metric-type 2
    - set vrf name vrf-green protocols ospf parameters router-id '192.0.1.1'
    - set vrf name vrf-green protocols ospf parameters rfc1583-compatibility
    - set vrf name vrf-green protocols ospf parameters abr-type 'cisco'
    - set vrf name vrf-green protocols ospf area '2'
    - set vrf name vrf-green protocols ospf area 2 area-type normal
    - set vrf name vrf-green protocols ospf area 2 authentication plaintext-password
    - set vrf name vrf-green protocols ospf area 2 shortcut enable
    - set vrf name vrf-green protocols ospf area '3'
    - set vrf name vrf-green protocols ospf area 3 area-type nssa
    - set vrf name vrf-green protocols ospf area '4'
    - set vrf name vrf-green protocols ospf area 4 area-type stub default-cost 20
    - set vrf name vrf-green protocols ospf area 4 network 192.0.2.0/24
    - set vrf name vrf-green protocols ospf area 4 range 192.0.3.0/24
    - set vrf name vrf-green protocols ospf area 4 range 192.0.3.0/24 cost 10
    - set vrf name vrf-green protocols ospf area 4 range 192.0.4.0/24
    - set vrf name vrf-green protocols ospf area 4 range 192.0.4.0/24 cost 12
    - set vrf name vrf-green protocols ospfv3 area '2'
    - set vrf name vrf-green protocols ospfv3 area 2 export-list export1
    - set vrf name vrf-green protocols ospfv3 area 2 import-list import1
    - set vrf name vrf-green protocols ospfv3 area 2 range 2001:db10::/32
    - set vrf name vrf-green protocols ospfv3 area 2 range 2001:db20::/32
    - set vrf name vrf-green protocols ospfv3 area 2 range 2001:db30::/32
    - set vrf name vrf-green protocols ospfv3 area '3'
    - set vrf name vrf-green protocols ospfv3 area 3 range 2001:db40::/32
    - set vrf name vrf-green protocols ospfv3 parameters router-id '192.0.2.10'
    - set vrf name vrf-green protocols ospfv3 redistribute bgp
    - set vrf name vrf-green protocols static route 192.0.2.0/24
    - set vrf name vrf-green protocols static route 192.0.2.0/24 blackhole distance '10'
    - set vrf name vrf-green protocols static route 192.0.2.0/24 next-hop '203.0.113.1'
    - set vrf name vrf-green protocols static route 192.0.2.0/24 next-hop '203.0.113.2'
    - set vrf name vrf-green protocols static route6 2001:db8::/32
    - set vrf name vrf-green protocols static route6 2001:db8::/32 blackhole distance '20'
    - set vrf name vrf-green protocols static route6 2001:db8::/32 next-hop '2001:db8::1'
    - set vrf name vrf-amber table 111
    - set vrf name vrf-amber vni 1001
    - set vrf name vrf-amber description amber-vrf
    # - set vrf name vrf-amber ip protocol kernel route-map rm1
    - set vrf name vrf-amber ip protocol ospf route-map rm1
    - set vrf name vrf-amber ip disable-forwarding

populate_config:
  - set vrf bind-to-all
  - set vrf name vrf-blue description 'blue-vrf'
  - set vrf name vrf-blue table '100'
  - set vrf name vrf-blue vni '1000'
  - set vrf name vrf-red description 'red-vrf'
  - set vrf name vrf-red disable
  - set vrf name vrf-red ip disable-forwarding
  # - set vrf name vrf-red ip protocol kernel route-map 'rm1'
  - set vrf name vrf-red ip protocol rip route-map 'rm1'
  - set vrf name vrf-red ipv6 nht no-resolve-via-default
  - set vrf name vrf-red table '101'
  - set vrf name vrf-red vni '1001'
  - set vrf name vrf-pink table 111
  - set vrf name vrf-pink vni 1111
  - set vrf name vrf-pink description pink-vrf
  - set vrf name vrf-pink protocols bgp system-as 65000
  - set vrf name vrf-pink protocols bgp neighbor 192.0.2.1 remote-as 65002
  - set vrf name vrf-pink protocols bgp neighbor 1.1.1.3 passive
  - set vrf name vrf-pink protocols bgp neighbor 1.1.1.3 remote-as 400
  - set vrf name vrf-pink protocols ospf log-adjacency-changes 'detail'
  - set vrf name vrf-pink protocols ospf max-metric router-lsa administrative
  - set vrf name vrf-pink protocols ospf max-metric router-lsa on-shutdown 10
  - set vrf name vrf-pink protocols ospf max-metric router-lsa on-startup 10
  - set vrf name vrf-pink protocols ospf default-information originate always
  - set vrf name vrf-pink protocols ospf default-information originate metric 10
  - set vrf name vrf-pink protocols ospf default-information originate metric-type 2
  - set vrf name vrf-pink protocols ospf mpls-te router-address '192.0.11.12'
  - set vrf name vrf-pink protocols ospf auto-cost reference-bandwidth '2'
  - set vrf name vrf-pink protocols ospf neighbor 192.0.11.12
  - set vrf name vrf-pink protocols ospf neighbor 192.0.11.12 poll-interval 10
  - set vrf name vrf-pink protocols ospf neighbor 192.0.11.12 priority 2
  - set vrf name vrf-pink protocols ospf redistribute bgp
  - set vrf name vrf-pink protocols ospf redistribute bgp metric 10
  - set vrf name vrf-pink protocols ospf redistribute bgp metric-type 2
  - set vrf name vrf-pink protocols ospf parameters router-id '192.0.1.1'
  - set vrf name vrf-pink protocols ospf parameters rfc1583-compatibility
  - set vrf name vrf-pink protocols ospf parameters abr-type 'cisco'
  - set vrf name vrf-pink protocols ospf area '2'
  - set vrf name vrf-pink protocols ospf area 2 area-type normal
  - set vrf name vrf-pink protocols ospf area 2 authentication plaintext-password
  - set vrf name vrf-pink protocols ospf area 2 shortcut enable
  - set vrf name vrf-pink protocols ospf area '3'
  - set vrf name vrf-pink protocols ospf area 3 area-type nssa
  - set vrf name vrf-pink protocols ospf area '4'
  - set vrf name vrf-pink protocols ospf area 4 area-type stub default-cost 20
  - set vrf name vrf-pink protocols ospf area 4 network 192.0.2.0/24
  - set vrf name vrf-pink protocols ospf area 4 range 192.0.3.0/24
  - set vrf name vrf-pink protocols ospf area 4 range 192.0.3.0/24 cost 10
  - set vrf name vrf-pink protocols ospf area 4 range 192.0.4.0/24
  - set vrf name vrf-pink protocols ospf area 4 range 192.0.4.0/24 cost 12
  - set vrf name vrf-pink protocols ospfv3 area '2'
  - set vrf name vrf-pink protocols ospfv3 area 2 export-list export1
  - set vrf name vrf-pink protocols ospfv3 area 2 import-list import1
  - set vrf name vrf-pink protocols ospfv3 area 2 range 2001:db10::/32
  - set vrf name vrf-pink protocols ospfv3 area 2 range 2001:db20::/32
  - set vrf name vrf-pink protocols ospfv3 area 2 range 2001:db30::/32
  - set vrf name vrf-pink protocols ospfv3 area '3'
  - set vrf name vrf-pink protocols ospfv3 area 3 range 2001:db40::/32
  - set vrf name vrf-pink protocols ospfv3 parameters router-id '192.0.2.10'
  - set vrf name vrf-pink protocols ospfv3 redistribute bgp
  - set vrf name vrf-pink protocols static route 192.0.2.0/24
  - set vrf name vrf-pink protocols static route 192.0.2.0/24 blackhole distance '10'
  - set vrf name vrf-pink protocols static route 192.0.2.0/24 next-hop '203.0.113.1'
  - set vrf name vrf-pink protocols static route 192.0.2.0/24 next-hop '203.0.113.2'
  - set vrf name vrf-pink protocols static route6 2001:db8::/32
  - set vrf name vrf-pink protocols static route6 2001:db8::/32 blackhole distance '20'
  - set vrf name vrf-pink protocols static route6 2001:db8::/32 next-hop '2001:db8::1'