@@ -106,58 +106,67 @@ New tables shall be added to CONFIG DB to store the rate limit configuration. in
106
106
}
107
107
},
108
108
"SYSLOG_CONFIG_FEATURE": {
109
- {%- for feature, _, _, _ in features %}
109
+ {\ %- for feature, _, _, _ in features \ %}
110
110
"{{feature}}": {
111
111
"rate_limit_interval" : "300",
112
112
"rate_limit_burst": "20000"
113
- }{%if not loop.last %},{% endif -%}
114
- {% endfor %}
113
+ }{\ %if not loop.last \ %},{\ % endif -\ %}
114
+ {\ % endfor \ %}
115
115
}
116
+
117
+ NOTE: An extra backslash is added in front of % in the above code snippet. Remove the backslash while using the actual code in SONiC.
118
+
116
119
...
117
120
```
118
121
119
122
#### rsyslog.conf.j2
120
123
121
124
```
122
- {% if SYSLOG_CONFIG is defined %}
123
- {% if 'GLOBAL' in SYSLOG_CONFIG %}
124
- {% if 'rate_limit_interval' in SYSLOG_CONFIG['GLOBAL']%}
125
- {% set rate_limit_interval = SYSLOG_CONFIG['GLOBAL']['rate_limit_interval'] %}
126
- {% endif %}
127
- {% if 'rate_limit_burst' in SYSLOG_CONFIG['GLOBAL']%}
128
- {% set rate_limit_burst = SYSLOG_CONFIG['GLOBAL']['rate_limit_burst'] %}
129
- {% endif %}
130
- {% endif %}
131
- {% endif %}
132
-
133
- {% if rate_limit_interval is defined %}
125
+ {\ % if SYSLOG_CONFIG is defined \ %}
126
+ {\ % if 'GLOBAL' in SYSLOG_CONFIG \ %}
127
+ {\ % if 'rate_limit_interval' in SYSLOG_CONFIG['GLOBAL']\ %}
128
+ {\ % set rate_limit_interval = SYSLOG_CONFIG['GLOBAL']['rate_limit_interval'] \ %}
129
+ {\ % endif \ %}
130
+ {\ % if 'rate_limit_burst' in SYSLOG_CONFIG['GLOBAL']\ %}
131
+ {\ % set rate_limit_burst = SYSLOG_CONFIG['GLOBAL']['rate_limit_burst'] \ %}
132
+ {\ % endif \ %}
133
+ {\ % endif \ %}
134
+ {\ % endif \ %}
135
+
136
+ {\ % if rate_limit_interval is defined \ %}
134
137
$SystemLogRateLimitInterval {{ rate_limit_interval }}
135
- {% endif %}
136
- {% if rate_limit_burst is defined %}
138
+ {\ % endif \ %}
139
+ {\ % if rate_limit_burst is defined \ %}
137
140
$SystemLogRateLimitBurst {{ rate_limit_burst }}
138
- {% endif %}
141
+ {\% endif \%}
142
+
143
+ NOTE: An extra backslash is added in front of % in the above code snippet. Remove the backslash while using the actual code in SONiC.
144
+
139
145
```
140
146
141
147
#### rsyslog-container.conf.j2
142
148
143
149
```
144
- {% if SYSLOG_CONFIG_FEATURE is defined %}
145
- {% if container_name in SYSLOG_CONFIG_FEATURE %}
146
- {% if 'rate_limit_interval' in SYSLOG_CONFIG_FEATURE[container_name]%}
147
- {% set rate_limit_interval = SYSLOG_CONFIG_FEATURE[container_name]['rate_limit_interval'] %}
148
- {% endif %}
149
- {% if 'rate_limit_burst' in SYSLOG_CONFIG_FEATURE[container_name]%}
150
- {% set rate_limit_burst = SYSLOG_CONFIG_FEATURE[container_name]['rate_limit_burst'] %}
151
- {% endif %}
152
- {% endif %}
153
- {% endif %}
154
-
155
- {% if rate_limit_interval is defined %}
150
+ {\ % if SYSLOG_CONFIG_FEATURE is defined \ %}
151
+ {\ % if container_name in SYSLOG_CONFIG_FEATURE \ %}
152
+ {\ % if 'rate_limit_interval' in SYSLOG_CONFIG_FEATURE[container_name]\ %}
153
+ {\ % set rate_limit_interval = SYSLOG_CONFIG_FEATURE[container_name]['rate_limit_interval'] \ %}
154
+ {\ % endif \ %}
155
+ {\ % if 'rate_limit_burst' in SYSLOG_CONFIG_FEATURE[container_name]\ %}
156
+ {\ % set rate_limit_burst = SYSLOG_CONFIG_FEATURE[container_name]['rate_limit_burst'] \ %}
157
+ {\ % endif \ %}
158
+ {\ % endif \ %}
159
+ {\ % endif\ %}
160
+
161
+ {\ % if rate_limit_interval is defined \ %}
156
162
$SystemLogRateLimitInterval {{ rate_limit_interval }}
157
- {% endif %}
158
- {% if rate_limit_burst is defined %}
163
+ {\ % endif \ %}
164
+ {\ % if rate_limit_burst is defined \ %}
159
165
$SystemLogRateLimitBurst {{ rate_limit_burst }}
160
- {% endif %}
166
+ {\% endif \%}
167
+
168
+ NOTE: An extra backslash is added in front of % in the above code snippet. Remove the backslash while using the actual code in SONiC.
169
+
161
170
```
162
171
163
172
#### docker_image_ctl.j2
0 commit comments