'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.
This commit is contained in:
RAMA CHANDRA REDDY GADDAM 2019-02-19 01:53:08 +05:30 committed by Qi Luo
parent 4c9760489f
commit fa12a5cc0f

View File

@ -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'}