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

Vlanmember #1042

Closed
wants to merge 4 commits into from
Closed

Vlanmember #1042

wants to merge 4 commits into from

Conversation

ouxlwhu
Copy link

@ouxlwhu ouxlwhu commented Aug 10, 2020

- What I did

  1. Prepare a configuration file "minigraph.xml" containing Vlan1000, and ports from Ethernet0 to Ethernet3 are attached to Vlan1000
  2. Execute the command "config load_minigraph" and wait for the execution to succeed
  3. Now, if you execute the command "config vlan member del 1000 Ethernet3", an error will be reported:
admin@48Y-oxl:~$ sudo config vlan member del 1000 Ethernet3
Usage: config vlan member del [OPTIONS] <vid> <interface_name>

Error: Ethernet3 is not a member of Vlan1000

- How I did it
vlan member field is deprecated in VLAN table. code should not rely on vlan member field.
so, modify the logic of VLAN member existence check

- How to verify it

  1. “config load_minigraph”. Once successful members will appear in Vlan1000
admin@48Y-oxl:~$ redis-cli -n 4 hgetall "VLAN|Vlan1000"
1) "dhcp_servers@"
2) "192.0.0.1,192.0.0.2,192.0.0.3,192.0.0.4"
3) "vlanid"
4) "1000"
  1. "config vlan member del 1000 Ethernet3", no error will be reported
admin@48Y-oxl:~$ sudo config vlan member del 1000 Ethernet3
admin@48Y-oxl:~$ 

- 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)

@lgtm-com
Copy link

lgtm-com bot commented Aug 10, 2020

This pull request introduces 11 alerts when merging 86b3dd6 into fa7fb3a - view on LGTM.com

new alerts:

  • 9 for Unnecessary pass
  • 1 for Except block handles 'BaseException'
  • 1 for Unused import

@lguohan
Copy link
Contributor

lguohan commented Aug 10, 2020

can you resolve conflict?

@ouxlwhu
Copy link
Author

ouxlwhu commented Aug 10, 2020

can you resolve conflict?

when I resolve conflict with #1038 (#1038), I find this problem has been fixed.
#1038 has fixed the logic of VLAN member existence check
So, this pull request is no longer needed

@lguohan lguohan closed this Aug 10, 2020
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