From 8837dc2e64332d2c66226b65012ca58e08a3a9bc Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Fri, 15 Apr 2022 09:09:25 -0700 Subject: [PATCH] [qos] add raw tag around the jinja2 sample code (#984) Signed-off-by: Ying Xie --- doc/qos/reclaim-reserved-buffer.md | 12 ++++++++++++ doc/subport/sonic-sub-port-intf-hld.md | 2 +- doc/vxlan/Overlay ECMP with BFD.md | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/qos/reclaim-reserved-buffer.md b/doc/qos/reclaim-reserved-buffer.md index dd6e8d8791..f2b5df0dbb 100644 --- a/doc/qos/reclaim-reserved-buffer.md +++ b/doc/qos/reclaim-reserved-buffer.md @@ -166,6 +166,7 @@ The following snippet of code is to generate `PORT_INACTIVE` which contains all They need to be moved from the middle of `buffer_template.j2` to the place just before the vendor specific template is imported, so that the vendor specific template has access to `PORT_INACTIVE`. ```json +{% raw %} # ignore this line please {%- set PORT_ALL = [] %} {%- if PORT is not defined %} @@ -192,16 +193,19 @@ They need to be moved from the middle of `buffer_template.j2` to the place just {# Import default values from device HWSKU folder #} {%- import 'buffers_defaults_%s.j2' % filename_postfix as defs with context %} +{% endraw %} # ignore this line please ``` The vairable `port_names_inactive` also need to be generated by the following snipped of code. ```json +{% raw %} # ignore this line please {%- set port_names_list_inactive = [] %} {%- for port in PORT_INACTIVE %} {%- if port_names_list_inactive.append(port) %}{%- endif %} {%- endfor %} {%- set port_names_inactive = port_names_list_inactive | join(',') %} +{% endraw %} # ignore this line please ``` ##### 7.1.1.2 Macro to generate buffer pool and profiles ##### @@ -211,6 +215,7 @@ Zero buffer profiles should be defined for ingress/egress and lossless/lossy tra This macro is defined in vendor specific buffer template files. ```json +{% raw %} # ignore this line please {%- macro generate_buffer_pool_and_profiles() %} "BUFFER_POOL": { {%- if dynamic_mode is not defined and PORT_INACTIVE is defined and PORT_INACTIVE|length > 0 %} @@ -302,6 +307,7 @@ This macro is defined in vendor specific buffer template files. } }, {%- endmacro %} +{% endraw %} # ignore this line please ``` ##### 7.1.1.3 Macro to apply zero buffer profiles to inactive ports ##### @@ -321,6 +327,7 @@ These macros are defined in vendor specific buffer template files. generate_profile_lists_with_inactive_ports: ```json +{% raw %} # ignore this line please {%- macro generate_profile_lists_with_inactive_ports(port_names_active, port_names_inactive) %} "BUFFER_PORT_INGRESS_PROFILE_LIST": { {% for port in port_names_active.split(',') %} @@ -365,11 +372,13 @@ generate_profile_lists_with_inactive_ports: {% endif %} } {%- endmacro %} +{% endraw %} # ignore this line please ``` generate_pg_profiles_with_inactive_ports: ```json +{% raw %} # ignore this line please {%- macro generate_pg_profiles(port_names_active, port_names_inactive) %} "BUFFER_PG": { {% for port in port_names_active.split(',') %} @@ -403,11 +412,13 @@ generate_pg_profiles_with_inactive_ports: {% endif %} } {%- endmacro %} +{% endraw %} # ignore this line please ``` generate_queue_buffers_with_inactive_ports: ```json +{% raw %} # ignore this line please {%- macro generate_queue_buffers(port_names_active, port_names_inactive) %} "BUFFER_QUEUE": { {% for port in port_names_active.split(',') %} @@ -466,6 +477,7 @@ generate_queue_buffers_with_inactive_ports: {% endif %} } {%- endmacro %} +{% endraw %} # ignore this line please ``` Assume port `Ethernet0` is admin down, an example is: diff --git a/doc/subport/sonic-sub-port-intf-hld.md b/doc/subport/sonic-sub-port-intf-hld.md index 1e0ad3f4bd..cf5db32ec9 100644 --- a/doc/subport/sonic-sub-port-intf-hld.md +++ b/doc/subport/sonic-sub-port-intf-hld.md @@ -172,7 +172,7 @@ Example configuration: "Ethernet0.100|192.0.0.1/21": {}, "Ethernet0.100|fc0a::/112": {} "Eth64.10": { - “vlan” : 100, + "vlan" : 100, "admin_status" : "up" }, "Eth64.10|192.168.0.1/21": {}, diff --git a/doc/vxlan/Overlay ECMP with BFD.md b/doc/vxlan/Overlay ECMP with BFD.md index 4485cd6237..74f3c31989 100644 --- a/doc/vxlan/Overlay ECMP with BFD.md +++ b/doc/vxlan/Overlay ECMP with BFD.md @@ -143,6 +143,7 @@ VNET_ROUTE_TUNNEL_TABLE:{{vnet_name}}:{{prefix}} Proposed: ``` +{% raw %} # ignore this line please VNET_ROUTE_TUNNEL_TABLE:{{vnet_name}}:{{prefix}} "endpoint": {{ip_address1},{ip_address2},...} "endpoint_monitor": {{ip_address1},{ip_address2},...} (OPTIONAL) @@ -150,6 +151,7 @@ VNET_ROUTE_TUNNEL_TABLE:{{vnet_name}}:{{prefix}} "vni": {{vni1},{vni2},...} (OPTIONAL) "weight": {{w1},{w2},...} (OPTIONAL) “profile”: {{profile_name}} (OPTIONAL) +{% endraw %} # ignore this line please ``` ```