Debian Codegraph @

test/integration/targets/deprecations/cache_plugins/notjsonfile.py

raw
1 # (c) 2020 Ansible Project
2 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
3
4 from __future__ import annotations
5
6 DOCUMENTATION = """
7 cache: notjsonfile
8 short_description: NotJSON cache plugin
9 description: This cache uses is NOT JSON
10 author: Ansible Core (@ansible-core)
11 version_added: 0.7.0
12 deprecated:
13 alternative: cause I need to test it
14 why: Test deprecation
15 version: '2.0.0'
16 options:
17 _uri:
18 required: True
19 description:
20 - Path in which the cache plugin will save the JSON files
21 env:
22 - name: ANSIBLE_CACHE_PLUGIN_CONNECTION
23 version_added: 1.2.0
24 ini:
25 - key: fact_caching_connection
26 section: notjsonfile_cache
27 - key: fact_caching_connection
28 section: defaults
29 _prefix:
30 description: User defined prefix to use when creating the JSON files
31 env:
32 - name: ANSIBLE_CACHE_PLUGIN_PREFIX
33 version_added: 1.1.0
34 ini:
35 - key: fact_caching_prefix
36 section: defaults
37 - key: fact_caching_prefix
38 section: notjson_cache
39 deprecated:
40 alternative: section is notjsonfile_cache
41 why: Another test deprecation
42 removed_at_date: '2050-01-01'
43 - key: fact_caching_prefix
44 section: notjsonfile_cache
45 _timeout:
46 default: 86400
47 description: Expiration timeout for the cache plugin data
48 env:
49 - name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
50 - name: ANSIBLE_NOTJSON_CACHE_PLUGIN_TIMEOUT
51 deprecated:
52 alternative: do not use a variable
53 why: Test deprecation
54 version: '3.0.0'
55 ini:
56 - key: fact_caching_timeout
57 section: defaults
58 - key: fact_caching_timeout
59 section: notjsonfile_cache
60 vars:
61 - name: notsjonfile_fact_caching_timeout
62 version_added: 1.5.0
63 type: integer
64 removeme:
65 default: 86400
66 description: Expiration timeout for the cache plugin data
67 deprecated:
68 alternative: cause i need to test it
69 why: Test deprecation
70 version: '2.0.0'
71 env:
72 - name: ANSIBLE_NOTJSON_CACHE_PLUGIN_REMOVEME
73 """
74
75 from ansible.plugins.cache import BaseFileCacheModule
76
77
78 class CacheModule(BaseFileCacheModule):
79 """
80 A caching module backed by json files.
81 """
82 def _dump(self):
83 pass
84
85 def _load(self):
86 pass