openstack-doc-tools/autogenerate_config_docs/templates/changes.docbook.j2
Gauvain Pocentek dd6fd594fd diff_branches: use jinja templates to create the files
Generating docbook using lxml works fine, but the switch to RST tables
will make the code more diffiicult to read and maintain. Using jinja
templates will shorten the code and avoid dealing with complicated code.

This patch implements the use of jinja for docbook tables, and will ease
the implementation of RST output.

Change-Id: Ia5a75ced773b7e6e8faa7f89cb7620d986c47718
2015-11-10 08:53:31 +01:00

71 lines
1.8 KiB
Django/Jinja

<?xml version='1.0' encoding='UTF-8'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="{{ project }}-conf-changes-{{ release|lower }}">
<!-- Warning: Do not edit this file. It is automatically generated and your changes will be overwritten. The tool to do so lives in the openstack-doc-tools repository. -->
<title>New, updated, and deprecated options in {{ release }} for {{ codename }}</title>
{% if new_opts %}
<table>
<caption>New options</caption>
<col width="50%"/>
<col width="50%"/>
<thead>
<tr>
<td>Option = default value</td>
<td>(Type) Help string</td>
</tr>
</thead>
{% for cells in new_opts %}
<tr>
{% for cell in cells %}
<td>{{ cell }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
{% endif %}
{% if new_defaults %}
<table>
<caption>New default values</caption>
<col width="33%"/>
<col width="33%"/>
<col width="33%"/>
<thead>
<tr>
<td>Option</td>
<td>Previous default value</td>
<td>New default value</td>
</tr>
</thead>
{% for cells in new_defaults %}
<tr>
{% for cell in cells %}
<td>{{ cell }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
{% endif %}
{% if deprecated_opts %}
<table>
<caption>Deprecated options</caption>
<col width="50%"/>
<col width="50%"/>
<thead>
<tr>
<td>Deprecated option</td>
<td>New Option</td>
</tr>
</thead>
{% for cells in deprecated_opts %}
<tr>
{% for cell in cells %}
<td>{{ cell }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
{% endif %}
{% if not new_opts and not new_defaults and not deprecated_opts %}
<para>There are no new, updated, and deprecated options in {{ release }} for {{ codename }}.</para>
{% endif %}
</section>