Skip to content

Commit 4d34ad9

Browse files
authored
Made some doc and test changes (#114)
- Add separate section for folder tests Because of #107 we added a separate section which will be created before running folder tests. Test variables will be linked to that new section via jinja templating. After running tests the section will be deleted. - update folder module doc - add filter doc source - remove old filter documentation - remove docs for non-existing lookup module - create fresh filter doc
1 parent c28cc29 commit 4d34ad9

File tree

11 files changed

+351
-316
lines changed

11 files changed

+351
-316
lines changed

docs/filters.rst

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Welcome to phpIPAM Ansible Module documentation!
1313
README
1414
Changelog <CHANGELOG>
1515
plugins/index
16-
Filters <filters>
1716

1817
.. toctree::
1918
:maxdepth: 2

docs/plugins/folder_module.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,11 @@ Parameters
461461
462462
.. Notes
463463
464+
Notes
465+
-----
466+
467+
.. note::
468+
- This module needs a phpIPAM backend with version 1.4.1 or highter.
464469

465470
.. Seealso
466471

docs/plugins/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Modules
9696
Filter Plugins
9797
~~~~~~~~~~~~~~
9898

99-
* :ansplugin:`is_subnet filter <codeaffen.phpipam.is_subnet#filter>` --
99+
* :ansplugin:`is_subnet filter <codeaffen.phpipam.is_subnet#filter>` -- Check if a subnet belongs to another
100100

101101
.. toctree::
102102
:maxdepth: 1

docs/plugins/is_subnet_filter.rst

Lines changed: 279 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,299 @@
11

2-
.. Document meta section
2+
.. Document meta
33
44
:orphan:
55

6+
.. |antsibull-internal-nbsp| unicode:: 0xA0
7+
:trim:
8+
69
.. meta::
710
:antsibull-docs: 2.5.0
811

9-
.. Document body
10-
1112
.. Anchors
1213
1314
.. _ansible_collections.codeaffen.phpipam.is_subnet_filter:
1415

16+
.. Anchors: short name for ansible.builtin
17+
1518
.. Title
1619
17-
codeaffen.phpipam.is_subnet filter
18-
++++++++++++++++++++++++++++++++++
20+
codeaffen.phpipam.is_subnet filter -- Check if a subnet belongs to another
21+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22+
23+
.. Collection note
24+
25+
.. note::
26+
This filter plugin is part of the `codeaffen.phpipam collection <https://galaxy.ansible.com/ui/repo/published/codeaffen/phpipam/>`_ (version 1.7.0).
27+
28+
It is not included in ``ansible-core``.
29+
To check whether it is installed, run :code:`ansible-galaxy collection list`.
30+
31+
To install it, use: :code:`ansible-galaxy collection install codeaffen.phpipam`.
32+
33+
To use it in a playbook, specify: :code:`codeaffen.phpipam.is_subnet`.
34+
35+
.. version_added
36+
37+
.. rst-class:: ansible-version-added
38+
39+
New in codeaffen.phpipam 1.2.0
40+
41+
.. contents::
42+
:local:
43+
:depth: 1
44+
45+
.. Deprecated
46+
47+
48+
Synopsis
49+
--------
50+
51+
.. Description
52+
53+
- First argument is a subnet second another. If the first subnet belongs to second
54+
55+
56+
.. Aliases
57+
58+
59+
.. Requirements
60+
61+
62+
63+
64+
65+
.. Input
66+
67+
Input
68+
-----
69+
70+
This describes the input of the filter, the value before ``| codeaffen.phpipam.is_subnet``.
71+
72+
.. tabularcolumns:: \X{1}{3}\X{2}{3}
73+
74+
.. list-table::
75+
:width: 100%
76+
:widths: auto
77+
:header-rows: 1
78+
:class: longtable ansible-option-table
79+
80+
* - Parameter
81+
- Comments
82+
83+
* - .. raw:: html
84+
85+
<div class="ansible-option-cell">
86+
<div class="ansibleOptionAnchor" id="parameter-_input"></div>
87+
88+
.. _ansible_collections.codeaffen.phpipam.is_subnet_filter__parameter-_input:
89+
90+
.. rst-class:: ansible-option-title
91+
92+
**Input**
93+
94+
.. raw:: html
95+
96+
<a class="ansibleOptionLink" href="#parameter-_input" title="Permalink to this option"></a>
97+
98+
.. ansible-option-type-line::
99+
100+
:ansible-option-type:`string` / :ansible-option-required:`required`
101+
102+
103+
104+
105+
.. raw:: html
106+
107+
</div>
108+
109+
- .. raw:: html
110+
111+
<div class="ansible-option-cell">
112+
113+
Subnet in cidr format which should belongs to parent
114+
115+
116+
.. raw:: html
117+
118+
</div>
119+
120+
121+
122+
123+
.. Positional
124+
125+
Positional parameters
126+
---------------------
127+
128+
This describes positional parameters of the filter. These are the values ``positional1``, ``positional2`` and so on in the following
129+
example: ``input | codeaffen.phpipam.is_subnet(positional1, positional2, ...)``
130+
131+
.. tabularcolumns:: \X{1}{3}\X{2}{3}
132+
133+
.. list-table::
134+
:width: 100%
135+
:widths: auto
136+
:header-rows: 1
137+
:class: longtable ansible-option-table
138+
139+
* - Parameter
140+
- Comments
141+
142+
* - .. raw:: html
143+
144+
<div class="ansible-option-cell">
145+
<div class="ansibleOptionAnchor" id="parameter-parent"></div>
146+
147+
.. _ansible_collections.codeaffen.phpipam.is_subnet_filter__parameter-parent:
148+
149+
.. rst-class:: ansible-option-title
150+
151+
**parent**
152+
153+
.. raw:: html
154+
155+
<a class="ansibleOptionLink" href="#parameter-parent" title="Permalink to this option"></a>
156+
157+
.. ansible-option-type-line::
158+
159+
:ansible-option-type:`string` / :ansible-option-required:`required`
160+
161+
162+
163+
164+
.. raw:: html
165+
166+
</div>
167+
168+
- .. raw:: html
169+
170+
<div class="ansible-option-cell">
171+
172+
Subnet where input should belongs to
173+
174+
175+
.. raw:: html
176+
177+
</div>
178+
179+
180+
181+
.. Options
182+
183+
184+
.. Attributes
185+
186+
187+
.. Notes
188+
189+
190+
.. Seealso
191+
192+
193+
.. Examples
194+
195+
Examples
196+
--------
197+
198+
.. code-block:: yaml+jinja
199+
200+
201+
192.0.2.0/25 | codeaffen.phpipam.is_subnet(192.0.2.0/24)
202+
203+
204+
205+
206+
.. Facts
207+
208+
209+
.. Return values
210+
211+
Return Value
212+
------------
213+
214+
.. tabularcolumns:: \X{1}{3}\X{2}{3}
215+
216+
.. list-table::
217+
:width: 100%
218+
:widths: auto
219+
:header-rows: 1
220+
:class: longtable ansible-option-table
221+
222+
* - Key
223+
- Description
224+
225+
* - .. raw:: html
226+
227+
<div class="ansible-option-cell">
228+
<div class="ansibleOptionAnchor" id="return-_value"></div>
229+
230+
.. _ansible_collections.codeaffen.phpipam.is_subnet_filter__return-_value:
231+
232+
.. rst-class:: ansible-option-title
233+
234+
**Return value**
235+
236+
.. raw:: html
237+
238+
<a class="ansibleOptionLink" href="#return-_value" title="Permalink to this return value"></a>
239+
240+
.. ansible-option-type-line::
241+
242+
:ansible-option-type:`boolean`
243+
244+
.. raw:: html
245+
246+
</div>
247+
248+
- .. raw:: html
249+
250+
<div class="ansible-option-cell">
251+
252+
True if children belongs to parent and false if not or both networks are the same.
253+
254+
255+
.. rst-class:: ansible-option-line
256+
257+
:ansible-option-returned-bold:`Returned:` success
258+
259+
260+
.. raw:: html
261+
262+
</div>
263+
264+
265+
266+
.. Status (Presently only deprecated)
267+
268+
269+
.. Authors
270+
271+
Authors
272+
~~~~~~~
273+
274+
- Christian Meißner
275+
276+
277+
.. hint::
278+
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
19279

280+
.. Extra links
20281
21-
The documentation for the filter plugin, codeaffen.phpipam.is_subnet, was malformed.
282+
Collection links
283+
~~~~~~~~~~~~~~~~
22284

23-
The errors were:
285+
.. ansible-links::
24286

25-
* ::
287+
- title: "Issue Tracker"
288+
url: "https://github.com/codeaffen/phpipam-ansible-modules/issues"
289+
external: true
290+
- title: "Homepage"
291+
url: "https://codeaffen.org/projects/phpipam-ansible-modules"
292+
external: true
293+
- title: "Repository (Sources)"
294+
url: "https://github.com/codeaffen/phpipam-ansible-modules"
295+
external: true
26296

27-
Missing documentation or could not parse documentation: No documentation available for codeaffen.phpipam.is_subnet (/home/cme/Development/github/cmeissner/phpipam-ansible-modules/build/collections/ansible_collections/codeaffen/phpipam/plugins/filter/phpipam.py)
28297

298+
.. Parsing errors
29299
30-
File a bug with the `codeaffen.phpipam collection <https://github.com/codeaffen/phpipam-ansible-modules/issues>`_ in order to have it corrected.

0 commit comments

Comments
 (0)