doc/_ext: render constraint and policies if available

they are used by rbd options.

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-05-10 20:55:40 +08:00
parent 907044dc59
commit f84504464a

View File

@ -56,6 +56,12 @@ TEMPLATE = '''
{%- elif opt.max is defined %}
:max: ``{{ opt.max }}``
{%- endif %}
{%- if opt.constraint %}
:constraint: {{ opt.constraint }}
{% endif %}
{%- if opt.policies %}
:policies: {{ opt.policies }}
{% endif %}
{%- if opt.see_also %}
:see also: {{ opt.see_also | map('ref_confval') | join(', ') }}
{%- endif %}