Skip to content

Commit a044164

Browse files
authored
[code sync] Merge code from sonic-net/sonic-buildimage:202411 to 202412 (sonic-net#858)
```<br>* a5f121d03 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-buildimage into 202412 (2025-03-12) [Sonic Automation] * ad28af8 - (head/202411) [submodule] Update submodule sonic-utilities to the latest HEAD automatically (sonic-net#21968) (2025-03-11) [mssonicbld] * 6cb2941 - [YANG] Add yang model to `SUBNET_DECAP` table (sonic-net#21118) (sonic-net#21974) (2025-03-11) [Longxiang Lyu] * ef9e911 - [Mellanox] Support new field "supporting_bulk_counter_groups" in DEVICE_METADATA|localhost for Mellanox-SN4280-O28 (sonic-net#21986) (2025-03-11) [mssonicbld] * 39dbcfd - [SNMP] Fix config template issue when setting snmpagentaddress (sonic-net#21987) (2025-03-11) [mssonicbld] * 5e6a202 - Merge pull request sonic-net#21964 from Aravind-Subbaroyan/patch-5 (2025-03-10) [Kumaresh Perumal] |\ | failure_prs.log skip_prs.log e1be5dd - Update cisco-8000.ini (2025-03-07) [Aravind-Subbaroyan] * | 37df4a3 - [submodule] Update submodule sonic-utilities to the latest HEAD automatically (sonic-net#21912) (2025-03-08) [mssonicbld] |/ * a414a7f - [submodule] Update submodule sonic-swss to the latest HEAD automatically (sonic-net#21933) (2025-03-08) [mssonicbld]<br>```
1 parent 6548b0f commit a044164

File tree

9 files changed

+231
-1
lines changed

9 files changed

+231
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"DEVICE_METADATA": {
3+
"localhost": {
4+
"create_only_config_db_buffers": "true"
5+
}
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
QUEUE_WATERMARK_STAT_COUNTER,PG_WATERMARK_STAT_COUNTER,PFC_WD

dockers/docker-snmp/snmpd.conf.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
{% if SNMP_AGENT_ADDRESS_CONFIG %}
2828
{% for (agentip, port, vrf) in SNMP_AGENT_ADDRESS_CONFIG %}
29-
agentAddress {{ protocol(agentip) }}:[{{ agentip }}]{% if port %}:{{ port }}{% endif %}{% if vrf %}%{{ vrf }}{% endif %}{{ "" }}
29+
agentAddress {{ protocol(agentip) }}:[{{ agentip }}]{% if vrf %}@{{ vrf }}{% endif %}{% if port %}:{{ port }}{% endif %}{{ "" }}
3030
{% endfor %}
3131
{% else %}
3232
agentAddress udp:161

src/sonic-yang-models/doc/Configuration.md

+15
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Table of Contents
9191
* [XCVRD_LOG](#xcvrd_log)
9292
* [PASSWORD_HARDENING](#password_hardening)
9393
* [SSH_SERVER](#ssh_server)
94+
* [SUBNET_DECAP](#subnet_decap)
9495
* [SYSTEM_DEFAULTS table](#systemdefaults-table)
9596
* [RADIUS](#radius)
9697
* [Static DNS](#static-dns)
@@ -2816,6 +2817,20 @@ The method could be:
28162817
}
28172818
```
28182819
2820+
### SUBNET_DECAP
2821+
2822+
The **SUBNET_DECAP** table is used for subnet decap configuration.
2823+
2824+
```
2825+
"SUBNET_DECAP": {
2826+
"AZURE": {
2827+
"status": "enable",
2828+
"src_ip": "10.10.10.0/24",
2829+
"src_ip_v6": "20c1:ba8::/64"
2830+
}
2831+
}
2832+
```
2833+
28192834
### SYSTEM_DEFAULTS table
28202835
To have a better management of the features in SONiC, a new table `SYSTEM_DEFAULTS` is introduced.
28212836

src/sonic-yang-models/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def run(self):
167167
'./yang-models/sonic-system-tacacs.yang',
168168
'./yang-models/sonic-system-radius.yang',
169169
'./yang-models/sonic-system-ldap.yang',
170+
'./yang-models/sonic-subnet-decap.yang',
170171
'./yang-models/sonic-telemetry.yang',
171172
'./yang-models/sonic-telemetry_client.yang',
172173
'./yang-models/sonic-gnmi.yang',

src/sonic-yang-models/tests/files/sample_config_db.json

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
"vni" : "100"
66
}
77
},
8+
"SUBNET_DECAP": {
9+
"AZURE": {
10+
"status": "enable",
11+
"src_ip": "10.10.10.0/24",
12+
"src_ip_v6": "20c1:ba8::/64"
13+
}
14+
},
815
"DHCP_SERVER": {
916
"192.0.0.8": {},
1017
"192.0.0.8": {},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"SUBNET_DECAP_DEFAULT_TEST": {
3+
"desc": "Configure SUBNET_DECAP table."
4+
},
5+
"SUBNET_DECAP_ENABLE_TEST": {
6+
"desc": "Configure SUBNET_DECAP table with status as enable."
7+
},
8+
"SUBNET_DECAP_DISABLE_TEST": {
9+
"desc": "Configure SUBNET_DECAP table with status as disable."
10+
},
11+
"SUBNET_DECAP_INVALID_STATUS_TEST": {
12+
"desc": "Configure SUBNET_DECAP table with invalid status.",
13+
"eStrKey": "InvalidValue"
14+
},
15+
"SUBNET_DECAP_INVALID_IPV4": {
16+
"desc": "Configure SUBNET_DECAP table with invalid src ipv4 prefix.",
17+
"eStrKey": "Pattern"
18+
},
19+
"SUBNET_DECAP_INVALID_IPV6": {
20+
"desc": "Configure SUBNET_DECAP table with invalid src ipv6 prefix.",
21+
"eStrKey": "Pattern"
22+
},
23+
"SUBNET_DECAP_NO_IPV4": {
24+
"desc": "Configure SUBNET_DECAP table without src ipv4 prefix.",
25+
"eStrKey": "Mandatory"
26+
},
27+
"SUBNET_DECAP_NO_IPV6": {
28+
"desc": "Configure SUBNET_DECAP table without src ipv6 prefix.",
29+
"eStrKey": "Mandatory"
30+
}
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"SUBNET_DECAP_DEFAULT_TEST": {
3+
"sonic-subnet-decap:sonic-subnet-decap": {
4+
"sonic-subnet-decap:SUBNET_DECAP": {
5+
"SUBNET_DECAP_LIST": [
6+
{
7+
"name": "AZURE",
8+
"src_ip": "10.10.10.0/24",
9+
"src_ip_v6": "20c1:ba8::/64"
10+
}
11+
]
12+
}
13+
}
14+
},
15+
"SUBNET_DECAP_ENABLE_TEST": {
16+
"sonic-subnet-decap:sonic-subnet-decap": {
17+
"sonic-subnet-decap:SUBNET_DECAP": {
18+
"SUBNET_DECAP_LIST": [
19+
{
20+
"name": "AZURE",
21+
"status": "enable",
22+
"src_ip": "10.10.10.0/24",
23+
"src_ip_v6": "20c1:ba8::/64"
24+
}
25+
]
26+
}
27+
}
28+
},
29+
"SUBNET_DECAP_DISABLE_TEST": {
30+
"sonic-subnet-decap:sonic-subnet-decap": {
31+
"sonic-subnet-decap:SUBNET_DECAP": {
32+
"SUBNET_DECAP_LIST": [
33+
{
34+
"name": "AZURE",
35+
"status": "disable",
36+
"src_ip": "10.10.10.0/24",
37+
"src_ip_v6": "20c1:ba8::/64"
38+
}
39+
]
40+
}
41+
}
42+
},
43+
"SUBNET_DECAP_INVALID_STATUS_TEST": {
44+
"sonic-subnet-decap:sonic-subnet-decap": {
45+
"sonic-subnet-decap:SUBNET_DECAP": {
46+
"SUBNET_DECAP_LIST": [
47+
{
48+
"name": "AZURE",
49+
"status": "enabled",
50+
"src_ip": "10.10.10.0/24",
51+
"src_ip_v6": "20c1:ba8::/64"
52+
}
53+
]
54+
}
55+
}
56+
},
57+
"SUBNET_DECAP_INVALID_IPV4": {
58+
"sonic-subnet-decap:sonic-subnet-decap": {
59+
"sonic-subnet-decap:SUBNET_DECAP": {
60+
"SUBNET_DECAP_LIST": [
61+
{
62+
"name": "AZURE",
63+
"status": "enable",
64+
"src_ip": "10.10.10.01111/24",
65+
"src_ip_v6": "20c1:ba8::/64"
66+
}
67+
]
68+
}
69+
}
70+
},
71+
"SUBNET_DECAP_INVALID_IPV6": {
72+
"sonic-subnet-decap:sonic-subnet-decap": {
73+
"sonic-subnet-decap:SUBNET_DECAP": {
74+
"SUBNET_DECAP_LIST": [
75+
{
76+
"name": "AZURE",
77+
"status": "enable",
78+
"src_ip": "10.10.10.0/24",
79+
"src_ip_v6": "20c1:ba8::01111/64"
80+
}
81+
]
82+
}
83+
}
84+
},
85+
"SUBNET_DECAP_NO_IPV4": {
86+
"sonic-subnet-decap:sonic-subnet-decap": {
87+
"sonic-subnet-decap:SUBNET_DECAP": {
88+
"SUBNET_DECAP_LIST": [
89+
{
90+
"name": "AZURE",
91+
"status": "enable",
92+
"src_ip_v6": "20c1:ba8::/64"
93+
}
94+
]
95+
}
96+
}
97+
},
98+
"SUBNET_DECAP_NO_IPV6": {
99+
"sonic-subnet-decap:sonic-subnet-decap": {
100+
"sonic-subnet-decap:SUBNET_DECAP": {
101+
"SUBNET_DECAP_LIST": [
102+
{
103+
"name": "AZURE",
104+
"status": "enable",
105+
"src_ip": "10.10.10.0/24"
106+
}
107+
]
108+
}
109+
}
110+
}
111+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
module sonic-subnet-decap {
2+
3+
yang-version 1.1;
4+
5+
namespace "http://github.com/sonic-net/sonic-subnet-decap";
6+
7+
prefix subnet-decap;
8+
9+
import ietf-inet-types {
10+
prefix inet;
11+
}
12+
13+
import sonic-types {
14+
prefix stypes;
15+
}
16+
17+
description "Subnet decap configuration for SONiC OS.";
18+
19+
revision 2024-12-19 {
20+
description "Initial version";
21+
}
22+
23+
container sonic-subnet-decap {
24+
container SUBNET_DECAP {
25+
26+
description "CONFIG_DB subnet decap configuration.";
27+
28+
list SUBNET_DECAP_LIST {
29+
30+
key "name";
31+
32+
leaf name {
33+
type string;
34+
description "Subnet Decap config name.";
35+
}
36+
37+
leaf status {
38+
type stypes:mode-status;
39+
default disable;
40+
description "Subnet Decap status.";
41+
}
42+
43+
leaf src_ip {
44+
type inet:ipv4-prefix;
45+
description "Subnet decap term source IPv4 prefix.";
46+
mandatory true;
47+
}
48+
49+
leaf src_ip_v6 {
50+
type inet:ipv6-prefix;
51+
description "Subnet decap term source IPv6 prefix.";
52+
mandatory true;
53+
}
54+
}
55+
}
56+
}
57+
}

0 commit comments

Comments
 (0)