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

[YANG]: Fix SNMP_AGENT_ADDRESS_CONFIG yang model #17044

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

SuvarnaMeenakshi
Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi commented Oct 30, 2023

fixes #16011

Why I did it

  1. seeing below warning ,essage:
    libyang[1]: Default value "" in the list key "port" is ignored. (/sonic-snmp:sonic-snmp/SNMP_AGENT_ADDRESS_CONFIG/SNMP_AGENT_ADDRESS_LIST)
    libyang[1]: Default value "" in the list key "vrf_name" is ignored. (/sonic-snmp:sonic-snmp/SNMP_AGENT_ADDRESS_CONFIG/SNMP_AGENT_ADDRESS_LIST)

  2. name of list is not <model_name>_LIST.

Work item tracking
  • Microsoft ADO 25646016:

How I did it

  1. Remove default value provided to key in yang model to avoid seeing below error:
    libyang[1]: Default value "" in the list key "port" is ignored. (/sonic-snmp:sonic-snmp/SNMP_AGENT_ADDRESS_CONFIG/SNMP_AGENT_ADDRESS_LIST)
    libyang[1]: Default value "" in the list key "vrf_name" is ignored. (/sonic-snmp:sonic-snmp/SNMP_AGENT_ADDRESS_CONFIG/SNMP_AGENT_ADDRESS_LIST)

  2. Modify the LIST name to have <model_name>_LIST as this was failing yang validation during unit-tests.

How to verify it

unit-tests passing.
Before fix

admin@vlab-01:~$ sudo sonic-package-manager list
libyang[1]: Default value "" in the list key "port" is ignored. (/sonic-snmp:sonic-snmp/SNMP_AGENT_ADDRESS_CONFIG/SNMP_AGENT_ADDRESS_LIST)
libyang[1]: Default value "" in the list key "vrf_name" is ignored. (/sonic-snmp:sonic-snmp/SNMP_AGENT_ADDRESS_CONFIG/SNMP_AGENT_ADDRESS_LIST)
Name            Repository                   Description                   Version    Status
--------------  ---------------------------  ----------------------------  ---------  ---------
database        docker-database              SONiC database package        1.0.0      Built-In
dhcp-relay      docker-dhcp-relay            N/A                           1.0.0      Installed
eventd          docker-eventd                SONiC eventd package          1.0.0      Built-In
fpm-frr         docker-fpm-frr               SONiC fpm-frr package         1.0.0      Built-In
gbsyncd         docker-gbsyncd-vs            SONiC gbsyncd package         1.0.0      Built-In
lldp            docker-lldp                  SONiC lldp package            1.0.0      Built-In
macsec          docker-macsec                N/A                           1.0.0      Installed
mgmt-framework  docker-sonic-mgmt-framework  SONiC mgmt-framework package  1.0.0      Built-In
mux             docker-mux                   SONiC mux package             1.0.0      Built-In
nat             docker-nat                   SONiC nat package             1.0.0      Built-In
pmon            docker-platform-monitor      SONiC pmon package            1.0.0      Built-In
radv            docker-router-advertiser     SONiC radv package            1.0.0      Built-In
sflow           docker-sflow                 SONiC sflow package           1.0.0      Built-In
snmp            docker-snmp                  SONiC snmp package            1.0.0      Built-In
swss            docker-orchagent             SONiC swss package            1.0.0      Built-In
syncd           docker-syncd-vs              SONiC syncd package           1.0.0      Built-In
teamd           docker-teamd                 SONiC teamd package           1.0.0      Built-In
telemetry       docker-sonic-telemetry       SONiC telemetry package       1.0.0      Built-In

After fix:

admin@vlab-01:~$ sudo sonic-package-manager list
Name            Repository                   Description                   Version    Status
--------------  ---------------------------  ----------------------------  ---------  ---------
database        docker-database              SONiC database package        1.0.0      Built-In
dhcp-relay      docker-dhcp-relay            N/A                           1.0.0      Installed
eventd          docker-eventd                SONiC eventd package          1.0.0      Built-In
fpm-frr         docker-fpm-frr               SONiC fpm-frr package         1.0.0      Built-In
gbsyncd         docker-gbsyncd-vs            SONiC gbsyncd package         1.0.0      Built-In
lldp            docker-lldp                  SONiC lldp package            1.0.0      Built-In
macsec          docker-macsec                N/A                           1.0.0      Installed
mgmt-framework  docker-sonic-mgmt-framework  SONiC mgmt-framework package  1.0.0      Built-In
mux             docker-mux                   SONiC mux package             1.0.0      Built-In
nat             docker-nat                   SONiC nat package             1.0.0      Built-In
pmon            docker-platform-monitor      SONiC pmon package            1.0.0      Built-In
radv            docker-router-advertiser     SONiC radv package            1.0.0      Built-In
sflow           docker-sflow                 SONiC sflow package           1.0.0      Built-In
snmp            docker-snmp                  SONiC snmp package            1.0.0      Built-In
swss            docker-orchagent             SONiC swss package            1.0.0      Built-In
syncd           docker-syncd-vs              SONiC syncd package           1.0.0      Built-In
teamd           docker-teamd                 SONiC teamd package           1.0.0      Built-In
telemetry       docker-sonic-telemetry       SONiC telemetry package       1.0.0      Built-In

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
Copy link
Contributor

@ganglyu ganglyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SuvarnaMeenakshi
Copy link
Contributor Author

@qiluo-msft @StormLiangMS can you help merge this PR

Copy link
Contributor

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS StormLiangMS merged commit 089c115 into sonic-net:master Nov 3, 2023
19 checks passed
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.

Error message in yang model observed in "config interface breakout" and "sonic-package-manager list"
4 participants