Debian Codegraph @

ansible_collections/community/dns/plugins/doc_fragments/_options.py

raw
1 # Copyright (c) 2021 Felix Fontein
2 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 # Note that this doc fragment is **PRIVATE** to the collection. It can have breaking changes at any time.
6 # Do not use this from other collections or standalone plugins/modules!
7
8 from __future__ import annotations
9
10
11 class ModuleDocFragment:
12
13 BULK_OPERATIONS = r"""
14 options:
15 bulk_operation_threshold:
16 description:
17 - Determines the threshold from when on bulk operations are used.
18 - The default value 2 means that if 2 or more operations of a kind are planned,
19 and the API supports bulk operations for this kind of operation, they will
20 be used.
21 type: int
22 default: 2
23 """
24
25 RECORD_TRANSFORMATION = r"""
26 options:
27 txt_transformation:
28 description:
29 - Determines how TXT entry values are converted between the API and this module's
30 input and output.
31 - The value V(api) means that values are returned from this module as they are returned
32 from the API, and pushed to the API as they have been passed to this module. For
33 idempotency checks, the input string will be compared to the strings returned by the
34 API. The API might automatically transform some values, like splitting long values or
35 adding quotes, which can cause problems with idempotency.
36 - The value V(unquoted) automatically transforms values so that you can pass in unquoted
37 values, and the module will return unquoted values. If you pass in quoted values, they
38 will be double-quoted.
39 - The value V(quoted) automatically transforms values so that you must use quoting for values
40 that contain spaces, characters such as quotation marks and backslashes, and that are
41 longer than 255 bytes. It also makes sure to return values from the API in a normalized
42 encoding.
43 - The default value, V(unquoted), ensures that you can work with values without having
44 to care about how to correctly quote for DNS. Most users should use one of V(unquoted)
45 or V(quoted), but not V(api).
46 - B(Note:) the conversion code assumes UTF-8 encoding for values. If you need another
47 encoding use O(txt_transformation=api) and handle the encoding yourself.
48 type: str
49 choices:
50 - api
51 - quoted
52 - unquoted
53 default: unquoted
54 txt_character_encoding:
55 description:
56 - Whether to treat numeric escape sequences (V(\\xyz)) as octal or decimal numbers.
57 This is only used when O(txt_transformation=quoted).
58 - The default changed to V(decimal) in community.dns 3.0.0. Before, the default used to be V(octal).
59 The value V(decimal) is compatible to L(RFC 1035, https://www.ietf.org/rfc/rfc1035.txt).
60 type: str
61 choices:
62 - decimal
63 - octal
64 default: decimal
65 version_added: 2.5.0
66 """