Commit 4a17e17 1 parent 906ab3e commit 4a17e17 Copy full SHA for 4a17e17
File tree 6 files changed +66
-12
lines changed
6 files changed +66
-12
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ Table of Contents
91
91
* [XCVRD_LOG](#xcvrd_log)
92
92
* [PASSWORD_HARDENING](#password_hardening)
93
93
* [SSH_SERVER](#ssh_server)
94
+ * [SUBNET_DECAP](#subnet_decap)
94
95
* [SYSTEM_DEFAULTS table](#systemdefaults-table)
95
96
* [RADIUS](#radius)
96
97
* [Static DNS](#static-dns)
@@ -2814,6 +2815,20 @@ The method could be:
2814
2815
}
2815
2816
```
2816
2817
2818
+ ### SUBNET_DECAP
2819
+
2820
+ The **SUBNET_DECAP** table is used for subnet decap configuration.
2821
+
2822
+ ```
2823
+ "SUBNET_DECAP": {
2824
+ "AZURE": {
2825
+ "status": "enable",
2826
+ "src_ip": "10.10.10.0/24",
2827
+ "src_ip_v6": "20c1:ba8::/64"
2828
+ }
2829
+ }
2830
+ ```
2831
+
2817
2832
### SYSTEM_DEFAULTS table
2818
2833
To have a better management of the features in SONiC, a new table `SYSTEM_DEFAULTS` is introduced.
2819
2834
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ def run(self):
167
167
'./yang-models/sonic-system-tacacs.yang' ,
168
168
'./yang-models/sonic-system-radius.yang' ,
169
169
'./yang-models/sonic-system-ldap.yang' ,
170
+ './yang-models/sonic-subnet-decap.yang' ,
170
171
'./yang-models/sonic-telemetry.yang' ,
171
172
'./yang-models/sonic-telemetry_client.yang' ,
172
173
'./yang-models/sonic-gnmi.yang' ,
Original file line number Diff line number Diff line change 5
5
"vni" : " 100"
6
6
}
7
7
},
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
+ },
8
15
"DHCP_SERVER" : {
9
16
"192.0.0.8" : {},
10
17
"192.0.0.8" : {},
2762
2769
"log_verbosity" : " notice"
2763
2770
}
2764
2771
},
2765
- "SUBNET_DECAP" : {
2766
- "AZURE" : {
2767
- "status" : " enable" ,
2768
- "src_ip" : " 10.10.10.0/24" ,
2769
- "src_ip_v6" : " 20c1:ba8::/64"
2770
- }
2771
- },
2772
2772
"GRPCCLIENT" : {
2773
2773
"config" : {
2774
2774
"type" : " secure" ,
Original file line number Diff line number Diff line change 10
10
},
11
11
"SUBNET_DECAP_INVALID_STATUS_TEST" : {
12
12
"desc" : " Configure SUBNET_DECAP table with invalid status." ,
13
- "eStrKey" : " Pattern "
13
+ "eStrKey" : " InvalidValue "
14
14
},
15
15
"SUBNET_DECAP_INVALID_IPV4" : {
16
16
"desc" : " Configure SUBNET_DECAP table with invalid src ipv4 prefix." ,
19
19
"SUBNET_DECAP_INVALID_IPV6" : {
20
20
"desc" : " Configure SUBNET_DECAP table with invalid src ipv6 prefix." ,
21
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"
22
30
}
23
31
}
Original file line number Diff line number Diff line change 81
81
]
82
82
}
83
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
+ }
84
110
}
85
111
}
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ module sonic-subnet-decap {
10
10
prefix inet;
11
11
}
12
12
13
+ import sonic-types {
14
+ prefix stypes;
15
+ }
16
+
13
17
description "Subnet decap configuration for SONiC OS." ;
14
18
15
19
revision 2024 -12 -19 {
@@ -31,21 +35,21 @@ module sonic-subnet-decap {
31
35
}
32
36
33
37
leaf status {
34
- type string {
35
- pattern "enable|disable" ;
36
- }
37
- default "disable" ;
38
+ type stypes:mode-status;
39
+ default disable;
38
40
description "Subnet Decap status." ;
39
41
}
40
42
41
43
leaf src_ip {
42
44
type inet:ipv4-prefix;
43
45
description "Subnet decap term source IPv4 prefix." ;
46
+ mandatory true ;
44
47
}
45
48
46
49
leaf src_ip_v6 {
47
50
type inet:ipv6-prefix;
48
51
description "Subnet decap term source IPv6 prefix." ;
52
+ mandatory true ;
49
53
}
50
54
}
51
55
}
You can’t perform that action at this time.
0 commit comments