Skip to content

Commit 0d037c2

Browse files
committed
Add descriptions to Hetzner source config options
1 parent ab0b583 commit 0d037c2

2 files changed

Lines changed: 30 additions & 9 deletions

File tree

module/sources/hetzner/config.py

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,27 @@ class HetznerConfig(ConfigBase):
99

1010
def __init__(self):
1111
self.options = [
12-
ConfigOption("enabled", bool, default_value=True),
13-
ConfigOption("type", str),
14-
ConfigOption("api_token", str, mandatory=True),
12+
13+
ConfigOption(
14+
"enabled",
15+
bool,
16+
default_value=True,
17+
description="Enable or disable the Hetzner Cloud source."
18+
),
19+
20+
ConfigOption(
21+
"type",
22+
str,
23+
default_value="hetzner",
24+
description="Source type identifier. Must remain 'hetzner'."
25+
),
26+
27+
ConfigOption(
28+
"api_token",
29+
str,
30+
mandatory=True,
31+
description="Hetzner Cloud API token used to authenticate against the Hetzner Cloud API."
32+
),
1533
]
1634

17-
super().__init__()
35+
super().__init__()

settings-example.ini

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,13 @@ inventory_file_path = /full/path/to/inventory/files
451451
;ip_tenant_inheritance_order = device, prefix
452452

453453
[source/hetzner]
454-
; Defines if this source is enabled or not
455-
;enabled = True
456-
; type of source. This defines which source handler to use
457-
;type = hetzner
458-
;api_token =
454+
# Enable or disable the Hetzner Cloud source.
455+
#enabled = True
456+
457+
# Source type identifier. Must remain 'hetzner'.
458+
#type = hetzner
459+
460+
# Hetzner Cloud API token used to authenticate against the Hetzner Cloud API.
461+
#api_token =
459462

460463
;EOF

0 commit comments

Comments
 (0)