diff --git a/src/sonic-config-engine/config_samples.py b/src/sonic-config-engine/config_samples.py index cc71145df1ec..aef6969d7131 100644 --- a/src/sonic-config-engine/config_samples.py +++ b/src/sonic-config-engine/config_samples.py @@ -50,7 +50,8 @@ 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'] = {} @@ -63,6 +64,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, @@ -185,7 +187,7 @@ def generate_global_dualtor_tables(): data = defaultdict(lambda: defaultdict(dict)) data['LOOPBACK_INTERFACE'] = { 'Loopback2': {}, - 'Loopback2|3.3.3.3': {} + 'Loopback2|3.3.3.3/32': {} } data['MUX_CABLE'] = {} data['PEER_SWITCH'] = { diff --git a/src/sonic-config-engine/tests/sample_output/py2/l2switch_dualtor.json b/src/sonic-config-engine/tests/sample_output/py2/l2switch_dualtor.json index f09874d6e645..5aa60f22c484 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/l2switch_dualtor.json +++ b/src/sonic-config-engine/tests/sample_output/py2/l2switch_dualtor.json @@ -520,7 +520,7 @@ }, "LOOPBACK_INTERFACE": { "Loopback2": {}, - "Loopback2|3.3.3.3": {} + "Loopback2|3.3.3.3/32": {} }, "MUX_CABLE": { "Ethernet0": { diff --git a/src/sonic-config-engine/tests/sample_output/py3/l2switch_dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/l2switch_dualtor.json index f09874d6e645..5aa60f22c484 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/l2switch_dualtor.json +++ b/src/sonic-config-engine/tests/sample_output/py3/l2switch_dualtor.json @@ -520,7 +520,7 @@ }, "LOOPBACK_INTERFACE": { "Loopback2": {}, - "Loopback2|3.3.3.3": {} + "Loopback2|3.3.3.3/32": {} }, "MUX_CABLE": { "Ethernet0": { diff --git a/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json b/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json index b7a93d530a13..d49ed7feb22c 100644 --- a/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json +++ b/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json @@ -375,6 +375,38 @@ } }, "INTERFACE": { + "Ethernet0":{}, + "Ethernet104": {}, + "Ethernet112": {}, + "Ethernet120": {}, + "Ethernet128": {}, + "Ethernet136": {}, + "Ethernet144": {}, + "Ethernet152": {}, + "Ethernet160": {}, + "Ethernet168": {}, + "Ethernet16": {}, + "Ethernet176": {}, + "Ethernet184": {}, + "Ethernet192": {}, + "Ethernet200": {}, + "Ethernet208": {}, + "Ethernet216": {}, + "Ethernet224": {}, + "Ethernet232": {}, + "Ethernet240": {}, + "Ethernet248": {}, + "Ethernet24": {}, + "Ethernet32": {}, + "Ethernet40": {}, + "Ethernet48": {}, + "Ethernet56": {}, + "Ethernet64": {}, + "Ethernet72": {}, + "Ethernet80": {}, + "Ethernet88": {}, + "Ethernet8": {}, + "Ethernet96": {}, "Ethernet0|10.0.0.0/31": {}, "Ethernet104|10.0.0.26/31": {}, "Ethernet112|10.0.0.28/31": {}, @@ -409,6 +441,7 @@ "Ethernet96|10.0.0.24/31": {} }, "LOOPBACK_INTERFACE": { + "Loopback0": {}, "Loopback0|10.1.0.1/32": {} }, "MID_PLANE_BRIDGE": { @@ -611,4 +644,4 @@ "mtu": "9100" } } -} \ No newline at end of file +}