Skip to content

Commit

Permalink
Made some doc and test changes (#114)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
cmeissner authored Oct 30, 2023
1 parent c28cc29 commit 4d34ad9
Show file tree
Hide file tree
Showing 11 changed files with 351 additions and 316 deletions.
15 changes: 0 additions & 15 deletions docs/filters.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Welcome to phpIPAM Ansible Module documentation!
README
Changelog <CHANGELOG>
plugins/index
Filters <filters>

.. toctree::
:maxdepth: 2
Expand Down
5 changes: 5 additions & 0 deletions docs/plugins/folder_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ Parameters
.. Notes
Notes
-----

.. note::
- This module needs a phpIPAM backend with version 1.4.1 or highter.

.. Seealso
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Modules
Filter Plugins
~~~~~~~~~~~~~~

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

.. toctree::
:maxdepth: 1
Expand Down
289 changes: 279 additions & 10 deletions docs/plugins/is_subnet_filter.rst
Original file line number Diff line number Diff line change
@@ -1,30 +1,299 @@

.. Document meta section
.. Document meta
:orphan:

.. |antsibull-internal-nbsp| unicode:: 0xA0
:trim:

.. meta::
:antsibull-docs: 2.5.0

.. Document body
.. Anchors
.. _ansible_collections.codeaffen.phpipam.is_subnet_filter:

.. Anchors: short name for ansible.builtin
.. Title
codeaffen.phpipam.is_subnet filter
++++++++++++++++++++++++++++++++++
codeaffen.phpipam.is_subnet filter -- Check if a subnet belongs to another
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. Collection note
.. note::
This filter plugin is part of the `codeaffen.phpipam collection <https://galaxy.ansible.com/ui/repo/published/codeaffen/phpipam/>`_ (version 1.7.0).

It is not included in ``ansible-core``.
To check whether it is installed, run :code:`ansible-galaxy collection list`.

To install it, use: :code:`ansible-galaxy collection install codeaffen.phpipam`.

To use it in a playbook, specify: :code:`codeaffen.phpipam.is_subnet`.

.. version_added
.. rst-class:: ansible-version-added

New in codeaffen.phpipam 1.2.0

.. contents::
:local:
:depth: 1

.. Deprecated
Synopsis
--------

.. Description
- First argument is a subnet second another. If the first subnet belongs to second


.. Aliases
.. Requirements
.. Input
Input
-----

This describes the input of the filter, the value before ``| codeaffen.phpipam.is_subnet``.

.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments

* - .. raw:: html

<div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-_input"></div>

.. _ansible_collections.codeaffen.phpipam.is_subnet_filter__parameter-_input:

.. rst-class:: ansible-option-title

**Input**

.. raw:: html

<a class="ansibleOptionLink" href="#parameter-_input" title="Permalink to this option"></a>

.. ansible-option-type-line::

:ansible-option-type:`string` / :ansible-option-required:`required`




.. raw:: html

</div>

- .. raw:: html

<div class="ansible-option-cell">

Subnet in cidr format which should belongs to parent


.. raw:: html

</div>




.. Positional
Positional parameters
---------------------

This describes positional parameters of the filter. These are the values ``positional1``, ``positional2`` and so on in the following
example: ``input | codeaffen.phpipam.is_subnet(positional1, positional2, ...)``

.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments

* - .. raw:: html

<div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-parent"></div>

.. _ansible_collections.codeaffen.phpipam.is_subnet_filter__parameter-parent:

.. rst-class:: ansible-option-title

**parent**

.. raw:: html

<a class="ansibleOptionLink" href="#parameter-parent" title="Permalink to this option"></a>

.. ansible-option-type-line::

:ansible-option-type:`string` / :ansible-option-required:`required`




.. raw:: html

</div>

- .. raw:: html

<div class="ansible-option-cell">

Subnet where input should belongs to


.. raw:: html

</div>



.. Options
.. Attributes
.. Notes
.. Seealso
.. Examples
Examples
--------

.. code-block:: yaml+jinja


192.0.2.0/25 | codeaffen.phpipam.is_subnet(192.0.2.0/24)




.. Facts
.. Return values
Return Value
------------

.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Key
- Description

* - .. raw:: html

<div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-_value"></div>

.. _ansible_collections.codeaffen.phpipam.is_subnet_filter__return-_value:

.. rst-class:: ansible-option-title

**Return value**

.. raw:: html

<a class="ansibleOptionLink" href="#return-_value" title="Permalink to this return value"></a>

.. ansible-option-type-line::

:ansible-option-type:`boolean`

.. raw:: html

</div>

- .. raw:: html

<div class="ansible-option-cell">

True if children belongs to parent and false if not or both networks are the same.


.. rst-class:: ansible-option-line

:ansible-option-returned-bold:`Returned:` success


.. raw:: html

</div>



.. Status (Presently only deprecated)
.. Authors
Authors
~~~~~~~

- Christian Meißner


.. hint::
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.

.. Extra links
The documentation for the filter plugin, codeaffen.phpipam.is_subnet, was malformed.
Collection links
~~~~~~~~~~~~~~~~

The errors were:
.. ansible-links::

* ::
- title: "Issue Tracker"
url: "https://github.com/codeaffen/phpipam-ansible-modules/issues"
external: true
- title: "Homepage"
url: "https://codeaffen.org/projects/phpipam-ansible-modules"
external: true
- title: "Repository (Sources)"
url: "https://github.com/codeaffen/phpipam-ansible-modules"
external: true

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)

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

0 comments on commit 4d34ad9

Please sign in to comment.