Commit 45ab087 Nikos Triantafillis
committed
1 parent 0766365 commit 45ab087 Copy full SHA for 45ab087
File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,18 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
57
57
{% if neighbor_addr | ipv 4 %}
58
58
address-family ipv4
59
59
neighbor {{ neighbor_addr }} activate
60
+ {% if bgp_session ['rrclient' ] != 0 %}
61
+ neighbor {{ bgp_session['addr'] }} route-reflector-client
62
+ {% endif %}
60
63
maximum-paths 64
61
64
exit-address-family
62
65
{% endif %}
63
66
{% if neighbor_addr | ipv 6 %}
64
67
address-family ipv6
65
68
neighbor {{ neighbor_addr }} activate
69
+ {% if bgp_session ['rrclient' ] != 0 %}
70
+ neighbor {{ bgp_session['addr'] }} route-reflector-client
71
+ {% endif %}
66
72
maximum-paths 64
67
73
exit-address-family
68
74
{% endif %}
Original file line number Diff line number Diff line change @@ -274,6 +274,10 @@ def parse_cpg(cpg, hname):
274
274
for router in child .findall (str (QName (ns1 , "BGPRouterDeclaration" ))):
275
275
asn = router .find (str (QName (ns1 , "ASN" ))).text
276
276
hostname = router .find (str (QName (ns1 , "Hostname" ))).text
277
+ if router .find (str (QName (ns1 , "RRClient" ))):
278
+ rrclient = '1'
279
+ else :
280
+ rrclient = '0'
277
281
if hostname == hname :
278
282
myasn = int (asn )
279
283
peers = router .find (str (QName (ns1 , "Peers" )))
@@ -292,6 +296,7 @@ def parse_cpg(cpg, hname):
292
296
bgp_session = bgp_sessions [peer ]
293
297
if hostname == bgp_session ['name' ]:
294
298
bgp_session ['asn' ] = int (asn )
299
+ bgp_session ['rrclient' ] = int (rrclient )
295
300
296
301
return bgp_sessions , myasn , bgp_peers_with_range
297
302
You can’t perform that action at this time.
0 commit comments