File tree Expand file tree Collapse file tree 6 files changed +50
-15
lines changed Expand file tree Collapse file tree 6 files changed +50
-15
lines changed Original file line number Diff line number Diff line change 1214
1214
"FEATURE" : {
1215
1215
"bgp" : {
1216
1216
"auto_restart" : " enabled" ,
1217
- "has_global_scope" : " false " ,
1218
- "has_per_asic_scope" : " true " ,
1219
- "has_timer" : " false " ,
1217
+ "has_global_scope" : " False " ,
1218
+ "has_per_asic_scope" : " True " ,
1219
+ "has_timer" : " False " ,
1220
1220
"high_mem_alert" : " disabled" ,
1221
1221
"state" : " enabled" ,
1222
1222
"set_owner" : " local"
1329
1329
"scheduler" : " TEST@1" ,
1330
1330
"wred_profile" : " Wred1"
1331
1331
}
1332
- },
1332
+ },
1333
1333
1334
1334
"DSCP_TO_TC_MAP" : {
1335
1335
"Dscp_to_tc_map1" : {
Original file line number Diff line number Diff line change 7
7
"eStrKey" : " Pattern" ,
8
8
"eStr" : [" enabled|disabled|always_enabled|always_disabled" ]
9
9
},
10
+ "FEATURE_WITH_INVALID_BOOLEAN_TYPE" : {
11
+ "desc" : " Referring invalid feature boolean types." ,
12
+ "eStrKey" : " Pattern" ,
13
+ "eStr" : [" false|true|False|True" ]
14
+ },
10
15
"FEATURE_WITH_INVALID_OWNER" : {
11
16
"desc" : " Referring invalid feature set_owner field." ,
12
17
"eStrKey" : " Pattern" ,
Original file line number Diff line number Diff line change 7
7
"name" : " database" ,
8
8
"state" : " always_enabled" ,
9
9
"auto_restart" : " always_enabled" ,
10
- "has_timer" : " false " ,
11
- "has_global_scope" : " true " ,
12
- "has_per_asic_scope" : " true " ,
10
+ "has_timer" : " False " ,
11
+ "has_global_scope" : " True " ,
12
+ "has_per_asic_scope" : " True " ,
13
13
"set_owner" : " local"
14
14
},
15
15
{
101
101
]
102
102
}
103
103
}
104
+ },
105
+ "FEATURE_WITH_INVALID_BOOLEAN_TYPE" : {
106
+ "sonic-feature:sonic-feature" : {
107
+ "sonic-feature:FEATURE" : {
108
+ "FEATURE_LIST" : [
109
+ {
110
+ "name" : " database" ,
111
+ "state" : " always_enabled" ,
112
+ "auto_restart" : " always_enabled" ,
113
+ "has_timer" : " FALSE" ,
114
+ "has_global_scope" : " TRUE" ,
115
+ "has_per_asic_scope" : " TRUE"
116
+ }
117
+ ]
118
+ }
119
+ }
104
120
}
105
121
}
Original file line number Diff line number Diff line change @@ -5,8 +5,12 @@ module sonic-feature{
5
5
namespace "http://github.com/Azure/sonic-feature" ;
6
6
prefix feature ;
7
7
8
+ import sonic-types {
9
+ prefix stypes;
10
+ }
11
+
8
12
description "Feature Table yang Module for SONiC" ;
9
-
13
+
10
14
typedef feature-state {
11
15
description "configuration to set the feature running state" ;
12
16
type string {
@@ -53,22 +57,22 @@ module sonic-feature{
53
57
leaf has_timer {
54
58
description "This configuration identicates if there is
55
59
timer associated to this feature" ;
56
- type boolean ;
57
- default false ;
60
+ type stypes: boolean _type ;
61
+ default " false" ;
58
62
}
59
63
60
64
leaf has_global_scope {
61
65
description "This configuration identicates there will only one service
62
66
spawned for the device" ;
63
- type boolean ;
64
- default false ;
67
+ type stypes: boolean _type ;
68
+ default " false" ;
65
69
}
66
70
67
71
leaf has_per_asic_scope {
68
72
description "This configuration identicates there will only one service
69
73
spawned per asic" ;
70
- type boolean ;
71
- default false ;
74
+ type stypes: boolean _type ;
75
+ default " false" ;
72
76
}
73
77
74
78
leaf high_mem_alert {
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ module sonic-flex_counter {
5
5
namespace "http://github.com/Azure/sonic-flex_counter" ;
6
6
prefix flex_counter;
7
7
8
+ import sonic-types {
9
+ prefix stypes;
10
+ }
11
+
8
12
description "FLEX COUNTER YANG Module for SONiC OS" ;
9
13
10
14
revision 2020 -04 -10 {
@@ -24,7 +28,7 @@ module sonic-flex_counter {
24
28
}
25
29
26
30
typedef flex_delay_status {
27
- type boolean ;
31
+ type stypes: boolean _type ;
28
32
}
29
33
30
34
typedef poll_interval {
Original file line number Diff line number Diff line change @@ -217,6 +217,12 @@ module sonic-types {
217
217
}
218
218
}
219
219
220
+ typedef boolean_type {
221
+ type string {
222
+ pattern "false|true|False|True";
223
+ }
224
+ }
225
+
220
226
typedef mac-addr-and-mask {
221
227
type string {
222
228
pattern "[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}|[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}/[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}";
You can’t perform that action at this time.
0 commit comments