0e58512353
### Why I did it Revise DPU's database_global.json schema to achieve a more general design ### How I did it 1. Remove databse_type 2. Add a new field databse_name
43 lines
884 B
Django/Jinja
43 lines
884 B
Django/Jinja
{% set namespace_cnt = NAMESPACE_COUNT|int %}
|
|
{% if NUM_DPU is defined %}
|
|
{% set dpu_cnt = NUM_DPU | int %}
|
|
{% else %}
|
|
{% set dpu_cnt = 0 %}
|
|
{% endif %}
|
|
{
|
|
"INCLUDES" : [
|
|
{
|
|
"include" : "../../redis/sonic-db/database_config.json"
|
|
},
|
|
|
|
{% if namespace_cnt > 1 %}
|
|
{% for ns in range(namespace_cnt) %}
|
|
{
|
|
"namespace" : "{{NAMESPACE_PREFIX}}{{ns}}",
|
|
"include" : "../../redis{{ns}}/sonic-db/database_config.json"
|
|
{% if ns == namespace_cnt-1 %}
|
|
}
|
|
{% else %}
|
|
},
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if dpu_cnt > 0 %}
|
|
{% for dpu in range(dpu_cnt) %}
|
|
{
|
|
"database_name" : "dpu{{dpu}}",
|
|
"include" : "../../redisdpu{{dpu}}/sonic-db/database_config.json"
|
|
{% if dpu == dpu_cnt-1 %}
|
|
}
|
|
{% else %}
|
|
},
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
],
|
|
"VERSION" : "1.0"
|
|
}
|
|
|