sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
195 stars 707 forks source link

snmpagentaddress doesn't support the uppercase letters for ipv6 address #4852

Open yanjundeng opened 2 years ago

yanjundeng commented 2 years ago

Description

The cli "config snmpagentaddress" doesn't support the uppercase letters for ipv6 address. In sonic /config/main.py, we should add lower() in the folllowing func for ip comparison: def add_snmp_agent_address(ctx, agentip, port, vrf): if agentip.lower() == ipaddr['addr'].lower():

Steps to reproduce the issue: config snmpagentaddress add FC00:2::32 -v mgmt IP addfress is not available config snmpagentaddress add fc00:2::32 -v mgmt

cisco@mathilda-01:~$ show management_interface addres Management IP address = 192.168.122.202/24 Management Network Default Gateway = 192.168.122.1 Management IP address = FC00:2::32/64 Management Network Default Gateway = fc00:2::1

Describe the results you received:

Describe the results you expected:

wangxin commented 2 years ago

This should be an issue of this repo: https://github.com/Azure/sonic-utilities

xwjiang-ms commented 2 years ago

Fixed in https://github.com/Azure/sonic-utilities/pull/1989