From fa12a5cc0fcaece6c6e0500948e78592103b2445 Mon Sep 17 00:00:00 2001 From: RAMA CHANDRA REDDY GADDAM <45847882+ramachandrareddygaddam@users.noreply.github.com> Date: Tue, 19 Feb 2019 01:53:08 +0530 Subject: [PATCH] 'show vlan config' is not displaying the VLAN members, after the clear config and reload with default l2 configuration. (#2536) 'show vlan config' not displaying the VLAN members, after clear config done loaded with default l2 configuration. --- src/sonic-config-engine/config_samples.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sonic-config-engine/config_samples.py b/src/sonic-config-engine/config_samples.py index 6cb417b9a50b..adaea0c4532c 100644 --- a/src/sonic-config-engine/config_samples.py +++ b/src/sonic-config-engine/config_samples.py @@ -47,6 +47,8 @@ def generate_l2_config(data): if not data['DEVICE_METADATA']['localhost'].has_key('type'): data['DEVICE_METADATA']['localhost']['type'] = 'ToRRouter' data['VLAN'] = {'Vlan1000': {'vlanid': '1000'}} + vp = natsorted(data['PORT'].keys()) + data['VLAN']['Vlan1000'].setdefault('members', vp) data['VLAN_MEMBER'] = {} for port in natsorted(data['PORT'].keys()): data['VLAN_MEMBER']['Vlan1000|{}'.format(port)] = {'tagging_mode': 'untagged'}