Skip to content

Commit

Permalink
[sonic-config-engine/config_samples.py]: Fix default config for T1 to
Browse files Browse the repository at this point in the history
comply with YANG models.

Signed-off-by: Praveen Chaudhary <[email protected]>
RB=2759881
G=lnos-reviewers
R=pchaudhary,pmao,samaity,zxu
A=
  • Loading branch information
Praveen Chaudhary committed Aug 16, 2021
1 parent 17c7307 commit b8b64b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sonic-config-engine/config_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def generate_t1_sample_config(data):
data['DEVICE_METADATA']['localhost']['hostname'] = 'sonic'
data['DEVICE_METADATA']['localhost']['type'] = 'LeafRouter'
data['DEVICE_METADATA']['localhost']['bgp_asn'] = '65100'
data['LOOPBACK_INTERFACE'] = {"Loopback0|10.1.0.1/32": {}}
data['LOOPBACK_INTERFACE'] = {
"Loopback0": {},
"Loopback0|10.1.0.1/32": {}}
data['BGP_NEIGHBOR'] = {}
data['DEVICE_NEIGHBOR'] = {}
data['INTERFACE'] = {}
Expand All @@ -27,6 +29,7 @@ def generate_t1_sample_config(data):
peer_addr = '10.0.{}.{}'.format(2 * port_count // 256, 2 * port_count % 256 + 1)
peer_name='ARISTA{0:02d}{1}'.format(1+port_count%(total_port_amount // 2), 'T2' if port_count < (total_port_amount // 2) else 'T0')
peer_asn = 65200 if port_count < (total_port_amount // 2) else 64001 + port_count - (total_port_amount // 2)
data['INTERFACE']['{}'.format(port)] = {}
data['INTERFACE']['{}|{}/31'.format(port, local_addr)] = {}
data['BGP_NEIGHBOR'][peer_addr] = {
'rrclient': 0,
Expand Down

0 comments on commit b8b64b5

Please sign in to comment.