output: add more items to mustach tags

Base level printing; localstime, number of ranges and shared networks,
project version, and file paths and time stamps.

Also print error and stop template processing when unknown tag is
encountered.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2017-11-14 10:46:48 +00:00
parent d24313d25a
commit ff3d9523e6
No known key found for this signature in database
GPG key ID: A9553245FDE9B739
4 changed files with 154 additions and 34 deletions

View file

@ -14,7 +14,7 @@ Subnets:{{#subnets}}
backup_percent: {{backup_percent}}
status: {{status}}
gettimeofday: {{gettimeofday}}
lease_file_mtime: {{lease_file_mtime}}
lease_file_epoch_mtime: {{lease_file_epoch_mtime}}
{{/subnets}}
Shared-networks:{{#shared-networks}}
@ -30,7 +30,7 @@ Shared-networks:{{#shared-networks}}
backup_percent: {{backup_percent}}
status: {{status}}
gettimeofday: {{gettimeofday}}
lease_file_mtime: {{lease_file_mtime}}
lease_file_epoch_mtime: {{lease_file_epoch_mtime}}
{{/shared-networks}}
Summary:{{#summary}}
@ -46,5 +46,22 @@ Summary:{{#summary}}
backup_percent: {{backup_percent}}
status: {{status}}
gettimeofday: {{gettimeofday}}
lease_file_mtime: {{lease_file_mtime}}
lease_file_epoch_mtime: {{lease_file_epoch_mtime}}
{{/summary}}
localtime: {{localtime}}
number_of_ranges: {{number_of_ranges}}
number_of_shared_networks: {{number_of_shared_networks}}
version: {{version}}
conf_file_path: {{conf_file_path}}
conf_file_local_mtime: {{conf_file_local_mtime}}
conf_file_epoch_mtime: {{conf_file_epoch_mtime}}
lease_file_path: {{lease_file_path}}
lease_file_local_mtime: {{lease_file_local_mtime}}
lease_file_epoch_mtime: {{lease_file_epoch_mtime}}
template_file_path: {{template_file_path}}
template_file_local_mtime: {{template_file_local_mtime}}
template_file_epoch_mtime: {{template_file_epoch_mtime}}