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-models] POLICER table missing #9742

Closed
wen587 opened this issue Jan 12, 2022 · 0 comments · Fixed by #9948
Closed

[yang-models] POLICER table missing #9742

wen587 opened this issue Jan 12, 2022 · 0 comments · Fixed by #9948
Labels
YANG YANG model related changes

Comments

@wen587
Copy link
Contributor

wen587 commented Jan 12, 2022

Description

POLICER yang is needed. It is used to set rate limit for mirror-session

Steps to reproduce the issue:

  1. Sample configDB table about policer.
admin@vlab-01:~/everflow$ cat policer.json
{
  "POLICER": {
    "everflow_static_policer": {
    "meter_type": "bytes",
    "mode": "sr_tcm",
    "cir": "12500000",
    "cbs": "12500000",
    "red_packet_action": "drop"
    }
  }
}
  1. apply-patch to add policer
admin@vlab-01:~/everflow$ sudo config apply-patch -i /FEATURE -i /QUEUE -i /SCHEDULER add_policer.json
Patch Applier: Patch application starting.
Patch Applier: Patch: [{"op": "add", "path": "/POLICER", "value": {"everflow_static_policer": {"meter_type": "bytes", "mode": "sr_tcm", "cir": "12500000", "cbs": "12500000", "red_packet_action": "drop"}}}]
Patch Applier: Getting current config db.
Patch Applier: Simulating the target full config after applying the patch.
Patch Applier: Validating target config does not have empty tables, since they do not show up in ConfigDb.
Patch Applier: Sorting patch updates.
Note: Below table(s) have no YANG models:
BGP_PEER_RANGE, CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, KDUMP, RESTAPI, SNMP, SNMP_COMMUNITY, TELEMETRY, POLICER,
Note: Below table(s) have no YANG models:
POLICER,
Failed to apply patch
Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH
Try "config apply-patch -h" for help.

Error: Given YANG covered config patch is not valid because it has changes to tables without YANG models

Describe the results you received:

Action failed.

Describe the results you expected:

Yang model should provide verification.

Output of show version:

admin@vlab-01:~/everflow$ show ver

SONiC Software Version: SONiC.master.58770-6402a0226
Distribution: Debian 11.1
Kernel: 5.10.0-8-2-amd64
Build commit: 6402a0226
Build date: Mon Dec 13 09:02:14 UTC 2021
Built by: AzDevOps@sonic-build-workers-000Z9S

Platform: x86_64-kvm_x86_64-r0
HwSKU: Force10-S6000
ASIC: vs
ASIC Count: 1
Serial Number: N/A
Model Number: N/A
Hardware Revision: N/A
Uptime: 08:30:18 up  2:47,  2 users,  load average: 0.21, 0.35, 0.27

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@wen587 wen587 added the YANG YANG model related changes label Jan 12, 2022
@qiluo-msft qiluo-msft assigned wen587 and unassigned wen587 Feb 9, 2022
qiluo-msft pushed a commit that referenced this issue Feb 14, 2022
#### Why I did it
Added yang model for policer table
Fixes #9742 and #9743
#### How I did it
Creating yang model for policer

#### How to verify it
Added UT to verify the yang model

The configuration schema for policer is added in the pull request sonic-net/sonic-swss#2144
judyjoseph pushed a commit that referenced this issue Feb 22, 2022
#### Why I did it
Added yang model for policer table
Fixes #9742 and #9743
#### How I did it
Creating yang model for policer

#### How to verify it
Added UT to verify the yang model

The configuration schema for policer is added in the pull request sonic-net/sonic-swss#2144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
YANG YANG model related changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants