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

Added Port-channel name validations. #556

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

Conversation

ramachandrareddygaddam
Copy link
Contributor

- What I did
Added port-channel name validations to the configuration commands.

- How I did it
Added more Port-channel name validations to the existing pull request #436.

  1. The port-channel name should start with prefix 'PortChannel' and suffix <0-9999>.
  2. Added Port-channel name suffix validation; valid suffix is 0-9999.
  3. Interface validation is done when Interface added as a member of port-channel.
  4. Added validation check when try to assign ipaddress to invalid port-channel name.

- How to verify it

User prompted with error for invalid port-channel configuration commands.

root@sonic:~# config portchannel add PortChan1000
Usage: config portchannel add [OPTIONS] <portchannel_name>

Error: PortChan1000 is invalid!, name should have prefix 'PortChannel' and suffix '<0-9999>'

root@sonic:~# config portchannel del PortChan1000
Usage: config portchannel del [OPTIONS] <portchannel_name>

Error: PortChan1000 is invalid!, name should have prefix 'PortChannel' and suffix '<0-9999>'

root@sonic:~# config portchannel member add PortChan1000 Ethernet0
Usage: config portchannel member add [OPTIONS] <portchannel_name> <port_name>

Error: PortChan1000 is invalid!, name should have prefix 'PortChannel' and suffix '<0-9999>'
root@sonic:~#

root@sonic:~# config portchannel member add PortChannel1 Etherne45
Usage: config portchannel member add [OPTIONS] <portchannel_name> <port_name>

Error: Interface name is invalid. Please enter a valid interface name!!
root@sonic:~#

root@sonic:~# config interface ip add PortChan1000 10.10.5.3/24
Usage: config interface ip add [OPTIONS] <interface_name> <ip_addr>

Error: 'interface_name' is not valid. Valid names [Ethernet/PortChannel/Vlan/Loopback]
root@sonic:~#

@stcheng
Copy link
Contributor

stcheng commented Jun 17, 2019

retest this please

@jleveque
Copy link
Contributor

Retest this please

@ramachandrareddygaddam
Copy link
Contributor Author

Can you pl. let me know, what tests to be performed. Appreciate your help.

@jleveque
Copy link
Contributor

@ramachandrareddygaddam: That comment is not directed at you. It is a trigger phrase which causes a GitHub plugin to automatically re-run our check builds.

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