Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'show vlan config' is not displaying the VLAN members, after the clear config and reload with default l2 configuration. #2536

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/sonic-config-engine/config_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Collaborator

@qiluo-msft qiluo-msft Feb 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it same as:
vp = natsorted(data['PORT'].keys())
? #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with comments. I will update the review with code changes.

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'}
Expand Down