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

Fix output bug on 'show vlan config' command. #1743

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

linemma
Copy link

@linemma linemma commented Aug 5, 2021

Signed-off-by: Emma Lin emma_lin@edge-core.com

What I did

Fix output bug on 'show vlan config' command.

bug: When user executes 'show vlan config' command, it also outputs ports from the 'members' field on VLAN_TABLE entry even it does not exist on VLAN_MEMBER_TABLE in redis-db.

// vlan data in /etc/sonic/config_db.json
    "VLAN": {
        "Vlan100": {
            "vlanid": "100",
            "members": [
                "Ethernet2"
            ]
        }
    },
    "VLAN_MEMBER": {
        "Vlan100|Ethernet1": {
            "tagging_mode": "tagged"
        }
    }

root@sonic:~# config reload -y
...
root@sonic:~# show vlan con
Name       VID  Member     Mode
-------  -----  ---------  ------
Vlan100    100  Ethernet1  tagged
Vlan100    100  Ethernet2  ?
root@sonic:~# show vlan b
+-----------+--------------+-----------+----------------+-----------------------+-------------+
|   VLAN ID | IP Address   | Ports     | Port Tagging   | DHCP Helper Address   | Proxy ARP   |
+===========+==============+===========+================+=======================+=============+
|       100 |              | Ethernet1 | tagged         |                       | disabled    |
+-----------+--------------+-----------+----------------+-----------------------+-------------+
root@sonic:~#

How I did it

It shall not get members from the 'members' field on VLAN_TABLE entry, so I remove the codes.

How to verify it

Execute 'show vlan config' command to make sure the output is correct.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

Signed-off-by: Emma Lin <emma_lin@edge-core.com>
@linemma
Copy link
Author

linemma commented Aug 16, 2021

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1743 in repo Azure/sonic-utilities

@linemma
Copy link
Author

linemma commented Aug 18, 2023

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants