Skip to content

Commit ff86a90

Browse files
authored
Provide ability to define same vlan in different l2domains (#86)
* Provide ability to define same vlan in different l2domains * Add option to fiter results of find_entity method * Extend find_vlan to search l2domain it belongs to * Add routing_domain as optional parameter * Default routing_domain to 'defautl' * Make routing_domain and vlan required_together * Adapt test cases and variables for current development * Add changelog entries * Catch error if a entity can't be resolved As there are relations between entities and the API does not provide a way to check these relations we decided to fail if we can't resolve an entity. This will happen if a entity is referenced which does not yet exists. E.g. a vlan in subnet or a routing domain in a vlan. * Fix output issues for included tasks in some tests
1 parent ce89b69 commit ff86a90

19 files changed

+253
-1458
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minor_changes:
2+
- fix \#85 - Add `routing_domain` parameter to subnet module to allow subnet with same vlan id in different l2domains
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minor_changes:
2+
- Fix \#84 - Allow vlans with same vlan id in different l2 routing domains

docs/plugins/address_module.rst

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. Document meta
32
43
:orphan:
@@ -45,9 +44,11 @@ codeaffen.phpipam.address module -- Manage addresses
4544
.. note::
4645
This module is part of the `codeaffen.phpipam collection <https://galaxy.ansible.com/codeaffen/phpipam>`_ (version 1.5.0).
4746

47+
You might already have this collection installed if you are using the ``ansible`` package.
48+
It is not included in ``ansible-core``.
49+
To check whether it is installed, run :code:`ansible-galaxy collection list`.
50+
4851
To install it, use: :code:`ansible-galaxy collection install codeaffen.phpipam`.
49-
You need further requirements to be able to use this module,
50-
see :ref:`Requirements <ansible_collections.codeaffen.phpipam.address_module_requirements>` for details.
5152

5253
To use it in a playbook, specify: :code:`codeaffen.phpipam.address`.
5354

@@ -75,15 +76,13 @@ Synopsis
7576
7677
.. Requirements
7778
78-
.. _ansible_collections.codeaffen.phpipam.address_module_requirements:
79-
8079
Requirements
8180
------------
8281
The below requirements are needed on the host that executes this module.
8382

8483
- inflection
8584
- ipaddress
86-
- phpypam\>=1.0.0
85+
- phpypam>=1.0.0
8786

8887

8988

@@ -246,8 +245,8 @@ Parameters
246245

247246
:ansible-option-choices:`Choices:`
248247

249-
- :ansible-option-choices-entry:`false`
250-
- :ansible-option-choices-entry:`true`
248+
- :ansible-option-choices-entry:`no`
249+
- :ansible-option-choices-entry:`yes`
251250

252251
.. raw:: html
253252

@@ -321,8 +320,8 @@ Parameters
321320

322321
:ansible-option-choices:`Choices:`
323322

324-
- :ansible-option-default-bold:`false` :ansible-option-default:`← (default)`
325-
- :ansible-option-choices-entry:`true`
323+
- :ansible-option-default-bold:`no` :ansible-option-default:`← (default)`
324+
- :ansible-option-choices-entry:`yes`
326325

327326
.. raw:: html
328327

@@ -404,8 +403,8 @@ Parameters
404403

405404
:ansible-option-choices:`Choices:`
406405

407-
- :ansible-option-default-bold:`false` :ansible-option-default:`← (default)`
408-
- :ansible-option-choices-entry:`true`
406+
- :ansible-option-default-bold:`no` :ansible-option-default:`← (default)`
407+
- :ansible-option-choices-entry:`yes`
409408

410409
.. raw:: html
411410

@@ -869,8 +868,8 @@ Parameters
869868

870869
:ansible-option-choices:`Choices:`
871870

872-
- :ansible-option-choices-entry:`false`
873-
- :ansible-option-default-bold:`true` :ansible-option-default:`← (default)`
871+
- :ansible-option-choices-entry:`no`
872+
- :ansible-option-default-bold:`yes` :ansible-option-default:`← (default)`
874873

875874
.. raw:: html
876875

docs/plugins/device_module.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. Document meta
32
43
:orphan:
@@ -45,9 +44,11 @@ codeaffen.phpipam.device module -- Manage devices
4544
.. note::
4645
This module is part of the `codeaffen.phpipam collection <https://galaxy.ansible.com/codeaffen/phpipam>`_ (version 1.5.0).
4746

47+
You might already have this collection installed if you are using the ``ansible`` package.
48+
It is not included in ``ansible-core``.
49+
To check whether it is installed, run :code:`ansible-galaxy collection list`.
50+
4851
To install it, use: :code:`ansible-galaxy collection install codeaffen.phpipam`.
49-
You need further requirements to be able to use this module,
50-
see :ref:`Requirements <ansible_collections.codeaffen.phpipam.device_module_requirements>` for details.
5152

5253
To use it in a playbook, specify: :code:`codeaffen.phpipam.device`.
5354

@@ -75,15 +76,13 @@ Synopsis
7576
7677
.. Requirements
7778
78-
.. _ansible_collections.codeaffen.phpipam.device_module_requirements:
79-
8079
Requirements
8180
------------
8281
The below requirements are needed on the host that executes this module.
8382

8483
- inflection
8584
- ipaddress
86-
- phpypam\>=1.0.0
85+
- phpypam>=1.0.0
8786

8887

8988

@@ -486,7 +485,7 @@ Parameters
486485

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

489-
:ansible-option-default-bold:`Default:` :ansible-option-default:`"161"`
488+
:ansible-option-default-bold:`Default:` :ansible-option-default:`161`
490489

491490
.. raw:: html
492491

@@ -1015,8 +1014,8 @@ Parameters
10151014

10161015
:ansible-option-choices:`Choices:`
10171016

1018-
- :ansible-option-choices-entry:`false`
1019-
- :ansible-option-default-bold:`true` :ansible-option-default:`← (default)`
1017+
- :ansible-option-choices-entry:`no`
1018+
- :ansible-option-default-bold:`yes` :ansible-option-default:`← (default)`
10201019

10211020
.. raw:: html
10221021

docs/plugins/device_type_module.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. Document meta
32
43
:orphan:
@@ -45,9 +44,11 @@ codeaffen.phpipam.device_type module -- Manage device types
4544
.. note::
4645
This module is part of the `codeaffen.phpipam collection <https://galaxy.ansible.com/codeaffen/phpipam>`_ (version 1.5.0).
4746

47+
You might already have this collection installed if you are using the ``ansible`` package.
48+
It is not included in ``ansible-core``.
49+
To check whether it is installed, run :code:`ansible-galaxy collection list`.
50+
4851
To install it, use: :code:`ansible-galaxy collection install codeaffen.phpipam`.
49-
You need further requirements to be able to use this module,
50-
see :ref:`Requirements <ansible_collections.codeaffen.phpipam.device_type_module_requirements>` for details.
5152

5253
To use it in a playbook, specify: :code:`codeaffen.phpipam.device_type`.
5354

@@ -75,15 +76,13 @@ Synopsis
7576
7677
.. Requirements
7778
78-
.. _ansible_collections.codeaffen.phpipam.device_type_module_requirements:
79-
8079
Requirements
8180
------------
8281
The below requirements are needed on the host that executes this module.
8382

8483
- inflection
8584
- ipaddress
86-
- phpypam\>=1.0.0
85+
- phpypam>=1.0.0
8786

8887

8988

@@ -389,8 +388,8 @@ Parameters
389388

390389
:ansible-option-choices:`Choices:`
391390

392-
- :ansible-option-choices-entry:`false`
393-
- :ansible-option-default-bold:`true` :ansible-option-default:`← (default)`
391+
- :ansible-option-choices-entry:`no`
392+
- :ansible-option-default-bold:`yes` :ansible-option-default:`← (default)`
394393

395394
.. raw:: html
396395

docs/plugins/domain_module.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. Document meta
32
43
:orphan:
@@ -45,9 +44,11 @@ codeaffen.phpipam.domain module -- Manage L2 routing domains
4544
.. note::
4645
This module is part of the `codeaffen.phpipam collection <https://galaxy.ansible.com/codeaffen/phpipam>`_ (version 1.5.0).
4746

47+
You might already have this collection installed if you are using the ``ansible`` package.
48+
It is not included in ``ansible-core``.
49+
To check whether it is installed, run :code:`ansible-galaxy collection list`.
50+
4851
To install it, use: :code:`ansible-galaxy collection install codeaffen.phpipam`.
49-
You need further requirements to be able to use this module,
50-
see :ref:`Requirements <ansible_collections.codeaffen.phpipam.domain_module_requirements>` for details.
5152

5253
To use it in a playbook, specify: :code:`codeaffen.phpipam.domain`.
5354

@@ -75,15 +76,13 @@ Synopsis
7576
7677
.. Requirements
7778
78-
.. _ansible_collections.codeaffen.phpipam.domain_module_requirements:
79-
8079
Requirements
8180
------------
8281
The below requirements are needed on the host that executes this module.
8382

8483
- inflection
8584
- ipaddress
86-
- phpypam\>=1.0.0
85+
- phpypam>=1.0.0
8786

8887

8988

@@ -423,8 +422,8 @@ Parameters
423422

424423
:ansible-option-choices:`Choices:`
425424

426-
- :ansible-option-choices-entry:`false`
427-
- :ansible-option-default-bold:`true` :ansible-option-default:`← (default)`
425+
- :ansible-option-choices-entry:`no`
426+
- :ansible-option-default-bold:`yes` :ansible-option-default:`← (default)`
428427

429428
.. raw:: html
430429

docs/plugins/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11

22

3-
43
.. _plugins_in_codeaffen.phpipam:
54

65
Codeaffen.Phpipam
@@ -57,7 +56,7 @@ Modules
5756
* :ref:`location module <ansible_collections.codeaffen.phpipam.location_module>` -- Manage locations
5857
* :ref:`nameserver module <ansible_collections.codeaffen.phpipam.nameserver_module>` -- Manage nameservers
5958
* :ref:`section module <ansible_collections.codeaffen.phpipam.section_module>` -- Manage sections
60-
* :ref:`subnet module <ansible_collections.codeaffen.phpipam.subnet_module>` -- Manage subnets
59+
* :ref:`subnet module <ansible_collections.codeaffen.phpipam.subnet_module>` --
6160
* :ref:`tag module <ansible_collections.codeaffen.phpipam.tag_module>` -- Manage tags
6261
* :ref:`vlan module <ansible_collections.codeaffen.phpipam.vlan_module>` -- Manage vlans
6362
* :ref:`vrf module <ansible_collections.codeaffen.phpipam.vrf_module>` -- Manage virtual routers and forwarders

docs/plugins/location_module.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. Document meta
32
43
:orphan:
@@ -45,9 +44,11 @@ codeaffen.phpipam.location module -- Manage locations
4544
.. note::
4645
This module is part of the `codeaffen.phpipam collection <https://galaxy.ansible.com/codeaffen/phpipam>`_ (version 1.5.0).
4746

47+
You might already have this collection installed if you are using the ``ansible`` package.
48+
It is not included in ``ansible-core``.
49+
To check whether it is installed, run :code:`ansible-galaxy collection list`.
50+
4851
To install it, use: :code:`ansible-galaxy collection install codeaffen.phpipam`.
49-
You need further requirements to be able to use this module,
50-
see :ref:`Requirements <ansible_collections.codeaffen.phpipam.location_module_requirements>` for details.
5152

5253
To use it in a playbook, specify: :code:`codeaffen.phpipam.location`.
5354

@@ -75,16 +76,14 @@ Synopsis
7576
7677
.. Requirements
7778
78-
.. _ansible_collections.codeaffen.phpipam.location_module_requirements:
79-
8079
Requirements
8180
------------
8281
The below requirements are needed on the host that executes this module.
8382

8483
- geopy
8584
- inflection
8685
- ipaddress
87-
- phpypam\>=1.0.0
86+
- phpypam>=1.0.0
8887

8988

9089

@@ -403,8 +402,8 @@ Parameters
403402

404403
:ansible-option-choices:`Choices:`
405404

406-
- :ansible-option-default-bold:`false` :ansible-option-default:`← (default)`
407-
- :ansible-option-choices-entry:`true`
405+
- :ansible-option-default-bold:`no` :ansible-option-default:`← (default)`
406+
- :ansible-option-choices-entry:`yes`
408407

409408
.. raw:: html
410409

@@ -553,8 +552,8 @@ Parameters
553552

554553
:ansible-option-choices:`Choices:`
555554

556-
- :ansible-option-choices-entry:`false`
557-
- :ansible-option-default-bold:`true` :ansible-option-default:`← (default)`
555+
- :ansible-option-choices-entry:`no`
556+
- :ansible-option-default-bold:`yes` :ansible-option-default:`← (default)`
558557

559558
.. raw:: html
560559

docs/plugins/nameserver_module.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. Document meta
32
43
:orphan:
@@ -45,9 +44,11 @@ codeaffen.phpipam.nameserver module -- Manage nameservers
4544
.. note::
4645
This module is part of the `codeaffen.phpipam collection <https://galaxy.ansible.com/codeaffen/phpipam>`_ (version 1.5.0).
4746

47+
You might already have this collection installed if you are using the ``ansible`` package.
48+
It is not included in ``ansible-core``.
49+
To check whether it is installed, run :code:`ansible-galaxy collection list`.
50+
4851
To install it, use: :code:`ansible-galaxy collection install codeaffen.phpipam`.
49-
You need further requirements to be able to use this module,
50-
see :ref:`Requirements <ansible_collections.codeaffen.phpipam.nameserver_module_requirements>` for details.
5152

5253
To use it in a playbook, specify: :code:`codeaffen.phpipam.nameserver`.
5354

@@ -75,15 +76,13 @@ Synopsis
7576
7677
.. Requirements
7778
78-
.. _ansible_collections.codeaffen.phpipam.nameserver_module_requirements:
79-
8079
Requirements
8180
------------
8281
The below requirements are needed on the host that executes this module.
8382

8483
- inflection
8584
- ipaddress
86-
- phpypam\>=1.0.0
85+
- phpypam>=1.0.0
8786

8887

8988

@@ -457,8 +456,8 @@ Parameters
457456

458457
:ansible-option-choices:`Choices:`
459458

460-
- :ansible-option-choices-entry:`false`
461-
- :ansible-option-default-bold:`true` :ansible-option-default:`← (default)`
459+
- :ansible-option-choices-entry:`no`
460+
- :ansible-option-default-bold:`yes` :ansible-option-default:`← (default)`
462461

463462
.. raw:: html
464463

0 commit comments

Comments
 (0)