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

Add vlan validation in config interface ip add command #3

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

matiAlfaro
Copy link

@matiAlfaro matiAlfaro commented Feb 6, 2024

~

What I did

Fix for -16975
Prevent configuration of illegal Vlan name in "config interface ip add" command

How I did it

Added Vlan name validation

How to verify it

Positive tests

config interface ip add Vlan100 1.1.1.1/24
config interface ip add Vlan4093 1.1.1.1/24

Negative tests

config interface ip add Vlan000000000000003 1.1.1.1/24
config interface ip add Vlan01 1.1.1.1/24
config interface ip add Vlan1.2 1.1.1.1/24

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

On illegal Vlan name command succeeded with no error

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

config interface ip add Vlan030 1.1.1.1/24
Error: Vlan030 is not a valid Vlan name

~

Signed-off-by: mati <mati@marvell.com>
Signed-off-by: mati <mati@marvell.com>
Test that vlan exists
Added an optional param (option) --ignore-vlan which will test only
format

~

Signed-off-by: matiAlfaro <mati@marvell.com>
Signed-off-by: matiAlfaro <mati@marvell.com>
@matiAlfaro matiAlfaro marked this pull request as draft February 15, 2024 07:23
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.

3 participants