Skip to content

Commit f32bdb8

Browse files
foxmoxThomasLamprecht
authored andcommitted
configuration files: add general section
Explain the mixed casing styles for (sub-)properties in configuration files and plans regarding the future. Signed-off-by: Fiona Ebner <[email protected]>
1 parent b38ef25 commit f32bdb8

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

configuration-files.adoc

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[[configuration_files]]
2+
General
3+
=======
4+
5+
Most configuration files in {pve} reside on the
6+
xref:chapter_pmxcfs[shared cluster file system] mounted at `/etc/pve`. There are
7+
exceptions, like the node-specific configuration file for backups in
8+
`/etc/vzdump.conf`.
9+
10+
Usually, the properties in a configuration file are derived from the JSON Schema
11+
that is also used for the associated API endpoints.
12+
13+
[[configuration_files_casing]]
14+
Casing of Property Names
15+
------------------------
16+
17+
Historically, longer properties (and sub-properties) often used `snake_case`, or
18+
were written as one word. This can likely be attributed to the {pve} stack being
19+
developed mostly in the programming language Perl, where access to properties
20+
using `kebab-case` requires additional quotes, as well as less style enforcement
21+
during early development, so different developers used different conventions.
22+
23+
For new properties, `kebab-case` is the preferred way and it is planned to
24+
introduce aliases for existing `snake_case` properties, and in the long term,
25+
switch over to `kebab-case` for the API, CLI and in-use configuration files
26+
while maintaining backwards-compatibility when restoring a configuration.
27+
28+
include::datacenter.cfg.adoc[]

pve-admin-guide.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Configuration Files
308308
-------------------
309309

310310
:leveloffset: 2
311-
include::datacenter.cfg.adoc[]
311+
include::configuration-files.adoc[]
312312

313313
:leveloffset: 0
314314

0 commit comments

Comments
 (0)