From b8b64b502363c93957e0b58b54edf6289c4276bb Mon Sep 17 00:00:00 2001 From: Praveen Chaudhary Date: Mon, 16 Aug 2021 17:43:25 +0000 Subject: [PATCH] [sonic-config-engine/config_samples.py]: Fix default config for T1 to comply with YANG models. Signed-off-by: Praveen Chaudhary RB=2759881 G=lnos-reviewers R=pchaudhary,pmao,samaity,zxu A= --- src/sonic-config-engine/config_samples.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sonic-config-engine/config_samples.py b/src/sonic-config-engine/config_samples.py index 5a58ca560221..5d1837609a08 100644 --- a/src/sonic-config-engine/config_samples.py +++ b/src/sonic-config-engine/config_samples.py @@ -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'] = {} @@ -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,