2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-08-16 08:10:27 +00:00

Merge pull request #185 from Obihoernchen/validvalues_man

Show valid values from attributes.py in man pages
This commit is contained in:
Jarrod Johnson
2025-04-09 09:13:10 -04:00
committed by GitHub
2 changed files with 14 additions and 11 deletions

View File

@@ -14,11 +14,16 @@ import shutil
shutil.copyfile('doc/man/nodeattrib.ronn.tmpl', 'doc/man/nodeattrib.ronn')
shutil.copyfile('doc/man/nodegroupattrib.ronn.tmpl', 'doc/man/nodegroupattrib.ronn')
with open('doc/man/nodeattrib.ronn', 'a') as outf:
for field in sorted(attr.node):
outf.write('\n* `{0}`:\n {1}\n'.format(field, attr.node[field]['description']))
with open('doc/man/nodegroupattrib.ronn', 'a') as outf:
for field in sorted(attr.node):
outf.write('\n* `{0}`:\n {1}\n'.format(field, attr.node[field]['description']))
def append_attributes(filename):
with open(filename, 'a') as outf:
for field in sorted(attr.node):
outf.write('\n* `{0}`:\n {1}\n'.format(field, attr.node[field]['description']))
# Optionally write valid values if they exist
for key, values in attr.node[field].items():
if key.startswith('valid'):
values_formatted = ', '.join("'{0}'".format(v) for v in values)
outf.write(f'\n Valid values: {values_formatted}\n')
append_attributes('doc/man/nodeattrib.ronn')
append_attributes('doc/man/nodegroupattrib.ronn')

View File

@@ -265,8 +265,7 @@ node = {
},
'discovery.policy': {
'description': 'Policy to use for auto-configuration of discovered '
'and identified nodes. Valid values are "manual", '
'"permissive", or "open". "manual" means nodes are '
'and identified nodes. "manual" means nodes are '
'detected, but not autoconfigured until a user '
'approves. "permissive" indicates to allow discovery, '
'so long as the node has no existing public key. '
@@ -361,9 +360,8 @@ node = {
# 'to suppress serial console configuration')
# },
'console.logging': {
'description': ('Indicate logging level to apply to console. Valid '
'values are currently "full", "interactive", "memory", and '
'"none". Defaults to "full".'),
'description': ('Indicate logging level to apply to console. '
'Defaults to "full".'),
'validvalues': ('full', 'memory', 'interactive', 'none'),
},
'console.method': {