From abf46a0381b01d9ade7ea045d99b3b9c3da84bfa Mon Sep 17 00:00:00 2001 From: Rama Chandra Reddy Gaddam Date: Thu, 7 Feb 2019 17:22:11 +0530 Subject: [PATCH 1/2] 'show vlan config' not displaying the VLAN members, after clear config done loaded with default l2 configuration. --- src/sonic-config-engine/config_samples.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sonic-config-engine/config_samples.py b/src/sonic-config-engine/config_samples.py index 6cb417b9a50b..df880b15fa65 100644 --- a/src/sonic-config-engine/config_samples.py +++ b/src/sonic-config-engine/config_samples.py @@ -47,6 +47,10 @@ 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 = [] + for port in natsorted(data['PORT'].keys()): + vp.append(port) + 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'} From 2cd14cbc53893d9a2b58d8db4fae205ae467218b Mon Sep 17 00:00:00 2001 From: Rama Chandra Reddy Gaddam Date: Mon, 18 Feb 2019 19:04:49 +0530 Subject: [PATCH 2/2] 'show vlan config' not displaying the VLAN members, after clear config done loaded with default l2 configuration. --- src/sonic-config-engine/config_samples.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sonic-config-engine/config_samples.py b/src/sonic-config-engine/config_samples.py index df880b15fa65..adaea0c4532c 100644 --- a/src/sonic-config-engine/config_samples.py +++ b/src/sonic-config-engine/config_samples.py @@ -47,9 +47,7 @@ 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 = [] - for port in natsorted(data['PORT'].keys()): - vp.append(port) + vp = natsorted(data['PORT'].keys()) data['VLAN']['Vlan1000'].setdefault('members', vp) data['VLAN_MEMBER'] = {} for port in natsorted(data['PORT'].keys()):