Skip to content

Commit

Permalink
doc(macdefaults): Add ..versionadded::
Browse files Browse the repository at this point in the history
  • Loading branch information
cdalvaro authored and dwoz committed Jul 12, 2024
1 parent 83225ac commit 18ca4fd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions salt/modules/macdefaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def write(
The separator to use when splitting the key into a list of keys.
If None, the key will not be split (Default).
.. versionadded:: 3008.0
value
The value to write to the given key.
Dates should be in the format 'YYYY-MM-DDTHH:MM:SSZ'
Expand Down Expand Up @@ -108,11 +110,15 @@ def write(
If current value is not a dictionary this option will be ignored.
This option will be set to True if vtype is dict-add.
.. versionadded:: 3008.0
array_add
Append the value to the array.
If current value is not a list this option will be ignored.
This option will be set to True if vtype is array-add.
.. versionadded:: 3008.0
Raises:
KeyError: When the key is not found in the domain
IndexError: When the key is not a valid array index
Expand Down Expand Up @@ -195,6 +201,8 @@ def read(domain, key, user=None, key_separator=None):
The separator to use when splitting the key into a list of keys.
If None, the key will not be split (Default).
.. versionadded:: 3008.0
user
The user to read the defaults from
Expand Down Expand Up @@ -236,6 +244,8 @@ def delete(domain, key, user=None, key_separator=None):
The separator to use when splitting the key into a list of keys.
If None, the key will not be split (Default).
.. versionadded:: 3008.0
user
The user to delete the defaults with
Expand Down Expand Up @@ -303,6 +313,7 @@ def cast_value_to_vtype(value, vtype):
Returns:
The converted value
.. versionadded:: 3008.0
"""
# Boolean
if vtype in ("bool", "boolean"):
Expand Down
4 changes: 4 additions & 0 deletions salt/states/macdefaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def write(name, domain, value, vtype=None, name_separator=None, user=None):
The separator to use when splitting the name into a list of keys.
If None, the name will not be split (Default).
.. versionadded:: 3008.0
domain
The name of the domain to write to
Expand Down Expand Up @@ -91,6 +93,8 @@ def absent(name, domain, user=None, name_separator=None):
The separator to use when splitting the name into a list of keys.
If None, the name will not be split (Default).
.. versionadded:: 3008.0
domain
The name of the domain to remove from
Expand Down

0 comments on commit 18ca4fd

Please sign in to comment.