NetworkManager/tools
Íñigo Huguet 8460040df1 docs: add "expand enumvals" capability to properties documenation
Having to type manually all the accepted values in each property's
documentation is very error prone: you can make typos and you will
probably forget to always update them when new possible values are
added.

If the possible values are the variant of an enum, we can use the
introspection data to get all the possible values for that enum and
their descriptions. With that info, we can automatically generate the
documentation with an always up to date list of accepted values.

Also, for nmcli documentation we want to show the pretty nickname of
each value because it's the more user friendly way for users to enter
the data. C names like NM_IP_TUNNEL_MODE_IPIP have no value here so they
mustn't be shown, and the pretty nickname "ipip" must be shown instead.

With this commit, the special string "#EnumName:*" can be used in docs
and it will be expanded to the complete list of accepted values. If the
docs that are being generated are for nmcli, pretty nicknames will be used
instead of C names.

It is also desirable to show a description of what each value means in
nmcli man pages. To do this, the special string "#EnumName:**" can be
used. It will expand the same way than "#EnumName:*" in the
"description" field of the property, but it will expand to a formatted
list with all the values and their explanations in the
"description-docbook" field. The "description-docbook" field is
currently only used for the nm-settings-nmcli man page.

To expand a single enum value in the proper format (i.e. using nicknames
in nmcli docs), use the string "%ENUM_VALUE".

However, this feature has an important limitation: it can only be used
for man/nm-settings-*.5 files generation, and the expansion only happens
in the special tagged comments (like ---nmcli---), not in the normal
gtkdoc comments. There are 2 reasons:
1. Any other documentation, other than man/nm-settings-*.5, is generated
   directly with gtkdoc, that doesn't support this expansion feature.
2. The gtkdoc comment applies to everything, either nmcli or dbus,
   keyfile, etc. We can't format the expanded text in a proper way
   without knowing where it's going to be used.
2023-08-23 11:07:47 +02:00
..
nm-in-container nm-in-container: add NetworkManager.service override 2023-06-30 15:44:05 +02:00
check-compare-generated.sh build: pass both filenames to "tools/check-compare-generated.sh" script 2022-10-31 09:11:30 +01:00
check-config-options.sh all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
check-docs.sh all: avoid "==" bashism in scripts 2023-05-18 09:16:41 +02:00
check-exports.sh tools/check-exports.sh: use ${NM} when available 2015-09-24 16:28:15 +02:00
check-gitlab-ci.sh tools: improve detection of "ci-fairy" command in "tools/check-gitlab-ci.sh" 2020-12-11 16:08:47 +01:00
check-nm-autoptr.sh build: add test for checking consistency of "nm-autoptr.h" 2023-02-28 16:33:07 +01:00
check-tree.sh build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
check-vapi.sh vapi: add test for consistency of "vapi/NM-1.0.metadata" 2023-02-28 13:05:47 +01:00
create-exports-NetworkManager.sh build: fix pretty() sed invocation portability in .ver script 2023-03-07 08:02:22 +01:00
debug-helper.py all: reformat python files with python black 2020-06-15 16:40:38 +02:00
enums-to-docbook.pl all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
generate-docs-nm-property-infos.py docs: add "expand enumvals" capability to properties documenation 2023-08-23 11:07:47 +02:00
generate-docs-nm-settings-docs-gir.py docs: better handle description tags in generate-docs-nm-settings-docs-merge.py 2023-05-19 12:52:00 +02:00
generate-docs-nm-settings-docs-merge.py tools: fix python2 compatibility in "generate-docs-nm-settings-docs-merge.py" 2023-05-19 15:53:20 +02:00
generate-docs-settings-docs.py doc: preserve paraghraphs in nmcli man pages 2022-07-15 17:25:15 +02:00
meson-post-install.sh cloud-setup: add pre-up event to prevent reaching network-online.target 2023-06-09 09:18:20 -04:00
run-nm-test.sh tests: propagate 77 exit code from "tools/run-nm-test.sh" 2022-02-19 13:43:14 +01:00
test-build.sh core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00
test-cloud-meta-mock.py tests: avoid Python3 f-string in "test-cloud-meta-mock.py" 2023-06-28 12:14:21 +02:00
test-networkmanager-service.py nmcli: warn if daemon version mismatch 2023-08-03 10:09:06 +02:00
test-sudo-wrapper.sh nmtst: add nmtst_reexec_sudo() function 2014-06-05 18:12:57 +02:00