diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd05b213..7ca3e0fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,17 +62,17 @@ jobs: runs-on: ubuntu-latest needs: unit_testing env: - python-version: "3.10" + python-version: "3.12" strategy: fail-fast: false matrix: - include: - - VERSION: "v3.6" - NETBOX_DOCKER_VERSION: 2.7.0 + include: - VERSION: "v3.7" NETBOX_DOCKER_VERSION: 2.7.0 - VERSION: "v4.0" NETBOX_DOCKER_VERSION: 2.9.1 + - VERSION: "v4.1" + NETBOX_DOCKER_VERSION: 3.0.1 steps: @@ -86,7 +86,7 @@ jobs: cd netbox-docker git checkout ${{ matrix.NETBOX_DOCKER_VERSION }} cp $GITHUB_WORKSPACE/tests/netbox-docker/${{ matrix.VERSION }}/docker-compose.override.yml docker-compose.override.yml - docker-compose up -d --quiet-pull netbox netbox-worker postgres redis redis-cache + docker compose up -d --quiet-pull netbox netbox-worker postgres redis redis-cache docker container ls cd .. @@ -112,21 +112,28 @@ jobs: - name: Wait for NetBox to be available run: | docker container ls - docker logs netbox-docker_netbox_1 - timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:32768)" != "200" ]]; do echo "waiting for NetBox"; sleep 5; done' || false - working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox - #if: matrix.VERSION == 'v3.3' + docker logs netbox-docker-netbox-1 + timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:32768/login/)" != "200" ]]; do echo "waiting for NetBox"; sleep 5; done' || false + working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox - name: Pre-populate NetBox run: ./tests/integration/netbox-deploy.py working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox - - name: Run integration tests - # Run regression and integration tests - # Run the inventory test first, in case any of the other tests modify the data. + - name: Run inventory tests + continue-on-error: true run: | ansible-test integration -v --color --coverage --python ${{ env.python-version }} inventory-${{ matrix.VERSION }} - ansible-test integration -v --color --coverage --python ${{ env.python-version }} regression-${{ matrix.VERSION }} + working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox + + - name: Run regression tests + continue-on-error: true + run: | + ansible-test integration -v --color --coverage --python ${{ env.python-version }} regression-${{ matrix.VERSION }} + working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox + + - name: Run integration tests + run: | ansible-test integration -v --color --coverage --python ${{ env.python-version }} ${{ matrix.VERSION }} ansible-test coverage report --all --omit "tests/*,hacking/*,docs/*" --show-missing working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d27d5977..aa11aa42 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,40 @@ NetBox.NetBox Release Notes .. contents:: Topics +v3.20.0 +======= + +Minor Changes +------------- + +- Add ``facility`` to ``location`` (https://github.com/netbox-community/ansible_modules/issues/1280) +- Add ``related_object_type`` to ``netbox_custom_filed`` (https://github.com/netbox-community/ansible_modules/issues/1268) +- Add ``status`` to ``location`` (https://github.com/netbox-community/ansible_modules/issues/1279) +- Add `description` to `netbox_cluster_group` module (https://github.com/netbox-community/ansible_modules/issues/1276) +- Add `serial` to `netbox_virtual_machine` module (https://github.com/netbox-community/ansible_modules/issues/1309) +- Add `status` to `netbox_cluster` (https://github.com/netbox-community/ansible_modules/issues/1275) +- Add `vid_ranges` to `netbox_vlan_group` module (https://github.com/netbox-community/ansible_modules/issues/1307) +- Add ability to rename variables set on the host by ``netbox.netbox.nb_inventory`` through configuration. +- Added option `hostname_field` to ``nb_inventory`` to be able to set the inventory hostname from a field in custom_fields +- Adjust tests for various modules +- Fix the form_factor option on netbox_rack +- Update CI for NetBox 4.1 + +Bugfixes +-------- + +- If `fetch_all` is `false`, prefix lookup depends on site lookup, so move it to secondary lookup (https://github.com/netbox-community/ansible_modules/issues/733) + +New Modules +----------- + +- netbox.netbox.netbox_permission - Creates or removes permissions from NetBox +- netbox.netbox.netbox_token - Creates or removes tokens from NetBox +- netbox.netbox.netbox_tunnel - Create, update or delete tunnels within NetBox +- netbox.netbox.netbox_tunnel_group - Create, update or delete tunnel groups within NetBox +- netbox.netbox.netbox_user - Creates or removes users from NetBox +- netbox.netbox.netbox_user_group - Creates or removes user groups from NetBox + v3.19.1 ======= diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 03360ec3..b8124e99 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -763,6 +763,58 @@ releases: - netbox_virtual_machine - Change vCPU to float from int (to reflect NetBox 3.0) [#605](https://github.com/netbox-community/ansible_modules/pull/605) release_date: '2021-10-18' + 3.20.0: + changes: + bugfixes: + - If `fetch_all` is `false`, prefix lookup depends on site lookup, so move it + to secondary lookup (https://github.com/netbox-community/ansible_modules/issues/733) + minor_changes: + - Add ``facility`` to ``location`` (https://github.com/netbox-community/ansible_modules/issues/1280) + - Add ``related_object_type`` to ``netbox_custom_filed`` (https://github.com/netbox-community/ansible_modules/issues/1268) + - Add ``status`` to ``location`` (https://github.com/netbox-community/ansible_modules/issues/1279) + - Add `description` to `netbox_cluster_group` module (https://github.com/netbox-community/ansible_modules/issues/1276) + - Add `serial` to `netbox_virtual_machine` module (https://github.com/netbox-community/ansible_modules/issues/1309) + - Add `status` to `netbox_cluster` (https://github.com/netbox-community/ansible_modules/issues/1275) + - Add `vid_ranges` to `netbox_vlan_group` module (https://github.com/netbox-community/ansible_modules/issues/1307) + - Add ability to rename variables set on the host by ``netbox.netbox.nb_inventory`` + through configuration. + - Added option `hostname_field` to ``nb_inventory`` to be able to set the inventory + hostname from a field in custom_fields + - Adjust tests for various modules + - Fix the form_factor option on netbox_rack + - Update CI for NetBox 4.1 + fragments: + - 1273-ability-to-rename-host-inventory-vars.yml + - 1275-feature-netbox_cluster-adds-status-field.yml + - 1276-feature-netbox_cluster_group-adds-description-field.yml + - 1281_move_prefix_lookup_to_secondary.yml + - 1307-feature-netbox_vlan_group-add-vid_ranges.yml + - 1309-feature-add-serial-number-to-vm.yml + - 1312-add-hostname_field-option.yml + - 41_updates.yml + - ci_netbox41.yml + - fix_issue_1268.yml + - fix_issues_1279_1280.yml + modules: + - description: Creates or removes permissions from NetBox + name: netbox_permission + namespace: '' + - description: Creates or removes tokens from NetBox + name: netbox_token + namespace: '' + - description: Create, update or delete tunnels within NetBox + name: netbox_tunnel + namespace: '' + - description: Create, update or delete tunnel groups within NetBox + name: netbox_tunnel_group + namespace: '' + - description: Creates or removes users from NetBox + name: netbox_user + namespace: '' + - description: Creates or removes user groups from NetBox + name: netbox_user_group + namespace: '' + release_date: '2024-09-12' 3.3.0: changes: minor_changes: diff --git a/docs/conf.py b/docs/conf.py index 47651bd1..44419cd8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,7 +27,7 @@ author = "Mikhail Yohman <@FragmentedPacket>" # The full version, including alpha/beta/rc tags -release = "3.19.1" +release = "3.20.0" # -- General configuration --------------------------------------------------- diff --git a/docs/plugins/environment_variables.rst b/docs/plugins/environment_variables.rst index bbe6a8f3..acc06a08 100644 --- a/docs/plugins/environment_variables.rst +++ b/docs/plugins/environment_variables.rst @@ -1,8 +1,7 @@ - :orphan: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. _list_of_collection_env_vars: diff --git a/docs/plugins/index.rst b/docs/plugins/index.rst index 92df1dcd..f97aa673 100644 --- a/docs/plugins/index.rst +++ b/docs/plugins/index.rst @@ -1,7 +1,5 @@ - - .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. _plugins_in_netbox.netbox: @@ -9,7 +7,7 @@ Netbox.Netbox ============= -Collection version 3.19.1 +Collection version 3.20.0 .. contents:: :local: @@ -98,6 +96,7 @@ Modules * :ansplugin:`netbox_module module ` -- Create, update or delete module within NetBox * :ansplugin:`netbox_module_bay module ` -- Create, update or delete module bay within NetBox * :ansplugin:`netbox_module_type module ` -- Create, update or delete module types within NetBox +* :ansplugin:`netbox_permission module ` -- Creates or removes permissions from NetBox * :ansplugin:`netbox_platform module ` -- Create or delete platforms within NetBox * :ansplugin:`netbox_power_feed module ` -- Create, update or delete power feeds within NetBox * :ansplugin:`netbox_power_outlet module ` -- Create, update or delete power outlets within NetBox @@ -123,6 +122,11 @@ Modules * :ansplugin:`netbox_tag module ` -- Creates or removes tags from NetBox * :ansplugin:`netbox_tenant module ` -- Creates or removes tenants from NetBox * :ansplugin:`netbox_tenant_group module ` -- Creates or removes tenant groups from NetBox +* :ansplugin:`netbox_token module ` -- Creates or removes tokens from NetBox +* :ansplugin:`netbox_tunnel module ` -- Create, update or delete tunnels within NetBox +* :ansplugin:`netbox_tunnel_group module ` -- Create, update or delete tunnel groups within NetBox +* :ansplugin:`netbox_user module ` -- Creates or removes users from NetBox +* :ansplugin:`netbox_user_group module ` -- Creates or removes user groups from NetBox * :ansplugin:`netbox_virtual_chassis module ` -- Create, update or delete virtual chassis within NetBox * :ansplugin:`netbox_virtual_disk module ` -- Creates or removes disks from virtual machines in NetBox * :ansplugin:`netbox_virtual_machine module ` -- Create, update or delete virtual\_machines within NetBox @@ -184,6 +188,7 @@ Modules netbox_module_module netbox_module_bay_module netbox_module_type_module + netbox_permission_module netbox_platform_module netbox_power_feed_module netbox_power_outlet_module @@ -209,6 +214,11 @@ Modules netbox_tag_module netbox_tenant_module netbox_tenant_group_module + netbox_token_module + netbox_tunnel_module + netbox_tunnel_group_module + netbox_user_module + netbox_user_group_module netbox_virtual_chassis_module netbox_virtual_disk_module netbox_virtual_machine_module @@ -244,5 +254,3 @@ Lookup Plugins :hidden: nb_lookup_lookup - - diff --git a/docs/plugins/nb_inventory_inventory.rst b/docs/plugins/nb_inventory_inventory.rst index c4695d22..3f7cd291 100644 --- a/docs/plugins/nb_inventory_inventory.rst +++ b/docs/plugins/nb_inventory_inventory.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.nb_inventory inventory -- NetBox inventory source .. Collection note .. note:: - This inventory plugin is part of the `netbox.netbox collection `_ (version 3.19.1). + This inventory plugin is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -435,21 +434,6 @@ Parameters - INI entries: - .. code-block:: - - [default] - fact_caching_prefix = ansible_inventory_ - - - Removed in: version 2.16 of ansible.builtin - - - Why: Fixes typing error in INI section name - - Alternative: Use the 'defaults' section instead - - - .. code-block:: [defaults] @@ -845,7 +829,7 @@ Parameters
- If \ :emphasis:`config\_context`\ is enabled, by default it's added as a host var named config\_context. + If :emphasis:`config\_context` is enabled, by default it's added as a host var named config\_context. If flatten\_config\_context is set to True, the config context variables will be added directly to the host instead. @@ -945,7 +929,7 @@ Parameters
- If \ :emphasis:`local\_context\_data`\ is enabled, by default it's added as a host var named local\_context\_data. + If :emphasis:`local\_context\_data` is enabled, by default it's added as a host var named local\_context\_data. If flatten\_local\_context\_data is set to True, the config context variables will be added directly to the host instead. @@ -994,7 +978,7 @@ Parameters Determine how redirects are followed. - By default, \ :emphasis:`follow\_redirects`\ is set to uses urllib2 default behavior. + By default, :emphasis:`follow\_redirects` is set to uses urllib2 default behavior. .. rst-class:: ansible-option-line @@ -1042,11 +1026,11 @@ Parameters
- Keys used to create groups. The \ :emphasis:`plurals`\ and \ :emphasis:`racks`\ options control which of these are valid. + Keys used to create groups. The :emphasis:`plurals` and :emphasis:`racks` options control which of these are valid. - \ :emphasis:`rack\_group`\ is supported on NetBox versions 2.10 or lower only + :emphasis:`rack\_group` is supported on NetBox versions 2.10 or lower only - \ :emphasis:`location`\ is supported on NetBox versions 2.11 or higher only + :emphasis:`location` is supported on NetBox versions 2.11 or higher only .. rst-class:: ansible-option-line @@ -1182,6 +1166,49 @@ Parameters
+ * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.nb_inventory_inventory__parameter-hostname_field: + + .. rst-class:: ansible-option-title + + **hostname_field** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + By default, the inventory hostname is the netbox device name + + If set, sets the inventory hostname from this field in custom\_fields instead + + + .. rst-class:: ansible-option-line + + :ansible-option-default-bold:`Default:` :ansible-option-default:`false` + + .. raw:: html + +
+ * - .. raw:: html
@@ -1311,7 +1338,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -1355,7 +1382,7 @@ Parameters The default value when the host variable's value is an empty string. - This option is mutually exclusive with \ :literal:`trailing\_separator`\ . + This option is mutually exclusive with :ansopt:`netbox.netbox.nb\_inventory#inventory:keyed\_groups[].trailing\_separator`. .. raw:: html @@ -1591,9 +1618,9 @@ Parameters
- Set this option to \ :emphasis:`False`\ to omit the \ :literal:`separator`\ after the host variable when the value is an empty string. + Set this option to :ansval:`False` to omit the :ansopt:`netbox.netbox.nb\_inventory#inventory:keyed\_groups[].separator` after the host variable when the value is an empty string. - This option is mutually exclusive with \ :literal:`default\_value`\ . + This option is mutually exclusive with :ansopt:`netbox.netbox.nb\_inventory#inventory:keyed\_groups[].default\_value`. .. rst-class:: ansible-option-line @@ -1839,7 +1866,7 @@ Parameters Group names will be plural (ie. "sites\_mysite" instead of "site\_mysite") - The choices of \ :emphasis:`group\_by`\ will be changed by this option. + The choices of :emphasis:`group\_by` will be changed by this option. .. rst-class:: ansible-option-line @@ -1982,7 +2009,7 @@ Parameters If False, skip querying the racks for information, which can be slow with great amounts of racks. - The choices of \ :emphasis:`group\_by`\ will be changed by this option. + The choices of :emphasis:`group\_by` will be changed by this option. .. rst-class:: ansible-option-line @@ -1993,6 +2020,55 @@ Parameters - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.nb_inventory_inventory__parameter-rename_variables: + + .. rst-class:: ansible-option-title + + **rename_variables** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` + + + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Rename variables evaluated by nb\_inventory, before writing them. + + Each list entry contains a dict with a 'pattern' and a 'repl'. + + Both 'pattern' and 'repl' are regular expressions. + + The first matching expression is used, subsequent matches are ignored. + + Internally \`re.sub\` is used. + + + .. rst-class:: ansible-option-line + + :ansible-option-default-bold:`Default:` :ansible-option-default:`[]` + .. raw:: html
@@ -2123,7 +2199,7 @@ Parameters
- If \ :literal:`yes`\ make invalid entries a fatal error, otherwise skip and continue. + If :ansval:`yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. @@ -2326,7 +2402,7 @@ Parameters
- Allows connection when SSL certificates are not valid. Set to \ :literal:`false`\ when certificates are not trusted. + Allows connection when SSL certificates are not valid. Set to :literal:`false` when certificates are not trusted. .. rst-class:: ansible-option-line @@ -2496,7 +2572,6 @@ Examples .. code-block:: yaml+jinja - # netbox_inventory.yml file in YAML format # Example command line: ansible-inventory -v --list -i netbox_inventory.yml @@ -2606,7 +2681,6 @@ Examples - .. Facts @@ -2648,4 +2722,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/nb_lookup_lookup.rst b/docs/plugins/nb_lookup_lookup.rst index 7ac5ef3e..70e6c064 100644 --- a/docs/plugins/nb_lookup_lookup.rst +++ b/docs/plugins/nb_lookup_lookup.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.nb_lookup lookup -- Queries and returns elements from NetBox .. Collection note .. note:: - This lookup plugin is part of the `netbox.netbox collection `_ (version 3.19.1). + This lookup plugin is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -262,7 +261,7 @@ examples: ``lookup('netbox.netbox.nb_lookup', key1=value1, key2=value2, ...)`` a (DEPRECATED) - NetBox 2.11 and earlier only - The location of the private key tied to user account. Mutually exclusive with \ :emphasis:`private\_key`\ . + The location of the private key tied to user account. Mutually exclusive with :emphasis:`private\_key`. .. raw:: html @@ -338,7 +337,7 @@ examples: ``lookup('netbox.netbox.nb_lookup', key1=value1, key2=value2, ...)`` a (DEPRECATED) - NetBox 2.11 and earlier only - The private key as a string. Mutually exclusive with \ :emphasis:`key\_file`\ . + The private key as a string. Mutually exclusive with :emphasis:`key\_file`. .. raw:: html @@ -502,7 +501,6 @@ Examples .. code-block:: yaml+jinja - tasks: # query a list of devices - name: Obtain list of devices from NetBox @@ -527,7 +525,6 @@ Examples - .. Facts @@ -618,4 +615,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_aggregate_module.rst b/docs/plugins/netbox_aggregate_module.rst index 417e141c..75eba0ed 100644 --- a/docs/plugins/netbox_aggregate_module.rst +++ b/docs/plugins/netbox_aggregate_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_aggregate module -- Creates or removes aggregates from NetB .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -677,7 +676,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -701,7 +700,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -713,7 +712,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox aggregate module" connection: local hosts: localhost @@ -752,7 +750,6 @@ Examples - .. Facts @@ -882,4 +879,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_asn_module.rst b/docs/plugins/netbox_asn_module.rst index 22864480..a5c69f82 100644 --- a/docs/plugins/netbox_asn_module.rst +++ b/docs/plugins/netbox_asn_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_asn module -- Create, update or delete ASNs within NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -587,7 +586,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -611,7 +610,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -623,7 +622,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -650,7 +648,6 @@ Examples - .. Facts @@ -703,7 +700,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -780,4 +777,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_cable_module.rst b/docs/plugins/netbox_cable_module.rst index 07d8cee5..27f2c824 100644 --- a/docs/plugins/netbox_cable_module.rst +++ b/docs/plugins/netbox_cable_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_cable module -- Create, update or delete cables within NetB .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -1052,7 +1051,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1076,7 +1075,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1088,7 +1087,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -1150,7 +1148,6 @@ Examples - .. Facts @@ -1203,7 +1200,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -1280,4 +1277,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_circuit_module.rst b/docs/plugins/netbox_circuit_module.rst index af32b52f..7b09be57 100644 --- a/docs/plugins/netbox_circuit_module.rst +++ b/docs/plugins/netbox_circuit_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_circuit module -- Create, update or delete circuits within .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -797,7 +796,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -821,7 +820,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -833,7 +832,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -876,7 +874,6 @@ Examples - .. Facts @@ -929,7 +926,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -1006,4 +1003,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_circuit_termination_module.rst b/docs/plugins/netbox_circuit_termination_module.rst index 898b1a27..5a6b767f 100644 --- a/docs/plugins/netbox_circuit_termination_module.rst +++ b/docs/plugins/netbox_circuit_termination_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_circuit_termination module -- Create, update or delete circ .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -774,7 +773,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -798,7 +797,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -810,7 +809,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -852,7 +850,6 @@ Examples - .. Facts @@ -905,7 +902,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -982,4 +979,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_circuit_type_module.rst b/docs/plugins/netbox_circuit_type_module.rst index 10fc1239..fc87150f 100644 --- a/docs/plugins/netbox_circuit_type_module.rst +++ b/docs/plugins/netbox_circuit_type_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_circuit_type module -- Create, update or delete circuit typ .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -601,7 +600,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -625,7 +624,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -637,7 +636,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -662,7 +660,6 @@ Examples - .. Facts @@ -715,7 +712,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -792,4 +789,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_cluster_group_module.rst b/docs/plugins/netbox_cluster_group_module.rst index bad767f4..929b0069 100644 --- a/docs/plugins/netbox_cluster_group_module.rst +++ b/docs/plugins/netbox_cluster_group_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_cluster_group module -- Create, update or delete cluster gr .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -198,6 +197,51 @@ Parameters Must exist in NetBox + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_cluster_group_module__parameter-data/description: + + .. rst-class:: ansible-option-title + + **description** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + :ansible-option-versionadded:`added in netbox.netbox 3.20.0` + + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The description of the cluster group + + .. raw:: html
@@ -511,7 +555,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -535,7 +579,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -547,7 +591,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -572,7 +615,6 @@ Examples - .. Facts @@ -625,7 +667,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -702,4 +744,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_cluster_module.rst b/docs/plugins/netbox_cluster_module.rst index 39eb8f3c..9fed04ac 100644 --- a/docs/plugins/netbox_cluster_module.rst +++ b/docs/plugins/netbox_cluster_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_cluster module -- Create, update or delete clusters within .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -447,7 +446,52 @@ Parameters
- Required if \ :emphasis:`state=present`\ and the cluster does not exist yet + Required if :emphasis:`state=present` and the cluster does not exist yet + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_cluster_module__parameter-data/status: + + .. rst-class:: ansible-option-title + + **status** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + :ansible-option-versionadded:`added in netbox.netbox 3.20.0` + + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Status of the cluster .. raw:: html @@ -716,7 +760,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -740,7 +784,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -752,7 +796,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -787,7 +830,7 @@ Examples - Schnozzberry state: present - - name: Update the group and site of an existing cluster + - name: Update the group, site and status of an existing cluster netbox.netbox.netbox_cluster: netbox_url: http://netbox.local netbox_token: thisIsMyToken @@ -796,11 +839,11 @@ Examples cluster_type: qemu cluster_group: GROUP site: SITE + status: planned state: present - .. Facts @@ -853,7 +896,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -930,4 +973,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_cluster_type_module.rst b/docs/plugins/netbox_cluster_type_module.rst index 63a98a42..db36fef9 100644 --- a/docs/plugins/netbox_cluster_type_module.rst +++ b/docs/plugins/netbox_cluster_type_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_cluster_type module -- Create, update or delete cluster typ .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -553,7 +552,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -577,7 +576,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -589,7 +588,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -614,7 +612,6 @@ Examples - .. Facts @@ -667,7 +664,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -744,4 +741,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_config_context_module.rst b/docs/plugins/netbox_config_context_module.rst index 9f4efd94..f1bcd5e7 100644 --- a/docs/plugins/netbox_config_context_module.rst +++ b/docs/plugins/netbox_config_context_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_config_context module -- Creates, updates or deletes config .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -1057,7 +1056,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1081,7 +1080,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1093,7 +1092,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox config_context module" connection: local hosts: localhost @@ -1129,7 +1127,6 @@ Examples - .. Facts @@ -1259,4 +1256,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_config_template_module.rst b/docs/plugins/netbox_config_template_module.rst index 24fbfb9d..76f508d6 100644 --- a/docs/plugins/netbox_config_template_module.rst +++ b/docs/plugins/netbox_config_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_config_template module -- Creates or removes config templat .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -545,7 +544,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -580,7 +579,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test config template creation/deletion" connection: local hosts: localhost @@ -609,7 +607,6 @@ Examples - .. Facts @@ -739,4 +736,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_console_port_module.rst b/docs/plugins/netbox_console_port_module.rst index cda040f3..44df81f5 100644 --- a/docs/plugins/netbox_console_port_module.rst +++ b/docs/plugins/netbox_console_port_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_console_port module -- Create, update or delete console por .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -844,7 +843,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -868,7 +867,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -880,7 +879,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -918,7 +916,6 @@ Examples - .. Facts @@ -971,7 +968,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -1048,4 +1045,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_console_port_template_module.rst b/docs/plugins/netbox_console_port_template_module.rst index 011d1a8a..58aa745b 100644 --- a/docs/plugins/netbox_console_port_template_module.rst +++ b/docs/plugins/netbox_console_port_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_console_port_template module -- Create, update or delete co .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -480,7 +479,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -504,7 +503,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -516,7 +515,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -553,7 +551,6 @@ Examples - .. Facts @@ -606,7 +603,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -683,4 +680,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_console_server_port_module.rst b/docs/plugins/netbox_console_server_port_module.rst index d3d35818..dc5954a9 100644 --- a/docs/plugins/netbox_console_server_port_module.rst +++ b/docs/plugins/netbox_console_server_port_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_console_server_port module -- Create, update or delete cons .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -195,7 +194,7 @@ Parameters
- cable to attach port to. Must exist. + cable to attach port to. Must exist. .. raw:: html @@ -799,7 +798,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -823,7 +822,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -835,7 +834,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -874,7 +872,6 @@ Examples - .. Facts @@ -927,7 +924,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -1004,4 +1001,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_console_server_port_template_module.rst b/docs/plugins/netbox_console_server_port_template_module.rst index 2990775f..0c8bb237 100644 --- a/docs/plugins/netbox_console_server_port_template_module.rst +++ b/docs/plugins/netbox_console_server_port_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_console_server_port_template module -- Create, update or de .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -480,7 +479,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -504,7 +503,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -516,7 +515,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -553,7 +551,6 @@ Examples - .. Facts @@ -606,7 +603,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -683,4 +680,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_contact_group_module.rst b/docs/plugins/netbox_contact_group_module.rst index e3504abb..769d3f49 100644 --- a/docs/plugins/netbox_contact_group_module.rst +++ b/docs/plugins/netbox_contact_group_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_contact_group module -- Creates or removes contact groups f .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -587,7 +586,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -611,7 +610,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -623,7 +622,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox contact group module" connection: local hosts: localhost @@ -648,7 +646,6 @@ Examples - .. Facts @@ -778,4 +775,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_contact_module.rst b/docs/plugins/netbox_contact_module.rst index c80e046b..95aae652 100644 --- a/docs/plugins/netbox_contact_module.rst +++ b/docs/plugins/netbox_contact_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_contact module -- Creates or removes contacts from NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -803,7 +802,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -827,7 +826,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -839,7 +838,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox module" connection: local hosts: localhost @@ -878,7 +876,6 @@ Examples - .. Facts @@ -1008,4 +1005,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_contact_role_module.rst b/docs/plugins/netbox_contact_role_module.rst index 6ac8f61f..514f00b6 100644 --- a/docs/plugins/netbox_contact_role_module.rst +++ b/docs/plugins/netbox_contact_role_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_contact_role module -- Creates or removes contact roles fro .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -547,7 +546,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -571,7 +570,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -583,7 +582,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox module" connection: local hosts: localhost @@ -607,7 +605,6 @@ Examples - .. Facts @@ -737,4 +734,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_custom_field_choice_set_module.rst b/docs/plugins/netbox_custom_field_choice_set_module.rst index 7674415a..1de78ab7 100644 --- a/docs/plugins/netbox_custom_field_choice_set_module.rst +++ b/docs/plugins/netbox_custom_field_choice_set_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_custom_field_choice_set module -- Creates, updates or delet .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -566,7 +565,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -589,7 +588,7 @@ Notes ----- .. note:: - - This should be run with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be run with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -601,7 +600,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox custom_field_choice_set module" connection: local hosts: localhost @@ -629,7 +627,6 @@ Examples - .. Facts @@ -759,4 +756,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_custom_field_module.rst b/docs/plugins/netbox_custom_field_module.rst index 0b3d5b74..35697c2f 100644 --- a/docs/plugins/netbox_custom_field_module.rst +++ b/docs/plugins/netbox_custom_field_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_custom_field module -- Creates, updates or deletes custom f .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -582,6 +581,51 @@ Parameters The content type(s) to apply this custom field to (NetBox 4.0+) + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_custom_field_module__parameter-data/related_object_type: + + .. rst-class:: ansible-option-title + + **related_object_type** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + :ansible-option-versionadded:`added in netbox.netbox 3.20.0` + + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The object type of the custom field (if any) (NetBox 4.0+) + + .. raw:: html
@@ -1143,7 +1187,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1166,7 +1210,7 @@ Notes ----- .. note:: - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1178,7 +1222,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox custom_fields module" connection: local hosts: localhost @@ -1232,7 +1275,6 @@ Examples - .. Facts @@ -1362,4 +1404,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_custom_link_module.rst b/docs/plugins/netbox_custom_link_module.rst index 18ea45e6..7ceff924 100644 --- a/docs/plugins/netbox_custom_link_module.rst +++ b/docs/plugins/netbox_custom_link_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_custom_link module -- Creates, updates or deletes custom li .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -822,7 +821,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -845,8 +844,8 @@ Notes ----- .. note:: - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ - - Use the \ :literal:`!unsafe`\ data type if you want jinja2 code in link\_text or link\_url + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` + - Use the :literal:`!unsafe` data type if you want jinja2 code in link\_text or link\_url .. Seealso @@ -858,7 +857,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox custom_link module" connection: local hosts: localhost @@ -886,7 +884,6 @@ Examples - .. Facts @@ -1016,4 +1013,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_device_bay_module.rst b/docs/plugins/netbox_device_bay_module.rst index e5b946fc..ed146312 100644 --- a/docs/plugins/netbox_device_bay_module.rst +++ b/docs/plugins/netbox_device_bay_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_device_bay module -- Create, update or delete device bays w .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -590,7 +589,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -614,7 +613,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -626,7 +625,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -663,7 +661,6 @@ Examples - .. Facts @@ -716,7 +713,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -793,4 +790,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_device_bay_template_module.rst b/docs/plugins/netbox_device_bay_template_module.rst index 549897ea..52c33813 100644 --- a/docs/plugins/netbox_device_bay_template_module.rst +++ b/docs/plugins/netbox_device_bay_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_device_bay_template module -- Create, update or delete devi .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -419,7 +418,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -443,7 +442,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -455,7 +454,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -482,7 +480,6 @@ Examples - .. Facts @@ -535,7 +532,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -612,4 +609,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_device_interface_module.rst b/docs/plugins/netbox_device_interface_module.rst index 228a3d84..83d90503 100644 --- a/docs/plugins/netbox_device_interface_module.rst +++ b/docs/plugins/netbox_device_interface_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_device_interface module -- Creates or removes interfaces on .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -468,9 +467,8 @@ Parameters
Form factor of the interface: - ex. 1000Base-T (1GE), Virtual, 10GBASE-T (10GE) - This has to be specified exactly as what is found within UI - + ex. 1000Base-T (1GE), Virtual, 10GBASE-T (10GE) + This has to be specified exactly as what is found within UI .. raw:: html @@ -1044,7 +1042,7 @@ Parameters
- A list of tagged VLANS to be assigned to interface. Mode must be set to either \ :literal:`Tagged`\ or \ :literal:`Tagged All`\ + A list of tagged VLANS to be assigned to interface. Mode must be set to either :literal:`Tagged` or :literal:`Tagged All` .. raw:: html @@ -1174,9 +1172,8 @@ Parameters
Form factor of the interface: - ex. 1000Base-T (1GE), Virtual, 10GBASE-T (10GE) - This has to be specified exactly as what is found within UI - + ex. 1000Base-T (1GE), Virtual, 10GBASE-T (10GE) + This has to be specified exactly as what is found within UI .. raw:: html @@ -1493,9 +1490,8 @@ Parameters
- Use when master device is specified for \ :literal:`device`\ and the specified interface exists on a child device - and needs updated - + Use when master device is specified for :literal:`device` and the specified interface exists on a child device + and needs updated .. rst-class:: ansible-option-line @@ -1537,7 +1533,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1561,7 +1557,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1573,7 +1569,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox interface module" connection: local hosts: localhost @@ -1670,7 +1665,6 @@ Examples - .. Facts @@ -1800,4 +1794,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_device_interface_template_module.rst b/docs/plugins/netbox_device_interface_template_module.rst index 88b661de..e2a19ee2 100644 --- a/docs/plugins/netbox_device_interface_template_module.rst +++ b/docs/plugins/netbox_device_interface_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_device_interface_template module -- Creates or removes inte .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -417,9 +416,8 @@ Parameters
Form factor of the interface: - ex. 1000Base-T (1GE), Virtual, 10GBASE-T (10GE) - This has to be specified exactly as what is found within UI - + ex. 1000Base-T (1GE), Virtual, 10GBASE-T (10GE) + This has to be specified exactly as what is found within UI .. raw:: html @@ -604,7 +602,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -628,7 +626,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -640,7 +638,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox interface template module" connection: local hosts: localhost @@ -667,7 +664,6 @@ Examples - .. Facts @@ -797,4 +793,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_device_module.rst b/docs/plugins/netbox_device_module.rst index 3e1943f1..ec95932c 100644 --- a/docs/plugins/netbox_device_module.rst +++ b/docs/plugins/netbox_device_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_device module -- Create, update or delete devices within Ne .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -508,7 +507,7 @@ Parameters
- Required if \ :emphasis:`state=present`\ and the device does not exist yet + Required if :emphasis:`state=present` and the device does not exist yet .. raw:: html @@ -550,7 +549,7 @@ Parameters
- Required if \ :emphasis:`state=present`\ and the device does not exist yet + Required if :emphasis:`state=present` and the device does not exist yet .. raw:: html @@ -592,7 +591,7 @@ Parameters
- Required if \ :emphasis:`rack`\ is defined + Required if :emphasis:`rack` is defined .. rst-class:: ansible-option-line @@ -1070,7 +1069,7 @@ Parameters
- Required if \ :emphasis:`state=present`\ and the device does not exist yet + Required if :emphasis:`state=present` and the device does not exist yet .. raw:: html @@ -1507,7 +1506,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1531,7 +1530,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1543,7 +1542,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -1608,7 +1606,6 @@ Examples - .. Facts @@ -1661,7 +1658,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -1739,4 +1736,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_device_role_module.rst b/docs/plugins/netbox_device_role_module.rst index a40d701e..81930aee 100644 --- a/docs/plugins/netbox_device_role_module.rst +++ b/docs/plugins/netbox_device_role_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_device_role module -- Create, update or delete devices role .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -645,7 +644,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -669,7 +668,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -681,7 +680,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -707,7 +705,6 @@ Examples - .. Facts @@ -760,7 +757,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -837,4 +834,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_device_type_module.rst b/docs/plugins/netbox_device_type_module.rst index 39b807a6..846f842f 100644 --- a/docs/plugins/netbox_device_type_module.rst +++ b/docs/plugins/netbox_device_type_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_device_type module -- Create, update or delete device types .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -1025,7 +1024,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1049,7 +1048,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1061,7 +1060,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -1102,7 +1100,6 @@ Examples - .. Facts @@ -1155,7 +1152,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -1232,4 +1229,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_export_template_module.rst b/docs/plugins/netbox_export_template_module.rst index bfa54972..6f0adda6 100644 --- a/docs/plugins/netbox_export_template_module.rst +++ b/docs/plugins/netbox_export_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_export_template module -- Creates, updates or deletes expor .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -727,7 +726,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -750,8 +749,8 @@ Notes ----- .. note:: - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ - - Use the \ :literal:`!unsafe`\ data type if you want jinja2 code in template\_code + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` + - Use the :literal:`!unsafe` data type if you want jinja2 code in template\_code .. Seealso @@ -763,7 +762,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox export_templates module" connection: local hosts: localhost @@ -799,7 +797,6 @@ Examples - .. Facts @@ -929,4 +926,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_fhrp_group_assignment_module.rst b/docs/plugins/netbox_fhrp_group_assignment_module.rst index 1837d0e1..a965e4f9 100644 --- a/docs/plugins/netbox_fhrp_group_assignment_module.rst +++ b/docs/plugins/netbox_fhrp_group_assignment_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_fhrp_group_assignment module -- Create, update or delete FH .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -153,7 +152,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -508,7 +507,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -532,7 +531,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -551,7 +550,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" hosts: localhost connection: local @@ -580,7 +578,6 @@ Examples - .. Facts @@ -633,7 +630,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -710,4 +707,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_fhrp_group_module.rst b/docs/plugins/netbox_fhrp_group_module.rst index b7900ccf..dc8eb37c 100644 --- a/docs/plugins/netbox_fhrp_group_module.rst +++ b/docs/plugins/netbox_fhrp_group_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_fhrp_group module -- Create, update or delete FHRP groups w .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -650,7 +649,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -674,7 +673,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -693,7 +692,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" hosts: localhost connection: local @@ -721,7 +719,6 @@ Examples - .. Facts @@ -774,7 +771,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -851,4 +848,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_front_port_module.rst b/docs/plugins/netbox_front_port_module.rst index b0f50c52..7618287f 100644 --- a/docs/plugins/netbox_front_port_module.rst +++ b/docs/plugins/netbox_front_port_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_front_port module -- Create, update or delete front ports w .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -694,7 +693,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -718,7 +717,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -730,7 +729,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -774,7 +772,6 @@ Examples - .. Facts @@ -827,7 +824,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -904,4 +901,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_front_port_template_module.rst b/docs/plugins/netbox_front_port_template_module.rst index a953e270..83586499 100644 --- a/docs/plugins/netbox_front_port_template_module.rst +++ b/docs/plugins/netbox_front_port_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_front_port_template module -- Create, update or delete fron .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -655,7 +654,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -679,7 +678,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -691,7 +690,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -734,7 +732,6 @@ Examples - .. Facts @@ -787,7 +784,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -864,4 +861,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_interface_module.rst b/docs/plugins/netbox_interface_module.rst index 673714bf..e5972f09 100644 --- a/docs/plugins/netbox_interface_module.rst +++ b/docs/plugins/netbox_interface_module.rst @@ -1,10 +1,9 @@ - .. Document meta :orphan: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -18,7 +17,7 @@ netbox.netbox.netbox_interface .. Collection note .. note:: - This plugin was part of the `netbox.netbox collection `_ (version 3.19.1). + This plugin was part of the `netbox.netbox collection `_ (version 3.20.0). This module has been removed in version 0.1.0 of netbox.netbox. diff --git a/docs/plugins/netbox_inventory_item_module.rst b/docs/plugins/netbox_inventory_item_module.rst index 3fc9ec1f..92939f1b 100644 --- a/docs/plugins/netbox_inventory_item_module.rst +++ b/docs/plugins/netbox_inventory_item_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_inventory_item module -- Creates or removes inventory items .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -243,7 +242,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -1089,7 +1088,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1113,7 +1112,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1125,7 +1124,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox inventory_item module" connection: local hosts: localhost @@ -1191,7 +1189,6 @@ Examples - .. Facts @@ -1321,4 +1318,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_inventory_item_role_module.rst b/docs/plugins/netbox_inventory_item_role_module.rst index 6c8576e4..d273880f 100644 --- a/docs/plugins/netbox_inventory_item_role_module.rst +++ b/docs/plugins/netbox_inventory_item_role_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_inventory_item_role module -- Create, update or delete devi .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -589,7 +588,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -613,7 +612,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -625,7 +624,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -651,7 +649,6 @@ Examples - .. Facts @@ -704,7 +701,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -781,4 +778,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_ip_address_module.rst b/docs/plugins/netbox_ip_address_module.rst index 3531d8d9..e0a871a5 100644 --- a/docs/plugins/netbox_ip_address_module.rst +++ b/docs/plugins/netbox_ip_address_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_ip_address module -- Creates or removes IP addresses from N .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -192,7 +191,7 @@ Parameters
- Required if state is \ :literal:`present`\ + Required if state is :literal:`present` .. raw:: html @@ -240,7 +239,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -627,8 +626,7 @@ Parameters
The name and device of the interface that the IP address should be assigned to - Required if state is \ :literal:`present`\ and a prefix specified. - + Required if state is :literal:`present` and a prefix specified. .. raw:: html @@ -712,16 +710,15 @@ Parameters
- With state \ :literal:`present`\ , if an interface is given, it will ensure - that an IP inside this prefix (and vrf, if given) is attached - to this interface. Otherwise, it will get the next available IP - of this prefix and attach it. - With state \ :literal:`new`\ , it will force to get the next available IP in - this prefix. If an interface is given, it will also force to attach - it. - Required if state is \ :literal:`present`\ or \ :literal:`new`\ when no address is given. - Unused if an address is specified. - + With state :literal:`present`\ , if an interface is given, it will ensure + that an IP inside this prefix (and vrf, if given) is attached + to this interface. Otherwise, it will get the next available IP + of this prefix and attach it. + With state :literal:`new`\ , it will force to get the next available IP in + this prefix. If an interface is given, it will also force to attach + it. + Required if state is :literal:`present` or :literal:`new` when no address is given. + Unused if an address is specified. .. raw:: html @@ -1088,11 +1085,10 @@ Parameters
- Use \ :literal:`present`\ , \ :literal:`new`\ or \ :literal:`absent`\ for adding, force adding or removing. - \ :literal:`present`\ will check if the IP is already created, and return it if - true. \ :literal:`new`\ will force to create it anyway (useful for anycasts, for - example). - + Use :literal:`present`\ , :literal:`new` or :literal:`absent` for adding, force adding or removing. + :literal:`present` will check if the IP is already created, and return it if + true. :literal:`new` will force to create it anyway (useful for anycasts, for + example). .. rst-class:: ansible-option-line @@ -1135,7 +1131,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1159,7 +1155,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1171,7 +1167,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox IP address module" connection: local hosts: localhost @@ -1277,7 +1272,6 @@ Examples - .. Facts @@ -1408,4 +1402,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_ipam_role_module.rst b/docs/plugins/netbox_ipam_role_module.rst index 82658f8f..52352124 100644 --- a/docs/plugins/netbox_ipam_role_module.rst +++ b/docs/plugins/netbox_ipam_role_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_ipam_role module -- Creates or removes ipam roles from NetB .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -595,7 +594,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -619,7 +618,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -631,7 +630,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox module" connection: local hosts: localhost @@ -655,7 +653,6 @@ Examples - .. Facts @@ -785,4 +782,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_journal_entry_module.rst b/docs/plugins/netbox_journal_entry_module.rst index a19ce280..44132c94 100644 --- a/docs/plugins/netbox_journal_entry_module.rst +++ b/docs/plugins/netbox_journal_entry_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_journal_entry module -- Creates a journal entry .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -587,8 +586,7 @@ Parameters
- Use \ :literal:`new`\ for adding a journal entry. - + Use :literal:`new` for adding a journal entry. .. rst-class:: ansible-option-line @@ -629,7 +627,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -653,7 +651,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -665,7 +663,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox Module" hosts: localhost connection: local @@ -693,7 +690,6 @@ Examples - .. Facts @@ -823,4 +819,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_l2vpn_module.rst b/docs/plugins/netbox_l2vpn_module.rst index 1e15e118..92a8dd64 100644 --- a/docs/plugins/netbox_l2vpn_module.rst +++ b/docs/plugins/netbox_l2vpn_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_l2vpn module -- Create, update or delete L2VPNs within NetB .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -758,7 +757,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -782,7 +781,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -794,7 +793,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -839,7 +837,6 @@ Examples - .. Facts @@ -892,7 +889,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -969,4 +966,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_l2vpn_termination_module.rst b/docs/plugins/netbox_l2vpn_termination_module.rst index 43636937..02ad585a 100644 --- a/docs/plugins/netbox_l2vpn_termination_module.rst +++ b/docs/plugins/netbox_l2vpn_termination_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_l2vpn_termination module -- Create, update or delete L2VPNs .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -554,7 +553,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -578,7 +577,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -597,7 +596,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" hosts: localhost connection: local @@ -624,7 +622,6 @@ Examples - .. Facts @@ -677,7 +674,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -754,4 +751,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_location_module.rst b/docs/plugins/netbox_location_module.rst index f40ec5e9..0523a162 100644 --- a/docs/plugins/netbox_location_module.rst +++ b/docs/plugins/netbox_location_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_location module -- Create, update or delete locations withi .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -240,6 +239,51 @@ Parameters The description of the location + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_location_module__parameter-data/facility: + + .. rst-class:: ansible-option-title + + **facility** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + :ansible-option-versionadded:`added in netbox.netbox 3.20.0` + + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Data center provider or facility, ex. Equinix NY7 + + .. raw:: html
@@ -363,7 +407,7 @@ Parameters
- Required if \ :emphasis:`state=present`\ and the location does not exist yet + Required if :emphasis:`state=present` and the location does not exist yet .. raw:: html @@ -410,6 +454,51 @@ Parameters This is auto-generated following NetBox rules if not provided + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_location_module__parameter-data/status: + + .. rst-class:: ansible-option-title + + **status** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + :ansible-option-versionadded:`added in netbox.netbox 3.20.0` + + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Status of the location + + .. raw:: html
@@ -682,7 +771,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -706,7 +795,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -718,7 +807,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -734,7 +822,7 @@ Examples site: Test Site state: present - - name: Create location within NetBox with a parent location + - name: Create location within NetBox with a parent location, status and facility netbox.netbox.netbox_location: netbox_url: http://netbox.local netbox_token: thisIsMyToken @@ -742,6 +830,8 @@ Examples name: Child location site: Test Site parent_location: Test location + status: planned + facility: Test Facility state: present - name: Delete location within NetBox @@ -754,7 +844,6 @@ Examples - .. Facts @@ -807,7 +896,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -884,4 +973,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_manufacturer_module.rst b/docs/plugins/netbox_manufacturer_module.rst index b13e9e41..8a3121f2 100644 --- a/docs/plugins/netbox_manufacturer_module.rst +++ b/docs/plugins/netbox_manufacturer_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_manufacturer module -- Create or delete manufacturers withi .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -553,7 +552,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -577,7 +576,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -589,7 +588,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -614,7 +612,6 @@ Examples - .. Facts @@ -667,7 +664,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -744,4 +741,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_module_bay_module.rst b/docs/plugins/netbox_module_bay_module.rst index b9ed205e..74ffb118 100644 --- a/docs/plugins/netbox_module_bay_module.rst +++ b/docs/plugins/netbox_module_bay_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_module_bay module -- Create, update or delete module bay wi .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -629,7 +628,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -653,7 +652,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -665,7 +664,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -692,7 +690,6 @@ Examples - .. Facts @@ -745,7 +742,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -822,4 +819,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_module_module.rst b/docs/plugins/netbox_module_module.rst index 5cd29e3b..9b221dbe 100644 --- a/docs/plugins/netbox_module_module.rst +++ b/docs/plugins/netbox_module_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_module module -- Create, update or delete module within Net .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -768,7 +767,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -792,7 +791,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -804,7 +803,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -851,7 +849,6 @@ Examples - .. Facts @@ -904,7 +901,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -981,4 +978,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_module_type_module.rst b/docs/plugins/netbox_module_type_module.rst index 987fd023..25f733f7 100644 --- a/docs/plugins/netbox_module_type_module.rst +++ b/docs/plugins/netbox_module_type_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_module_type module -- Create, update or delete module types .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -684,7 +683,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -708,7 +707,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -720,7 +719,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -756,7 +754,6 @@ Examples - .. Facts @@ -809,7 +806,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -886,4 +883,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_permission_module.rst b/docs/plugins/netbox_permission_module.rst new file mode 100644 index 00000000..730b00bc --- /dev/null +++ b/docs/plugins/netbox_permission_module.rst @@ -0,0 +1,829 @@ +.. Document meta + +:orphan: + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. meta:: + :antsibull-docs: 2.13.1 + +.. Anchors + +.. _ansible_collections.netbox.netbox.netbox_permission_module: + +.. Anchors: short name for ansible.builtin + +.. Title + +netbox.netbox.netbox_permission module -- Creates or removes permissions from NetBox +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This module is part of the `netbox.netbox collection `_ (version 3.20.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 netbox.netbox`. + You need further requirements to be able to use this module, + see :ref:`Requirements ` for details. + + To use it in a playbook, specify: :code:`netbox.netbox.netbox_permission`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in netbox.netbox 3.20.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Creates or removes permissions from NetBox + + +.. Aliases + + +.. Requirements + +.. _ansible_collections.netbox.netbox.netbox_permission_module_requirements: + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- pynetbox + + + + + + +.. Options + +Parameters +---------- + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-cert: + + .. rst-class:: ansible-option-title + + **cert** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Certificate path + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-data: + + .. rst-class:: ansible-option-title + + **data** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Defines the permission configuration + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-data/actions: + + .. rst-class:: ansible-option-title + + **actions** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=any` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The actions of the permission to be created + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-data/constraints: + + .. rst-class:: ansible-option-title + + **constraints** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The constraints of the permission to be created + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-data/description: + + .. rst-class:: ansible-option-title + + **description** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Description of the permission to be created + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-data/enabled: + + .. rst-class:: ansible-option-title + + **enabled** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`boolean` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Whether or not the permission to be created should be enabled + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`false` + - :ansible-option-choices-entry:`true` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-data/name: + + .. rst-class:: ansible-option-title + + **name** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Name of the permission to be created + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-data/object_types: + + .. rst-class:: ansible-option-title + + **object_types** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=any` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The object types of the permission to be created + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-netbox_token: + + .. rst-class:: ansible-option-title + + **netbox_token** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The NetBox API token. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-netbox_url: + + .. rst-class:: ansible-option-title + + **netbox_url** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The URL of the NetBox instance. + + Must be accessible by the Ansible control host. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-query_params: + + .. rst-class:: ansible-option-title + + **query_params** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + This can be used to override the specified values in ALLOWED\_QUERY\_PARAMS that are defined + + in plugins/module\_utils/netbox\_utils.py and provides control to users on what may make + + an object unique in their environment. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-state: + + .. rst-class:: ansible-option-title + + **state** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The state of the object. + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry-default:`"present"` :ansible-option-choices-default-mark:`← (default)` + - :ansible-option-choices-entry:`"absent"` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_permission_module__parameter-validate_certs: + + .. rst-class:: ansible-option-title + + **validate_certs** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + If :literal:`no`\ , SSL certificates will not be validated. + + This should only be used on personally controlled sites using a self-signed certificates. + + + .. rst-class:: ansible-option-line + + :ansible-option-default-bold:`Default:` :ansible-option-default:`true` + + .. raw:: html + +
+ + +.. Attributes + + +.. Notes + +Notes +----- + +.. note:: + - Tags should be defined as a YAML list + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + - name: "Test NetBox module" + connection: local + hosts: localhost + gather_facts: false + tasks: + - name: Create permission within NetBox with only required information + netbox.netbox.netbox_permission: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Permission + actions: + - view + object_types: [] + state: present + + - name: Create user which has the permission + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + password: MyPassword + permissions: + - My Permission + state: present + + - name: Create a group which has the permission + netbox.netbox.netbox_user_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Group + permissions: + - My Permission + state: absent + + - name: Delete permission within netbox + netbox.netbox.netbox_permission: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Permission + state: absent + + - name: Create permission with all parameters + netbox.netbox.netbox_permission: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My permission + description: The permission I made + enabled: false + actions: + - view + - add + - change + - delete + - extreme_administration + object_types: + - vpn.tunneltermination + - wireless.wirelesslan + constraints: + id: 1 + state: present + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_permission_module__return-msg: + + .. rst-class:: ansible-option-title + + **msg** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Message indicating failure or info about what has been achieved + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` always + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_permission_module__return-permissions: + + .. rst-class:: ansible-option-title + + **permissions** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Serialized object as created or already existent within NetBox + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` on creation + + + .. raw:: html + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Daniel Chiquito (@dchiquito) + + + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. ansible-links:: + + - title: "Issue Tracker" + url: "https://github.com/netbox-community/ansible_modules/issues" + external: true + - title: "Repository (Sources)" + url: "https://github.com/netbox-community/ansible_modules" + external: true + + +.. Parsing errors diff --git a/docs/plugins/netbox_platform_module.rst b/docs/plugins/netbox_platform_module.rst index d1871e29..3945080f 100644 --- a/docs/plugins/netbox_platform_module.rst +++ b/docs/plugins/netbox_platform_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_platform module -- Create or delete platforms within NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -724,7 +723,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -748,7 +747,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -760,7 +759,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -806,7 +804,6 @@ Examples - .. Facts @@ -899,7 +896,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -936,4 +933,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_power_feed_module.rst b/docs/plugins/netbox_power_feed_module.rst index 69792d7c..9b9dea84 100644 --- a/docs/plugins/netbox_power_feed_module.rst +++ b/docs/plugins/netbox_power_feed_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_power_feed module -- Create, update or delete power feeds w .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -960,7 +959,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -984,7 +983,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -996,7 +995,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -1040,7 +1038,6 @@ Examples - .. Facts @@ -1133,7 +1130,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -1170,4 +1167,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_power_outlet_module.rst b/docs/plugins/netbox_power_outlet_module.rst index 20ff3bdb..c5e83d1a 100644 --- a/docs/plugins/netbox_power_outlet_module.rst +++ b/docs/plugins/netbox_power_outlet_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_power_outlet module -- Create, update or delete power outle .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -744,7 +743,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -768,7 +767,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -780,7 +779,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -820,7 +818,6 @@ Examples - .. Facts @@ -913,7 +910,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -950,4 +947,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_power_outlet_template_module.rst b/docs/plugins/netbox_power_outlet_template_module.rst index 7a37688a..77fe75aa 100644 --- a/docs/plugins/netbox_power_outlet_template_module.rst +++ b/docs/plugins/netbox_power_outlet_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_power_outlet_template module -- Create, update or delete po .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -615,7 +614,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -639,7 +638,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -651,7 +650,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -690,7 +688,6 @@ Examples - .. Facts @@ -783,7 +780,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -820,4 +817,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_power_panel_module.rst b/docs/plugins/netbox_power_panel_module.rst index b5aae596..288dfd0b 100644 --- a/docs/plugins/netbox_power_panel_module.rst +++ b/docs/plugins/netbox_power_panel_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_power_panel module -- Create, update or delete power panels .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -688,7 +687,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -712,7 +711,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -724,7 +723,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -771,7 +769,6 @@ Examples - .. Facts @@ -864,7 +861,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -901,4 +898,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_power_port_module.rst b/docs/plugins/netbox_power_port_module.rst index a6d4fd88..b4016aba 100644 --- a/docs/plugins/netbox_power_port_module.rst +++ b/docs/plugins/netbox_power_port_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_power_port module -- Create, update or delete power ports w .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -780,7 +779,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -804,7 +803,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -816,7 +815,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -856,7 +854,6 @@ Examples - .. Facts @@ -949,7 +946,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -986,4 +983,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_power_port_template_module.rst b/docs/plugins/netbox_power_port_template_module.rst index 81d469ba..c1f6f007 100644 --- a/docs/plugins/netbox_power_port_template_module.rst +++ b/docs/plugins/netbox_power_port_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_power_port_template module -- Create, update or delete powe .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -236,7 +235,7 @@ Parameters The device type the power port is attached to - Either \ :emphasis:`device\_type`\ or \ :emphasis:`module\_type`\ are required + Either :emphasis:`device\_type` or :emphasis:`module\_type` are required .. raw:: html @@ -325,7 +324,7 @@ Parameters The module type the power port is attached to - Either \ :emphasis:`device\_type`\ or \ :emphasis:`module\_type`\ are required + Either :emphasis:`device\_type` or :emphasis:`module\_type` are required .. raw:: html @@ -700,7 +699,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -724,7 +723,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -736,7 +735,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -786,7 +784,6 @@ Examples - .. Facts @@ -879,7 +876,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -916,4 +913,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_prefix_module.rst b/docs/plugins/netbox_prefix_module.rst index d300754a..c2895ed1 100644 --- a/docs/plugins/netbox_prefix_module.rst +++ b/docs/plugins/netbox_prefix_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_prefix module -- Creates or removes prefixes from NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -466,7 +465,7 @@ Parameters
- Required if state is \ :literal:`present`\ and first\_available is \ :literal:`yes`\ . Will get a new available prefix in this parent prefix. + Required if state is :literal:`present` and first\_available is :literal:`yes`. Will get a new available prefix in this parent prefix. .. raw:: html @@ -508,7 +507,7 @@ Parameters
- Required if state is \ :literal:`present`\ and first\_available is False. Will allocate or free this prefix. + Required if state is :literal:`present` and first\_available is False. Will allocate or free this prefix. .. raw:: html @@ -550,9 +549,8 @@ Parameters
- Required ONLY if state is \ :literal:`present`\ and first\_available is \ :literal:`yes`\ . - Will get a new available prefix of the given prefix\_length in this parent prefix. - + Required ONLY if state is :literal:`present` and first\_available is :literal:`yes`. + Will get a new available prefix of the given prefix\_length in this parent prefix. .. raw:: html @@ -881,7 +879,7 @@ Parameters
- If \ :literal:`yes`\ and state \ :literal:`present`\ , if an parent is given, it will get the first available prefix of the given prefix\_length inside the given parent (and vrf, if given). Unused with state \ :literal:`absent`\ . + If :literal:`yes` and state :literal:`present`\ , if an parent is given, it will get the first available prefix of the given prefix\_length inside the given parent (and vrf, if given). Unused with state :literal:`absent`. .. rst-class:: ansible-option-line @@ -1073,7 +1071,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1097,7 +1095,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1109,7 +1107,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox prefix module" connection: local hosts: localhost @@ -1197,7 +1194,6 @@ Examples - .. Facts @@ -1328,4 +1324,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_provider_module.rst b/docs/plugins/netbox_provider_module.rst index cd8ca3de..f29fcbaa 100644 --- a/docs/plugins/netbox_provider_module.rst +++ b/docs/plugins/netbox_provider_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_provider module -- Create, update or delete providers withi .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -758,7 +757,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -782,7 +781,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -794,7 +793,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -833,7 +831,6 @@ Examples - .. Facts @@ -926,7 +923,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -963,4 +960,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_provider_network_module.rst b/docs/plugins/netbox_provider_network_module.rst index 836c2a9c..dbbbb3f3 100644 --- a/docs/plugins/netbox_provider_network_module.rst +++ b/docs/plugins/netbox_provider_network_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_provider_network module -- Create, update or delete provide .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -632,7 +631,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -656,7 +655,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -668,7 +667,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -706,7 +704,6 @@ Examples - .. Facts @@ -799,7 +796,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -836,4 +833,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_rack_group_module.rst b/docs/plugins/netbox_rack_group_module.rst index 03776b7c..b69056fc 100644 --- a/docs/plugins/netbox_rack_group_module.rst +++ b/docs/plugins/netbox_rack_group_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_rack_group module -- Create, update or delete racks groups .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -234,7 +233,7 @@ Parameters
- Required if \ :emphasis:`state=present`\ and the rack does not exist yet + Required if :emphasis:`state=present` and the rack does not exist yet .. raw:: html @@ -463,7 +462,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -487,7 +486,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -499,7 +498,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -526,7 +524,6 @@ Examples - .. Facts @@ -619,7 +616,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -656,4 +653,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_rack_module.rst b/docs/plugins/netbox_rack_module.rst index 929273ff..74b1e071 100644 --- a/docs/plugins/netbox_rack_module.rst +++ b/docs/plugins/netbox_rack_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_rack module -- Create, update or delete racks within NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -674,7 +673,7 @@ Parameters
- Whether the rack unit is in Millimeters or Inches and is \ :emphasis:`required`\ if outer\_width/outer\_depth is specified + Whether the rack unit is in Millimeters or Inches and is :emphasis:`required` if outer\_width/outer\_depth is specified .. rst-class:: ansible-option-line @@ -894,7 +893,7 @@ Parameters
- Required if \ :emphasis:`state=present`\ and the rack does not exist yet + Required if :emphasis:`state=present` and the rack does not exist yet .. raw:: html @@ -1452,7 +1451,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1476,7 +1475,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1488,7 +1487,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -1534,7 +1532,6 @@ Examples - .. Facts @@ -1627,7 +1624,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -1664,4 +1661,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_rack_role_module.rst b/docs/plugins/netbox_rack_role_module.rst index 17a4cfb9..556bcb8f 100644 --- a/docs/plugins/netbox_rack_role_module.rst +++ b/docs/plugins/netbox_rack_role_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_rack_role module -- Create, update or delete racks roles wi .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -598,7 +597,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -622,7 +621,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -634,7 +633,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -670,7 +668,6 @@ Examples - .. Facts @@ -763,7 +760,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -800,4 +797,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_rear_port_module.rst b/docs/plugins/netbox_rear_port_module.rst index b894fc22..bbf186f0 100644 --- a/docs/plugins/netbox_rear_port_module.rst +++ b/docs/plugins/netbox_rear_port_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_rear_port module -- Create, update or delete rear ports wit .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -652,7 +651,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -676,7 +675,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -688,7 +687,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -729,7 +727,6 @@ Examples - .. Facts @@ -822,7 +819,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -859,4 +856,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_rear_port_template_module.rst b/docs/plugins/netbox_rear_port_template_module.rst index b73c13eb..17c9aee6 100644 --- a/docs/plugins/netbox_rear_port_template_module.rst +++ b/docs/plugins/netbox_rear_port_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_rear_port_template module -- Create, update or delete rear .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -613,7 +612,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -637,7 +636,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -649,7 +648,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -689,7 +687,6 @@ Examples - .. Facts @@ -782,7 +779,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -819,4 +816,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_region_module.rst b/docs/plugins/netbox_region_module.rst index 58ac03c2..e736df1f 100644 --- a/docs/plugins/netbox_region_module.rst +++ b/docs/plugins/netbox_region_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_region module -- Creates or removes regions from NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -598,7 +597,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -622,7 +621,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -634,7 +633,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox region module" connection: local hosts: localhost @@ -658,7 +656,6 @@ Examples - .. Facts @@ -788,4 +785,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_rir_module.rst b/docs/plugins/netbox_rir_module.rst index 8e7616f8..b35be36a 100644 --- a/docs/plugins/netbox_rir_module.rst +++ b/docs/plugins/netbox_rir_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_rir module -- Create, update or delete RIRs within NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -603,7 +602,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -627,7 +626,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -639,7 +638,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -673,7 +671,6 @@ Examples - .. Facts @@ -766,7 +763,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -803,4 +800,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_route_target_module.rst b/docs/plugins/netbox_route_target_module.rst index 8c37378e..8e3a7688 100644 --- a/docs/plugins/netbox_route_target_module.rst +++ b/docs/plugins/netbox_route_target_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_route_target module -- Creates or removes route targets fro .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -590,7 +589,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -614,7 +613,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -626,7 +625,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test route target creation/deletion" connection: local hosts: localhost @@ -672,7 +670,6 @@ Examples - .. Facts @@ -802,4 +799,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_service_module.rst b/docs/plugins/netbox_service_module.rst index 8c74bdbc..3f124015 100644 --- a/docs/plugins/netbox_service_module.rst +++ b/docs/plugins/netbox_service_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_service module -- Creates or removes service from NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -800,7 +799,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -823,7 +822,7 @@ Notes ----- .. note:: - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -835,7 +834,6 @@ Examples .. code-block:: yaml+jinja - - name: "Create netbox service" connection: local hosts: localhost @@ -870,7 +868,6 @@ Examples - .. Facts @@ -905,4 +902,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_service_template_module.rst b/docs/plugins/netbox_service_template_module.rst index 5880545e..2eae360b 100644 --- a/docs/plugins/netbox_service_template_module.rst +++ b/docs/plugins/netbox_service_template_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_service_template module -- Create, update or delete service .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -638,7 +637,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -662,7 +661,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -674,7 +673,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -714,7 +712,6 @@ Examples - .. Facts @@ -807,7 +804,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -844,4 +841,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_site_group_module.rst b/docs/plugins/netbox_site_group_module.rst index 7975300f..98f5a5f6 100644 --- a/docs/plugins/netbox_site_group_module.rst +++ b/docs/plugins/netbox_site_group_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_site_group module -- Create, update, or delete site groups .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -595,7 +594,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -619,7 +618,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -631,7 +630,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox site group module" connection: local hosts: localhost @@ -664,7 +662,6 @@ Examples - .. Facts @@ -757,7 +754,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -794,4 +791,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_site_module.rst b/docs/plugins/netbox_site_module.rst index 5d97e3d2..e6bcb584 100644 --- a/docs/plugins/netbox_site_module.rst +++ b/docs/plugins/netbox_site_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_site module -- Creates or removes sites from NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -1178,7 +1177,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1202,7 +1201,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1214,7 +1213,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox site module" connection: local hosts: localhost @@ -1263,7 +1261,6 @@ Examples - .. Facts @@ -1393,4 +1390,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_tag_module.rst b/docs/plugins/netbox_tag_module.rst index b283e1d2..9075a4bb 100644 --- a/docs/plugins/netbox_tag_module.rst +++ b/docs/plugins/netbox_tag_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_tag module -- Creates or removes tags from NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -505,7 +504,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -529,7 +528,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -541,7 +540,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test tags creation/deletion" connection: local hosts: localhost @@ -571,7 +569,6 @@ Examples - .. Facts @@ -701,4 +698,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_tenant_group_module.rst b/docs/plugins/netbox_tenant_group_module.rst index bc29df22..05fb91d9 100644 --- a/docs/plugins/netbox_tenant_group_module.rst +++ b/docs/plugins/netbox_tenant_group_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_tenant_group module -- Creates or removes tenant groups fro .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -593,7 +592,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -617,7 +616,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -629,7 +628,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox tenant group module" connection: local hosts: localhost @@ -654,7 +652,6 @@ Examples - .. Facts @@ -784,4 +781,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_tenant_module.rst b/docs/plugins/netbox_tenant_module.rst index 4f7dbdb5..78530942 100644 --- a/docs/plugins/netbox_tenant_module.rst +++ b/docs/plugins/netbox_tenant_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_tenant module -- Creates or removes tenants from NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -629,7 +628,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -653,7 +652,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -665,7 +664,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox module" connection: local hosts: localhost @@ -705,7 +703,6 @@ Examples - .. Facts @@ -835,4 +832,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_token_module.rst b/docs/plugins/netbox_token_module.rst new file mode 100644 index 00000000..3158d0d6 --- /dev/null +++ b/docs/plugins/netbox_token_module.rst @@ -0,0 +1,764 @@ +.. Document meta + +:orphan: + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. meta:: + :antsibull-docs: 2.13.1 + +.. Anchors + +.. _ansible_collections.netbox.netbox.netbox_token_module: + +.. Anchors: short name for ansible.builtin + +.. Title + +netbox.netbox.netbox_token module -- Creates or removes tokens from NetBox +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This module is part of the `netbox.netbox collection `_ (version 3.20.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 netbox.netbox`. + You need further requirements to be able to use this module, + see :ref:`Requirements ` for details. + + To use it in a playbook, specify: :code:`netbox.netbox.netbox_token`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in netbox.netbox 3.20.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Creates or removes tokens from NetBox + + +.. Aliases + + +.. Requirements + +.. _ansible_collections.netbox.netbox.netbox_token_module_requirements: + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- pynetbox + + + + + + +.. Options + +Parameters +---------- + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-cert: + + .. rst-class:: ansible-option-title + + **cert** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Certificate path + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-data: + + .. rst-class:: ansible-option-title + + **data** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Defines the token configuration + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-data/description: + + .. rst-class:: ansible-option-title + + **description** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The description of the token to be created + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-data/expires: + + .. rst-class:: ansible-option-title + + **expires** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + When the token to be created should expire + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-data/key: + + .. rst-class:: ansible-option-title + + **key** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Key of the token to be created. Must be exactly 40 characters + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-data/user: + + .. rst-class:: ansible-option-title + + **user** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + User the token to be created belongs to + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-data/write_enabled: + + .. rst-class:: ansible-option-title + + **write_enabled** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`boolean` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Whether or not the token to be created should allow write operations + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`false` + - :ansible-option-choices-entry:`true` + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-netbox_token: + + .. rst-class:: ansible-option-title + + **netbox_token** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The NetBox API token. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-netbox_url: + + .. rst-class:: ansible-option-title + + **netbox_url** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The URL of the NetBox instance. + + Must be accessible by the Ansible control host. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-query_params: + + .. rst-class:: ansible-option-title + + **query_params** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + This can be used to override the specified values in ALLOWED\_QUERY\_PARAMS that are defined + + in plugins/module\_utils/netbox\_utils.py and provides control to users on what may make + + an object unique in their environment. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-state: + + .. rst-class:: ansible-option-title + + **state** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The state of the object. + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry-default:`"present"` :ansible-option-choices-default-mark:`← (default)` + - :ansible-option-choices-entry:`"absent"` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_token_module__parameter-validate_certs: + + .. rst-class:: ansible-option-title + + **validate_certs** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + If :literal:`no`\ , SSL certificates will not be validated. + + This should only be used on personally controlled sites using a self-signed certificates. + + + .. rst-class:: ansible-option-line + + :ansible-option-default-bold:`Default:` :ansible-option-default:`true` + + .. raw:: html + +
+ + +.. Attributes + + +.. Notes + +Notes +----- + +.. note:: + - Tags should be defined as a YAML list + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + - name: "Test NetBox module" + connection: local + hosts: localhost + gather_facts: false + tasks: + - name: Create user to own the token + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + password: MyPassword + state: present + + - name: Create token within NetBox with only required information + netbox.netbox.netbox_token: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + user: TestUser + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: present + + - name: Delete token within netbox + netbox.netbox.netbox_token: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: absent + + - name: Create token with all parameters + netbox.netbox.netbox_token: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + user: TestUser + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + description: The test token + write_enabled: false + expires: 2024-08-26T14:49:01.345000+00:00 + state: present + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_token_module__return-msg: + + .. rst-class:: ansible-option-title + + **msg** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Message indicating failure or info about what has been achieved + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` always + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_token_module__return-token: + + .. rst-class:: ansible-option-title + + **token** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Serialized object as created or already existent within NetBox + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` on creation + + + .. raw:: html + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Daniel Chiquito (@dchiquito) + + + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. ansible-links:: + + - title: "Issue Tracker" + url: "https://github.com/netbox-community/ansible_modules/issues" + external: true + - title: "Repository (Sources)" + url: "https://github.com/netbox-community/ansible_modules" + external: true + + +.. Parsing errors diff --git a/docs/plugins/netbox_tunnel_group_module.rst b/docs/plugins/netbox_tunnel_group_module.rst new file mode 100644 index 00000000..538742a2 --- /dev/null +++ b/docs/plugins/netbox_tunnel_group_module.rst @@ -0,0 +1,737 @@ +.. Document meta + +:orphan: + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. meta:: + :antsibull-docs: 2.13.1 + +.. Anchors + +.. _ansible_collections.netbox.netbox.netbox_tunnel_group_module: + +.. Anchors: short name for ansible.builtin + +.. Title + +netbox.netbox.netbox_tunnel_group module -- Create, update or delete tunnel groups within NetBox +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This module is part of the `netbox.netbox collection `_ (version 3.20.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 netbox.netbox`. + You need further requirements to be able to use this module, + see :ref:`Requirements ` for details. + + To use it in a playbook, specify: :code:`netbox.netbox.netbox_tunnel_group`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in netbox.netbox 3.20.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Creates, updates or deletes tunnel groups within NetBox + + +.. Aliases + + +.. Requirements + +.. _ansible_collections.netbox.netbox.netbox_tunnel_group_module_requirements: + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- pynetbox + + + + + + +.. Options + +Parameters +---------- + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-cert: + + .. rst-class:: ansible-option-title + + **cert** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Certificate path + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-data: + + .. rst-class:: ansible-option-title + + **data** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Defines the tunnel group configuration + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-data/custom_fields: + + .. rst-class:: ansible-option-title + + **custom_fields** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Must exist in NetBox + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-data/description: + + .. rst-class:: ansible-option-title + + **description** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The description of the tunnel group + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-data/name: + + .. rst-class:: ansible-option-title + + **name** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The name of the tunnel group + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-data/slug: + + .. rst-class:: ansible-option-title + + **slug** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The slugified version of the name or custom slug. + + This is auto-generated following NetBox rules if not provided + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-data/tags: + + .. rst-class:: ansible-option-title + + **tags** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=any` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The tags to add/update + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-netbox_token: + + .. rst-class:: ansible-option-title + + **netbox_token** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The NetBox API token. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-netbox_url: + + .. rst-class:: ansible-option-title + + **netbox_url** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The URL of the NetBox instance. + + Must be accessible by the Ansible control host. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-query_params: + + .. rst-class:: ansible-option-title + + **query_params** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + This can be used to override the specified values in ALLOWED\_QUERY\_PARAMS that are defined + + in plugins/module\_utils/netbox\_utils.py and provides control to users on what may make + + an object unique in their environment. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-state: + + .. rst-class:: ansible-option-title + + **state** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The state of the object. + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry-default:`"present"` :ansible-option-choices-default-mark:`← (default)` + - :ansible-option-choices-entry:`"absent"` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__parameter-validate_certs: + + .. rst-class:: ansible-option-title + + **validate_certs** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + If :literal:`no`\ , SSL certificates will not be validated. + + This should only be used on personally controlled sites using a self-signed certificates. + + + .. rst-class:: ansible-option-line + + :ansible-option-default-bold:`Default:` :ansible-option-default:`true` + + .. raw:: html + +
+ + +.. Attributes + + +.. Notes + +Notes +----- + +.. note:: + - Tags should be defined as a YAML list + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + - name: "Test NetBox Tunnel Group module" + connection: local + hosts: localhost + gather_facts: false + + tasks: + - name: Create tunnel group within NetBox with only required information + netbox.netbox.netbox_tunnel_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Tunnel Group + state: present + + - name: Delete tunnel group within netbox + netbox.netbox.netbox_tunnel_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Tunnel Group + state: absent + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__return-msg: + + .. rst-class:: ansible-option-title + + **msg** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Message indicating failure or info about what has been achieved + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` always + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_group_module__return-tunnel_group: + + .. rst-class:: ansible-option-title + + **tunnel_group** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Serialized object as created or already existent within NetBox + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) + + + .. raw:: html + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Rich Bibby, NetBox Labs (@richbibby) + + + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. ansible-links:: + + - title: "Issue Tracker" + url: "https://github.com/netbox-community/ansible_modules/issues" + external: true + - title: "Repository (Sources)" + url: "https://github.com/netbox-community/ansible_modules" + external: true + + +.. Parsing errors diff --git a/docs/plugins/netbox_tunnel_module.rst b/docs/plugins/netbox_tunnel_module.rst new file mode 100644 index 00000000..f2af8bbc --- /dev/null +++ b/docs/plugins/netbox_tunnel_module.rst @@ -0,0 +1,1016 @@ +.. Document meta + +:orphan: + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. meta:: + :antsibull-docs: 2.13.1 + +.. Anchors + +.. _ansible_collections.netbox.netbox.netbox_tunnel_module: + +.. Anchors: short name for ansible.builtin + +.. Title + +netbox.netbox.netbox_tunnel module -- Create, update or delete tunnels within NetBox +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This module is part of the `netbox.netbox collection `_ (version 3.20.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 netbox.netbox`. + You need further requirements to be able to use this module, + see :ref:`Requirements ` for details. + + To use it in a playbook, specify: :code:`netbox.netbox.netbox_tunnel`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in netbox.netbox 3.20.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Creates, updates or removes tunnels from NetBox + + +.. Aliases + + +.. Requirements + +.. _ansible_collections.netbox.netbox.netbox_tunnel_module_requirements: + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- pynetbox + + + + + + +.. Options + +Parameters +---------- + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-cert: + + .. rst-class:: ansible-option-title + + **cert** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Certificate path + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data: + + .. rst-class:: ansible-option-title + + **data** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Defines the tunnel configuration + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/comments: + + .. rst-class:: ansible-option-title + + **comments** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Comments that may include additional information in regards to the tunnel + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/custom_fields: + + .. rst-class:: ansible-option-title + + **custom_fields** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Must exist in NetBox + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/description: + + .. rst-class:: ansible-option-title + + **description** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The description of the tunnel + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/encapsulation: + + .. rst-class:: ansible-option-title + + **encapsulation** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The encapsulation protocol or technique employed to effect the tunnel + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`"ipsec-transport"` + - :ansible-option-choices-entry:`"ipsec-tunnel"` + - :ansible-option-choices-entry:`"ip-ip"` + - :ansible-option-choices-entry:`"gre"` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/ipsec_profile: + + .. rst-class:: ansible-option-title + + **ipsec_profile** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The IPSec Profile employed to negotiate security associations + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/name: + + .. rst-class:: ansible-option-title + + **name** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The name of the tunnel + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/status: + + .. rst-class:: ansible-option-title + + **status** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Status of the tunnel + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/tags: + + .. rst-class:: ansible-option-title + + **tags** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=any` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Any tags that the tunnel may need to be associated with + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/tenant: + + .. rst-class:: ansible-option-title + + **tenant** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The tenant that the tunnel will be associated with + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/tunnel_group: + + .. rst-class:: ansible-option-title + + **tunnel_group** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The Tunnel group the VLAN will be associated with. Must exist in NetBox + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-data/tunnel_id: + + .. rst-class:: ansible-option-title + + **tunnel_id** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`integer` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The ID of the tunnel + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-netbox_token: + + .. rst-class:: ansible-option-title + + **netbox_token** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The NetBox API token. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-netbox_url: + + .. rst-class:: ansible-option-title + + **netbox_url** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The URL of the NetBox instance. + + Must be accessible by the Ansible control host. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-query_params: + + .. rst-class:: ansible-option-title + + **query_params** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + This can be used to override the specified values in ALLOWED\_QUERY\_PARAMS that are defined + + in plugins/module\_utils/netbox\_utils.py and provides control to users on what may make + + an object unique in their environment. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-state: + + .. rst-class:: ansible-option-title + + **state** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The state of the object. + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry-default:`"present"` :ansible-option-choices-default-mark:`← (default)` + - :ansible-option-choices-entry:`"absent"` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__parameter-validate_certs: + + .. rst-class:: ansible-option-title + + **validate_certs** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + If :literal:`no`\ , SSL certificates will not be validated. + + This should only be used on personally controlled sites using a self-signed certificates. + + + .. rst-class:: ansible-option-line + + :ansible-option-default-bold:`Default:` :ansible-option-default:`true` + + .. raw:: html + +
+ + +.. Attributes + + +.. Notes + +Notes +----- + +.. note:: + - Tags should be defined as a YAML list + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + - name: "Test NetBox modules" + connection: local + hosts: localhost + gather_facts: false + + tasks: + - name: Create tunnel within NetBox with only required information + netbox.netbox.netbox_tunnel: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Tunnel + encapsulation: ipsec-tunnel + state: present + + - name: Delete tunnel within NetBox + netbox.netbox.netbox_tunnel: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Tunnel + encapsulation: ipsec-tunnel + state: absent + + - name: Create tunnel with all information + netbox.netbox.netbox_tunnel: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Tunnel + status: planned + tunnel_group: Test Tunnel Group + encapsulation: ipsec-tunnel + ipsec_profile: ipsec-profile + description: Test Description + tenant: Test Tenant + tunnel_id: 200 + tags: + - Schnozzberry + state: present + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__return-msg: + + .. rst-class:: ansible-option-title + + **msg** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Message indicating failure or info about what has been achieved + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` always + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_tunnel_module__return-tunnel: + + .. rst-class:: ansible-option-title + + **tunnel** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Serialized object as created or already existent within NetBox + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) + + + .. raw:: html + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Rich Bibby, NetBox Labs (@richbibby) + + + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. ansible-links:: + + - title: "Issue Tracker" + url: "https://github.com/netbox-community/ansible_modules/issues" + external: true + - title: "Repository (Sources)" + url: "https://github.com/netbox-community/ansible_modules" + external: true + + +.. Parsing errors diff --git a/docs/plugins/netbox_user_group_module.rst b/docs/plugins/netbox_user_group_module.rst new file mode 100644 index 00000000..af830468 --- /dev/null +++ b/docs/plugins/netbox_user_group_module.rst @@ -0,0 +1,670 @@ +.. Document meta + +:orphan: + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. meta:: + :antsibull-docs: 2.13.1 + +.. Anchors + +.. _ansible_collections.netbox.netbox.netbox_user_group_module: + +.. Anchors: short name for ansible.builtin + +.. Title + +netbox.netbox.netbox_user_group module -- Creates or removes user groups from NetBox +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This module is part of the `netbox.netbox collection `_ (version 3.20.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 netbox.netbox`. + You need further requirements to be able to use this module, + see :ref:`Requirements ` for details. + + To use it in a playbook, specify: :code:`netbox.netbox.netbox_user_group`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in netbox.netbox 3.20.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Creates or removes users from NetBox + + +.. Aliases + + +.. Requirements + +.. _ansible_collections.netbox.netbox.netbox_user_group_module_requirements: + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- pynetbox + + + + + + +.. Options + +Parameters +---------- + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_group_module__parameter-cert: + + .. rst-class:: ansible-option-title + + **cert** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Certificate path + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_group_module__parameter-data: + + .. rst-class:: ansible-option-title + + **data** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Defines the user group configuration + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_group_module__parameter-data/description: + + .. rst-class:: ansible-option-title + + **description** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Description of the user group to be created + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_group_module__parameter-data/name: + + .. rst-class:: ansible-option-title + + **name** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Name of the user group to be created + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_group_module__parameter-data/permissions: + + .. rst-class:: ansible-option-title + + **permissions** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Permissions the user group to be created should have + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_group_module__parameter-netbox_token: + + .. rst-class:: ansible-option-title + + **netbox_token** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The NetBox API token. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_group_module__parameter-netbox_url: + + .. rst-class:: ansible-option-title + + **netbox_url** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The URL of the NetBox instance. + + Must be accessible by the Ansible control host. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_group_module__parameter-query_params: + + .. rst-class:: ansible-option-title + + **query_params** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + This can be used to override the specified values in ALLOWED\_QUERY\_PARAMS that are defined + + in plugins/module\_utils/netbox\_utils.py and provides control to users on what may make + + an object unique in their environment. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_group_module__parameter-state: + + .. rst-class:: ansible-option-title + + **state** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The state of the object. + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry-default:`"present"` :ansible-option-choices-default-mark:`← (default)` + - :ansible-option-choices-entry:`"absent"` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_group_module__parameter-validate_certs: + + .. rst-class:: ansible-option-title + + **validate_certs** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + If :literal:`no`\ , SSL certificates will not be validated. + + This should only be used on personally controlled sites using a self-signed certificates. + + + .. rst-class:: ansible-option-line + + :ansible-option-default-bold:`Default:` :ansible-option-default:`true` + + .. raw:: html + +
+ + +.. Attributes + + +.. Notes + +Notes +----- + +.. note:: + - Tags should be defined as a YAML list + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + - name: "Test NetBox module" + connection: local + hosts: localhost + gather_facts: false + tasks: + - name: Create user group within NetBox with only required information + netbox.netbox.netbox_user_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Group + state: present + + - name: Create user belonging to the group + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + password: MyPassword + groups: + - My Group + state: present + + - name: Delete user group within netbox + netbox.netbox.netbox_user_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Group + state: absent + + - name: Create user group with all parameters + netbox.netbox.netbox_user_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Group + description: The group I made + state: present + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_group_module__return-msg: + + .. rst-class:: ansible-option-title + + **msg** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Message indicating failure or info about what has been achieved + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` always + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_group_module__return-user_group: + + .. rst-class:: ansible-option-title + + **user_group** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Serialized object as created or already existent within NetBox + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` on creation + + + .. raw:: html + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Daniel Chiquito (@dchiquito) + + + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. ansible-links:: + + - title: "Issue Tracker" + url: "https://github.com/netbox-community/ansible_modules/issues" + external: true + - title: "Repository (Sources)" + url: "https://github.com/netbox-community/ansible_modules" + external: true + + +.. Parsing errors diff --git a/docs/plugins/netbox_user_module.rst b/docs/plugins/netbox_user_module.rst new file mode 100644 index 00000000..953850eb --- /dev/null +++ b/docs/plugins/netbox_user_module.rst @@ -0,0 +1,940 @@ +.. Document meta + +:orphan: + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. meta:: + :antsibull-docs: 2.13.1 + +.. Anchors + +.. _ansible_collections.netbox.netbox.netbox_user_module: + +.. Anchors: short name for ansible.builtin + +.. Title + +netbox.netbox.netbox_user module -- Creates or removes users from NetBox +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This module is part of the `netbox.netbox collection `_ (version 3.20.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 netbox.netbox`. + You need further requirements to be able to use this module, + see :ref:`Requirements ` for details. + + To use it in a playbook, specify: :code:`netbox.netbox.netbox_user`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in netbox.netbox 3.20.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Creates or removes users from NetBox + + +.. Aliases + + +.. Requirements + +.. _ansible_collections.netbox.netbox.netbox_user_module_requirements: + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- pynetbox + + + + + + +.. Options + +Parameters +---------- + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-cert: + + .. rst-class:: ansible-option-title + + **cert** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Certificate path + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-data: + + .. rst-class:: ansible-option-title + + **data** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Defines the user configuration + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-data/email: + + .. rst-class:: ansible-option-title + + **email** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Email of the user to be created + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-data/first_name: + + .. rst-class:: ansible-option-title + + **first_name** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + First name of the user to be created + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-data/groups: + + .. rst-class:: ansible-option-title + + **groups** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Groups the user to be created should belong to + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-data/is_active: + + .. rst-class:: ansible-option-title + + **is_active** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`boolean` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Active status of the user to be created + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`false` + - :ansible-option-choices-entry:`true` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-data/is_staff: + + .. rst-class:: ansible-option-title + + **is_staff** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`boolean` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Staff status of the user to be created + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`false` + - :ansible-option-choices-entry:`true` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-data/last_name: + + .. rst-class:: ansible-option-title + + **last_name** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Last name of the user to be created + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-data/password: + + .. rst-class:: ansible-option-title + + **password** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Password of the user to be created. If this is specified, the password field will always be updated. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-data/permissions: + + .. rst-class:: ansible-option-title + + **permissions** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Permissions the user to be created should have + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-data/username: + + .. rst-class:: ansible-option-title + + **username** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Username of the user to be created + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-netbox_token: + + .. rst-class:: ansible-option-title + + **netbox_token** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The NetBox API token. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-netbox_url: + + .. rst-class:: ansible-option-title + + **netbox_url** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The URL of the NetBox instance. + + Must be accessible by the Ansible control host. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-query_params: + + .. rst-class:: ansible-option-title + + **query_params** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + This can be used to override the specified values in ALLOWED\_QUERY\_PARAMS that are defined + + in plugins/module\_utils/netbox\_utils.py and provides control to users on what may make + + an object unique in their environment. + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-state: + + .. rst-class:: ansible-option-title + + **state** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The state of the object. + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry-default:`"present"` :ansible-option-choices-default-mark:`← (default)` + - :ansible-option-choices-entry:`"absent"` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_module__parameter-validate_certs: + + .. rst-class:: ansible-option-title + + **validate_certs** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + If :literal:`no`\ , SSL certificates will not be validated. + + This should only be used on personally controlled sites using a self-signed certificates. + + + .. rst-class:: ansible-option-line + + :ansible-option-default-bold:`Default:` :ansible-option-default:`true` + + .. raw:: html + +
+ + +.. Attributes + + +.. Notes + +Notes +----- + +.. note:: + - Tags should be defined as a YAML list + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + - name: "Test NetBox module" + connection: local + hosts: localhost + gather_facts: false + tasks: + - name: Create user within NetBox with only required information + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + password: MyPassword + state: present + + - name: Update a user's email + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + password: my@user.com + state: present + + - name: Delete user within netbox + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + state: absent + + - name: Create user with all parameters + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser2 + password: MyPassword + email: my@user.com + first_name: My + last_name: User + state: present + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. 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 + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_module__return-msg: + + .. rst-class:: ansible-option-title + + **msg** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Message indicating failure or info about what has been achieved + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` always + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_user_module__return-user: + + .. rst-class:: ansible-option-title + + **user** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Serialized object as created or already existent within NetBox + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` on creation + + + .. raw:: html + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Daniel Chiquito (@dchiquito) + + + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. ansible-links:: + + - title: "Issue Tracker" + url: "https://github.com/netbox-community/ansible_modules/issues" + external: true + - title: "Repository (Sources)" + url: "https://github.com/netbox-community/ansible_modules" + external: true + + +.. Parsing errors diff --git a/docs/plugins/netbox_virtual_chassis_module.rst b/docs/plugins/netbox_virtual_chassis_module.rst index 77b97089..453bd906 100644 --- a/docs/plugins/netbox_virtual_chassis_module.rst +++ b/docs/plugins/netbox_virtual_chassis_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_virtual_chassis module -- Create, update or delete virtual .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -635,7 +634,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -659,7 +658,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -671,7 +670,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -706,7 +704,6 @@ Examples - .. Facts @@ -799,7 +796,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -836,4 +833,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_virtual_disk_module.rst b/docs/plugins/netbox_virtual_disk_module.rst index 325fa866..e4da063b 100644 --- a/docs/plugins/netbox_virtual_disk_module.rst +++ b/docs/plugins/netbox_virtual_disk_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_virtual_disk module -- Creates or removes disks from virtua .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -587,7 +586,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -611,7 +610,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -623,7 +622,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox virtual disk module" connection: local hosts: localhost @@ -639,7 +637,6 @@ Examples - .. Facts @@ -769,4 +766,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_virtual_machine_module.rst b/docs/plugins/netbox_virtual_machine_module.rst index 4ecbc701..c122cc26 100644 --- a/docs/plugins/netbox_virtual_machine_module.rst +++ b/docs/plugins/netbox_virtual_machine_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_virtual_machine module -- Create, update or delete virtual\ .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -708,6 +707,51 @@ Parameters Primary IPv6 address assigned to the virtual machine + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_virtual_machine_module__parameter-data/serial: + + .. rst-class:: ansible-option-title + + **serial** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + :ansible-option-versionadded:`added in netbox.netbox 3.20.0` + + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Serial number of the virtual machine + + .. raw:: html
@@ -1142,7 +1186,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1166,7 +1210,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -1178,7 +1222,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -1225,6 +1268,15 @@ Examples disk: 8 state: present + - name: Update virtual machine within NetBox with serial number + netbox_virtual_machine: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Virtual Machine + cluster: test cluster + serial: 1234abc + state: present @@ -1320,7 +1372,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -1357,4 +1409,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_vlan_group_module.rst b/docs/plugins/netbox_vlan_group_module.rst index 950b8d6d..dfa31804 100644 --- a/docs/plugins/netbox_vlan_group_module.rst +++ b/docs/plugins/netbox_vlan_group_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_vlan_group module -- Create, update or delete vlans groups .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -611,6 +610,51 @@ Parameters The tags to add/update + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_vlan_group_module__parameter-data/vid_ranges: + + .. rst-class:: ansible-option-title + + **vid_ranges** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=any` + + :ansible-option-versionadded:`added in netbox.netbox 3.20.0` + + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Array of starting and ending VLAN ID pairs + + .. raw:: html
@@ -793,7 +837,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -817,7 +861,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -829,7 +873,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -855,6 +898,18 @@ Examples scope: Test Site state: present + - name: Create vlan group within NetBox with vid_ranges + netbox_vlan_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test vlan group + vid_ranges: [ + [1300, 1329], + [1, 2] + ] + state: present + - name: Delete vlan group within netbox netbox_vlan_group: netbox_url: http://netbox.local @@ -865,7 +920,6 @@ Examples - .. Facts @@ -958,7 +1012,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -995,4 +1049,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_vlan_module.rst b/docs/plugins/netbox_vlan_module.rst index e76f2722..64cb9c91 100644 --- a/docs/plugins/netbox_vlan_module.rst +++ b/docs/plugins/netbox_vlan_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_vlan module -- Create, update or delete vlans within NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -615,7 +614,7 @@ Parameters
- Required if \ :emphasis:`state=present`\ and the vlan does not exist yet + Required if :emphasis:`state=present` and the vlan does not exist yet .. raw:: html @@ -800,7 +799,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -824,7 +823,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -836,7 +835,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -880,7 +878,6 @@ Examples - .. Facts @@ -973,7 +970,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -1010,4 +1007,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_vm_interface_module.rst b/docs/plugins/netbox_vm_interface_module.rst index a12c8991..1798edaa 100644 --- a/docs/plugins/netbox_vm_interface_module.rst +++ b/docs/plugins/netbox_vm_interface_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_vm_interface module -- Creates or removes interfaces from v .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -542,7 +541,7 @@ Parameters
- A list of tagged VLANS to be assigned to interface. Mode must be set to either \ :literal:`Tagged`\ or \ :literal:`Tagged All`\ + A list of tagged VLANS to be assigned to interface. Mode must be set to either :literal:`Tagged` or :literal:`Tagged All` .. raw:: html @@ -943,7 +942,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -967,7 +966,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -979,7 +978,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox interface module" connection: local hosts: localhost @@ -1044,7 +1042,6 @@ Examples - .. Facts @@ -1174,4 +1171,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_vrf_module.rst b/docs/plugins/netbox_vrf_module.rst index 0d0fa27c..e500d33c 100644 --- a/docs/plugins/netbox_vrf_module.rst +++ b/docs/plugins/netbox_vrf_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_vrf module -- Create, update or delete vrfs within NetBox .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -772,7 +771,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -796,7 +795,7 @@ Notes .. note:: - Tags should be defined as a YAML list - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -808,7 +807,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox modules" connection: local hosts: localhost @@ -851,7 +849,6 @@ Examples - .. Facts @@ -944,7 +941,7 @@ Common return values are documented :ref:`here `, the foll .. rst-class:: ansible-option-line - :ansible-option-returned-bold:`Returned:` success (when \ :emphasis:`state=present`\ ) + :ansible-option-returned-bold:`Returned:` success (when :emphasis:`state=present`\ ) .. raw:: html @@ -981,4 +978,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_webhook_module.rst b/docs/plugins/netbox_webhook_module.rst index c0f24966..d4203d3e 100644 --- a/docs/plugins/netbox_webhook_module.rst +++ b/docs/plugins/netbox_webhook_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_webhook module -- Creates, updates or deletes webhook confi .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -362,7 +361,7 @@ Parameters The content type(s) to apply this webhook to - Required when \ :emphasis:`state=present`\ + Required when :emphasis:`state=present` .. raw:: html @@ -582,7 +581,7 @@ Parameters URL for the webhook to use. - Required when \ :emphasis:`state=present`\ + Required when :emphasis:`state=present` .. raw:: html @@ -1009,7 +1008,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -1032,8 +1031,8 @@ Notes ----- .. note:: - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ - - Use \ :literal:`!unsafe`\ when adding jinja2 code to \ :literal:`additional\_headers`\ or \ :literal:`body\_template`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` + - Use :literal:`!unsafe` when adding jinja2 code to :literal:`additional\_headers` or :literal:`body\_template` .. Seealso @@ -1045,7 +1044,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox webhook module" connection: local hosts: localhost @@ -1090,7 +1088,6 @@ Examples - .. Facts @@ -1220,4 +1217,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_wireless_lan_group_module.rst b/docs/plugins/netbox_wireless_lan_group_module.rst index b4eaadde..5b286b43 100644 --- a/docs/plugins/netbox_wireless_lan_group_module.rst +++ b/docs/plugins/netbox_wireless_lan_group_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_wireless_lan_group module -- Creates or removes Wireless LA .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -587,7 +586,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -610,7 +609,7 @@ Notes ----- .. note:: - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -622,7 +621,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox module" connection: local hosts: localhost @@ -659,7 +657,6 @@ Examples - .. Facts @@ -789,4 +786,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_wireless_lan_module.rst b/docs/plugins/netbox_wireless_lan_module.rst index c75251d8..1cd4407f 100644 --- a/docs/plugins/netbox_wireless_lan_module.rst +++ b/docs/plugins/netbox_wireless_lan_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_wireless_lan module -- Creates or removes Wireless LANs fro .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -819,7 +818,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -842,7 +841,7 @@ Notes ----- .. note:: - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -854,7 +853,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox module" connection: local hosts: localhost @@ -894,7 +892,6 @@ Examples - .. Facts @@ -1024,4 +1021,3 @@ Collection links .. Parsing errors - diff --git a/docs/plugins/netbox_wireless_link_module.rst b/docs/plugins/netbox_wireless_link_module.rst index b4cbe76f..d2bdddda 100644 --- a/docs/plugins/netbox_wireless_link_module.rst +++ b/docs/plugins/netbox_wireless_link_module.rst @@ -1,4 +1,3 @@ - .. Document meta :orphan: @@ -7,7 +6,7 @@ :trim: .. meta:: - :antsibull-docs: 2.11.0 + :antsibull-docs: 2.13.1 .. Anchors @@ -23,7 +22,7 @@ netbox.netbox.netbox_wireless_link module -- Creates or removes Wireless links f .. Collection note .. note:: - This module is part of the `netbox.netbox collection `_ (version 3.19.1). + This module is part of the `netbox.netbox collection `_ (version 3.20.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -156,7 +155,7 @@ Parameters .. raw:: html
- + * - .. raw:: html
@@ -828,7 +827,7 @@ Parameters
- If \ :literal:`no`\ , SSL certificates will not be validated. + If :literal:`no`\ , SSL certificates will not be validated. This should only be used on personally controlled sites using a self-signed certificates. @@ -851,7 +850,7 @@ Notes ----- .. note:: - - This should be ran with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + - This should be ran with connection :literal:`local` and hosts :literal:`localhost` .. Seealso @@ -863,7 +862,6 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox module" connection: local hosts: localhost @@ -919,7 +917,6 @@ Examples - .. Facts @@ -1049,4 +1046,3 @@ Collection links .. Parsing errors - diff --git a/galaxy.yml b/galaxy.yml index 19d93bd9..a16e960f 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: netbox name: netbox # The version of the collection. Must be compatible with semantic versioning -version: 3.19.1 +version: 3.20.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/meta/runtime.yml b/meta/runtime.yml index ec581926..bf338f25 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -78,6 +78,8 @@ action_groups: - netbox_tag - netbox_tenant - netbox_tenant_group + - netbox_tunnel + - netbox_tunnel_group - netbox_virtual_chassis - netbox_virtual_machine - netbox_vlan diff --git a/plugins/inventory/nb_inventory.py b/plugins/inventory/nb_inventory.py index 0aac76a8..678a4179 100644 --- a/plugins/inventory/nb_inventory.py +++ b/plugins/inventory/nb_inventory.py @@ -249,6 +249,21 @@ description: Use out of band IP as `ansible host` type: boolean default: false + rename_variables: + description: + - Rename variables evaluated by nb_inventory, before writing them. + - Each list entry contains a dict with a 'pattern' and a 'repl'. + - Both 'pattern' and 'repl' are regular expressions. + - The first matching expression is used, subsequent matches are ignored. + - Internally `re.sub` is used. + type: list + elements: dict + default: [] + hostname_field: + description: + - By default, the inventory hostname is the netbox device name + - If set, sets the inventory hostname from this field in custom_fields instead + default: False """ EXAMPLES = """ @@ -364,6 +379,7 @@ import uuid import math import os +import re import datetime from copy import deepcopy from functools import partial @@ -1139,8 +1155,8 @@ def refresh_prefixes(self): for prefix in prefixes: if prefix.get("site"): self.prefixes_sites_lookup[prefix["site"]["id"]].append(prefix) - # Remove "site" attribute, as it's redundant when prefixes are assigned to site - del prefix["site"] + # Remove "site" attribute, as it's redundant when prefixes are assigned to site + del prefix["site"] def refresh_regions_lookup(self): url = self.api_endpoint + "/api/dcim/regions/?limit=0" @@ -1510,9 +1526,6 @@ def lookup_processes(self): if self.interfaces: lookups.append(self.refresh_interfaces) - if self.prefixes: - lookups.append(self.refresh_prefixes) - if self.services: lookups.append(self.refresh_services) @@ -1534,6 +1547,9 @@ def lookup_processes_secondary(self): if self.interfaces or self.dns_name or self.ansible_host_dns_name: lookups.append(self.refresh_ipaddresses) + if self.prefixes: + lookups.append(self.refresh_prefixes) + return lookups def refresh_lookups(self, lookups): @@ -1752,6 +1768,8 @@ def extract_name(self, host): # Use virtual chassis name if set by the user. if self.virtual_chassis_name and self._get_host_virtual_chassis_master(host): return host["virtual_chassis"]["name"] or str(uuid.uuid4()) + elif self.hostname_field: + return host["custom_fields"][self.hostname_field] else: return host["name"] or str(uuid.uuid4()) @@ -1905,31 +1923,37 @@ def _setup_nested_groups(self, group, lookup, parent_lookup): return transformed_group_names + def _set_variable(self, hostname, key, value): + for item in self.rename_variables: + if item["pattern"].match(key): + key = item["pattern"].sub(item["repl"], key) + break + + self.inventory.set_variable(hostname, key, value) + def _fill_host_variables(self, host, hostname): extracted_primary_ip = self.extract_primary_ip(host=host) if extracted_primary_ip: - self.inventory.set_variable(hostname, "ansible_host", extracted_primary_ip) + self._set_variable(hostname, "ansible_host", extracted_primary_ip) if self.ansible_host_dns_name: extracted_dns_name = self.extract_dns_name(host=host) if extracted_dns_name: - self.inventory.set_variable( - hostname, "ansible_host", extracted_dns_name - ) + self._set_variable(hostname, "ansible_host", extracted_dns_name) extracted_primary_ip4 = self.extract_primary_ip4(host=host) if extracted_primary_ip4: - self.inventory.set_variable(hostname, "primary_ip4", extracted_primary_ip4) + self._set_variable(hostname, "primary_ip4", extracted_primary_ip4) extracted_primary_ip6 = self.extract_primary_ip6(host=host) if extracted_primary_ip6: - self.inventory.set_variable(hostname, "primary_ip6", extracted_primary_ip6) + self._set_variable(hostname, "primary_ip6", extracted_primary_ip6) extracted_oob_ip = self.extract_oob_ip(host=host) if extracted_oob_ip: - self.inventory.set_variable(hostname, "oob_ip", extracted_oob_ip) + self._set_variable(hostname, "oob_ip", extracted_oob_ip) if self.oob_ip_as_primary_ip: - self.inventory.set_variable(hostname, "ansible_host", extracted_oob_ip) + self._set_variable(hostname, "ansible_host", extracted_oob_ip) for attribute, extractor in self.group_extractors.items(): extracted_value = extractor(host) @@ -1965,9 +1989,9 @@ def _fill_host_variables(self, host, hostname): ) ): for key, value in extracted_value.items(): - self.inventory.set_variable(hostname, key, value) + self._set_variable(hostname, key, value) else: - self.inventory.set_variable(hostname, attribute, extracted_value) + self._set_variable(hostname, attribute, extracted_value) def _get_host_virtual_chassis_master(self, host): virtual_chassis = host.get("virtual_chassis", None) @@ -2123,6 +2147,7 @@ def parse(self, inventory, loader, path, cache=True): self.key = self.get_option("key") self.ca_path = self.get_option("ca_path") self.oob_ip_as_primary_ip = self.get_option("oob_ip_as_primary_ip") + self.hostname_field = self.get_option("hostname_field") self._set_authorization() @@ -2146,4 +2171,15 @@ def parse(self, inventory, loader, path, cache=True): self.ansible_host_dns_name = self.get_option("ansible_host_dns_name") self.racks = self.get_option("racks") + # Compile regular expressions, if any + self.rename_variables = self.parse_rename_variables( + self.get_option("rename_variables") + ) + self.main() + + def parse_rename_variables(self, rename_variables): + return [ + {"pattern": re.compile(i["pattern"]), "repl": i["repl"]} + for i in rename_variables or () + ] diff --git a/plugins/module_utils/netbox_dcim.py b/plugins/module_utils/netbox_dcim.py index b9d5edc1..d3ede9c7 100644 --- a/plugins/module_utils/netbox_dcim.py +++ b/plugins/module_utils/netbox_dcim.py @@ -125,6 +125,13 @@ def run(self): data = self.data + # Handle rack and form_factor + if endpoint_name == "rack": + if Version(self.full_version) >= Version("4.1.0"): + if "type" in data: + data["form_factor"] = self._to_slug(data["type"]) + del data["type"] + # Used for msg output if data.get("name"): name = data["name"] diff --git a/plugins/module_utils/netbox_users.py b/plugins/module_utils/netbox_users.py new file mode 100644 index 00000000..5d3d2f2a --- /dev/null +++ b/plugins/module_utils/netbox_users.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# Copyright: (c) 2024, Daniel Chiquito (@dchiquito) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils import ( + NetboxModule, + ENDPOINT_NAME_MAPPING, +) + +NB_CONFIG = "config" +NB_GROUPS = "groups" +NB_PERMISSIONS = "permissions" +NB_TOKENS = "tokens" +NB_USERS = "users" + + +class NetboxUsersModule(NetboxModule): + def __init__(self, module, endpoint): + super().__init__(module, endpoint) + + def run(self): + """ + This function should have all necessary code for endpoints within the + application to create/update/delete the endpoint objects + Supported endpoints: + - config + - groups + - permissions + - tokens + - users + """ + # Used to dynamically set key when returning results + endpoint_name = ENDPOINT_NAME_MAPPING[self.endpoint] + + self.result = {"changed": False} + + application = self._find_app(self.endpoint) + nb_app = getattr(self.nb, application) + nb_endpoint = getattr(nb_app, self.endpoint) + user_query_params = self.module.params.get("query_params") + + data = self.data + + # Used for msg output + if data.get("username"): + name = data["username"] + elif data.get("name"): + name = data["name"] + elif data.get("key"): + name = data["key"] + + object_query_params = self._build_query_params( + endpoint_name, data, user_query_params + ) + self.nb_object = self._nb_endpoint_get(nb_endpoint, object_query_params, name) + + if self.state == "present": + self._ensure_object_exists(nb_endpoint, endpoint_name, name, data) + elif self.state == "absent": + self._ensure_object_absent(endpoint_name, name) + + try: + serialized_object = self.nb_object.serialize() + except AttributeError: + serialized_object = self.nb_object + + self.result.update({endpoint_name: serialized_object}) + + self.module.exit_json(**self.result) + + def _update_netbox_object(self, data): + if self.endpoint == "users": + return self._update_netbox_user(data) + else: + if self.endpoint == "tokens" and "key" in data: + del data["key"] + return super()._update_netbox_object(data) + + def _update_netbox_user(self, data): + serialized_nb_obj = self.nb_object.serialize() + updated_obj = serialized_nb_obj.copy() + updated_obj.update(data) + + if serialized_nb_obj == updated_obj: + return serialized_nb_obj, None + else: + data_before, data_after = {}, {} + for key in data: + # Do not diff the password field + if key == "password": + continue + try: + if serialized_nb_obj[key] != updated_obj[key]: + data_before[key] = serialized_nb_obj[key] + data_after[key] = updated_obj[key] + except KeyError: + msg = ( + "%s does not exist on existing object. Check to make sure" + " valid field." % (key) + ) + self._handle_errors(msg=msg) + + if not self.check_mode: + if "password" in data: + # The initial response from Netbox obviously doesn't have a password field, so the nb_object also doesn't have a password field. + # Any fields that weren't on the initial response are ignored, so to update the password we must add the password field to the cache. + self.nb_object._add_cache(("password", "")) + self.nb_object.update(data) + updated_obj = self.nb_object.serialize() + + diff = self._build_diff(before=data_before, after=data_after) + return updated_obj, diff diff --git a/plugins/module_utils/netbox_utils.py b/plugins/module_utils/netbox_utils.py index 34578688..ea76f43c 100644 --- a/plugins/module_utils/netbox_utils.py +++ b/plugins/module_utils/netbox_utils.py @@ -116,6 +116,12 @@ "contact_groups": {}, "contact_roles": {}, }, + users={ + "groups": {}, + "permissions": {}, + "tokens": {}, + "users": {}, + }, virtualization={ "cluster_groups": {}, "cluster_types": {}, @@ -131,6 +137,9 @@ vpn={ "l2vpns": {"introduced": "3.7"}, "l2vpn_terminations": {"introduced": "3.7"}, + "tunnels": {"introduced": "3.7"}, + "tunnel_groups": {"introduced": "3.7"}, + "ipsec_profiles": {"introduced": "3.7"}, }, ) @@ -158,6 +167,7 @@ fhrp_groups="group_id", fhrp_group_assignments="id", group="slug", + groups="name", installed_device="name", inventory_item_role="name", import_targets="name", @@ -185,6 +195,7 @@ primary_ip4="address", primary_ip6="address", oob_ip="address", + permissions="name", provider="slug", provider_network="name", rack="name", @@ -201,7 +212,10 @@ site_group="slug", tenant="slug", tenant_group="slug", + token="slug", + tunnel="name", time_zone="timezone", + user="username", virtual_chassis="name", virtual_machine="name", virtual_machine_role="slug", @@ -248,6 +262,7 @@ "device_types": "device_types", "export_targets": "route_targets", "group": "tenant_groups", + "groups": "groups", "import_targets": "route_targets", "installed_device": "devices", "interface": "interfaces", @@ -257,6 +272,7 @@ "inventory_item_role": "inventory_item_roles", "ip_addresses": "ip_addresses", "ipaddresses": "ip_addresses", + "ipsec_profile": "ipsec_profiles", "location": "locations", "lag": "interfaces", "manufacturer": "manufacturers", @@ -276,6 +292,7 @@ "parent_site_group": "site_groups", "parent_tenant_group": "tenant_groups", "parent_wireless_lan_group": "wireless_lan_groups", + "permissions": "permissions", "platforms": "platforms", "power_panel": "power_panels", "power_port": "power_ports", @@ -313,7 +330,9 @@ "tenant_groups": "tenant_groups", "termination_a": "interfaces", "termination_b": "interfaces", + "tunnel_group": "tunnel_groups", "untagged_vlan": "vlans", + "user": "users", "virtual_chassis": "virtual_chassis", "virtual_machine": "virtual_machines", "virtual_machine_role": "device_roles", @@ -359,6 +378,7 @@ "fhrp_group_assignments": "fhrp_group_assignment", "front_ports": "front_port", "front_port_templates": "front_port_template", + "groups": "user_group", "journal_entries": "journal_entry", "interfaces": "interface", "interface_templates": "interface_template", @@ -372,6 +392,7 @@ "modules": "module", "module_bays": "module_bay", "module_types": "module_type", + "permissions": "permission", "platforms": "platform", "power_feeds": "power_feed", "power_outlets": "power_outlet", @@ -399,6 +420,10 @@ "tags": "tags", "tenants": "tenant", "tenant_groups": "tenant_group", + "tokens": "token", + "tunnels": "tunnel", + "tunnel_groups": "tunnel_group", + "users": "user", "virtual_chassis": "virtual_chassis", "virtual_machines": "virtual_machine", "virtual_disks": "virtual_disk", @@ -505,6 +530,7 @@ "parent_region": set(["slug"]), "parent_site_group": set(["slug"]), "parent_tenant_group": set(["slug"]), + "permission": set(["name"]), "platform": set(["slug"]), "power_feed": set(["name", "power_panel"]), "power_outlet": set(["name", "device"]), @@ -537,6 +563,11 @@ "tenant_group": set(["slug"]), "termination_a": set(["name", "device", "virtual_machine"]), "termination_b": set(["name", "device", "virtual_machine"]), + "token": set(["key"]), + "tunnel": set(["name"]), + "tunnel_group": set(["slug"]), + "user": set(["username", "password"]), + "user_group": set(["name"]), "untagged_vlan": set(["group", "name", "site", "vid", "vlan_group", "tenant"]), "virtual_chassis": set(["name", "master"]), "virtual_machine": set(["name", "cluster"]), @@ -630,6 +661,7 @@ "tenant_group": "group", "termination_a": "termination_a_id", "termination_b": "termination_b_id", + "tunnel_group": "group", "virtual_machine_role": "role", "vlan_role": "role", "vlan_group": "group", @@ -660,9 +692,11 @@ "tags", "tenants", "tenant_groups", + "tunnel_groups", "manufacturers", "platforms", "providers", + "user_groups", "vlan_groups", "wireless_lan_groups", } @@ -1051,10 +1085,18 @@ def _build_query_params( elif parent == "rear_port_template" and self.endpoint == "front_port_templates": if isinstance(module_data.get("rear_port_template"), str): - rear_port_template = { - "devicetype_id": module_data.get("device_type"), - "name": module_data.get("rear_port_template"), - } + if self._version_check_greater( + self.version, "4.0", greater_or_equal=True + ): + rear_port_template = { + "device_type_id": module_data.get("device_type"), + "name": module_data.get("rear_port_template"), + } + else: + rear_port_template = { + "devicetype_id": module_data.get("device_type"), + "name": module_data.get("rear_port_template"), + } query_dict.update(rear_port_template) elif parent == "power_port" and self.endpoint == "power_outlets": @@ -1070,10 +1112,18 @@ def _build_query_params( and self.endpoint == "power_outlet_templates" ): if isinstance(module_data.get("power_port_template"), str): - power_port_template = { - "devicetype_id": module_data.get("device_type"), - "name": module_data.get("power_port_template"), - } + if self._version_check_greater( + self.version, "4.0", greater_or_equal=True + ): + power_port_template = { + "device_type_id": module_data.get("device_type"), + "name": module_data.get("power_port_template"), + } + else: + power_port_template = { + "devicetype_id": module_data.get("device_type"), + "name": module_data.get("power_port_template"), + } query_dict.update(power_port_template) elif parent == "l2vpn_termination": query_param_mapping = { @@ -1097,7 +1147,12 @@ def _build_query_params( ) elif "_template" in parent: if query_dict.get("device_type"): - query_dict["devicetype_id"] = query_dict.pop("device_type") + if self._version_check_greater( + self.version, "4.0", greater_or_equal=True + ): + query_dict["device_type_id"] = query_dict.pop("device_type") + else: + query_dict["devicetype_id"] = query_dict.pop("device_type") if not query_dict: provided_kwargs = child.keys() if child else module_data.keys() diff --git a/plugins/module_utils/netbox_vpn.py b/plugins/module_utils/netbox_vpn.py index 83338943..fd417c29 100644 --- a/plugins/module_utils/netbox_vpn.py +++ b/plugins/module_utils/netbox_vpn.py @@ -17,6 +17,8 @@ NB_L2VPNS = "l2vpns" NB_L2VPN_TERMINATIONS = "l2vpn_terminations" +NB_TUNNELS = "tunnels" +NB_TUNNEL_GROUPS = "tunnel_groups" class NetboxVpnModule(NetboxModule): @@ -30,6 +32,8 @@ def run(self): Supported endpoints: - l2vpns - l2vpn_terminations + - tunnels + - tunnel_groups """ # Used to dynamically set key when returning results endpoint_name = ENDPOINT_NAME_MAPPING[self.endpoint] diff --git a/plugins/modules/netbox_cluster.py b/plugins/modules/netbox_cluster.py index 81677fd6..d91e770c 100644 --- a/plugins/modules/netbox_cluster.py +++ b/plugins/modules/netbox_cluster.py @@ -35,6 +35,12 @@ - The name of the cluster required: true type: str + status: + description: + - Status of the cluster + required: false + type: raw + version_added: "3.20.0" cluster_type: description: - type of the cluster @@ -114,7 +120,7 @@ - Schnozzberry state: present - - name: Update the group and site of an existing cluster + - name: Update the group, site and status of an existing cluster netbox.netbox.netbox_cluster: netbox_url: http://netbox.local netbox_token: thisIsMyToken @@ -123,6 +129,7 @@ cluster_type: qemu cluster_group: GROUP site: SITE + status: planned state: present """ @@ -160,6 +167,7 @@ def main(): required=True, options=dict( name=dict(required=True, type="str"), + status=dict(required=False, type="raw"), cluster_type=dict(required=False, type="raw"), cluster_group=dict(required=False, type="raw"), site=dict(required=False, type="raw"), diff --git a/plugins/modules/netbox_cluster_group.py b/plugins/modules/netbox_cluster_group.py index fa2f38de..9d1f42e4 100644 --- a/plugins/modules/netbox_cluster_group.py +++ b/plugins/modules/netbox_cluster_group.py @@ -41,6 +41,12 @@ - This is auto-generated following NetBox rules if not provided required: false type: str + description: + description: + - The description of the cluster group + required: false + type: str + version_added: "3.20.0" tags: description: - The tags to add/update @@ -115,6 +121,7 @@ def main(): options=dict( name=dict(required=True, type="str"), slug=dict(required=False, type="str"), + description=dict(required=False, type="str"), tags=dict(required=False, type="list", elements="raw"), custom_fields=dict(required=False, type="dict"), ), diff --git a/plugins/modules/netbox_custom_field.py b/plugins/modules/netbox_custom_field.py index 725ac5fe..65f0bd9e 100644 --- a/plugins/modules/netbox_custom_field.py +++ b/plugins/modules/netbox_custom_field.py @@ -66,6 +66,12 @@ required: false type: str version_added: "3.7.0" + related_object_type: + description: + - The object type of the custom field (if any) (NetBox 4.0+) + required: false + type: str + version_added: "3.20.0" name: description: - Name of the custom field @@ -255,6 +261,7 @@ def main(): type="str", ), object_type=dict(required=False, type="str"), + related_object_type=dict(required=False, type="str"), name=dict(required=True, type="str"), label=dict(required=False, type="str"), description=dict(required=False, type="str"), diff --git a/plugins/modules/netbox_location.py b/plugins/modules/netbox_location.py index 880cc402..684225c9 100644 --- a/plugins/modules/netbox_location.py +++ b/plugins/modules/netbox_location.py @@ -34,6 +34,12 @@ - The name of the location required: true type: str + status: + description: + - Status of the location + required: false + type: raw + version_added: "3.20.0" slug: description: - The slugified version of the name or custom slug. @@ -56,6 +62,12 @@ required: false type: raw version_added: "3.8.0" + facility: + description: + - Data center provider or facility, ex. Equinix NY7 + required: false + type: str + version_added: "3.20.0" description: description: - The description of the location @@ -93,7 +105,7 @@ site: Test Site state: present - - name: Create location within NetBox with a parent location + - name: Create location within NetBox with a parent location, status and facility netbox.netbox.netbox_location: netbox_url: http://netbox.local netbox_token: thisIsMyToken @@ -101,6 +113,8 @@ name: Child location site: Test Site parent_location: Test location + status: planned + facility: Test Facility state: present - name: Delete location within NetBox @@ -146,10 +160,12 @@ def main(): required=True, options=dict( name=dict(required=True, type="str"), + status=dict(required=False, type="raw"), slug=dict(required=False, type="str"), site=dict(required=False, type="raw"), parent_location=dict(required=False, type="raw"), tenant=dict(required=False, type="raw"), + facility=dict(required=False, type="str"), description=dict(required=False, type="str"), tags=dict(required=False, type="list", elements="raw"), custom_fields=dict(required=False, type="dict"), diff --git a/plugins/modules/netbox_permission.py b/plugins/modules/netbox_permission.py new file mode 100644 index 00000000..f4fa64d3 --- /dev/null +++ b/plugins/modules/netbox_permission.py @@ -0,0 +1,192 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright: (c) 2024, Daniel Chiquito (@dchiquito) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +__metaclass__ = type + +DOCUMENTATION = r""" +--- +module: netbox_permission +short_description: Creates or removes permissions from NetBox +description: + - Creates or removes permissions from NetBox +notes: + - Tags should be defined as a YAML list + - This should be ran with connection C(local) and hosts C(localhost) +author: + - Daniel Chiquito (@dchiquito) +requirements: + - pynetbox +version_added: "3.20.0" +extends_documentation_fragment: + - netbox.netbox.common +options: + data: + type: dict + description: + - Defines the permission configuration + suboptions: + name: + description: + - Name of the permission to be created + required: true + type: str + description: + description: + - Description of the permission to be created + required: false + type: str + enabled: + description: + - Whether or not the permission to be created should be enabled + required: false + type: bool + actions: + description: + - The actions of the permission to be created + required: false + type: list + elements: raw + object_types: + description: + - The object types of the permission to be created + required: false + type: list + elements: raw + constraints: + description: + - The constraints of the permission to be created + required: false + type: dict + required: true +""" + +EXAMPLES = r""" +- name: "Test NetBox module" + connection: local + hosts: localhost + gather_facts: false + tasks: + - name: Create permission within NetBox with only required information + netbox.netbox.netbox_permission: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Permission + actions: + - view + object_types: [] + state: present + + - name: Create user which has the permission + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + password: MyPassword + permissions: + - My Permission + state: present + + - name: Create a group which has the permission + netbox.netbox.netbox_user_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Group + permissions: + - My Permission + state: absent + + - name: Delete permission within netbox + netbox.netbox.netbox_permission: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Permission + state: absent + + - name: Create permission with all parameters + netbox.netbox.netbox_permission: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My permission + description: The permission I made + enabled: false + actions: + - view + - add + - change + - delete + - extreme_administration + object_types: + - vpn.tunneltermination + - wireless.wirelesslan + constraints: + id: 1 + state: present +""" + +RETURN = r""" +permissions: + description: Serialized object as created or already existent within NetBox + returned: on creation + type: dict +msg: + description: Message indicating failure or info about what has been achieved + returned: always + type: str +""" + + +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils import ( + NetboxAnsibleModule, + NETBOX_ARG_SPEC, +) +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_users import ( + NetboxUsersModule, + NB_PERMISSIONS, +) +from copy import deepcopy + + +def main(): + """ + Main entry point for module execution + """ + argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec.update( + dict( + data=dict( + type="dict", + required=True, + options=dict( + name=dict(required=True, type="str"), + description=dict(required=False, type="str"), + enabled=dict(required=False, type="bool"), + actions=dict(required=False, type="list", elements="raw"), + object_types=dict(required=False, type="list", elements="raw"), + constraints=dict(required=False, type="dict"), + ), + ), + ) + ) + + required_if = [ + ("state", "present", ["name", "actions", "object_types"]), + ("state", "absent", ["name"]), + ] + + module = NetboxAnsibleModule( + argument_spec=argument_spec, supports_check_mode=True, required_if=required_if + ) + + netbox_permission = NetboxUsersModule(module, NB_PERMISSIONS) + netbox_permission.run() + + +if __name__ == "__main__": # pragma: no cover + main() diff --git a/plugins/modules/netbox_token.py b/plugins/modules/netbox_token.py new file mode 100644 index 00000000..98077c6f --- /dev/null +++ b/plugins/modules/netbox_token.py @@ -0,0 +1,161 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright: (c) 2024, Daniel Chiquito (@dchiquito) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +__metaclass__ = type + +DOCUMENTATION = r""" +--- +module: netbox_token +short_description: Creates or removes tokens from NetBox +description: + - Creates or removes tokens from NetBox +notes: + - Tags should be defined as a YAML list + - This should be ran with connection C(local) and hosts C(localhost) +author: + - Daniel Chiquito (@dchiquito) +requirements: + - pynetbox +version_added: "3.20.0" +extends_documentation_fragment: + - netbox.netbox.common +options: + data: + type: dict + description: + - Defines the token configuration + suboptions: + key: + description: + - Key of the token to be created. Must be exactly 40 characters + required: true + type: str + user: + description: + - User the token to be created belongs to + required: false + type: str + description: + description: + - The description of the token to be created + required: false + type: str + write_enabled: + description: + - Whether or not the token to be created should allow write operations + required: false + type: bool + expires: + description: + - When the token to be created should expire + required: false + type: str + required: true +""" + +EXAMPLES = r""" +- name: "Test NetBox module" + connection: local + hosts: localhost + gather_facts: false + tasks: + - name: Create user to own the token + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + password: MyPassword + state: present + + - name: Create token within NetBox with only required information + netbox.netbox.netbox_token: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + user: TestUser + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: present + + - name: Delete token within netbox + netbox.netbox.netbox_token: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: absent + + - name: Create token with all parameters + netbox.netbox.netbox_token: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + user: TestUser + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + description: The test token + write_enabled: false + expires: 2024-08-26T14:49:01.345000+00:00 + state: present +""" + +RETURN = r""" +token: + description: Serialized object as created or already existent within NetBox + returned: on creation + type: dict +msg: + description: Message indicating failure or info about what has been achieved + returned: always + type: str +""" + + +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils import ( + NetboxAnsibleModule, + NETBOX_ARG_SPEC, +) +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_users import ( + NetboxUsersModule, + NB_TOKENS, +) +from copy import deepcopy + + +def main(): + """ + Main entry point for module execution + """ + argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec.update( + dict( + data=dict( + type="dict", + required=True, + options=dict( + key=dict(required=True, type="str", no_log=True), + user=dict(required=False, type="str"), + description=dict(required=False, type="str"), + write_enabled=dict(required=False, type="bool"), + expires=dict(required=False, type="str"), + ), + ), + ) + ) + + required_if = [ + ("state", "present", ["key", "user"]), + ("state", "absent", ["key"]), + ] + + module = NetboxAnsibleModule( + argument_spec=argument_spec, supports_check_mode=True, required_if=required_if + ) + + netbox_token = NetboxUsersModule(module, NB_TOKENS) + netbox_token.run() + + +if __name__ == "__main__": # pragma: no cover + main() diff --git a/plugins/modules/netbox_tunnel.py b/plugins/modules/netbox_tunnel.py new file mode 100644 index 00000000..2b73ba33 --- /dev/null +++ b/plugins/modules/netbox_tunnel.py @@ -0,0 +1,211 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright: (c) 2024, Rich Bibby, NetBox Labs (@richbibby) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = r""" +--- +module: netbox_tunnel +short_description: Create, update or delete tunnels within NetBox +description: + - Creates, updates or removes tunnels from NetBox +notes: + - Tags should be defined as a YAML list + - This should be ran with connection C(local) and hosts C(localhost) +author: + - Rich Bibby, NetBox Labs (@richbibby) +requirements: + - pynetbox +version_added: '3.20.0' +extends_documentation_fragment: + - netbox.netbox.common +options: + data: + type: dict + description: + - Defines the tunnel configuration + suboptions: + name: + description: + - The name of the tunnel + required: true + type: str + status: + description: + - Status of the tunnel + required: false + type: raw + tunnel_group: + description: + - The Tunnel group the VLAN will be associated with. Must exist in NetBox + required: false + type: raw + encapsulation: + description: + - The encapsulation protocol or technique employed to effect the tunnel + choices: + - ipsec-transport + - ipsec-tunnel + - ip-ip + - gre + required: true + type: str + ipsec_profile: + description: + - The IPSec Profile employed to negotiate security associations + required: false + type: raw + tenant: + description: + - The tenant that the tunnel will be associated with + required: false + type: raw + tunnel_id: + description: + - The ID of the tunnel + required: false + type: int + description: + description: + - The description of the tunnel + required: false + type: str + comments: + description: + - Comments that may include additional information in regards to the tunnel + required: false + type: str + tags: + description: + - Any tags that the tunnel may need to be associated with + required: false + type: list + elements: raw + custom_fields: + description: + - Must exist in NetBox + required: false + type: dict + required: true +""" + +EXAMPLES = r""" +- name: "Test NetBox modules" + connection: local + hosts: localhost + gather_facts: false + + tasks: + - name: Create tunnel within NetBox with only required information + netbox.netbox.netbox_tunnel: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Tunnel + encapsulation: ipsec-tunnel + state: present + + - name: Delete tunnel within NetBox + netbox.netbox.netbox_tunnel: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Tunnel + encapsulation: ipsec-tunnel + state: absent + + - name: Create tunnel with all information + netbox.netbox.netbox_tunnel: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Tunnel + status: planned + tunnel_group: Test Tunnel Group + encapsulation: ipsec-tunnel + ipsec_profile: ipsec-profile + description: Test Description + tenant: Test Tenant + tunnel_id: 200 + tags: + - Schnozzberry + state: present +""" + +RETURN = r""" +tunnel: + description: Serialized object as created or already existent within NetBox + returned: success (when I(state=present)) + type: dict +msg: + description: Message indicating failure or info about what has been achieved + returned: always + type: str +""" + +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils import ( + NetboxAnsibleModule, + NETBOX_ARG_SPEC, +) +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_vpn import ( + NetboxVpnModule, + NB_TUNNELS, +) +from copy import deepcopy + + +def main(): + """ + Main entry point for module execution + """ + argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec.update( + dict( + data=dict( + type="dict", + required=True, + options=dict( + name=dict(required=True, type="str"), + status=dict(required=False, type="raw"), + tunnel_group=dict(required=False, type="raw"), + encapsulation=dict( + required=True, + type="str", + choices=[ + "ipsec-transport", + "ipsec-tunnel", + "ip-ip", + "gre", + ], + ), + ipsec_profile=dict(required=False, type="raw"), + tenant=dict(required=False, type="raw"), + tunnel_id=dict(required=False, type="int"), + description=dict(required=False, type="str"), + comments=dict(required=False, type="str"), + tags=dict(required=False, type="list", elements="raw"), + custom_fields=dict(required=False, type="dict"), + ), + ), + ) + ) + + required_if = [ + ("state", "present", ["name", "encapsulation"]), + ("state", "absent", ["name", "encapsulation"]), + ] + + module = NetboxAnsibleModule( + argument_spec=argument_spec, supports_check_mode=True, required_if=required_if + ) + + netbox_tunnel = NetboxVpnModule(module, NB_TUNNELS) + netbox_tunnel.run() + + +if __name__ == "__main__": # pragma: no cover + main() diff --git a/plugins/modules/netbox_tunnel_group.py b/plugins/modules/netbox_tunnel_group.py new file mode 100644 index 00000000..bb069347 --- /dev/null +++ b/plugins/modules/netbox_tunnel_group.py @@ -0,0 +1,140 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright: (c) 2024, Rich Bibby, NetBox Labs (@richbibby) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = r""" +--- +module: netbox_tunnel_group +short_description: Create, update or delete tunnel groups within NetBox +description: + - Creates, updates or deletes tunnel groups within NetBox +notes: + - Tags should be defined as a YAML list + - This should be ran with connection C(local) and hosts C(localhost) +author: + - Rich Bibby, NetBox Labs (@richbibby) +requirements: + - pynetbox +version_added: '3.20.0' +extends_documentation_fragment: + - netbox.netbox.common +options: + data: + required: true + type: dict + description: + - Defines the tunnel group configuration + suboptions: + name: + description: + - The name of the tunnel group + required: true + type: str + slug: + description: + - The slugified version of the name or custom slug. + - This is auto-generated following NetBox rules if not provided + required: false + type: str + description: + description: + - The description of the tunnel group + required: false + type: str + tags: + description: + - The tags to add/update + required: false + type: list + elements: raw + custom_fields: + description: + - Must exist in NetBox + required: false + type: dict +""" + +EXAMPLES = r""" +- name: "Test NetBox Tunnel Group module" + connection: local + hosts: localhost + gather_facts: false + + tasks: + - name: Create tunnel group within NetBox with only required information + netbox.netbox.netbox_tunnel_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Tunnel Group + state: present + + - name: Delete tunnel group within netbox + netbox.netbox.netbox_tunnel_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Tunnel Group + state: absent +""" + +RETURN = r""" +tunnel_group: + description: Serialized object as created or already existent within NetBox + returned: success (when I(state=present)) + type: dict +msg: + description: Message indicating failure or info about what has been achieved + returned: always + type: str +""" + +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils import ( + NetboxAnsibleModule, + NETBOX_ARG_SPEC, +) +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_vpn import ( + NetboxVpnModule, + NB_TUNNEL_GROUPS, +) +from copy import deepcopy + + +def main(): + """ + Main entry point for module execution + """ + argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec.update( + dict( + data=dict( + type="dict", + required=True, + options=dict( + name=dict(required=True, type="str"), + slug=dict(required=False, type="str"), + description=dict(required=False, type="str"), + tags=dict(required=False, type="list", elements="raw"), + custom_fields=dict(required=False, type="dict"), + ), + ), + ) + ) + + required_if = [("state", "present", ["name"]), ("state", "absent", ["name"])] + + module = NetboxAnsibleModule( + argument_spec=argument_spec, supports_check_mode=True, required_if=required_if + ) + + netbox_tunnel_group = NetboxVpnModule(module, NB_TUNNEL_GROUPS) + netbox_tunnel_group.run() + + +if __name__ == "__main__": # pragma: no cover + main() diff --git a/plugins/modules/netbox_user.py b/plugins/modules/netbox_user.py new file mode 100644 index 00000000..36c289f5 --- /dev/null +++ b/plugins/modules/netbox_user.py @@ -0,0 +1,187 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright: (c) 2024, Daniel Chiquito (@dchiquito) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +__metaclass__ = type + +DOCUMENTATION = r""" +--- +module: netbox_user +short_description: Creates or removes users from NetBox +description: + - Creates or removes users from NetBox +notes: + - Tags should be defined as a YAML list + - This should be ran with connection C(local) and hosts C(localhost) +author: + - Daniel Chiquito (@dchiquito) +requirements: + - pynetbox +version_added: "3.20.0" +extends_documentation_fragment: + - netbox.netbox.common +options: + data: + type: dict + description: + - Defines the user configuration + suboptions: + username: + description: + - Username of the user to be created + required: true + type: str + password: + description: + - Password of the user to be created. If this is specified, the password field will always be updated. + required: false + type: str + email: + description: + - Email of the user to be created + required: false + type: str + first_name: + description: + - First name of the user to be created + required: false + type: str + last_name: + description: + - Last name of the user to be created + required: false + type: str + is_staff: + description: + - Staff status of the user to be created + required: false + type: bool + is_active: + description: + - Active status of the user to be created + required: false + type: bool + groups: + description: + - Groups the user to be created should belong to + required: false + type: list + elements: str + permissions: + description: + - Permissions the user to be created should have + required: false + type: list + elements: str + required: true +""" + +EXAMPLES = r""" +- name: "Test NetBox module" + connection: local + hosts: localhost + gather_facts: false + tasks: + - name: Create user within NetBox with only required information + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + password: MyPassword + state: present + + - name: Update a user's email + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + password: my@user.com + state: present + + - name: Delete user within netbox + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + state: absent + + - name: Create user with all parameters + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser2 + password: MyPassword + email: my@user.com + first_name: My + last_name: User + state: present +""" + +RETURN = r""" +user: + description: Serialized object as created or already existent within NetBox + returned: on creation + type: dict +msg: + description: Message indicating failure or info about what has been achieved + returned: always + type: str +""" + + +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils import ( + NetboxAnsibleModule, + NETBOX_ARG_SPEC, +) +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_users import ( + NetboxUsersModule, + NB_USERS, +) +from copy import deepcopy + + +def main(): + """ + Main entry point for module execution + """ + argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec.update( + dict( + data=dict( + type="dict", + required=True, + options=dict( + username=dict(required=True, type="str"), + password=dict(required=False, type="str", no_log=True), + email=dict(required=False, type="str"), + first_name=dict(required=False, type="str"), + last_name=dict(required=False, type="str"), + is_active=dict(required=False, type="bool"), + is_staff=dict(required=False, type="bool"), + groups=dict(required=False, type="list", elements="str"), + permissions=dict(required=False, type="list", elements="str"), + ), + ), + ) + ) + + required_if = [ + ("state", "present", ["username"]), + ("state", "absent", ["username"]), + ] + + module = NetboxAnsibleModule( + argument_spec=argument_spec, supports_check_mode=True, required_if=required_if + ) + + netbox_user = NetboxUsersModule(module, NB_USERS) + netbox_user.run() + + +if __name__ == "__main__": # pragma: no cover + main() diff --git a/plugins/modules/netbox_user_group.py b/plugins/modules/netbox_user_group.py new file mode 100644 index 00000000..2d635d28 --- /dev/null +++ b/plugins/modules/netbox_user_group.py @@ -0,0 +1,145 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright: (c) 2024, Daniel Chiquito (@dchiquito) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +__metaclass__ = type + +DOCUMENTATION = r""" +--- +module: netbox_user_group +short_description: Creates or removes user groups from NetBox +description: + - Creates or removes users from NetBox +notes: + - Tags should be defined as a YAML list + - This should be ran with connection C(local) and hosts C(localhost) +author: + - Daniel Chiquito (@dchiquito) +requirements: + - pynetbox +version_added: "3.20.0" +extends_documentation_fragment: + - netbox.netbox.common +options: + data: + type: dict + description: + - Defines the user group configuration + suboptions: + name: + description: + - Name of the user group to be created + required: true + type: str + description: + description: + - Description of the user group to be created + required: false + type: str + permissions: + description: + - Permissions the user group to be created should have + required: false + type: list + elements: str + required: true +""" + +EXAMPLES = r""" +- name: "Test NetBox module" + connection: local + hosts: localhost + gather_facts: false + tasks: + - name: Create user group within NetBox with only required information + netbox.netbox.netbox_user_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Group + state: present + + - name: Create user belonging to the group + netbox.netbox.netbox_user: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + username: MyUser + password: MyPassword + groups: + - My Group + state: present + + - name: Delete user group within netbox + netbox.netbox.netbox_user_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Group + state: absent + + - name: Create user group with all parameters + netbox.netbox.netbox_user_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: My Group + description: The group I made + state: present +""" + +RETURN = r""" +user_group: + description: Serialized object as created or already existent within NetBox + returned: on creation + type: dict +msg: + description: Message indicating failure or info about what has been achieved + returned: always + type: str +""" + + +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils import ( + NetboxAnsibleModule, + NETBOX_ARG_SPEC, +) +from ansible_collections.netbox.netbox.plugins.module_utils.netbox_users import ( + NetboxUsersModule, + NB_GROUPS, +) +from copy import deepcopy + + +def main(): + """ + Main entry point for module execution + """ + argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec.update( + dict( + data=dict( + type="dict", + required=True, + options=dict( + name=dict(required=True, type="str"), + description=dict(required=False, type="str"), + permissions=dict(required=False, type="list", elements="str"), + ), + ), + ) + ) + + required_if = [("state", "present", ["name"]), ("state", "absent", ["name"])] + + module = NetboxAnsibleModule( + argument_spec=argument_spec, supports_check_mode=True, required_if=required_if + ) + + netbox_user_group = NetboxUsersModule(module, NB_GROUPS) + netbox_user_group.run() + + +if __name__ == "__main__": # pragma: no cover + main() diff --git a/plugins/modules/netbox_virtual_machine.py b/plugins/modules/netbox_virtual_machine.py index 44db31d5..b321cc06 100644 --- a/plugins/modules/netbox_virtual_machine.py +++ b/plugins/modules/netbox_virtual_machine.py @@ -64,6 +64,12 @@ - The platform of the virtual machine required: false type: raw + serial: + description: + - Serial number of the virtual machine + required: false + type: str + version_added: "3.20.0" primary_ip4: description: - Primary IPv4 address assigned to the virtual machine @@ -177,6 +183,16 @@ memory: 8 disk: 8 state: present + + - name: Update virtual machine within NetBox with serial number + netbox_virtual_machine: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test Virtual Machine + cluster: test cluster + serial: 1234abc + state: present """ RETURN = r""" @@ -219,6 +235,7 @@ def main(): vcpus=dict(required=False, type="float"), tenant=dict(required=False, type="raw"), platform=dict(required=False, type="raw"), + serial=dict(required=False, type="str"), primary_ip4=dict(required=False, type="raw"), primary_ip6=dict(required=False, type="raw"), memory=dict(required=False, type="int"), diff --git a/plugins/modules/netbox_vlan_group.py b/plugins/modules/netbox_vlan_group.py index 07d60d1d..036ae574 100644 --- a/plugins/modules/netbox_vlan_group.py +++ b/plugins/modules/netbox_vlan_group.py @@ -84,6 +84,13 @@ required: false type: int version_added: "3.7.0" + vid_ranges: + description: + - Array of starting and ending VLAN ID pairs + required: false + type: list + elements: raw + version_added: "3.20.0" tags: description: - The tags to add/update @@ -126,6 +133,18 @@ scope: Test Site state: present + - name: Create vlan group within NetBox with vid_ranges + netbox_vlan_group: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: Test vlan group + vid_ranges: [ + [1300, 1329], + [1, 2] + ] + state: present + - name: Delete vlan group within netbox netbox_vlan_group: netbox_url: http://netbox.local @@ -192,6 +211,7 @@ def main(): scope=dict(required=False, type="raw"), min_vid=dict(required=False, type="int"), max_vid=dict(required=False, type="int"), + vid_ranges=dict(required=False, type="list", elements="raw"), description=dict(required=False, type="str"), tags=dict(required=False, type="list", elements="raw"), custom_fields=dict(required=False, type="dict"), diff --git a/poetry.lock b/poetry.lock index a2392f3b..f1ec27c2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,101 +2,128 @@ [[package]] name = "aiofiles" -version = "23.2.1" +version = "24.1.0" description = "File support for asyncio." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "aiofiles-23.2.1-py3-none-any.whl", hash = "sha256:19297512c647d4b27a2cf7c34caa7e405c0d60b5560618a29a9fe027b18b0107"}, - {file = "aiofiles-23.2.1.tar.gz", hash = "sha256:84ec2218d8419404abcb9f0c02df3f34c6e0a68ed41072acfb1cef5cbc29051a"}, + {file = "aiofiles-24.1.0-py3-none-any.whl", hash = "sha256:b4ec55f4195e3eb5d7abd1bf7e061763e864dd4954231fb8539a0ef8bb8260e5"}, + {file = "aiofiles-24.1.0.tar.gz", hash = "sha256:22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c"}, +] + +[[package]] +name = "aiohappyeyeballs" +version = "2.4.0" +description = "Happy Eyeballs for asyncio" +optional = false +python-versions = ">=3.8" +files = [ + {file = "aiohappyeyeballs-2.4.0-py3-none-any.whl", hash = "sha256:7ce92076e249169a13c2f49320d1967425eaf1f407522d707d59cac7628d62bd"}, + {file = "aiohappyeyeballs-2.4.0.tar.gz", hash = "sha256:55a1714f084e63d49639800f95716da97a1f173d46a16dfcfda0016abb93b6b2"}, ] [[package]] name = "aiohttp" -version = "3.9.5" +version = "3.10.5" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.8" files = [ - {file = "aiohttp-3.9.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fcde4c397f673fdec23e6b05ebf8d4751314fa7c24f93334bf1f1364c1c69ac7"}, - {file = "aiohttp-3.9.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5d6b3f1fabe465e819aed2c421a6743d8debbde79b6a8600739300630a01bf2c"}, - {file = "aiohttp-3.9.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6ae79c1bc12c34082d92bf9422764f799aee4746fd7a392db46b7fd357d4a17a"}, - {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d3ebb9e1316ec74277d19c5f482f98cc65a73ccd5430540d6d11682cd857430"}, - {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84dabd95154f43a2ea80deffec9cb44d2e301e38a0c9d331cc4aa0166fe28ae3"}, - {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c8a02fbeca6f63cb1f0475c799679057fc9268b77075ab7cf3f1c600e81dd46b"}, - {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c26959ca7b75ff768e2776d8055bf9582a6267e24556bb7f7bd29e677932be72"}, - {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:714d4e5231fed4ba2762ed489b4aec07b2b9953cf4ee31e9871caac895a839c0"}, - {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7a6a8354f1b62e15d48e04350f13e726fa08b62c3d7b8401c0a1314f02e3558"}, - {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c413016880e03e69d166efb5a1a95d40f83d5a3a648d16486592c49ffb76d0db"}, - {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ff84aeb864e0fac81f676be9f4685f0527b660f1efdc40dcede3c251ef1e867f"}, - {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ad7f2919d7dac062f24d6f5fe95d401597fbb015a25771f85e692d043c9d7832"}, - {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:702e2c7c187c1a498a4e2b03155d52658fdd6fda882d3d7fbb891a5cf108bb10"}, - {file = "aiohttp-3.9.5-cp310-cp310-win32.whl", hash = "sha256:67c3119f5ddc7261d47163ed86d760ddf0e625cd6246b4ed852e82159617b5fb"}, - {file = "aiohttp-3.9.5-cp310-cp310-win_amd64.whl", hash = "sha256:471f0ef53ccedec9995287f02caf0c068732f026455f07db3f01a46e49d76bbb"}, - {file = "aiohttp-3.9.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e0ae53e33ee7476dd3d1132f932eeb39bf6125083820049d06edcdca4381f342"}, - {file = "aiohttp-3.9.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c088c4d70d21f8ca5c0b8b5403fe84a7bc8e024161febdd4ef04575ef35d474d"}, - {file = "aiohttp-3.9.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:639d0042b7670222f33b0028de6b4e2fad6451462ce7df2af8aee37dcac55424"}, - {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f26383adb94da5e7fb388d441bf09c61e5e35f455a3217bfd790c6b6bc64b2ee"}, - {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:66331d00fb28dc90aa606d9a54304af76b335ae204d1836f65797d6fe27f1ca2"}, - {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4ff550491f5492ab5ed3533e76b8567f4b37bd2995e780a1f46bca2024223233"}, - {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f22eb3a6c1080d862befa0a89c380b4dafce29dc6cd56083f630073d102eb595"}, - {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a81b1143d42b66ffc40a441379387076243ef7b51019204fd3ec36b9f69e77d6"}, - {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f64fd07515dad67f24b6ea4a66ae2876c01031de91c93075b8093f07c0a2d93d"}, - {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:93e22add827447d2e26d67c9ac0161756007f152fdc5210277d00a85f6c92323"}, - {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:55b39c8684a46e56ef8c8d24faf02de4a2b2ac60d26cee93bc595651ff545de9"}, - {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4715a9b778f4293b9f8ae7a0a7cef9829f02ff8d6277a39d7f40565c737d3771"}, - {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:afc52b8d969eff14e069a710057d15ab9ac17cd4b6753042c407dcea0e40bf75"}, - {file = "aiohttp-3.9.5-cp311-cp311-win32.whl", hash = "sha256:b3df71da99c98534be076196791adca8819761f0bf6e08e07fd7da25127150d6"}, - {file = "aiohttp-3.9.5-cp311-cp311-win_amd64.whl", hash = "sha256:88e311d98cc0bf45b62fc46c66753a83445f5ab20038bcc1b8a1cc05666f428a"}, - {file = "aiohttp-3.9.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:c7a4b7a6cf5b6eb11e109a9755fd4fda7d57395f8c575e166d363b9fc3ec4678"}, - {file = "aiohttp-3.9.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:0a158704edf0abcac8ac371fbb54044f3270bdbc93e254a82b6c82be1ef08f3c"}, - {file = "aiohttp-3.9.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d153f652a687a8e95ad367a86a61e8d53d528b0530ef382ec5aaf533140ed00f"}, - {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82a6a97d9771cb48ae16979c3a3a9a18b600a8505b1115cfe354dfb2054468b4"}, - {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:60cdbd56f4cad9f69c35eaac0fbbdf1f77b0ff9456cebd4902f3dd1cf096464c"}, - {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8676e8fd73141ded15ea586de0b7cda1542960a7b9ad89b2b06428e97125d4fa"}, - {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da00da442a0e31f1c69d26d224e1efd3a1ca5bcbf210978a2ca7426dfcae9f58"}, - {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18f634d540dd099c262e9f887c8bbacc959847cfe5da7a0e2e1cf3f14dbf2daf"}, - {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:320e8618eda64e19d11bdb3bd04ccc0a816c17eaecb7e4945d01deee2a22f95f"}, - {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:2faa61a904b83142747fc6a6d7ad8fccff898c849123030f8e75d5d967fd4a81"}, - {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:8c64a6dc3fe5db7b1b4d2b5cb84c4f677768bdc340611eca673afb7cf416ef5a"}, - {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:393c7aba2b55559ef7ab791c94b44f7482a07bf7640d17b341b79081f5e5cd1a"}, - {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c671dc117c2c21a1ca10c116cfcd6e3e44da7fcde37bf83b2be485ab377b25da"}, - {file = "aiohttp-3.9.5-cp312-cp312-win32.whl", hash = "sha256:5a7ee16aab26e76add4afc45e8f8206c95d1d75540f1039b84a03c3b3800dd59"}, - {file = "aiohttp-3.9.5-cp312-cp312-win_amd64.whl", hash = "sha256:5ca51eadbd67045396bc92a4345d1790b7301c14d1848feaac1d6a6c9289e888"}, - {file = "aiohttp-3.9.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:694d828b5c41255e54bc2dddb51a9f5150b4eefa9886e38b52605a05d96566e8"}, - {file = "aiohttp-3.9.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0605cc2c0088fcaae79f01c913a38611ad09ba68ff482402d3410bf59039bfb8"}, - {file = "aiohttp-3.9.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4558e5012ee03d2638c681e156461d37b7a113fe13970d438d95d10173d25f78"}, - {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dbc053ac75ccc63dc3a3cc547b98c7258ec35a215a92bd9f983e0aac95d3d5b"}, - {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4109adee842b90671f1b689901b948f347325045c15f46b39797ae1bf17019de"}, - {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6ea1a5b409a85477fd8e5ee6ad8f0e40bf2844c270955e09360418cfd09abac"}, - {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3c2890ca8c59ee683fd09adf32321a40fe1cf164e3387799efb2acebf090c11"}, - {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3916c8692dbd9d55c523374a3b8213e628424d19116ac4308e434dbf6d95bbdd"}, - {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8d1964eb7617907c792ca00b341b5ec3e01ae8c280825deadbbd678447b127e1"}, - {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:d5ab8e1f6bee051a4bf6195e38a5c13e5e161cb7bad83d8854524798bd9fcd6e"}, - {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:52c27110f3862a1afbcb2af4281fc9fdc40327fa286c4625dfee247c3ba90156"}, - {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:7f64cbd44443e80094309875d4f9c71d0401e966d191c3d469cde4642bc2e031"}, - {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8b4f72fbb66279624bfe83fd5eb6aea0022dad8eec62b71e7bf63ee1caadeafe"}, - {file = "aiohttp-3.9.5-cp38-cp38-win32.whl", hash = "sha256:6380c039ec52866c06d69b5c7aad5478b24ed11696f0e72f6b807cfb261453da"}, - {file = "aiohttp-3.9.5-cp38-cp38-win_amd64.whl", hash = "sha256:da22dab31d7180f8c3ac7c7635f3bcd53808f374f6aa333fe0b0b9e14b01f91a"}, - {file = "aiohttp-3.9.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1732102949ff6087589408d76cd6dea656b93c896b011ecafff418c9661dc4ed"}, - {file = "aiohttp-3.9.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c6021d296318cb6f9414b48e6a439a7f5d1f665464da507e8ff640848ee2a58a"}, - {file = "aiohttp-3.9.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:239f975589a944eeb1bad26b8b140a59a3a320067fb3cd10b75c3092405a1372"}, - {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b7b30258348082826d274504fbc7c849959f1989d86c29bc355107accec6cfb"}, - {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cd2adf5c87ff6d8b277814a28a535b59e20bfea40a101db6b3bdca7e9926bc24"}, - {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9a3d838441bebcf5cf442700e3963f58b5c33f015341f9ea86dcd7d503c07e2"}, - {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e3a1ae66e3d0c17cf65c08968a5ee3180c5a95920ec2731f53343fac9bad106"}, - {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9c69e77370cce2d6df5d12b4e12bdcca60c47ba13d1cbbc8645dd005a20b738b"}, - {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0cbf56238f4bbf49dab8c2dc2e6b1b68502b1e88d335bea59b3f5b9f4c001475"}, - {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d1469f228cd9ffddd396d9948b8c9cd8022b6d1bf1e40c6f25b0fb90b4f893ed"}, - {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:45731330e754f5811c314901cebdf19dd776a44b31927fa4b4dbecab9e457b0c"}, - {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:3fcb4046d2904378e3aeea1df51f697b0467f2aac55d232c87ba162709478c46"}, - {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8cf142aa6c1a751fcb364158fd710b8a9be874b81889c2bd13aa8893197455e2"}, - {file = "aiohttp-3.9.5-cp39-cp39-win32.whl", hash = "sha256:7b179eea70833c8dee51ec42f3b4097bd6370892fa93f510f76762105568cf09"}, - {file = "aiohttp-3.9.5-cp39-cp39-win_amd64.whl", hash = "sha256:38d80498e2e169bc61418ff36170e0aad0cd268da8b38a17c4cf29d254a8b3f1"}, - {file = "aiohttp-3.9.5.tar.gz", hash = "sha256:edea7d15772ceeb29db4aff55e482d4bcfb6ae160ce144f2682de02f6d693551"}, + {file = "aiohttp-3.10.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:18a01eba2574fb9edd5f6e5fb25f66e6ce061da5dab5db75e13fe1558142e0a3"}, + {file = "aiohttp-3.10.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:94fac7c6e77ccb1ca91e9eb4cb0ac0270b9fb9b289738654120ba8cebb1189c6"}, + {file = "aiohttp-3.10.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2f1f1c75c395991ce9c94d3e4aa96e5c59c8356a15b1c9231e783865e2772699"}, + {file = "aiohttp-3.10.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f7acae3cf1a2a2361ec4c8e787eaaa86a94171d2417aae53c0cca6ca3118ff6"}, + {file = "aiohttp-3.10.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:94c4381ffba9cc508b37d2e536b418d5ea9cfdc2848b9a7fea6aebad4ec6aac1"}, + {file = "aiohttp-3.10.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c31ad0c0c507894e3eaa843415841995bf8de4d6b2d24c6e33099f4bc9fc0d4f"}, + {file = "aiohttp-3.10.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0912b8a8fadeb32ff67a3ed44249448c20148397c1ed905d5dac185b4ca547bb"}, + {file = "aiohttp-3.10.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0d93400c18596b7dc4794d48a63fb361b01a0d8eb39f28800dc900c8fbdaca91"}, + {file = "aiohttp-3.10.5-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d00f3c5e0d764a5c9aa5a62d99728c56d455310bcc288a79cab10157b3af426f"}, + {file = "aiohttp-3.10.5-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:d742c36ed44f2798c8d3f4bc511f479b9ceef2b93f348671184139e7d708042c"}, + {file = "aiohttp-3.10.5-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:814375093edae5f1cb31e3407997cf3eacefb9010f96df10d64829362ae2df69"}, + {file = "aiohttp-3.10.5-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8224f98be68a84b19f48e0bdc14224b5a71339aff3a27df69989fa47d01296f3"}, + {file = "aiohttp-3.10.5-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d9a487ef090aea982d748b1b0d74fe7c3950b109df967630a20584f9a99c0683"}, + {file = "aiohttp-3.10.5-cp310-cp310-win32.whl", hash = "sha256:d9ef084e3dc690ad50137cc05831c52b6ca428096e6deb3c43e95827f531d5ef"}, + {file = "aiohttp-3.10.5-cp310-cp310-win_amd64.whl", hash = "sha256:66bf9234e08fe561dccd62083bf67400bdbf1c67ba9efdc3dac03650e97c6088"}, + {file = "aiohttp-3.10.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8c6a4e5e40156d72a40241a25cc226051c0a8d816610097a8e8f517aeacd59a2"}, + {file = "aiohttp-3.10.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c634a3207a5445be65536d38c13791904fda0748b9eabf908d3fe86a52941cf"}, + {file = "aiohttp-3.10.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4aff049b5e629ef9b3e9e617fa6e2dfeda1bf87e01bcfecaf3949af9e210105e"}, + {file = "aiohttp-3.10.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1942244f00baaacaa8155eca94dbd9e8cc7017deb69b75ef67c78e89fdad3c77"}, + {file = "aiohttp-3.10.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e04a1f2a65ad2f93aa20f9ff9f1b672bf912413e5547f60749fa2ef8a644e061"}, + {file = "aiohttp-3.10.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7f2bfc0032a00405d4af2ba27f3c429e851d04fad1e5ceee4080a1c570476697"}, + {file = "aiohttp-3.10.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:424ae21498790e12eb759040bbb504e5e280cab64693d14775c54269fd1d2bb7"}, + {file = "aiohttp-3.10.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:975218eee0e6d24eb336d0328c768ebc5d617609affaca5dbbd6dd1984f16ed0"}, + {file = "aiohttp-3.10.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4120d7fefa1e2d8fb6f650b11489710091788de554e2b6f8347c7a20ceb003f5"}, + {file = "aiohttp-3.10.5-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:b90078989ef3fc45cf9221d3859acd1108af7560c52397ff4ace8ad7052a132e"}, + {file = "aiohttp-3.10.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ba5a8b74c2a8af7d862399cdedce1533642fa727def0b8c3e3e02fcb52dca1b1"}, + {file = "aiohttp-3.10.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:02594361128f780eecc2a29939d9dfc870e17b45178a867bf61a11b2a4367277"}, + {file = "aiohttp-3.10.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:8fb4fc029e135859f533025bc82047334e24b0d489e75513144f25408ecaf058"}, + {file = "aiohttp-3.10.5-cp311-cp311-win32.whl", hash = "sha256:e1ca1ef5ba129718a8fc827b0867f6aa4e893c56eb00003b7367f8a733a9b072"}, + {file = "aiohttp-3.10.5-cp311-cp311-win_amd64.whl", hash = "sha256:349ef8a73a7c5665cca65c88ab24abe75447e28aa3bc4c93ea5093474dfdf0ff"}, + {file = "aiohttp-3.10.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:305be5ff2081fa1d283a76113b8df7a14c10d75602a38d9f012935df20731487"}, + {file = "aiohttp-3.10.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3a1c32a19ee6bbde02f1cb189e13a71b321256cc1d431196a9f824050b160d5a"}, + {file = "aiohttp-3.10.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:61645818edd40cc6f455b851277a21bf420ce347baa0b86eaa41d51ef58ba23d"}, + {file = "aiohttp-3.10.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c225286f2b13bab5987425558baa5cbdb2bc925b2998038fa028245ef421e75"}, + {file = "aiohttp-3.10.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8ba01ebc6175e1e6b7275c907a3a36be48a2d487549b656aa90c8a910d9f3178"}, + {file = "aiohttp-3.10.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8eaf44ccbc4e35762683078b72bf293f476561d8b68ec8a64f98cf32811c323e"}, + {file = "aiohttp-3.10.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1c43eb1ab7cbf411b8e387dc169acb31f0ca0d8c09ba63f9eac67829585b44f"}, + {file = "aiohttp-3.10.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:de7a5299827253023c55ea549444e058c0eb496931fa05d693b95140a947cb73"}, + {file = "aiohttp-3.10.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4790f0e15f00058f7599dab2b206d3049d7ac464dc2e5eae0e93fa18aee9e7bf"}, + {file = "aiohttp-3.10.5-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:44b324a6b8376a23e6ba25d368726ee3bc281e6ab306db80b5819999c737d820"}, + {file = "aiohttp-3.10.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:0d277cfb304118079e7044aad0b76685d30ecb86f83a0711fc5fb257ffe832ca"}, + {file = "aiohttp-3.10.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:54d9ddea424cd19d3ff6128601a4a4d23d54a421f9b4c0fff740505813739a91"}, + {file = "aiohttp-3.10.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4f1c9866ccf48a6df2b06823e6ae80573529f2af3a0992ec4fe75b1a510df8a6"}, + {file = "aiohttp-3.10.5-cp312-cp312-win32.whl", hash = "sha256:dc4826823121783dccc0871e3f405417ac116055bf184ac04c36f98b75aacd12"}, + {file = "aiohttp-3.10.5-cp312-cp312-win_amd64.whl", hash = "sha256:22c0a23a3b3138a6bf76fc553789cb1a703836da86b0f306b6f0dc1617398abc"}, + {file = "aiohttp-3.10.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7f6b639c36734eaa80a6c152a238242bedcee9b953f23bb887e9102976343092"}, + {file = "aiohttp-3.10.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f29930bc2921cef955ba39a3ff87d2c4398a0394ae217f41cb02d5c26c8b1b77"}, + {file = "aiohttp-3.10.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f489a2c9e6455d87eabf907ac0b7d230a9786be43fbe884ad184ddf9e9c1e385"}, + {file = "aiohttp-3.10.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:123dd5b16b75b2962d0fff566effb7a065e33cd4538c1692fb31c3bda2bfb972"}, + {file = "aiohttp-3.10.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b98e698dc34966e5976e10bbca6d26d6724e6bdea853c7c10162a3235aba6e16"}, + {file = "aiohttp-3.10.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3b9162bab7e42f21243effc822652dc5bb5e8ff42a4eb62fe7782bcbcdfacf6"}, + {file = "aiohttp-3.10.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1923a5c44061bffd5eebeef58cecf68096e35003907d8201a4d0d6f6e387ccaa"}, + {file = "aiohttp-3.10.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d55f011da0a843c3d3df2c2cf4e537b8070a419f891c930245f05d329c4b0689"}, + {file = "aiohttp-3.10.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:afe16a84498441d05e9189a15900640a2d2b5e76cf4efe8cbb088ab4f112ee57"}, + {file = "aiohttp-3.10.5-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:f8112fb501b1e0567a1251a2fd0747baae60a4ab325a871e975b7bb67e59221f"}, + {file = "aiohttp-3.10.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1e72589da4c90337837fdfe2026ae1952c0f4a6e793adbbfbdd40efed7c63599"}, + {file = "aiohttp-3.10.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:4d46c7b4173415d8e583045fbc4daa48b40e31b19ce595b8d92cf639396c15d5"}, + {file = "aiohttp-3.10.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:33e6bc4bab477c772a541f76cd91e11ccb6d2efa2b8d7d7883591dfb523e5987"}, + {file = "aiohttp-3.10.5-cp313-cp313-win32.whl", hash = "sha256:c58c6837a2c2a7cf3133983e64173aec11f9c2cd8e87ec2fdc16ce727bcf1a04"}, + {file = "aiohttp-3.10.5-cp313-cp313-win_amd64.whl", hash = "sha256:38172a70005252b6893088c0f5e8a47d173df7cc2b2bd88650957eb84fcf5022"}, + {file = "aiohttp-3.10.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:f6f18898ace4bcd2d41a122916475344a87f1dfdec626ecde9ee802a711bc569"}, + {file = "aiohttp-3.10.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5ede29d91a40ba22ac1b922ef510aab871652f6c88ef60b9dcdf773c6d32ad7a"}, + {file = "aiohttp-3.10.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:673f988370f5954df96cc31fd99c7312a3af0a97f09e407399f61583f30da9bc"}, + {file = "aiohttp-3.10.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58718e181c56a3c02d25b09d4115eb02aafe1a732ce5714ab70326d9776457c3"}, + {file = "aiohttp-3.10.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4b38b1570242fbab8d86a84128fb5b5234a2f70c2e32f3070143a6d94bc854cf"}, + {file = "aiohttp-3.10.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:074d1bff0163e107e97bd48cad9f928fa5a3eb4b9d33366137ffce08a63e37fe"}, + {file = "aiohttp-3.10.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd31f176429cecbc1ba499d4aba31aaccfea488f418d60376b911269d3b883c5"}, + {file = "aiohttp-3.10.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7384d0b87d4635ec38db9263e6a3f1eb609e2e06087f0aa7f63b76833737b471"}, + {file = "aiohttp-3.10.5-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:8989f46f3d7ef79585e98fa991e6ded55d2f48ae56d2c9fa5e491a6e4effb589"}, + {file = "aiohttp-3.10.5-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:c83f7a107abb89a227d6c454c613e7606c12a42b9a4ca9c5d7dad25d47c776ae"}, + {file = "aiohttp-3.10.5-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:cde98f323d6bf161041e7627a5fd763f9fd829bcfcd089804a5fdce7bb6e1b7d"}, + {file = "aiohttp-3.10.5-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:676f94c5480d8eefd97c0c7e3953315e4d8c2b71f3b49539beb2aa676c58272f"}, + {file = "aiohttp-3.10.5-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:2d21ac12dc943c68135ff858c3a989f2194a709e6e10b4c8977d7fcd67dfd511"}, + {file = "aiohttp-3.10.5-cp38-cp38-win32.whl", hash = "sha256:17e997105bd1a260850272bfb50e2a328e029c941c2708170d9d978d5a30ad9a"}, + {file = "aiohttp-3.10.5-cp38-cp38-win_amd64.whl", hash = "sha256:1c19de68896747a2aa6257ae4cf6ef59d73917a36a35ee9d0a6f48cff0f94db8"}, + {file = "aiohttp-3.10.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7e2fe37ac654032db1f3499fe56e77190282534810e2a8e833141a021faaab0e"}, + {file = "aiohttp-3.10.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f5bf3ead3cb66ab990ee2561373b009db5bc0e857549b6c9ba84b20bc462e172"}, + {file = "aiohttp-3.10.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1b2c16a919d936ca87a3c5f0e43af12a89a3ce7ccbce59a2d6784caba945b68b"}, + {file = "aiohttp-3.10.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad146dae5977c4dd435eb31373b3fe9b0b1bf26858c6fc452bf6af394067e10b"}, + {file = "aiohttp-3.10.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8c5c6fa16412b35999320f5c9690c0f554392dc222c04e559217e0f9ae244b92"}, + {file = "aiohttp-3.10.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:95c4dc6f61d610bc0ee1edc6f29d993f10febfe5b76bb470b486d90bbece6b22"}, + {file = "aiohttp-3.10.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da452c2c322e9ce0cfef392e469a26d63d42860f829026a63374fde6b5c5876f"}, + {file = "aiohttp-3.10.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:898715cf566ec2869d5cb4d5fb4be408964704c46c96b4be267442d265390f32"}, + {file = "aiohttp-3.10.5-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:391cc3a9c1527e424c6865e087897e766a917f15dddb360174a70467572ac6ce"}, + {file = "aiohttp-3.10.5-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:380f926b51b92d02a34119d072f178d80bbda334d1a7e10fa22d467a66e494db"}, + {file = "aiohttp-3.10.5-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ce91db90dbf37bb6fa0997f26574107e1b9d5ff939315247b7e615baa8ec313b"}, + {file = "aiohttp-3.10.5-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9093a81e18c45227eebe4c16124ebf3e0d893830c6aca7cc310bfca8fe59d857"}, + {file = "aiohttp-3.10.5-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:ee40b40aa753d844162dcc80d0fe256b87cba48ca0054f64e68000453caead11"}, + {file = "aiohttp-3.10.5-cp39-cp39-win32.whl", hash = "sha256:03f2645adbe17f274444953bdea69f8327e9d278d961d85657cb0d06864814c1"}, + {file = "aiohttp-3.10.5-cp39-cp39-win_amd64.whl", hash = "sha256:d17920f18e6ee090bdd3d0bfffd769d9f2cb4c8ffde3eb203777a3895c128862"}, + {file = "aiohttp-3.10.5.tar.gz", hash = "sha256:f071854b47d39591ce9a17981c46790acb30518e2f83dfca8db2dfa091178691"}, ] [package.dependencies] +aiohappyeyeballs = ">=2.3.0" aiosignal = ">=1.1.2" async-timeout = {version = ">=4.0,<5.0", markers = "python_version < \"3.11\""} attrs = ">=17.3.0" @@ -105,7 +132,7 @@ multidict = ">=4.5,<7.0" yarl = ">=1.0,<2.0" [package.extras] -speedups = ["Brotli", "aiodns", "brotlicffi"] +speedups = ["Brotli", "aiodns (>=3.2.0)", "brotlicffi"] [[package]] name = "aiosignal" @@ -123,35 +150,35 @@ frozenlist = ">=1.1.0" [[package]] name = "alabaster" -version = "0.7.16" +version = "1.0.0" description = "A light, configurable Sphinx theme" optional = false -python-versions = ">=3.9" +python-versions = ">=3.10" files = [ - {file = "alabaster-0.7.16-py3-none-any.whl", hash = "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92"}, - {file = "alabaster-0.7.16.tar.gz", hash = "sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65"}, + {file = "alabaster-1.0.0-py3-none-any.whl", hash = "sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b"}, + {file = "alabaster-1.0.0.tar.gz", hash = "sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e"}, ] [[package]] name = "annotated-types" -version = "0.6.0" +version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" files = [ - {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, - {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] [[package]] name = "ansible-core" -version = "2.15.9" +version = "2.17.3" description = "Radically simple IT automation" optional = false -python-versions = ">=3.9" +python-versions = ">=3.10" files = [ - {file = "ansible-core-2.15.9.tar.gz", hash = "sha256:25f9b1b5a5af3c0986bd3928ed086eaddb867527fb5c83afef1a03cfad34f345"}, - {file = "ansible_core-2.15.9-py3-none-any.whl", hash = "sha256:5b6a4b12aa5358f60933e79d86763e3558862282fb1dc563a29b9999e5849fc3"}, + {file = "ansible_core-2.17.3-py3-none-any.whl", hash = "sha256:71e5c93729cc5bf09ecdf0cac675685fd345d1571312409029bf842420850f23"}, + {file = "ansible_core-2.17.3.tar.gz", hash = "sha256:917557065339fe36e7078e9bea47eefab6d6877f3bd435fa5f0d766d04c58485"}, ] [package.dependencies] @@ -177,13 +204,13 @@ pygments = ">=2.4.0" [[package]] name = "antsibull" -version = "0.62.0" +version = "0.64.0" description = "Tools for building the Ansible Distribution" optional = false python-versions = ">=3.9" files = [ - {file = "antsibull-0.62.0-py3-none-any.whl", hash = "sha256:23f5ccdbc2fb15bc5a60b129b5a9026ae2f3578f50673cd2ea32e80a1c20b891"}, - {file = "antsibull-0.62.0.tar.gz", hash = "sha256:c1f7b34d5f5266b97c88a73d7c2b14afb21666eefb0d21705c7b0e97b4c06382"}, + {file = "antsibull-0.64.0-py3-none-any.whl", hash = "sha256:afcd946bacd1775fec4435023ad71f50abc32bb0c6860feedbf43bfb34201cf0"}, + {file = "antsibull-0.64.0.tar.gz", hash = "sha256:227133ee70c31d6739ec7d9b468690951e6f168cb8f4ea2f968cdf15e4000eec"}, ] [package.dependencies] @@ -205,20 +232,20 @@ all = ["pyperclip"] clipboard = ["pyperclip"] codeqa = ["flake8 (>=3.8.0)", "pylint", "reuse"] coverage = ["coverage[toml]"] -dev = ["asynctest", "coverage[toml]", "cryptography", "flake8 (>=3.8.0)", "mypy", "nox", "pylint", "pyperclip", "pyre-check (>=0.9.15)", "pytest", "pytest-asyncio (>=0.12)", "pytest-cov", "pytest-error-for-skips", "reuse", "types-aiofiles", "types-docutils", "types-pyyaml", "types-setuptools"] +dev = ["asynctest", "coverage[toml]", "cryptography", "flake8 (>=3.8.0)", "mypy", "nox", "pylint", "pyperclip", "pytest", "pytest-asyncio (>=0.12)", "pytest-cov", "pytest-error-for-skips", "reuse", "types-aiofiles", "types-docutils", "types-pyyaml", "types-setuptools"] formatters = ["black (>=24)", "isort"] test = ["asynctest", "cryptography", "pytest", "pytest-asyncio (>=0.12)", "pytest-cov", "pytest-error-for-skips"] -typing = ["mypy", "pyre-check (>=0.9.15)", "types-aiofiles", "types-docutils", "types-pyyaml", "types-setuptools"] +typing = ["mypy", "types-aiofiles", "types-docutils", "types-pyyaml", "types-setuptools"] [[package]] name = "antsibull-changelog" -version = "0.26.0" +version = "0.29.0" description = "Changelog tool for Ansible-core and Ansible collections" optional = false python-versions = ">=3.9.0" files = [ - {file = "antsibull_changelog-0.26.0-py3-none-any.whl", hash = "sha256:0a6aa5327790e89a686872fd452a9c31be288a3cb2deb9cc23eb3fc5ea7f0a19"}, - {file = "antsibull_changelog-0.26.0.tar.gz", hash = "sha256:8060c438d9fb5a1025a1e98d4de0ce8d897be6e0c21014216151b93f4e4891ff"}, + {file = "antsibull_changelog-0.29.0-py3-none-any.whl", hash = "sha256:992533e66c908929a79f4881cb8e668b9f3e90e12bf16a8bcb7a9e43d4fb3b37"}, + {file = "antsibull_changelog-0.29.0.tar.gz", hash = "sha256:b86d7e8e1a4f5ea7022f016efde2693262efe8bdf78be7f1b6e26f9673a6c70e"}, ] [package.dependencies] @@ -231,7 +258,7 @@ semantic-version = "*" [package.extras] codeqa = ["flake8 (>=3.8.0)", "pylint", "reuse"] coverage = ["coverage[toml]"] -dev = ["antsibull-changelog[codeqa]", "antsibull-changelog[coverage]", "antsibull-changelog[formatters]", "antsibull-changelog[test]", "antsibull-changelog[typing]", "nox"] +dev = ["black (>=24)", "coverage[toml]", "flake8 (>=3.8.0)", "isort", "mypy", "nox", "pylint", "pyre-check (>=0.9.17)", "pytest", "pytest-cov", "pytest-error-for-skips", "reuse", "types-docutils", "types-pyyaml", "types-toml"] formatters = ["black (>=24)", "isort"] test = ["pytest", "pytest-cov", "pytest-error-for-skips"] toml = ["tomli"] @@ -239,18 +266,18 @@ typing = ["mypy", "pyre-check (>=0.9.17)", "types-docutils", "types-pyyaml", "ty [[package]] name = "antsibull-core" -version = "3.0.1" +version = "3.0.2" description = "Tools for building the Ansible Distribution" optional = false python-versions = ">=3.9" files = [ - {file = "antsibull_core-3.0.1-py3-none-any.whl", hash = "sha256:653f44b010c85b6bcd37aacde64b35e56adec8f62119d2764aa56add7299c2f8"}, - {file = "antsibull_core-3.0.1.tar.gz", hash = "sha256:d7fddfb539757849725f8ae88ff049cef360c088a67251de0d1d8cb041243a9c"}, + {file = "antsibull_core-3.0.2-py3-none-any.whl", hash = "sha256:2cfebeffe242afecc3285b3c49f6610d6f21082b1e69cc16c1e1937abfa6d192"}, + {file = "antsibull_core-3.0.2.tar.gz", hash = "sha256:293679fc1b1e7178a761583db55f8e7b641d1d1777d99dde442bf5160ccd58b3"}, ] [package.dependencies] aiofiles = "*" -aiohttp = ">=3.0.0" +aiohttp = ">=3.3.0" build = "*" packaging = ">=20.0" perky = "*" @@ -269,13 +296,13 @@ typing = ["mypy", "pyre-check (>=0.9.17)", "types-aiofiles", "types-pyyaml", "ty [[package]] name = "antsibull-docs" -version = "2.11.0" +version = "2.13.1" description = "Tools for building Ansible documentation" optional = false python-versions = ">=3.9" files = [ - {file = "antsibull_docs-2.11.0-py3-none-any.whl", hash = "sha256:110cbe8c22c8728f341e4cd914e3e200a9d37ed04412a7c059447a63e44166df"}, - {file = "antsibull_docs-2.11.0.tar.gz", hash = "sha256:2eb252e05f33024210ac564435cb3ccd482285d21d42ac48241561db4c2240b3"}, + {file = "antsibull_docs-2.13.1-py3-none-any.whl", hash = "sha256:c2385536beedf22ef86afad8c7c50ba757690239eb81a56c7cddc80bc001ce6e"}, + {file = "antsibull_docs-2.13.1.tar.gz", hash = "sha256:32d679d14e23b27d705fa6d2011c3d1e27d90b601bc793ff2c60b0acf8cc4a63"}, ] [package.dependencies] @@ -283,7 +310,7 @@ aiohttp = ">=3.0.0" ansible-pygments = "*" antsibull-changelog = ">=0.24.0" antsibull-core = ">=2.1.0,<4.0.0" -antsibull-docs-parser = ">=1.0.0,<2.0.0" +antsibull-docs-parser = ">=1.1.0,<2.0.0" asyncio-pool = "*" docutils = "*" jinja2 = ">=3.0" @@ -298,39 +325,39 @@ twiggy = "*" [package.extras] codeqa = ["flake8 (>=3.8.0)", "pylint (>=2.17.2)", "reuse"] coverage = ["coverage[toml]"] -dev = ["ansible-core (>=2.14.0)", "asynctest", "black (>=24)", "cryptography", "flake8 (>=3.8.0)", "isort", "mypy", "nox", "pylint (>=2.17.2)", "pyre-check (>=0.9.17)", "pytest", "pytest-asyncio (>=0.12)", "pytest-cov", "pytest-error-for-skips", "reuse", "types-aiofiles", "types-docutils", "types-pyyaml"] +dev = ["ansible-core (>=2.14.0)", "asynctest", "black (>=24)", "cryptography", "flake8 (>=3.8.0)", "isort", "mypy", "nox", "pylint (>=2.17.2)", "pytest", "pytest-asyncio (>=0.12)", "pytest-cov", "pytest-error-for-skips", "reuse", "types-aiofiles", "types-docutils", "types-pyyaml"] formatters = ["black (>=24)", "isort"] test = ["ansible-core (>=2.14.0)", "asynctest", "cryptography", "pytest", "pytest-asyncio (>=0.12)", "pytest-cov", "pytest-error-for-skips"] -typing = ["mypy", "pyre-check (>=0.9.17)", "types-aiofiles", "types-docutils", "types-pyyaml"] +typing = ["mypy", "types-aiofiles", "types-docutils", "types-pyyaml"] [[package]] name = "antsibull-docs-parser" -version = "1.0.1" +version = "1.1.0" description = "Python library for processing Ansible documentation markup" optional = false python-versions = ">=3.6.1" files = [ - {file = "antsibull_docs_parser-1.0.1-py3-none-any.whl", hash = "sha256:2c92e60315ee8635537242226cfdb6c43d8036fe6d771f7c52fd037667ff0b4f"}, - {file = "antsibull_docs_parser-1.0.1.tar.gz", hash = "sha256:38c49a9cc9362c70c3024ea6ad1bd44cad8006eb80086ad2f59bd2ead7b16bb3"}, + {file = "antsibull_docs_parser-1.1.0-py3-none-any.whl", hash = "sha256:b29490908cd51660cc2b98d6af45b64db938e529f50e84aec416971820013450"}, + {file = "antsibull_docs_parser-1.1.0.tar.gz", hash = "sha256:9b94400918343677119c38344bf3bd867a937259f8d09fddc68deae2741ba056"}, ] [package.extras] codeqa = ["antsibull-changelog", "flake8", "pylint", "reuse"] coverage = ["coverage[toml]"] -dev = ["antsibull-docs-parser[codeqa]", "antsibull-docs-parser[coverage]", "antsibull-docs-parser[formatters]", "antsibull-docs-parser[test]", "antsibull-docs-parser[typing]", "nox"] +dev = ["antsibull-changelog", "black", "coverage[toml]", "flake8", "isort", "mypy", "nox", "pylint", "pyre-check (>=0.9.17)", "pytest", "pytest-cov", "pytest-error-for-skips", "pyyaml", "reuse"] formatters = ["black", "isort"] test = ["pytest", "pytest-cov", "pytest-error-for-skips", "pyyaml"] typing = ["mypy", "pyre-check (>=0.9.17)"] [[package]] name = "astroid" -version = "3.1.0" +version = "3.2.4" description = "An abstract syntax tree for Python with inference support." optional = false python-versions = ">=3.8.0" files = [ - {file = "astroid-3.1.0-py3-none-any.whl", hash = "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819"}, - {file = "astroid-3.1.0.tar.gz", hash = "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4"}, + {file = "astroid-3.2.4-py3-none-any.whl", hash = "sha256:413658a61eeca6202a59231abb473f932038fbcbf1666587f66d482083413a25"}, + {file = "astroid-3.2.4.tar.gz", hash = "sha256:0e14202810b30da1b735827f78f5157be2bbd4a7a59b7707ca0bfc2fb4c0063a"}, ] [package.dependencies] @@ -360,32 +387,32 @@ files = [ [[package]] name = "attrs" -version = "23.2.0" +version = "24.2.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.7" files = [ - {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, - {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, + {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, + {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, ] [package.extras] -cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[tests]", "pre-commit"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] -tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"] -tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] +benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] +tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] [[package]] name = "babel" -version = "2.15.0" +version = "2.16.0" description = "Internationalization utilities" optional = false python-versions = ">=3.8" files = [ - {file = "Babel-2.15.0-py3-none-any.whl", hash = "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb"}, - {file = "babel-2.15.0.tar.gz", hash = "sha256:8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413"}, + {file = "babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b"}, + {file = "babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316"}, ] [package.extras] @@ -393,33 +420,33 @@ dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] [[package]] name = "black" -version = "24.4.2" +version = "24.8.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" files = [ - {file = "black-24.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd1b5a14e417189db4c7b64a6540f31730713d173f0b63e55fabd52d61d8fdce"}, - {file = "black-24.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e537d281831ad0e71007dcdcbe50a71470b978c453fa41ce77186bbe0ed6021"}, - {file = "black-24.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eaea3008c281f1038edb473c1aa8ed8143a5535ff18f978a318f10302b254063"}, - {file = "black-24.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:7768a0dbf16a39aa5e9a3ded568bb545c8c2727396d063bbaf847df05b08cd96"}, - {file = "black-24.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474"}, - {file = "black-24.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bdde6f877a18f24844e381d45e9947a49e97933573ac9d4345399be37621e26c"}, - {file = "black-24.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb"}, - {file = "black-24.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:7e122b1c4fb252fd85df3ca93578732b4749d9be076593076ef4d07a0233c3e1"}, - {file = "black-24.4.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:accf49e151c8ed2c0cdc528691838afd217c50412534e876a19270fea1e28e2d"}, - {file = "black-24.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:88c57dc656038f1ab9f92b3eb5335ee9b021412feaa46330d5eba4e51fe49b04"}, - {file = "black-24.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be8bef99eb46d5021bf053114442914baeb3649a89dc5f3a555c88737e5e98fc"}, - {file = "black-24.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:415e686e87dbbe6f4cd5ef0fbf764af7b89f9057b97c908742b6008cc554b9c0"}, - {file = "black-24.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bf10f7310db693bb62692609b397e8d67257c55f949abde4c67f9cc574492cc7"}, - {file = "black-24.4.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:98e123f1d5cfd42f886624d84464f7756f60ff6eab89ae845210631714f6db94"}, - {file = "black-24.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48a85f2cb5e6799a9ef05347b476cce6c182d6c71ee36925a6c194d074336ef8"}, - {file = "black-24.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:b1530ae42e9d6d5b670a34db49a94115a64596bc77710b1d05e9801e62ca0a7c"}, - {file = "black-24.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:37aae07b029fa0174d39daf02748b379399b909652a806e5708199bd93899da1"}, - {file = "black-24.4.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:da33a1a5e49c4122ccdfd56cd021ff1ebc4a1ec4e2d01594fef9b6f267a9e741"}, - {file = "black-24.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef703f83fc32e131e9bcc0a5094cfe85599e7109f896fe8bc96cc402f3eb4b6e"}, - {file = "black-24.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:b9176b9832e84308818a99a561e90aa479e73c523b3f77afd07913380ae2eab7"}, - {file = "black-24.4.2-py3-none-any.whl", hash = "sha256:d36ed1124bb81b32f8614555b34cc4259c3fbc7eec17870e8ff8ded335b58d8c"}, - {file = "black-24.4.2.tar.gz", hash = "sha256:c872b53057f000085da66a19c55d68f6f8ddcac2642392ad3a355878406fbd4d"}, + {file = "black-24.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:09cdeb74d494ec023ded657f7092ba518e8cf78fa8386155e4a03fdcc44679e6"}, + {file = "black-24.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:81c6742da39f33b08e791da38410f32e27d632260e599df7245cccee2064afeb"}, + {file = "black-24.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:707a1ca89221bc8a1a64fb5e15ef39cd755633daa672a9db7498d1c19de66a42"}, + {file = "black-24.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:d6417535d99c37cee4091a2f24eb2b6d5ec42b144d50f1f2e436d9fe1916fe1a"}, + {file = "black-24.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fb6e2c0b86bbd43dee042e48059c9ad7830abd5c94b0bc518c0eeec57c3eddc1"}, + {file = "black-24.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:837fd281f1908d0076844bc2b801ad2d369c78c45cf800cad7b61686051041af"}, + {file = "black-24.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62e8730977f0b77998029da7971fa896ceefa2c4c4933fcd593fa599ecbf97a4"}, + {file = "black-24.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:72901b4913cbac8972ad911dc4098d5753704d1f3c56e44ae8dce99eecb0e3af"}, + {file = "black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368"}, + {file = "black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed"}, + {file = "black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018"}, + {file = "black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2"}, + {file = "black-24.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:505289f17ceda596658ae81b61ebbe2d9b25aa78067035184ed0a9d855d18afd"}, + {file = "black-24.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b19c9ad992c7883ad84c9b22aaa73562a16b819c1d8db7a1a1a49fb7ec13c7d2"}, + {file = "black-24.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1f13f7f386f86f8121d76599114bb8c17b69d962137fc70efe56137727c7047e"}, + {file = "black-24.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:f490dbd59680d809ca31efdae20e634f3fae27fba3ce0ba3208333b713bc3920"}, + {file = "black-24.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eab4dd44ce80dea27dc69db40dab62d4ca96112f87996bca68cd75639aeb2e4c"}, + {file = "black-24.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3c4285573d4897a7610054af5a890bde7c65cb466040c5f0c8b732812d7f0e5e"}, + {file = "black-24.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e84e33b37be070ba135176c123ae52a51f82306def9f7d063ee302ecab2cf47"}, + {file = "black-24.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:73bbf84ed136e45d451a260c6b73ed674652f90a2b3211d6a35e78054563a9bb"}, + {file = "black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed"}, + {file = "black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f"}, ] [package.dependencies] @@ -439,13 +466,13 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "build" -version = "1.2.1" +version = "1.2.2" description = "A simple, correct Python build frontend" optional = false python-versions = ">=3.8" files = [ - {file = "build-1.2.1-py3-none-any.whl", hash = "sha256:75e10f767a433d9a86e50d83f418e83efc18ede923ee5ff7df93b6cb0306c5d4"}, - {file = "build-1.2.1.tar.gz", hash = "sha256:526263f4870c26f26c433545579475377b2b7588b6f1eac76a001e873ae3e19d"}, + {file = "build-1.2.2-py3-none-any.whl", hash = "sha256:277ccc71619d98afdd841a0e96ac9fe1593b823af481d3b0cea748e8894e0613"}, + {file = "build-1.2.2.tar.gz", hash = "sha256:119b2fb462adef986483438377a13b2f42064a2a3a4161f24a0cca698a07ac8c"}, ] [package.dependencies] @@ -464,74 +491,89 @@ virtualenv = ["virtualenv (>=20.0.35)"] [[package]] name = "certifi" -version = "2024.2.2" +version = "2024.8.30" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, + {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, + {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, ] [[package]] name = "cffi" -version = "1.16.0" +version = "1.17.1" description = "Foreign Function Interface for Python calling C code." optional = false python-versions = ">=3.8" files = [ - {file = "cffi-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088"}, - {file = "cffi-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e61e3e4fa664a8588aa25c883eab612a188c725755afff6289454d6362b9673"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a72e8961a86d19bdb45851d8f1f08b041ea37d2bd8d4fd19903bc3083d80c896"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b50bf3f55561dac5438f8e70bfcdfd74543fd60df5fa5f62d94e5867deca684"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7651c50c8c5ef7bdb41108b7b8c5a83013bfaa8a935590c5d74627c047a583c7"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4108df7fe9b707191e55f33efbcb2d81928e10cea45527879a4749cbe472614"}, - {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:32c68ef735dbe5857c810328cb2481e24722a59a2003018885514d4c09af9743"}, - {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:673739cb539f8cdaa07d92d02efa93c9ccf87e345b9a0b556e3ecc666718468d"}, - {file = "cffi-1.16.0-cp310-cp310-win32.whl", hash = "sha256:9f90389693731ff1f659e55c7d1640e2ec43ff725cc61b04b2f9c6d8d017df6a"}, - {file = "cffi-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:e6024675e67af929088fda399b2094574609396b1decb609c55fa58b028a32a1"}, - {file = "cffi-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b84834d0cf97e7d27dd5b7f3aca7b6e9263c56308ab9dc8aae9784abb774d404"}, - {file = "cffi-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b8ebc27c014c59692bb2664c7d13ce7a6e9a629be20e54e7271fa696ff2b417"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee07e47c12890ef248766a6e55bd38ebfb2bb8edd4142d56db91b21ea68b7627"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8a9d3ebe49f084ad71f9269834ceccbf398253c9fac910c4fd7053ff1386936"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e70f54f1796669ef691ca07d046cd81a29cb4deb1e5f942003f401c0c4a2695d"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5bf44d66cdf9e893637896c7faa22298baebcd18d1ddb6d2626a6e39793a1d56"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b78010e7b97fef4bee1e896df8a4bbb6712b7f05b7ef630f9d1da00f6444d2e"}, - {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c6a164aa47843fb1b01e941d385aab7215563bb8816d80ff3a363a9f8448a8dc"}, - {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e09f3ff613345df5e8c3667da1d918f9149bd623cd9070c983c013792a9a62eb"}, - {file = "cffi-1.16.0-cp311-cp311-win32.whl", hash = "sha256:2c56b361916f390cd758a57f2e16233eb4f64bcbeee88a4881ea90fca14dc6ab"}, - {file = "cffi-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:db8e577c19c0fda0beb7e0d4e09e0ba74b1e4c092e0e40bfa12fe05b6f6d75ba"}, - {file = "cffi-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fa3a0128b152627161ce47201262d3140edb5a5c3da88d73a1b790a959126956"}, - {file = "cffi-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68e7c44931cc171c54ccb702482e9fc723192e88d25a0e133edd7aff8fcd1f6e"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abd808f9c129ba2beda4cfc53bde801e5bcf9d6e0f22f095e45327c038bfe68e"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88e2b3c14bdb32e440be531ade29d3c50a1a59cd4e51b1dd8b0865c54ea5d2e2"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcc8eb6d5902bb1cf6dc4f187ee3ea80a1eba0a89aba40a5cb20a5087d961357"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7be2d771cdba2942e13215c4e340bfd76398e9227ad10402a8767ab1865d2e6"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e715596e683d2ce000574bae5d07bd522c781a822866c20495e52520564f0969"}, - {file = "cffi-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2d92b25dbf6cae33f65005baf472d2c245c050b1ce709cc4588cdcdd5495b520"}, - {file = "cffi-1.16.0-cp312-cp312-win32.whl", hash = "sha256:b2ca4e77f9f47c55c194982e10f058db063937845bb2b7a86c84a6cfe0aefa8b"}, - {file = "cffi-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235"}, - {file = "cffi-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c9ef6ff37e974b73c25eecc13952c55bceed9112be2d9d938ded8e856138bcc"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a09582f178759ee8128d9270cd1344154fd473bb77d94ce0aeb2a93ebf0feaf0"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e760191dd42581e023a68b758769e2da259b5d52e3103c6060ddc02c9edb8d7b"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80876338e19c951fdfed6198e70bc88f1c9758b94578d5a7c4c91a87af3cf31c"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6a14b17d7e17fa0d207ac08642c8820f84f25ce17a442fd15e27ea18d67c59b"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6602bc8dc6f3a9e02b6c22c4fc1e47aa50f8f8e6d3f78a5e16ac33ef5fefa324"}, - {file = "cffi-1.16.0-cp38-cp38-win32.whl", hash = "sha256:131fd094d1065b19540c3d72594260f118b231090295d8c34e19a7bbcf2e860a"}, - {file = "cffi-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:31d13b0f99e0836b7ff893d37af07366ebc90b678b6664c955b54561fc36ef36"}, - {file = "cffi-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:582215a0e9adbe0e379761260553ba11c58943e4bbe9c36430c4ca6ac74b15ed"}, - {file = "cffi-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b29ebffcf550f9da55bec9e02ad430c992a87e5f512cd63388abb76f1036d8d2"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc9b18bf40cc75f66f40a7379f6a9513244fe33c0e8aa72e2d56b0196a7ef872"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cb4a35b3642fc5c005a6755a5d17c6c8b6bcb6981baf81cea8bfbc8903e8ba8"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b86851a328eedc692acf81fb05444bdf1891747c25af7529e39ddafaf68a4f3f"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c0f31130ebc2d37cdd8e44605fb5fa7ad59049298b3f745c74fa74c62fbfcfc4"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f8e709127c6c77446a8c0a8c8bf3c8ee706a06cd44b1e827c3e6a2ee6b8c098"}, - {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:748dcd1e3d3d7cd5443ef03ce8685043294ad6bd7c02a38d1bd367cfd968e000"}, - {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8895613bcc094d4a1b2dbe179d88d7fb4a15cee43c052e8885783fac397d91fe"}, - {file = "cffi-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed86a35631f7bfbb28e108dd96773b9d5a6ce4811cf6ea468bb6a359b256b1e4"}, - {file = "cffi-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:3686dffb02459559c74dd3d81748269ffb0eb027c39a6fc99502de37d501faa8"}, - {file = "cffi-1.16.0.tar.gz", hash = "sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0"}, + {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, + {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be"}, + {file = "cffi-1.17.1-cp310-cp310-win32.whl", hash = "sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c"}, + {file = "cffi-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b"}, + {file = "cffi-1.17.1-cp311-cp311-win32.whl", hash = "sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655"}, + {file = "cffi-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8"}, + {file = "cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65"}, + {file = "cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9"}, + {file = "cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d"}, + {file = "cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a"}, + {file = "cffi-1.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1"}, + {file = "cffi-1.17.1-cp38-cp38-win32.whl", hash = "sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8"}, + {file = "cffi-1.17.1-cp38-cp38-win_amd64.whl", hash = "sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e"}, + {file = "cffi-1.17.1-cp39-cp39-win32.whl", hash = "sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7"}, + {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, + {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, ] [package.dependencies] @@ -678,61 +720,63 @@ files = [ [[package]] name = "coverage" -version = "6.5.0" +version = "7.3.2" description = "Code coverage measurement for Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "coverage-6.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef8674b0ee8cc11e2d574e3e2998aea5df5ab242e012286824ea3c6970580e53"}, - {file = "coverage-6.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:784f53ebc9f3fd0e2a3f6a78b2be1bd1f5575d7863e10c6e12504f240fd06660"}, - {file = "coverage-6.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4a5be1748d538a710f87542f22c2cad22f80545a847ad91ce45e77417293eb4"}, - {file = "coverage-6.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:83516205e254a0cb77d2d7bb3632ee019d93d9f4005de31dca0a8c3667d5bc04"}, - {file = "coverage-6.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af4fffaffc4067232253715065e30c5a7ec6faac36f8fc8d6f64263b15f74db0"}, - {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:97117225cdd992a9c2a5515db1f66b59db634f59d0679ca1fa3fe8da32749cae"}, - {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a1170fa54185845505fbfa672f1c1ab175446c887cce8212c44149581cf2d466"}, - {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:11b990d520ea75e7ee8dcab5bc908072aaada194a794db9f6d7d5cfd19661e5a"}, - {file = "coverage-6.5.0-cp310-cp310-win32.whl", hash = "sha256:5dbec3b9095749390c09ab7c89d314727f18800060d8d24e87f01fb9cfb40b32"}, - {file = "coverage-6.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:59f53f1dc5b656cafb1badd0feb428c1e7bc19b867479ff72f7a9dd9b479f10e"}, - {file = "coverage-6.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4a5375e28c5191ac38cca59b38edd33ef4cc914732c916f2929029b4bfb50795"}, - {file = "coverage-6.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4ed2820d919351f4167e52425e096af41bfabacb1857186c1ea32ff9983ed75"}, - {file = "coverage-6.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:33a7da4376d5977fbf0a8ed91c4dffaaa8dbf0ddbf4c8eea500a2486d8bc4d7b"}, - {file = "coverage-6.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8fb6cf131ac4070c9c5a3e21de0f7dc5a0fbe8bc77c9456ced896c12fcdad91"}, - {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a6b7d95969b8845250586f269e81e5dfdd8ff828ddeb8567a4a2eaa7313460c4"}, - {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:1ef221513e6f68b69ee9e159506d583d31aa3567e0ae84eaad9d6ec1107dddaa"}, - {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cca4435eebea7962a52bdb216dec27215d0df64cf27fc1dd538415f5d2b9da6b"}, - {file = "coverage-6.5.0-cp311-cp311-win32.whl", hash = "sha256:98e8a10b7a314f454d9eff4216a9a94d143a7ee65018dd12442e898ee2310578"}, - {file = "coverage-6.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:bc8ef5e043a2af066fa8cbfc6e708d58017024dc4345a1f9757b329a249f041b"}, - {file = "coverage-6.5.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4433b90fae13f86fafff0b326453dd42fc9a639a0d9e4eec4d366436d1a41b6d"}, - {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4f05d88d9a80ad3cac6244d36dd89a3c00abc16371769f1340101d3cb899fc3"}, - {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:94e2565443291bd778421856bc975d351738963071e9b8839ca1fc08b42d4bef"}, - {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:027018943386e7b942fa832372ebc120155fd970837489896099f5cfa2890f79"}, - {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:255758a1e3b61db372ec2736c8e2a1fdfaf563977eedbdf131de003ca5779b7d"}, - {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:851cf4ff24062c6aec510a454b2584f6e998cada52d4cb58c5e233d07172e50c"}, - {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:12adf310e4aafddc58afdb04d686795f33f4d7a6fa67a7a9d4ce7d6ae24d949f"}, - {file = "coverage-6.5.0-cp37-cp37m-win32.whl", hash = "sha256:b5604380f3415ba69de87a289a2b56687faa4fe04dbee0754bfcae433489316b"}, - {file = "coverage-6.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:4a8dbc1f0fbb2ae3de73eb0bdbb914180c7abfbf258e90b311dcd4f585d44bd2"}, - {file = "coverage-6.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d900bb429fdfd7f511f868cedd03a6bbb142f3f9118c09b99ef8dc9bf9643c3c"}, - {file = "coverage-6.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2198ea6fc548de52adc826f62cb18554caedfb1d26548c1b7c88d8f7faa8f6ba"}, - {file = "coverage-6.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c4459b3de97b75e3bd6b7d4b7f0db13f17f504f3d13e2a7c623786289dd670e"}, - {file = "coverage-6.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:20c8ac5386253717e5ccc827caad43ed66fea0efe255727b1053a8154d952398"}, - {file = "coverage-6.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b07130585d54fe8dff3d97b93b0e20290de974dc8177c320aeaf23459219c0b"}, - {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dbdb91cd8c048c2b09eb17713b0c12a54fbd587d79adcebad543bc0cd9a3410b"}, - {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:de3001a203182842a4630e7b8d1a2c7c07ec1b45d3084a83d5d227a3806f530f"}, - {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e07f4a4a9b41583d6eabec04f8b68076ab3cd44c20bd29332c6572dda36f372e"}, - {file = "coverage-6.5.0-cp38-cp38-win32.whl", hash = "sha256:6d4817234349a80dbf03640cec6109cd90cba068330703fa65ddf56b60223a6d"}, - {file = "coverage-6.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:7ccf362abd726b0410bf8911c31fbf97f09f8f1061f8c1cf03dfc4b6372848f6"}, - {file = "coverage-6.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:633713d70ad6bfc49b34ead4060531658dc6dfc9b3eb7d8a716d5873377ab745"}, - {file = "coverage-6.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:95203854f974e07af96358c0b261f1048d8e1083f2de9b1c565e1be4a3a48cfc"}, - {file = "coverage-6.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9023e237f4c02ff739581ef35969c3739445fb059b060ca51771e69101efffe"}, - {file = "coverage-6.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:265de0fa6778d07de30bcf4d9dc471c3dc4314a23a3c6603d356a3c9abc2dfcf"}, - {file = "coverage-6.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f830ed581b45b82451a40faabb89c84e1a998124ee4212d440e9c6cf70083e5"}, - {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7b6be138d61e458e18d8e6ddcddd36dd96215edfe5f1168de0b1b32635839b62"}, - {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:42eafe6778551cf006a7c43153af1211c3aaab658d4d66fa5fcc021613d02518"}, - {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:723e8130d4ecc8f56e9a611e73b31219595baa3bb252d539206f7bbbab6ffc1f"}, - {file = "coverage-6.5.0-cp39-cp39-win32.whl", hash = "sha256:d9ecf0829c6a62b9b573c7bb6d4dcd6ba8b6f80be9ba4fc7ed50bf4ac9aecd72"}, - {file = "coverage-6.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987"}, - {file = "coverage-6.5.0-pp36.pp37.pp38-none-any.whl", hash = "sha256:1431986dac3923c5945271f169f59c45b8802a114c8f548d611f2015133df77a"}, - {file = "coverage-6.5.0.tar.gz", hash = "sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84"}, + {file = "coverage-7.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d872145f3a3231a5f20fd48500274d7df222e291d90baa2026cc5152b7ce86bf"}, + {file = "coverage-7.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:310b3bb9c91ea66d59c53fa4989f57d2436e08f18fb2f421a1b0b6b8cc7fffda"}, + {file = "coverage-7.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f47d39359e2c3779c5331fc740cf4bce6d9d680a7b4b4ead97056a0ae07cb49a"}, + {file = "coverage-7.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa72dbaf2c2068404b9870d93436e6d23addd8bbe9295f49cbca83f6e278179c"}, + {file = "coverage-7.3.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:beaa5c1b4777f03fc63dfd2a6bd820f73f036bfb10e925fce067b00a340d0f3f"}, + {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:dbc1b46b92186cc8074fee9d9fbb97a9dd06c6cbbef391c2f59d80eabdf0faa6"}, + {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:315a989e861031334d7bee1f9113c8770472db2ac484e5b8c3173428360a9148"}, + {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d1bc430677773397f64a5c88cb522ea43175ff16f8bfcc89d467d974cb2274f9"}, + {file = "coverage-7.3.2-cp310-cp310-win32.whl", hash = "sha256:a889ae02f43aa45032afe364c8ae84ad3c54828c2faa44f3bfcafecb5c96b02f"}, + {file = "coverage-7.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c0ba320de3fb8c6ec16e0be17ee1d3d69adcda99406c43c0409cb5c41788a611"}, + {file = "coverage-7.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ac8c802fa29843a72d32ec56d0ca792ad15a302b28ca6203389afe21f8fa062c"}, + {file = "coverage-7.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:89a937174104339e3a3ffcf9f446c00e3a806c28b1841c63edb2b369310fd074"}, + {file = "coverage-7.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e267e9e2b574a176ddb983399dec325a80dbe161f1a32715c780b5d14b5f583a"}, + {file = "coverage-7.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2443cbda35df0d35dcfb9bf8f3c02c57c1d6111169e3c85fc1fcc05e0c9f39a3"}, + {file = "coverage-7.3.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4175e10cc8dda0265653e8714b3174430b07c1dca8957f4966cbd6c2b1b8065a"}, + {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1"}, + {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5c913b556a116b8d5f6ef834038ba983834d887d82187c8f73dec21049abd65c"}, + {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1981f785239e4e39e6444c63a98da3a1db8e971cb9ceb50a945ba6296b43f312"}, + {file = "coverage-7.3.2-cp311-cp311-win32.whl", hash = "sha256:43668cabd5ca8258f5954f27a3aaf78757e6acf13c17604d89648ecc0cc66640"}, + {file = "coverage-7.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10c39c0452bf6e694511c901426d6b5ac005acc0f78ff265dbe36bf81f808a2"}, + {file = "coverage-7.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4cbae1051ab791debecc4a5dcc4a1ff45fc27b91b9aee165c8a27514dd160836"}, + {file = "coverage-7.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63"}, + {file = "coverage-7.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c7bba973ebee5e56fe9251300c00f1579652587a9f4a5ed8404b15a0471f216"}, + {file = "coverage-7.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe494faa90ce6381770746077243231e0b83ff3f17069d748f645617cefe19d4"}, + {file = "coverage-7.3.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6e9589bd04d0461a417562649522575d8752904d35c12907d8c9dfeba588faf"}, + {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d51ac2a26f71da1b57f2dc81d0e108b6ab177e7d30e774db90675467c847bbdf"}, + {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:99b89d9f76070237975b315b3d5f4d6956ae354a4c92ac2388a5695516e47c84"}, + {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fa28e909776dc69efb6ed975a63691bc8172b64ff357e663a1bb06ff3c9b589a"}, + {file = "coverage-7.3.2-cp312-cp312-win32.whl", hash = "sha256:289fe43bf45a575e3ab10b26d7b6f2ddb9ee2dba447499f5401cfb5ecb8196bb"}, + {file = "coverage-7.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:7dbc3ed60e8659bc59b6b304b43ff9c3ed858da2839c78b804973f613d3e92ed"}, + {file = "coverage-7.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f94b734214ea6a36fe16e96a70d941af80ff3bfd716c141300d95ebc85339738"}, + {file = "coverage-7.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:af3d828d2c1cbae52d34bdbb22fcd94d1ce715d95f1a012354a75e5913f1bda2"}, + {file = "coverage-7.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:630b13e3036e13c7adc480ca42fa7afc2a5d938081d28e20903cf7fd687872e2"}, + {file = "coverage-7.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9eacf273e885b02a0273bb3a2170f30e2d53a6d53b72dbe02d6701b5296101c"}, + {file = "coverage-7.3.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8f17966e861ff97305e0801134e69db33b143bbfb36436efb9cfff6ec7b2fd9"}, + {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b4275802d16882cf9c8b3d057a0839acb07ee9379fa2749eca54efbce1535b82"}, + {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:72c0cfa5250f483181e677ebc97133ea1ab3eb68645e494775deb6a7f6f83901"}, + {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:cb536f0dcd14149425996821a168f6e269d7dcd2c273a8bff8201e79f5104e76"}, + {file = "coverage-7.3.2-cp38-cp38-win32.whl", hash = "sha256:307adb8bd3abe389a471e649038a71b4eb13bfd6b7dd9a129fa856f5c695cf92"}, + {file = "coverage-7.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:88ed2c30a49ea81ea3b7f172e0269c182a44c236eb394718f976239892c0a27a"}, + {file = "coverage-7.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b631c92dfe601adf8f5ebc7fc13ced6bb6e9609b19d9a8cd59fa47c4186ad1ce"}, + {file = "coverage-7.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d3d9df4051c4a7d13036524b66ecf7a7537d14c18a384043f30a303b146164e9"}, + {file = "coverage-7.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f7363d3b6a1119ef05015959ca24a9afc0ea8a02c687fe7e2d557705375c01f"}, + {file = "coverage-7.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2f11cc3c967a09d3695d2a6f03fb3e6236622b93be7a4b5dc09166a861be6d25"}, + {file = "coverage-7.3.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9"}, + {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3a4006916aa6fee7cd38db3bfc95aa9c54ebb4ffbfc47c677c8bba949ceba0a6"}, + {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9028a3871280110d6e1aa2df1afd5ef003bab5fb1ef421d6dc748ae1c8ef2ebc"}, + {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9f805d62aec8eb92bab5b61c0f07329275b6f41c97d80e847b03eb894f38d083"}, + {file = "coverage-7.3.2-cp39-cp39-win32.whl", hash = "sha256:d1c88ec1a7ff4ebca0219f5b1ef863451d828cccf889c173e1253aa84b1e07ce"}, + {file = "coverage-7.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b4767da59464bb593c07afceaddea61b154136300881844768037fd5e859353f"}, + {file = "coverage-7.3.2-pp38.pp39.pp310-none-any.whl", hash = "sha256:ae97af89f0fbf373400970c0a21eef5aa941ffeed90aee43650b81f7d7f47637"}, + {file = "coverage-7.3.2.tar.gz", hash = "sha256:be32ad29341b0170e795ca590e1c07e81fc061cb5b10c74ce7203491484404ef"}, ] [package.extras] @@ -740,43 +784,38 @@ toml = ["tomli"] [[package]] name = "cryptography" -version = "42.0.7" +version = "43.0.1" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" files = [ - {file = "cryptography-42.0.7-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:a987f840718078212fdf4504d0fd4c6effe34a7e4740378e59d47696e8dfb477"}, - {file = "cryptography-42.0.7-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:bd13b5e9b543532453de08bcdc3cc7cebec6f9883e886fd20a92f26940fd3e7a"}, - {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a79165431551042cc9d1d90e6145d5d0d3ab0f2d66326c201d9b0e7f5bf43604"}, - {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a47787a5e3649008a1102d3df55424e86606c9bae6fb77ac59afe06d234605f8"}, - {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:02c0eee2d7133bdbbc5e24441258d5d2244beb31da5ed19fbb80315f4bbbff55"}, - {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:5e44507bf8d14b36b8389b226665d597bc0f18ea035d75b4e53c7b1ea84583cc"}, - {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:7f8b25fa616d8b846aef64b15c606bb0828dbc35faf90566eb139aa9cff67af2"}, - {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:93a3209f6bb2b33e725ed08ee0991b92976dfdcf4e8b38646540674fc7508e13"}, - {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:e6b8f1881dac458c34778d0a424ae5769de30544fc678eac51c1c8bb2183e9da"}, - {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3de9a45d3b2b7d8088c3fbf1ed4395dfeff79d07842217b38df14ef09ce1d8d7"}, - {file = "cryptography-42.0.7-cp37-abi3-win32.whl", hash = "sha256:789caea816c6704f63f6241a519bfa347f72fbd67ba28d04636b7c6b7da94b0b"}, - {file = "cryptography-42.0.7-cp37-abi3-win_amd64.whl", hash = "sha256:8cb8ce7c3347fcf9446f201dc30e2d5a3c898d009126010cbd1f443f28b52678"}, - {file = "cryptography-42.0.7-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:a3a5ac8b56fe37f3125e5b72b61dcde43283e5370827f5233893d461b7360cd4"}, - {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:779245e13b9a6638df14641d029add5dc17edbef6ec915688f3acb9e720a5858"}, - {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d563795db98b4cd57742a78a288cdbdc9daedac29f2239793071fe114f13785"}, - {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:31adb7d06fe4383226c3e963471f6837742889b3c4caa55aac20ad951bc8ffda"}, - {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:efd0bf5205240182e0f13bcaea41be4fdf5c22c5129fc7ced4a0282ac86998c9"}, - {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:a9bc127cdc4ecf87a5ea22a2556cab6c7eda2923f84e4f3cc588e8470ce4e42e"}, - {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:3577d029bc3f4827dd5bf8bf7710cac13527b470bbf1820a3f394adb38ed7d5f"}, - {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2e47577f9b18723fa294b0ea9a17d5e53a227867a0a4904a1a076d1646d45ca1"}, - {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:1a58839984d9cb34c855197043eaae2c187d930ca6d644612843b4fe8513c886"}, - {file = "cryptography-42.0.7-cp39-abi3-win32.whl", hash = "sha256:e6b79d0adb01aae87e8a44c2b64bc3f3fe59515280e00fb6d57a7267a2583cda"}, - {file = "cryptography-42.0.7-cp39-abi3-win_amd64.whl", hash = "sha256:16268d46086bb8ad5bf0a2b5544d8a9ed87a0e33f5e77dd3c3301e63d941a83b"}, - {file = "cryptography-42.0.7-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2954fccea107026512b15afb4aa664a5640cd0af630e2ee3962f2602693f0c82"}, - {file = "cryptography-42.0.7-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:362e7197754c231797ec45ee081f3088a27a47c6c01eff2ac83f60f85a50fe60"}, - {file = "cryptography-42.0.7-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:4f698edacf9c9e0371112792558d2f705b5645076cc0aaae02f816a0171770fd"}, - {file = "cryptography-42.0.7-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5482e789294854c28237bba77c4c83be698be740e31a3ae5e879ee5444166582"}, - {file = "cryptography-42.0.7-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e9b2a6309f14c0497f348d08a065d52f3020656f675819fc405fb63bbcd26562"}, - {file = "cryptography-42.0.7-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:d8e3098721b84392ee45af2dd554c947c32cc52f862b6a3ae982dbb90f577f14"}, - {file = "cryptography-42.0.7-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c65f96dad14f8528a447414125e1fc8feb2ad5a272b8f68477abbcc1ea7d94b9"}, - {file = "cryptography-42.0.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:36017400817987670037fbb0324d71489b6ead6231c9604f8fc1f7d008087c68"}, - {file = "cryptography-42.0.7.tar.gz", hash = "sha256:ecbfbc00bf55888edda9868a4cf927205de8499e7fabe6c050322298382953f2"}, + {file = "cryptography-43.0.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:8385d98f6a3bf8bb2d65a73e17ed87a3ba84f6991c155691c51112075f9ffc5d"}, + {file = "cryptography-43.0.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:27e613d7077ac613e399270253259d9d53872aaf657471473ebfc9a52935c062"}, + {file = "cryptography-43.0.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68aaecc4178e90719e95298515979814bda0cbada1256a4485414860bd7ab962"}, + {file = "cryptography-43.0.1-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:de41fd81a41e53267cb020bb3a7212861da53a7d39f863585d13ea11049cf277"}, + {file = "cryptography-43.0.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f98bf604c82c416bc829e490c700ca1553eafdf2912a91e23a79d97d9801372a"}, + {file = "cryptography-43.0.1-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:61ec41068b7b74268fa86e3e9e12b9f0c21fcf65434571dbb13d954bceb08042"}, + {file = "cryptography-43.0.1-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:014f58110f53237ace6a408b5beb6c427b64e084eb451ef25a28308270086494"}, + {file = "cryptography-43.0.1-cp37-abi3-win32.whl", hash = "sha256:2bd51274dcd59f09dd952afb696bf9c61a7a49dfc764c04dd33ef7a6b502a1e2"}, + {file = "cryptography-43.0.1-cp37-abi3-win_amd64.whl", hash = "sha256:666ae11966643886c2987b3b721899d250855718d6d9ce41b521252a17985f4d"}, + {file = "cryptography-43.0.1-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:ac119bb76b9faa00f48128b7f5679e1d8d437365c5d26f1c2c3f0da4ce1b553d"}, + {file = "cryptography-43.0.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bbcce1a551e262dfbafb6e6252f1ae36a248e615ca44ba302df077a846a8806"}, + {file = "cryptography-43.0.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58d4e9129985185a06d849aa6df265bdd5a74ca6e1b736a77959b498e0505b85"}, + {file = "cryptography-43.0.1-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:d03a475165f3134f773d1388aeb19c2d25ba88b6a9733c5c590b9ff7bbfa2e0c"}, + {file = "cryptography-43.0.1-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:511f4273808ab590912a93ddb4e3914dfd8a388fed883361b02dea3791f292e1"}, + {file = "cryptography-43.0.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:80eda8b3e173f0f247f711eef62be51b599b5d425c429b5d4ca6a05e9e856baa"}, + {file = "cryptography-43.0.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:38926c50cff6f533f8a2dae3d7f19541432610d114a70808f0926d5aaa7121e4"}, + {file = "cryptography-43.0.1-cp39-abi3-win32.whl", hash = "sha256:a575913fb06e05e6b4b814d7f7468c2c660e8bb16d8d5a1faf9b33ccc569dd47"}, + {file = "cryptography-43.0.1-cp39-abi3-win_amd64.whl", hash = "sha256:d75601ad10b059ec832e78823b348bfa1a59f6b8d545db3a24fd44362a1564cb"}, + {file = "cryptography-43.0.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ea25acb556320250756e53f9e20a4177515f012c9eaea17eb7587a8c4d8ae034"}, + {file = "cryptography-43.0.1-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c1332724be35d23a854994ff0b66530119500b6053d0bd3363265f7e5e77288d"}, + {file = "cryptography-43.0.1-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:fba1007b3ef89946dbbb515aeeb41e30203b004f0b4b00e5e16078b518563289"}, + {file = "cryptography-43.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5b43d1ea6b378b54a1dc99dd8a2b5be47658fe9a7ce0a58ff0b55f4b43ef2b84"}, + {file = "cryptography-43.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:88cce104c36870d70c49c7c8fd22885875d950d9ee6ab54df2745f83ba0dc365"}, + {file = "cryptography-43.0.1-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:9d3cdb25fa98afdd3d0892d132b8d7139e2c087da1712041f6b762e4f807cc96"}, + {file = "cryptography-43.0.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e710bf40870f4db63c3d7d929aa9e09e4e7ee219e703f949ec4073b4294f6172"}, + {file = "cryptography-43.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7c05650fe8023c5ed0d46793d4b7d7e6cd9c04e68eabe5b0aeea836e37bdcec2"}, + {file = "cryptography-43.0.1.tar.gz", hash = "sha256:203e92a75716d8cfb491dc47c79e17d0d9207ccffcbcb35f598fbe463ae3444d"}, ] [package.dependencies] @@ -789,22 +828,22 @@ nox = ["nox"] pep8test = ["check-sdist", "click", "mypy", "ruff"] sdist = ["build"] ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test = ["certifi", "cryptography-vectors (==43.0.1)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] test-randomorder = ["pytest-randomly"] [[package]] name = "deepdiff" -version = "7.0.1" +version = "8.0.1" description = "Deep Difference and Search of any Python object/data. Recreate objects by adding adding deltas to each other." optional = false python-versions = ">=3.8" files = [ - {file = "deepdiff-7.0.1-py3-none-any.whl", hash = "sha256:447760081918216aa4fd4ca78a4b6a848b81307b2ea94c810255334b759e1dc3"}, - {file = "deepdiff-7.0.1.tar.gz", hash = "sha256:260c16f052d4badbf60351b4f77e8390bee03a0b516246f6839bc813fb429ddf"}, + {file = "deepdiff-8.0.1-py3-none-any.whl", hash = "sha256:42e99004ce603f9a53934c634a57b04ad5900e0d8ed0abb15e635767489cbc05"}, + {file = "deepdiff-8.0.1.tar.gz", hash = "sha256:245599a4586ab59bb599ca3517a9c42f3318ff600ded5e80a3432693c8ec3c4b"}, ] [package.dependencies] -ordered-set = ">=4.1.0,<4.2.0" +orderly-set = "5.2.2" [package.extras] cli = ["click (==8.1.7)", "pyyaml (==6.0.1)"] @@ -838,13 +877,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.2.1" +version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, - {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, + {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, + {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, ] [package.extras] @@ -952,13 +991,13 @@ files = [ [[package]] name = "idna" -version = "3.7" +version = "3.8" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" files = [ - {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, - {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, + {file = "idna-3.8-py3-none-any.whl", hash = "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac"}, + {file = "idna-3.8.tar.gz", hash = "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603"}, ] [[package]] @@ -974,37 +1013,41 @@ files = [ [[package]] name = "importlib-metadata" -version = "7.1.0" +version = "8.4.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570"}, - {file = "importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2"}, + {file = "importlib_metadata-8.4.0-py3-none-any.whl", hash = "sha256:66f342cc6ac9818fc6ff340576acd24d65ba0b3efabb2b4ac08b598965a4a2f1"}, + {file = "importlib_metadata-8.4.0.tar.gz", hash = "sha256:9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5"}, ] [package.dependencies] zipp = ">=0.5" [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] +test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] [[package]] name = "importlib-resources" -version = "6.4.0" +version = "6.4.4" description = "Read resources from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_resources-6.4.0-py3-none-any.whl", hash = "sha256:50d10f043df931902d4194ea07ec57960f66a80449ff867bfe782b4c486ba78c"}, - {file = "importlib_resources-6.4.0.tar.gz", hash = "sha256:cdb2b453b8046ca4e3798eb1d84f3cce1446a0e8e7b5ef4efb600f19fc398145"}, + {file = "importlib_resources-6.4.4-py3-none-any.whl", hash = "sha256:dda242603d1c9cd836c3368b1174ed74cb4049ecd209e7a1a0104620c18c5c11"}, + {file = "importlib_resources-6.4.4.tar.gz", hash = "sha256:20600c8b7361938dc0bb2d5ec0297802e575df486f5a544fa414da65e13721f7"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["jaraco.test (>=5.4)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)", "zipp (>=3.17)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["jaraco.test (>=5.4)", "pytest (>=6,!=8.1.*)", "zipp (>=3.17)"] +type = ["pytest-mypy"] [[package]] name = "iniconfig" @@ -1301,28 +1344,25 @@ files = [ ] [[package]] -name = "ordered-set" -version = "4.1.0" -description = "An OrderedSet is a custom MutableSet that remembers its order, so that every" +name = "orderly-set" +version = "5.2.2" +description = "Orderly set" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "ordered-set-4.1.0.tar.gz", hash = "sha256:694a8e44c87657c59292ede72891eb91d34131f6531463aab3009191c77364a8"}, - {file = "ordered_set-4.1.0-py3-none-any.whl", hash = "sha256:046e1132c71fcf3330438a539928932caf51ddbc582496833e23de611de14562"}, + {file = "orderly_set-5.2.2-py3-none-any.whl", hash = "sha256:f7a37c95a38c01cdfe41c3ffb62925a318a2286ea0a41790c057fc802aec54da"}, + {file = "orderly_set-5.2.2.tar.gz", hash = "sha256:52a18b86aaf3f5d5a498bbdb27bf3253a4e5c57ab38e5b7a56fa00115cd28448"}, ] -[package.extras] -dev = ["black", "mypy", "pytest"] - [[package]] name = "packaging" -version = "23.2" +version = "24.1" description = "Core utilities for Python packages" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] [[package]] @@ -1349,19 +1389,19 @@ files = [ [[package]] name = "platformdirs" -version = "4.2.1" +version = "4.3.2" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" files = [ - {file = "platformdirs-4.2.1-py3-none-any.whl", hash = "sha256:17d5a1161b3fd67b390023cb2d3b026bbd40abde6fdb052dfbd3a29c3ba22ee1"}, - {file = "platformdirs-4.2.1.tar.gz", hash = "sha256:031cd18d4ec63ec53e82dceaac0417d218a6863f7745dfcc9efe7793b7039bdf"}, + {file = "platformdirs-4.3.2-py3-none-any.whl", hash = "sha256:eb1c8582560b34ed4ba105009a4badf7f6f85768b30126f351328507b2beb617"}, + {file = "platformdirs-4.3.2.tar.gz", hash = "sha256:9e5e27a08aa095dd127b9f2e764d74254f482fef22b0970773bfba79d091ab8c"}, ] [package.extras] -docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] -type = ["mypy (>=1.8)"] +docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] +type = ["mypy (>=1.11.2)"] [[package]] name = "pluggy" @@ -1402,109 +1442,123 @@ files = [ [[package]] name = "pydantic" -version = "2.7.1" +version = "2.9.0" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.7.1-py3-none-any.whl", hash = "sha256:e029badca45266732a9a79898a15ae2e8b14840b1eabbb25844be28f0b33f3d5"}, - {file = "pydantic-2.7.1.tar.gz", hash = "sha256:e9dbb5eada8abe4d9ae5f46b9939aead650cd2b68f249bb3a8139dbe125803cc"}, + {file = "pydantic-2.9.0-py3-none-any.whl", hash = "sha256:f66a7073abd93214a20c5f7b32d56843137a7a2e70d02111f3be287035c45370"}, + {file = "pydantic-2.9.0.tar.gz", hash = "sha256:c7a8a9fdf7d100afa49647eae340e2d23efa382466a8d177efcd1381e9be5598"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.18.2" -typing-extensions = ">=4.6.1" +pydantic-core = "2.23.2" +typing-extensions = [ + {version = ">=4.6.1", markers = "python_version < \"3.13\""}, + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, +] +tzdata = {version = "*", markers = "python_version >= \"3.9\""} [package.extras] email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.18.2" +version = "2.23.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.18.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:9e08e867b306f525802df7cd16c44ff5ebbe747ff0ca6cf3fde7f36c05a59a81"}, - {file = "pydantic_core-2.18.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f0a21cbaa69900cbe1a2e7cad2aa74ac3cf21b10c3efb0fa0b80305274c0e8a2"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0680b1f1f11fda801397de52c36ce38ef1c1dc841a0927a94f226dea29c3ae3d"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:95b9d5e72481d3780ba3442eac863eae92ae43a5f3adb5b4d0a1de89d42bb250"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fcf5cd9c4b655ad666ca332b9a081112cd7a58a8b5a6ca7a3104bc950f2038"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b5155ff768083cb1d62f3e143b49a8a3432e6789a3abee8acd005c3c7af1c74"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:553ef617b6836fc7e4df130bb851e32fe357ce36336d897fd6646d6058d980af"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b89ed9eb7d616ef5714e5590e6cf7f23b02d0d539767d33561e3675d6f9e3857"}, - {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:75f7e9488238e920ab6204399ded280dc4c307d034f3924cd7f90a38b1829563"}, - {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ef26c9e94a8c04a1b2924149a9cb081836913818e55681722d7f29af88fe7b38"}, - {file = "pydantic_core-2.18.2-cp310-none-win32.whl", hash = "sha256:182245ff6b0039e82b6bb585ed55a64d7c81c560715d1bad0cbad6dfa07b4027"}, - {file = "pydantic_core-2.18.2-cp310-none-win_amd64.whl", hash = "sha256:e23ec367a948b6d812301afc1b13f8094ab7b2c280af66ef450efc357d2ae543"}, - {file = "pydantic_core-2.18.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:219da3f096d50a157f33645a1cf31c0ad1fe829a92181dd1311022f986e5fbe3"}, - {file = "pydantic_core-2.18.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cc1cfd88a64e012b74e94cd00bbe0f9c6df57049c97f02bb07d39e9c852e19a4"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05b7133a6e6aeb8df37d6f413f7705a37ab4031597f64ab56384c94d98fa0e90"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:224c421235f6102e8737032483f43c1a8cfb1d2f45740c44166219599358c2cd"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b14d82cdb934e99dda6d9d60dc84a24379820176cc4a0d123f88df319ae9c150"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2728b01246a3bba6de144f9e3115b532ee44bd6cf39795194fb75491824a1413"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:470b94480bb5ee929f5acba6995251ada5e059a5ef3e0dfc63cca287283ebfa6"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:997abc4df705d1295a42f95b4eec4950a37ad8ae46d913caeee117b6b198811c"}, - {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:75250dbc5290e3f1a0f4618db35e51a165186f9034eff158f3d490b3fed9f8a0"}, - {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4456f2dca97c425231d7315737d45239b2b51a50dc2b6f0c2bb181fce6207664"}, - {file = "pydantic_core-2.18.2-cp311-none-win32.whl", hash = "sha256:269322dcc3d8bdb69f054681edff86276b2ff972447863cf34c8b860f5188e2e"}, - {file = "pydantic_core-2.18.2-cp311-none-win_amd64.whl", hash = "sha256:800d60565aec896f25bc3cfa56d2277d52d5182af08162f7954f938c06dc4ee3"}, - {file = "pydantic_core-2.18.2-cp311-none-win_arm64.whl", hash = "sha256:1404c69d6a676245199767ba4f633cce5f4ad4181f9d0ccb0577e1f66cf4c46d"}, - {file = "pydantic_core-2.18.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:fb2bd7be70c0fe4dfd32c951bc813d9fe6ebcbfdd15a07527796c8204bd36242"}, - {file = "pydantic_core-2.18.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6132dd3bd52838acddca05a72aafb6eab6536aa145e923bb50f45e78b7251043"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7d904828195733c183d20a54230c0df0eb46ec746ea1a666730787353e87182"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c9bd70772c720142be1020eac55f8143a34ec9f82d75a8e7a07852023e46617f"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2b8ed04b3582771764538f7ee7001b02e1170223cf9b75dff0bc698fadb00cf3"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6dac87ddb34aaec85f873d737e9d06a3555a1cc1a8e0c44b7f8d5daeb89d86f"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ca4ae5a27ad7a4ee5170aebce1574b375de390bc01284f87b18d43a3984df72"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:886eec03591b7cf058467a70a87733b35f44707bd86cf64a615584fd72488b7c"}, - {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ca7b0c1f1c983e064caa85f3792dd2fe3526b3505378874afa84baf662e12241"}, - {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b4356d3538c3649337df4074e81b85f0616b79731fe22dd11b99499b2ebbdf3"}, - {file = "pydantic_core-2.18.2-cp312-none-win32.whl", hash = "sha256:8b172601454f2d7701121bbec3425dd71efcb787a027edf49724c9cefc14c038"}, - {file = "pydantic_core-2.18.2-cp312-none-win_amd64.whl", hash = "sha256:b1bd7e47b1558ea872bd16c8502c414f9e90dcf12f1395129d7bb42a09a95438"}, - {file = "pydantic_core-2.18.2-cp312-none-win_arm64.whl", hash = "sha256:98758d627ff397e752bc339272c14c98199c613f922d4a384ddc07526c86a2ec"}, - {file = "pydantic_core-2.18.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:9fdad8e35f278b2c3eb77cbdc5c0a49dada440657bf738d6905ce106dc1de439"}, - {file = "pydantic_core-2.18.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1d90c3265ae107f91a4f279f4d6f6f1d4907ac76c6868b27dc7fb33688cfb347"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:390193c770399861d8df9670fb0d1874f330c79caaca4642332df7c682bf6b91"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:82d5d4d78e4448683cb467897fe24e2b74bb7b973a541ea1dcfec1d3cbce39fb"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4774f3184d2ef3e14e8693194f661dea5a4d6ca4e3dc8e39786d33a94865cefd"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d4d938ec0adf5167cb335acb25a4ee69a8107e4984f8fbd2e897021d9e4ca21b"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0e8b1be28239fc64a88a8189d1df7fad8be8c1ae47fcc33e43d4be15f99cc70"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:868649da93e5a3d5eacc2b5b3b9235c98ccdbfd443832f31e075f54419e1b96b"}, - {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:78363590ef93d5d226ba21a90a03ea89a20738ee5b7da83d771d283fd8a56761"}, - {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:852e966fbd035a6468fc0a3496589b45e2208ec7ca95c26470a54daed82a0788"}, - {file = "pydantic_core-2.18.2-cp38-none-win32.whl", hash = "sha256:6a46e22a707e7ad4484ac9ee9f290f9d501df45954184e23fc29408dfad61350"}, - {file = "pydantic_core-2.18.2-cp38-none-win_amd64.whl", hash = "sha256:d91cb5ea8b11607cc757675051f61b3d93f15eca3cefb3e6c704a5d6e8440f4e"}, - {file = "pydantic_core-2.18.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:ae0a8a797a5e56c053610fa7be147993fe50960fa43609ff2a9552b0e07013e8"}, - {file = "pydantic_core-2.18.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:042473b6280246b1dbf530559246f6842b56119c2926d1e52b631bdc46075f2a"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a388a77e629b9ec814c1b1e6b3b595fe521d2cdc625fcca26fbc2d44c816804"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25add29b8f3b233ae90ccef2d902d0ae0432eb0d45370fe315d1a5cf231004b"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f459a5ce8434614dfd39bbebf1041952ae01da6bed9855008cb33b875cb024c0"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eff2de745698eb46eeb51193a9f41d67d834d50e424aef27df2fcdee1b153845"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8309f67285bdfe65c372ea3722b7a5642680f3dba538566340a9d36e920b5f0"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f93a8a2e3938ff656a7c1bc57193b1319960ac015b6e87d76c76bf14fe0244b4"}, - {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:22057013c8c1e272eb8d0eebc796701167d8377441ec894a8fed1af64a0bf399"}, - {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cfeecd1ac6cc1fb2692c3d5110781c965aabd4ec5d32799773ca7b1456ac636b"}, - {file = "pydantic_core-2.18.2-cp39-none-win32.whl", hash = "sha256:0d69b4c2f6bb3e130dba60d34c0845ba31b69babdd3f78f7c0c8fae5021a253e"}, - {file = "pydantic_core-2.18.2-cp39-none-win_amd64.whl", hash = "sha256:d9319e499827271b09b4e411905b24a426b8fb69464dfa1696258f53a3334641"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a1874c6dd4113308bd0eb568418e6114b252afe44319ead2b4081e9b9521fe75"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:ccdd111c03bfd3666bd2472b674c6899550e09e9f298954cfc896ab92b5b0e6d"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e18609ceaa6eed63753037fc06ebb16041d17d28199ae5aba0052c51449650a9"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e5c584d357c4e2baf0ff7baf44f4994be121e16a2c88918a5817331fc7599d7"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43f0f463cf89ace478de71a318b1b4f05ebc456a9b9300d027b4b57c1a2064fb"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:e1b395e58b10b73b07b7cf740d728dd4ff9365ac46c18751bf8b3d8cca8f625a"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0098300eebb1c837271d3d1a2cd2911e7c11b396eac9661655ee524a7f10587b"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:36789b70d613fbac0a25bb07ab3d9dba4d2e38af609c020cf4d888d165ee0bf3"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3f9a801e7c8f1ef8718da265bba008fa121243dfe37c1cea17840b0944dfd72c"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:3a6515ebc6e69d85502b4951d89131ca4e036078ea35533bb76327f8424531ce"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20aca1e2298c56ececfd8ed159ae4dde2df0781988c97ef77d5c16ff4bd5b400"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:223ee893d77a310a0391dca6df00f70bbc2f36a71a895cecd9a0e762dc37b349"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2334ce8c673ee93a1d6a65bd90327588387ba073c17e61bf19b4fd97d688d63c"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:cbca948f2d14b09d20268cda7b0367723d79063f26c4ffc523af9042cad95592"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b3ef08e20ec49e02d5c6717a91bb5af9b20f1805583cb0adfe9ba2c6b505b5ae"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c6fdc8627910eed0c01aed6a390a252fe3ea6d472ee70fdde56273f198938374"}, - {file = "pydantic_core-2.18.2.tar.gz", hash = "sha256:2e29d20810dfc3043ee13ac7d9e25105799817683348823f305ab3f349b9386e"}, + {file = "pydantic_core-2.23.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:7d0324a35ab436c9d768753cbc3c47a865a2cbc0757066cb864747baa61f6ece"}, + {file = "pydantic_core-2.23.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:276ae78153a94b664e700ac362587c73b84399bd1145e135287513442e7dfbc7"}, + {file = "pydantic_core-2.23.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:964c7aa318da542cdcc60d4a648377ffe1a2ef0eb1e996026c7f74507b720a78"}, + {file = "pydantic_core-2.23.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1cf842265a3a820ebc6388b963ead065f5ce8f2068ac4e1c713ef77a67b71f7c"}, + {file = "pydantic_core-2.23.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae90b9e50fe1bd115b24785e962b51130340408156d34d67b5f8f3fa6540938e"}, + {file = "pydantic_core-2.23.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ae65fdfb8a841556b52935dfd4c3f79132dc5253b12c0061b96415208f4d622"}, + {file = "pydantic_core-2.23.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c8aa40f6ca803f95b1c1c5aeaee6237b9e879e4dfb46ad713229a63651a95fb"}, + {file = "pydantic_core-2.23.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c53100c8ee5a1e102766abde2158077d8c374bee0639201f11d3032e3555dfbc"}, + {file = "pydantic_core-2.23.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d6b9dd6aa03c812017411734e496c44fef29b43dba1e3dd1fa7361bbacfc1354"}, + {file = "pydantic_core-2.23.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b18cf68255a476b927910c6873d9ed00da692bb293c5b10b282bd48a0afe3ae2"}, + {file = "pydantic_core-2.23.2-cp310-none-win32.whl", hash = "sha256:e460475719721d59cd54a350c1f71c797c763212c836bf48585478c5514d2854"}, + {file = "pydantic_core-2.23.2-cp310-none-win_amd64.whl", hash = "sha256:5f3cf3721eaf8741cffaf092487f1ca80831202ce91672776b02b875580e174a"}, + {file = "pydantic_core-2.23.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:7ce8e26b86a91e305858e018afc7a6e932f17428b1eaa60154bd1f7ee888b5f8"}, + {file = "pydantic_core-2.23.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7e9b24cca4037a561422bf5dc52b38d390fb61f7bfff64053ce1b72f6938e6b2"}, + {file = "pydantic_core-2.23.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:753294d42fb072aa1775bfe1a2ba1012427376718fa4c72de52005a3d2a22178"}, + {file = "pydantic_core-2.23.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:257d6a410a0d8aeb50b4283dea39bb79b14303e0fab0f2b9d617701331ed1515"}, + {file = "pydantic_core-2.23.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c8319e0bd6a7b45ad76166cc3d5d6a36c97d0c82a196f478c3ee5346566eebfd"}, + {file = "pydantic_core-2.23.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7a05c0240f6c711eb381ac392de987ee974fa9336071fb697768dfdb151345ce"}, + {file = "pydantic_core-2.23.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d5b0ff3218858859910295df6953d7bafac3a48d5cd18f4e3ed9999efd2245f"}, + {file = "pydantic_core-2.23.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:96ef39add33ff58cd4c112cbac076726b96b98bb8f1e7f7595288dcfb2f10b57"}, + {file = "pydantic_core-2.23.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0102e49ac7d2df3379ef8d658d3bc59d3d769b0bdb17da189b75efa861fc07b4"}, + {file = "pydantic_core-2.23.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a6612c2a844043e4d10a8324c54cdff0042c558eef30bd705770793d70b224aa"}, + {file = "pydantic_core-2.23.2-cp311-none-win32.whl", hash = "sha256:caffda619099cfd4f63d48462f6aadbecee3ad9603b4b88b60cb821c1b258576"}, + {file = "pydantic_core-2.23.2-cp311-none-win_amd64.whl", hash = "sha256:6f80fba4af0cb1d2344869d56430e304a51396b70d46b91a55ed4959993c0589"}, + {file = "pydantic_core-2.23.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:4c83c64d05ffbbe12d4e8498ab72bdb05bcc1026340a4a597dc647a13c1605ec"}, + {file = "pydantic_core-2.23.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6294907eaaccf71c076abdd1c7954e272efa39bb043161b4b8aa1cd76a16ce43"}, + {file = "pydantic_core-2.23.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a801c5e1e13272e0909c520708122496647d1279d252c9e6e07dac216accc41"}, + {file = "pydantic_core-2.23.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cc0c316fba3ce72ac3ab7902a888b9dc4979162d320823679da270c2d9ad0cad"}, + {file = "pydantic_core-2.23.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6b06c5d4e8701ac2ba99a2ef835e4e1b187d41095a9c619c5b185c9068ed2a49"}, + {file = "pydantic_core-2.23.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:82764c0bd697159fe9947ad59b6db6d7329e88505c8f98990eb07e84cc0a5d81"}, + {file = "pydantic_core-2.23.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b1a195efd347ede8bcf723e932300292eb13a9d2a3c1f84eb8f37cbbc905b7f"}, + {file = "pydantic_core-2.23.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b7efb12e5071ad8d5b547487bdad489fbd4a5a35a0fc36a1941517a6ad7f23e0"}, + {file = "pydantic_core-2.23.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:5dd0ec5f514ed40e49bf961d49cf1bc2c72e9b50f29a163b2cc9030c6742aa73"}, + {file = "pydantic_core-2.23.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:820f6ee5c06bc868335e3b6e42d7ef41f50dfb3ea32fbd523ab679d10d8741c0"}, + {file = "pydantic_core-2.23.2-cp312-none-win32.whl", hash = "sha256:3713dc093d5048bfaedbba7a8dbc53e74c44a140d45ede020dc347dda18daf3f"}, + {file = "pydantic_core-2.23.2-cp312-none-win_amd64.whl", hash = "sha256:e1895e949f8849bc2757c0dbac28422a04be031204df46a56ab34bcf98507342"}, + {file = "pydantic_core-2.23.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:da43cbe593e3c87d07108d0ebd73771dc414488f1f91ed2e204b0370b94b37ac"}, + {file = "pydantic_core-2.23.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:64d094ea1aa97c6ded4748d40886076a931a8bf6f61b6e43e4a1041769c39dd2"}, + {file = "pydantic_core-2.23.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:084414ffe9a85a52940b49631321d636dadf3576c30259607b75516d131fecd0"}, + {file = "pydantic_core-2.23.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:043ef8469f72609c4c3a5e06a07a1f713d53df4d53112c6d49207c0bd3c3bd9b"}, + {file = "pydantic_core-2.23.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3649bd3ae6a8ebea7dc381afb7f3c6db237fc7cebd05c8ac36ca8a4187b03b30"}, + {file = "pydantic_core-2.23.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6db09153d8438425e98cdc9a289c5fade04a5d2128faff8f227c459da21b9703"}, + {file = "pydantic_core-2.23.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5668b3173bb0b2e65020b60d83f5910a7224027232c9f5dc05a71a1deac9f960"}, + {file = "pydantic_core-2.23.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1c7b81beaf7c7ebde978377dc53679c6cba0e946426fc7ade54251dfe24a7604"}, + {file = "pydantic_core-2.23.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:ae579143826c6f05a361d9546446c432a165ecf1c0b720bbfd81152645cb897d"}, + {file = "pydantic_core-2.23.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:19f1352fe4b248cae22a89268720fc74e83f008057a652894f08fa931e77dced"}, + {file = "pydantic_core-2.23.2-cp313-none-win32.whl", hash = "sha256:e1a79ad49f346aa1a2921f31e8dbbab4d64484823e813a002679eaa46cba39e1"}, + {file = "pydantic_core-2.23.2-cp313-none-win_amd64.whl", hash = "sha256:582871902e1902b3c8e9b2c347f32a792a07094110c1bca6c2ea89b90150caac"}, + {file = "pydantic_core-2.23.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:743e5811b0c377eb830150d675b0847a74a44d4ad5ab8845923d5b3a756d8100"}, + {file = "pydantic_core-2.23.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6650a7bbe17a2717167e3e23c186849bae5cef35d38949549f1c116031b2b3aa"}, + {file = "pydantic_core-2.23.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56e6a12ec8d7679f41b3750ffa426d22b44ef97be226a9bab00a03365f217b2b"}, + {file = "pydantic_core-2.23.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:810ca06cca91de9107718dc83d9ac4d2e86efd6c02cba49a190abcaf33fb0472"}, + {file = "pydantic_core-2.23.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:785e7f517ebb9890813d31cb5d328fa5eda825bb205065cde760b3150e4de1f7"}, + {file = "pydantic_core-2.23.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ef71ec876fcc4d3bbf2ae81961959e8d62f8d74a83d116668409c224012e3af"}, + {file = "pydantic_core-2.23.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d50ac34835c6a4a0d456b5db559b82047403c4317b3bc73b3455fefdbdc54b0a"}, + {file = "pydantic_core-2.23.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16b25a4a120a2bb7dab51b81e3d9f3cde4f9a4456566c403ed29ac81bf49744f"}, + {file = "pydantic_core-2.23.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:41ae8537ad371ec018e3c5da0eb3f3e40ee1011eb9be1da7f965357c4623c501"}, + {file = "pydantic_core-2.23.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:07049ec9306ec64e955b2e7c40c8d77dd78ea89adb97a2013d0b6e055c5ee4c5"}, + {file = "pydantic_core-2.23.2-cp38-none-win32.whl", hash = "sha256:086c5db95157dc84c63ff9d96ebb8856f47ce113c86b61065a066f8efbe80acf"}, + {file = "pydantic_core-2.23.2-cp38-none-win_amd64.whl", hash = "sha256:67b6655311b00581914aba481729971b88bb8bc7996206590700a3ac85e457b8"}, + {file = "pydantic_core-2.23.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:358331e21a897151e54d58e08d0219acf98ebb14c567267a87e971f3d2a3be59"}, + {file = "pydantic_core-2.23.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c4d9f15ffe68bcd3898b0ad7233af01b15c57d91cd1667f8d868e0eacbfe3f87"}, + {file = "pydantic_core-2.23.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0123655fedacf035ab10c23450163c2f65a4174f2bb034b188240a6cf06bb123"}, + {file = "pydantic_core-2.23.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e6e3ccebdbd6e53474b0bb7ab8b88e83c0cfe91484b25e058e581348ee5a01a5"}, + {file = "pydantic_core-2.23.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fc535cb898ef88333cf317777ecdfe0faac1c2a3187ef7eb061b6f7ecf7e6bae"}, + {file = "pydantic_core-2.23.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aab9e522efff3993a9e98ab14263d4e20211e62da088298089a03056980a3e69"}, + {file = "pydantic_core-2.23.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05b366fb8fe3d8683b11ac35fa08947d7b92be78ec64e3277d03bd7f9b7cda79"}, + {file = "pydantic_core-2.23.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7568f682c06f10f30ef643a1e8eec4afeecdafde5c4af1b574c6df079e96f96c"}, + {file = "pydantic_core-2.23.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:cdd02a08205dc90238669f082747612cb3c82bd2c717adc60f9b9ecadb540f80"}, + {file = "pydantic_core-2.23.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1a2ab4f410f4b886de53b6bddf5dd6f337915a29dd9f22f20f3099659536b2f6"}, + {file = "pydantic_core-2.23.2-cp39-none-win32.whl", hash = "sha256:0448b81c3dfcde439551bb04a9f41d7627f676b12701865c8a2574bcea034437"}, + {file = "pydantic_core-2.23.2-cp39-none-win_amd64.whl", hash = "sha256:4cebb9794f67266d65e7e4cbe5dcf063e29fc7b81c79dc9475bd476d9534150e"}, + {file = "pydantic_core-2.23.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e758d271ed0286d146cf7c04c539a5169a888dd0b57026be621547e756af55bc"}, + {file = "pydantic_core-2.23.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:f477d26183e94eaafc60b983ab25af2a809a1b48ce4debb57b343f671b7a90b6"}, + {file = "pydantic_core-2.23.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da3131ef2b940b99106f29dfbc30d9505643f766704e14c5d5e504e6a480c35e"}, + {file = "pydantic_core-2.23.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:329a721253c7e4cbd7aad4a377745fbcc0607f9d72a3cc2102dd40519be75ed2"}, + {file = "pydantic_core-2.23.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7706e15cdbf42f8fab1e6425247dfa98f4a6f8c63746c995d6a2017f78e619ae"}, + {file = "pydantic_core-2.23.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:e64ffaf8f6e17ca15eb48344d86a7a741454526f3a3fa56bc493ad9d7ec63936"}, + {file = "pydantic_core-2.23.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:dd59638025160056687d598b054b64a79183f8065eae0d3f5ca523cde9943940"}, + {file = "pydantic_core-2.23.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:12625e69b1199e94b0ae1c9a95d000484ce9f0182f9965a26572f054b1537e44"}, + {file = "pydantic_core-2.23.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5d813fd871b3d5c3005157622ee102e8908ad6011ec915a18bd8fde673c4360e"}, + {file = "pydantic_core-2.23.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:1eb37f7d6a8001c0f86dc8ff2ee8d08291a536d76e49e78cda8587bb54d8b329"}, + {file = "pydantic_core-2.23.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ce7eaf9a98680b4312b7cebcdd9352531c43db00fca586115845df388f3c465"}, + {file = "pydantic_core-2.23.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f087879f1ffde024dd2788a30d55acd67959dcf6c431e9d3682d1c491a0eb474"}, + {file = "pydantic_core-2.23.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ce883906810b4c3bd90e0ada1f9e808d9ecf1c5f0b60c6b8831d6100bcc7dd6"}, + {file = "pydantic_core-2.23.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:a8031074a397a5925d06b590121f8339d34a5a74cfe6970f8a1124eb8b83f4ac"}, + {file = "pydantic_core-2.23.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:23af245b8f2f4ee9e2c99cb3f93d0e22fb5c16df3f2f643f5a8da5caff12a653"}, + {file = "pydantic_core-2.23.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c57e493a0faea1e4c38f860d6862ba6832723396c884fbf938ff5e9b224200e2"}, + {file = "pydantic_core-2.23.2.tar.gz", hash = "sha256:95d6bf449a1ac81de562d65d180af5d8c19672793c81877a2eda8fde5d08f2fd"}, ] [package.dependencies] @@ -1526,17 +1580,17 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pylint" -version = "3.1.1" +version = "3.2.7" description = "python code static checker" optional = false python-versions = ">=3.8.0" files = [ - {file = "pylint-3.1.1-py3-none-any.whl", hash = "sha256:862eddf25dab42704c5f06d3688b8bc19ef4c99ad8a836b6ff260a3b2fbafee1"}, - {file = "pylint-3.1.1.tar.gz", hash = "sha256:c7c2652bf8099c7fb7a63bc6af5c5f8f7b9d7b392fa1d320cb020e222aff28c2"}, + {file = "pylint-3.2.7-py3-none-any.whl", hash = "sha256:02f4aedeac91be69fb3b4bea997ce580a4ac68ce58b89eaefeaf06749df73f4b"}, + {file = "pylint-3.2.7.tar.gz", hash = "sha256:1b7a721b575eaeaa7d39db076b6e7743c993ea44f57979127c517c6c572c803e"}, ] [package.dependencies] -astroid = ">=3.1.0,<=3.2.0-dev0" +astroid = ">=3.2.4,<=3.3.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ {version = ">=0.2", markers = "python_version < \"3.11\""}, @@ -1555,17 +1609,17 @@ testutils = ["gitpython (>3)"] [[package]] name = "pynetbox" -version = "7.3.3" +version = "7.4.0" description = "NetBox API client library" optional = false python-versions = "*" files = [ - {file = "pynetbox-7.3.3-py3-none-any.whl", hash = "sha256:9bc25f83ff126f12d26976e544a2f0f6c7c898c261e6d47f8a4144ab47686d81"}, - {file = "pynetbox-7.3.3.tar.gz", hash = "sha256:b0bcef4c3a019516d2425ae0ce5509eae7f4f11ad4510c9fe9527d468f22529b"}, + {file = "pynetbox-7.4.0-py3-none-any.whl", hash = "sha256:974d93da77ad404e813bc7b3948d9664e0653262f0fb1e97715217aee062a648"}, + {file = "pynetbox-7.4.0.tar.gz", hash = "sha256:fd0b1f197b3880048408ff5ed84422dd599bcd9389e32cb06a09b9b0d55c1636"}, ] [package.dependencies] -packaging = "<24.0" +packaging = "*" requests = ">=2.20.0,<3.0" [[package]] @@ -1581,13 +1635,13 @@ files = [ [[package]] name = "pytest" -version = "8.2.0" +version = "8.3.2" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.2.0-py3-none-any.whl", hash = "sha256:1733f0620f6cda4095bbf0d9ff8022486e91892245bb9e7d5542c018f612f233"}, - {file = "pytest-8.2.0.tar.gz", hash = "sha256:d507d4482197eac0ba2bae2e9babf0672eb333017bcedaa5fb1a3d42c1174b3f"}, + {file = "pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5"}, + {file = "pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"}, ] [package.dependencies] @@ -1595,7 +1649,7 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.5,<2.0" +pluggy = ">=1.5,<2" tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] @@ -1666,73 +1720,75 @@ files = [ [[package]] name = "pyyaml" -version = "6.0.1" +version = "6.0.2" description = "YAML parser and emitter for Python" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, - {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, - {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, - {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, - {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, - {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, - {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, - {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, - {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, - {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, - {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, - {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, - {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, - {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, - {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, - {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, - {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, + {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, + {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, + {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, + {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, + {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, + {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, + {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, + {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, + {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, + {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, + {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, + {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, + {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, + {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, + {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, ] [[package]] name = "requests" -version = "2.32.0" +version = "2.32.3" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" files = [ - {file = "requests-2.32.0-py3-none-any.whl", hash = "sha256:f2c3881dddb70d056c5bd7600a4fae312b2a300e39be6a118d30b90bd27262b5"}, - {file = "requests-2.32.0.tar.gz", hash = "sha256:fa5490319474c82ef1d2c9bc459d3652e3ae4ef4c4ebdd18a21145a47ca4b6b8"}, + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, ] [package.dependencies] @@ -1764,13 +1820,13 @@ test = ["commentjson", "packaging", "pytest"] [[package]] name = "rich" -version = "13.7.1" +version = "13.8.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.7.0" files = [ - {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, - {file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"}, + {file = "rich-13.8.0-py3-none-any.whl", hash = "sha256:2e85306a063b9492dffc86278197a60cbece75bcb766022f3436f567cae11bdc"}, + {file = "rich-13.8.0.tar.gz", hash = "sha256:a5ac1f1cd448ade0d59cc3356f7db7a7ccda2c8cbae9c7a90c28ff463d3e91f4"}, ] [package.dependencies] @@ -1782,22 +1838,22 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "rstcheck" -version = "6.2.1" +version = "6.2.4" description = "Checks syntax of reStructuredText and code blocks nested within it" optional = false python-versions = ">=3.8" files = [ - {file = "rstcheck-6.2.1-py3-none-any.whl", hash = "sha256:b450943707d8ca053f5c6b9f103ee595f4926a064203e5e579172aefb3fe2c12"}, - {file = "rstcheck-6.2.1.tar.gz", hash = "sha256:e4d173950b023eb12c2b9d2348a8c62bef46612bbc7b29e1e57d37320ed0a891"}, + {file = "rstcheck-6.2.4-py3-none-any.whl", hash = "sha256:23de2575ba0af1adcddea87a20d69187f0fb9dd8270f59eb98d63461c95375a7"}, + {file = "rstcheck-6.2.4.tar.gz", hash = "sha256:384942563dfbfcc85903a587ecf050447217c46b51e266ed3fe51371bc599015"}, ] [package.dependencies] rstcheck-core = ">=1.1" -typer = {version = ">=0.4.1", extras = ["all"]} +typer = ">=0.12.0" [package.extras] dev = ["rstcheck[docs,sphinx,testing,toml,type-check]", "tox (>=3.15)"] -docs = ["m2r2 (>=0.3.2)", "sphinx (>=5.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-click (>=4.0.3)", "sphinx-rtd-theme (>=1.2)", "sphinxcontrib-spelling (>=7.3)"] +docs = ["myst-parser (>=3)", "sphinx (>=5.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-click (>=4.0.3)", "sphinx-rtd-theme (>=1.2)", "sphinxcontrib-spelling (>=7.3)"] sphinx = ["sphinx (>=5.0)"] testing = ["coverage-conditional-plugin (>=0.5)", "coverage[toml] (>=6.0)", "pytest (>=7.2)", "pytest-cov (>=3.0)", "pytest-randomly (>=3.0)", "pytest-sugar (>=0.9.5)"] toml = ["tomli (>=2.0)"] @@ -1877,26 +1933,26 @@ files = [ [[package]] name = "sphinx" -version = "7.3.7" +version = "8.0.2" description = "Python documentation generator" optional = false -python-versions = ">=3.9" +python-versions = ">=3.10" files = [ - {file = "sphinx-7.3.7-py3-none-any.whl", hash = "sha256:413f75440be4cacf328f580b4274ada4565fb2187d696a84970c23f77b64d8c3"}, - {file = "sphinx-7.3.7.tar.gz", hash = "sha256:a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc"}, + {file = "sphinx-8.0.2-py3-none-any.whl", hash = "sha256:56173572ae6c1b9a38911786e206a110c9749116745873feae4f9ce88e59391d"}, + {file = "sphinx-8.0.2.tar.gz", hash = "sha256:0cce1ddcc4fd3532cf1dd283bc7d886758362c5c1de6598696579ce96d8ffa5b"}, ] [package.dependencies] -alabaster = ">=0.7.14,<0.8.0" -babel = ">=2.9" -colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.18.1,<0.22" +alabaster = ">=0.7.14" +babel = ">=2.13" +colorama = {version = ">=0.4.6", markers = "sys_platform == \"win32\""} +docutils = ">=0.20,<0.22" imagesize = ">=1.3" -Jinja2 = ">=3.0" -packaging = ">=21.0" -Pygments = ">=2.14" -requests = ">=2.25.0" -snowballstemmer = ">=2.0" +Jinja2 = ">=3.1" +packaging = ">=23.0" +Pygments = ">=2.17" +requests = ">=2.30.0" +snowballstemmer = ">=2.2" sphinxcontrib-applehelp = "*" sphinxcontrib-devhelp = "*" sphinxcontrib-htmlhelp = ">=2.0.0" @@ -1907,54 +1963,54 @@ tomli = {version = ">=2", markers = "python_version < \"3.11\""} [package.extras] docs = ["sphinxcontrib-websupport"] -lint = ["flake8 (>=3.5.0)", "importlib_metadata", "mypy (==1.9.0)", "pytest (>=6.0)", "ruff (==0.3.7)", "sphinx-lint", "tomli", "types-docutils", "types-requests"] -test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=6.0)", "setuptools (>=67.0)"] +lint = ["flake8 (>=6.0)", "mypy (==1.11.0)", "pytest (>=6.0)", "ruff (==0.5.5)", "sphinx-lint (>=0.9)", "tomli (>=2)", "types-Pillow (==10.2.0.20240520)", "types-Pygments (==2.18.0.20240506)", "types-colorama (==0.4.15.20240311)", "types-defusedxml (==0.7.0.20240218)", "types-docutils (==0.21.0.20240724)", "types-requests (>=2.30.0)"] +test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=8.0)", "setuptools (>=70.0)", "typing_extensions (>=4.9)"] [[package]] name = "sphinxcontrib-applehelp" -version = "1.0.8" +version = "2.0.0" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_applehelp-1.0.8-py3-none-any.whl", hash = "sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4"}, - {file = "sphinxcontrib_applehelp-1.0.8.tar.gz", hash = "sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619"}, + {file = "sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5"}, + {file = "sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] name = "sphinxcontrib-devhelp" -version = "1.0.6" +version = "2.0.0" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_devhelp-1.0.6-py3-none-any.whl", hash = "sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f"}, - {file = "sphinxcontrib_devhelp-1.0.6.tar.gz", hash = "sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3"}, + {file = "sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2"}, + {file = "sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] name = "sphinxcontrib-htmlhelp" -version = "2.0.5" +version = "2.1.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl", hash = "sha256:393f04f112b4d2f53d93448d4bce35842f62b307ccdc549ec1585e950bc35e04"}, - {file = "sphinxcontrib_htmlhelp-2.0.5.tar.gz", hash = "sha256:0dc87637d5de53dd5eec3a6a01753b1ccf99494bd756aafecd74b4fa9e729015"}, + {file = "sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8"}, + {file = "sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["html5lib", "pytest"] @@ -1974,33 +2030,33 @@ test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" -version = "1.0.7" +version = "2.0.0" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_qthelp-1.0.7-py3-none-any.whl", hash = "sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182"}, - {file = "sphinxcontrib_qthelp-1.0.7.tar.gz", hash = "sha256:053dedc38823a80a7209a80860b16b722e9e0209e32fea98c90e4e6624588ed6"}, + {file = "sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb"}, + {file = "sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] -test = ["pytest"] +test = ["defusedxml (>=0.7.1)", "pytest"] [[package]] name = "sphinxcontrib-serializinghtml" -version = "1.1.10" +version = "2.0.0" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl", hash = "sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7"}, - {file = "sphinxcontrib_serializinghtml-1.1.10.tar.gz", hash = "sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f"}, + {file = "sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331"}, + {file = "sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] @@ -2017,13 +2073,13 @@ files = [ [[package]] name = "tomlkit" -version = "0.12.5" +version = "0.13.2" description = "Style preserving TOML library" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "tomlkit-0.12.5-py3-none-any.whl", hash = "sha256:af914f5a9c59ed9d0762c7b64d3b5d5df007448eb9cd2edc8a46b1eafead172f"}, - {file = "tomlkit-0.12.5.tar.gz", hash = "sha256:eef34fba39834d4d6b73c9ba7f3e4d1c417a4e56f89a7e96e090dd0d24b8fb3c"}, + {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, + {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, ] [[package]] @@ -2042,13 +2098,13 @@ six = "*" [[package]] name = "typer" -version = "0.12.3" +version = "0.12.5" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." optional = false python-versions = ">=3.7" files = [ - {file = "typer-0.12.3-py3-none-any.whl", hash = "sha256:070d7ca53f785acbccba8e7d28b08dcd88f79f1fbda035ade0aecec71ca5c914"}, - {file = "typer-0.12.3.tar.gz", hash = "sha256:49e73131481d804288ef62598d97a1ceef3058905aa536a1134f90891ba35482"}, + {file = "typer-0.12.5-py3-none-any.whl", hash = "sha256:62fe4e471711b147e3365034133904df3e235698399bc4de2b36c8579298d52b"}, + {file = "typer-0.12.5.tar.gz", hash = "sha256:f592f089bedcc8ec1b974125d64851029c3b1af145f04aca64d69410f0c9b722"}, ] [package.dependencies] @@ -2059,24 +2115,35 @@ typing-extensions = ">=3.7.4.3" [[package]] name = "typing-extensions" -version = "4.11.0" +version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, - {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, +] + +[[package]] +name = "tzdata" +version = "2024.1" +description = "Provider of IANA time zone data" +optional = false +python-versions = ">=2" +files = [ + {file = "tzdata-2024.1-py2.py3-none-any.whl", hash = "sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252"}, + {file = "tzdata-2024.1.tar.gz", hash = "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd"}, ] [[package]] name = "urllib3" -version = "2.2.1" +version = "2.2.2" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, - {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, + {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, + {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, ] [package.extras] @@ -2087,101 +2154,103 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "yarl" -version = "1.9.4" +version = "1.10.0" description = "Yet another URL library" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "yarl-1.9.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a8c1df72eb746f4136fe9a2e72b0c9dc1da1cbd23b5372f94b5820ff8ae30e0e"}, - {file = "yarl-1.9.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a3a6ed1d525bfb91b3fc9b690c5a21bb52de28c018530ad85093cc488bee2dd2"}, - {file = "yarl-1.9.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c38c9ddb6103ceae4e4498f9c08fac9b590c5c71b0370f98714768e22ac6fa66"}, - {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d9e09c9d74f4566e905a0b8fa668c58109f7624db96a2171f21747abc7524234"}, - {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8477c1ee4bd47c57d49621a062121c3023609f7a13b8a46953eb6c9716ca392"}, - {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5ff2c858f5f6a42c2a8e751100f237c5e869cbde669a724f2062d4c4ef93551"}, - {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:357495293086c5b6d34ca9616a43d329317feab7917518bc97a08f9e55648455"}, - {file = "yarl-1.9.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54525ae423d7b7a8ee81ba189f131054defdb122cde31ff17477951464c1691c"}, - {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:801e9264d19643548651b9db361ce3287176671fb0117f96b5ac0ee1c3530d53"}, - {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e516dc8baf7b380e6c1c26792610230f37147bb754d6426462ab115a02944385"}, - {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:7d5aaac37d19b2904bb9dfe12cdb08c8443e7ba7d2852894ad448d4b8f442863"}, - {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:54beabb809ffcacbd9d28ac57b0db46e42a6e341a030293fb3185c409e626b8b"}, - {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bac8d525a8dbc2a1507ec731d2867025d11ceadcb4dd421423a5d42c56818541"}, - {file = "yarl-1.9.4-cp310-cp310-win32.whl", hash = "sha256:7855426dfbddac81896b6e533ebefc0af2f132d4a47340cee6d22cac7190022d"}, - {file = "yarl-1.9.4-cp310-cp310-win_amd64.whl", hash = "sha256:848cd2a1df56ddbffeb375535fb62c9d1645dde33ca4d51341378b3f5954429b"}, - {file = "yarl-1.9.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:35a2b9396879ce32754bd457d31a51ff0a9d426fd9e0e3c33394bf4b9036b099"}, - {file = "yarl-1.9.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c7d56b293cc071e82532f70adcbd8b61909eec973ae9d2d1f9b233f3d943f2c"}, - {file = "yarl-1.9.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d8a1c6c0be645c745a081c192e747c5de06e944a0d21245f4cf7c05e457c36e0"}, - {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b3c1ffe10069f655ea2d731808e76e0f452fc6c749bea04781daf18e6039525"}, - {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:549d19c84c55d11687ddbd47eeb348a89df9cb30e1993f1b128f4685cd0ebbf8"}, - {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7409f968456111140c1c95301cadf071bd30a81cbd7ab829169fb9e3d72eae9"}, - {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e23a6d84d9d1738dbc6e38167776107e63307dfc8ad108e580548d1f2c587f42"}, - {file = "yarl-1.9.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d8b889777de69897406c9fb0b76cdf2fd0f31267861ae7501d93003d55f54fbe"}, - {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:03caa9507d3d3c83bca08650678e25364e1843b484f19986a527630ca376ecce"}, - {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4e9035df8d0880b2f1c7f5031f33f69e071dfe72ee9310cfc76f7b605958ceb9"}, - {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:c0ec0ed476f77db9fb29bca17f0a8fcc7bc97ad4c6c1d8959c507decb22e8572"}, - {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:ee04010f26d5102399bd17f8df8bc38dc7ccd7701dc77f4a68c5b8d733406958"}, - {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:49a180c2e0743d5d6e0b4d1a9e5f633c62eca3f8a86ba5dd3c471060e352ca98"}, - {file = "yarl-1.9.4-cp311-cp311-win32.whl", hash = "sha256:81eb57278deb6098a5b62e88ad8281b2ba09f2f1147c4767522353eaa6260b31"}, - {file = "yarl-1.9.4-cp311-cp311-win_amd64.whl", hash = "sha256:d1d2532b340b692880261c15aee4dc94dd22ca5d61b9db9a8a361953d36410b1"}, - {file = "yarl-1.9.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0d2454f0aef65ea81037759be5ca9947539667eecebca092733b2eb43c965a81"}, - {file = "yarl-1.9.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:44d8ffbb9c06e5a7f529f38f53eda23e50d1ed33c6c869e01481d3fafa6b8142"}, - {file = "yarl-1.9.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:aaaea1e536f98754a6e5c56091baa1b6ce2f2700cc4a00b0d49eca8dea471074"}, - {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3777ce5536d17989c91696db1d459574e9a9bd37660ea7ee4d3344579bb6f129"}, - {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fc5fc1eeb029757349ad26bbc5880557389a03fa6ada41703db5e068881e5f2"}, - {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ea65804b5dc88dacd4a40279af0cdadcfe74b3e5b4c897aa0d81cf86927fee78"}, - {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa102d6d280a5455ad6a0f9e6d769989638718e938a6a0a2ff3f4a7ff8c62cc4"}, - {file = "yarl-1.9.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09efe4615ada057ba2d30df871d2f668af661e971dfeedf0c159927d48bbeff0"}, - {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:008d3e808d03ef28542372d01057fd09168419cdc8f848efe2804f894ae03e51"}, - {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:6f5cb257bc2ec58f437da2b37a8cd48f666db96d47b8a3115c29f316313654ff"}, - {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:992f18e0ea248ee03b5a6e8b3b4738850ae7dbb172cc41c966462801cbf62cf7"}, - {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:0e9d124c191d5b881060a9e5060627694c3bdd1fe24c5eecc8d5d7d0eb6faabc"}, - {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3986b6f41ad22988e53d5778f91855dc0399b043fc8946d4f2e68af22ee9ff10"}, - {file = "yarl-1.9.4-cp312-cp312-win32.whl", hash = "sha256:4b21516d181cd77ebd06ce160ef8cc2a5e9ad35fb1c5930882baff5ac865eee7"}, - {file = "yarl-1.9.4-cp312-cp312-win_amd64.whl", hash = "sha256:a9bd00dc3bc395a662900f33f74feb3e757429e545d831eef5bb280252631984"}, - {file = "yarl-1.9.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:63b20738b5aac74e239622d2fe30df4fca4942a86e31bf47a81a0e94c14df94f"}, - {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7d7f7de27b8944f1fee2c26a88b4dabc2409d2fea7a9ed3df79b67277644e17"}, - {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c74018551e31269d56fab81a728f683667e7c28c04e807ba08f8c9e3bba32f14"}, - {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca06675212f94e7a610e85ca36948bb8fc023e458dd6c63ef71abfd482481aa5"}, - {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5aef935237d60a51a62b86249839b51345f47564208c6ee615ed2a40878dccdd"}, - {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b134fd795e2322b7684155b7855cc99409d10b2e408056db2b93b51a52accc7"}, - {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d25039a474c4c72a5ad4b52495056f843a7ff07b632c1b92ea9043a3d9950f6e"}, - {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f7d6b36dd2e029b6bcb8a13cf19664c7b8e19ab3a58e0fefbb5b8461447ed5ec"}, - {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:957b4774373cf6f709359e5c8c4a0af9f6d7875db657adb0feaf8d6cb3c3964c"}, - {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:d7eeb6d22331e2fd42fce928a81c697c9ee2d51400bd1a28803965883e13cead"}, - {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6a962e04b8f91f8c4e5917e518d17958e3bdee71fd1d8b88cdce74dd0ebbf434"}, - {file = "yarl-1.9.4-cp37-cp37m-win32.whl", hash = "sha256:f3bc6af6e2b8f92eced34ef6a96ffb248e863af20ef4fde9448cc8c9b858b749"}, - {file = "yarl-1.9.4-cp37-cp37m-win_amd64.whl", hash = "sha256:ad4d7a90a92e528aadf4965d685c17dacff3df282db1121136c382dc0b6014d2"}, - {file = "yarl-1.9.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ec61d826d80fc293ed46c9dd26995921e3a82146feacd952ef0757236fc137be"}, - {file = "yarl-1.9.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8be9e837ea9113676e5754b43b940b50cce76d9ed7d2461df1af39a8ee674d9f"}, - {file = "yarl-1.9.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bef596fdaa8f26e3d66af846bbe77057237cb6e8efff8cd7cc8dff9a62278bbf"}, - {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d47552b6e52c3319fede1b60b3de120fe83bde9b7bddad11a69fb0af7db32f1"}, - {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84fc30f71689d7fc9168b92788abc977dc8cefa806909565fc2951d02f6b7d57"}, - {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4aa9741085f635934f3a2583e16fcf62ba835719a8b2b28fb2917bb0537c1dfa"}, - {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:206a55215e6d05dbc6c98ce598a59e6fbd0c493e2de4ea6cc2f4934d5a18d130"}, - {file = "yarl-1.9.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07574b007ee20e5c375a8fe4a0789fad26db905f9813be0f9fef5a68080de559"}, - {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5a2e2433eb9344a163aced6a5f6c9222c0786e5a9e9cac2c89f0b28433f56e23"}, - {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6ad6d10ed9b67a382b45f29ea028f92d25bc0bc1daf6c5b801b90b5aa70fb9ec"}, - {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:6fe79f998a4052d79e1c30eeb7d6c1c1056ad33300f682465e1b4e9b5a188b78"}, - {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a825ec844298c791fd28ed14ed1bffc56a98d15b8c58a20e0e08c1f5f2bea1be"}, - {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8619d6915b3b0b34420cf9b2bb6d81ef59d984cb0fde7544e9ece32b4b3043c3"}, - {file = "yarl-1.9.4-cp38-cp38-win32.whl", hash = "sha256:686a0c2f85f83463272ddffd4deb5e591c98aac1897d65e92319f729c320eece"}, - {file = "yarl-1.9.4-cp38-cp38-win_amd64.whl", hash = "sha256:a00862fb23195b6b8322f7d781b0dc1d82cb3bcac346d1e38689370cc1cc398b"}, - {file = "yarl-1.9.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:604f31d97fa493083ea21bd9b92c419012531c4e17ea6da0f65cacdcf5d0bd27"}, - {file = "yarl-1.9.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8a854227cf581330ffa2c4824d96e52ee621dd571078a252c25e3a3b3d94a1b1"}, - {file = "yarl-1.9.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ba6f52cbc7809cd8d74604cce9c14868306ae4aa0282016b641c661f981a6e91"}, - {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a6327976c7c2f4ee6816eff196e25385ccc02cb81427952414a64811037bbc8b"}, - {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8397a3817d7dcdd14bb266283cd1d6fc7264a48c186b986f32e86d86d35fbac5"}, - {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e0381b4ce23ff92f8170080c97678040fc5b08da85e9e292292aba67fdac6c34"}, - {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23d32a2594cb5d565d358a92e151315d1b2268bc10f4610d098f96b147370136"}, - {file = "yarl-1.9.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ddb2a5c08a4eaaba605340fdee8fc08e406c56617566d9643ad8bf6852778fc7"}, - {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:26a1dc6285e03f3cc9e839a2da83bcbf31dcb0d004c72d0730e755b33466c30e"}, - {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:18580f672e44ce1238b82f7fb87d727c4a131f3a9d33a5e0e82b793362bf18b4"}, - {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:29e0f83f37610f173eb7e7b5562dd71467993495e568e708d99e9d1944f561ec"}, - {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:1f23e4fe1e8794f74b6027d7cf19dc25f8b63af1483d91d595d4a07eca1fb26c"}, - {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:db8e58b9d79200c76956cefd14d5c90af54416ff5353c5bfd7cbe58818e26ef0"}, - {file = "yarl-1.9.4-cp39-cp39-win32.whl", hash = "sha256:c7224cab95645c7ab53791022ae77a4509472613e839dab722a72abe5a684575"}, - {file = "yarl-1.9.4-cp39-cp39-win_amd64.whl", hash = "sha256:824d6c50492add5da9374875ce72db7a0733b29c2394890aef23d533106e2b15"}, - {file = "yarl-1.9.4-py3-none-any.whl", hash = "sha256:928cecb0ef9d5a7946eb6ff58417ad2fe9375762382f1bf5c55e61645f2c43ad"}, - {file = "yarl-1.9.4.tar.gz", hash = "sha256:566db86717cf8080b99b58b083b773a908ae40f06681e87e589a976faf8246bf"}, + {file = "yarl-1.10.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1718c0bca5a61edac7a57dcc11856cb01bde13a9360a3cb6baf384b89cfc0b40"}, + {file = "yarl-1.10.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e4657fd290d556a5f3018d07c7b7deadcb622760c0125277d10a11471c340054"}, + {file = "yarl-1.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:044b76d069e69c6b0246f071ebac0576f89c772f806d66ef51e662bd015d03c7"}, + {file = "yarl-1.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5527d32506c11150ca87f33820057dc284e2a01a87f0238555cada247a8b278"}, + {file = "yarl-1.10.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:36d12d78b8b0d46099d413c8689b5510ad9ce5e443363d1c37b6ac5b3d7cbdfb"}, + {file = "yarl-1.10.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:11f7f8a72b3e26c533fa7ffa7a8068f4e3aad7b67c5cf7b17ea8c79fc81d9830"}, + {file = "yarl-1.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88173836a25b7e5dce989eeee3b92d8ef5cdf512830d4155c6212de98e616f70"}, + {file = "yarl-1.10.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c382e189af10070bcb39caa9406b9cc47b26c1d2257979f11fe03a38be09fea9"}, + {file = "yarl-1.10.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:534b8bc181dca1691cf491c263e084af678a8fb6b6181687c788027d8c317026"}, + {file = "yarl-1.10.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:5f3372f9ae1d1f001826b77d0b29d4220e84f6c5f53915e71a825cdd02600065"}, + {file = "yarl-1.10.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4cca9ba00be4bb8a051c4007b60fc91d6c9728c8b70c86cee4c24be9d641002f"}, + {file = "yarl-1.10.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:a9d8c4be5658834dc688072239d220631ad4b71ff79a5f3d17fb653f16d10759"}, + {file = "yarl-1.10.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ff45a655ca51e1cb778abbb586083fddb7d896332f47bb3b03bc75e30c25649f"}, + {file = "yarl-1.10.0-cp310-cp310-win32.whl", hash = "sha256:9ef7ce61958b3c7b2e2e0927c52d35cf367c5ee410e06e1337ecc83a90c23b95"}, + {file = "yarl-1.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:48a48261f8d610b0e15fed033e74798763bc2f8f2c0d769a2a0732511af71f1e"}, + {file = "yarl-1.10.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:308d1cce071b5b500e3d95636bbf15dfdb8e87ed081b893555658a7f9869a156"}, + {file = "yarl-1.10.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bc66927f6362ed613a483c22618f88f014994ccbd0b7a25ec1ebc8c472d4b40a"}, + {file = "yarl-1.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c4d13071c5b99974cfe2f94c749ecc4baf882f7c4b6e4c40ca3d15d1b7e81f24"}, + {file = "yarl-1.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:348ad53acd41caa489df7db352d620c982ab069855d9635dda73d685bbbc3636"}, + {file = "yarl-1.10.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:293f7c2b30d015de3f1441c4ee764963b86636fde881b4d6093498d1e8711f69"}, + {file = "yarl-1.10.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:315e8853d0ea46aabdce01f1f248fff7b9743de89b555c5f0487f54ac84beae8"}, + {file = "yarl-1.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:012c506b2c23be4500fb97509aa7e6a575996fb317b80667fa26899d456e2aaf"}, + {file = "yarl-1.10.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5f769c2708c31227c5349c3e4c668c8b4b2e25af3e7263723f2ef33e8e3906a0"}, + {file = "yarl-1.10.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4f6ac063a4e9bbd4f6cc88cc621516a44d6aec66862ea8399ba063374e4b12c7"}, + {file = "yarl-1.10.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:18b7ce6d8c35da8e16dcc8de124a80e250fc8c73f8c02663acf2485c874f1972"}, + {file = "yarl-1.10.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:b80246bdee036381636e73ef0f19b032912064622b0e5ee44f6960fd11df12aa"}, + {file = "yarl-1.10.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:183dd37bb5471e8017ab8a998c1ea070b4a0b08a97a7c4e20e0c7ccbe8ebb999"}, + {file = "yarl-1.10.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9b6d0d7522b514f054b359409817af4c5ed76fa4fe42d8bd1ed12956804cf595"}, + {file = "yarl-1.10.0-cp311-cp311-win32.whl", hash = "sha256:6026a6ef14d038a38ca9d81422db4b6bb7d5da94f9d08f21e0ad9ebd9c4bc3bb"}, + {file = "yarl-1.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:190e70d2f9f16f1c9d666c103d635c9ed4bf8de7803e9fa0495eec405a3e96a8"}, + {file = "yarl-1.10.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:6bc602c7413e1b5223bc988947125998cb54d6184de45a871985daacc23e6c8c"}, + {file = "yarl-1.10.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:bf733c835ebbd52bd78a52b919205e0f06d8571f71976a0259e5bcc20d0a2f44"}, + {file = "yarl-1.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6e91ed5f6818e1e3806eaeb7b14d9e17b90340f23089451ea59a89a29499d760"}, + {file = "yarl-1.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23057a004bc9735008eb2a04b6ce94c6c06219cdf2b193997fd3ae6039eb3196"}, + {file = "yarl-1.10.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2b922c32a1cff62bc43d408d1a8745abeed0a705793f2253c622bf3521922198"}, + {file = "yarl-1.10.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:be199fed28861d72df917e355287ad6835555d8210e7f8203060561f24d7d842"}, + {file = "yarl-1.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5cece693380c1c4a606cdcaa0c54eda8f72cfe1ba83f5149b9023bb955e8fa8e"}, + {file = "yarl-1.10.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ff8e803d8ca170e632fb3b4df1bfd29ba29be8edc3e9306c5ffa5fadea234a4f"}, + {file = "yarl-1.10.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:30dde3a8b88c80a4f049eb4dd240d2a02e89174da6be2525541f949bf9fa38ab"}, + {file = "yarl-1.10.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:dff84623e7098cf9bfbb5187f9883051af652b0ce08b9f7084cc8630b87b6457"}, + {file = "yarl-1.10.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8e69b55965a47dd6c79e578abd7d85637b1bb4a7565436630826bdb28aa9b7ad"}, + {file = "yarl-1.10.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5d0c9e1dcc92d46ca89608fe4763fc2362f1e81c19a922c67dbc0f20951466e4"}, + {file = "yarl-1.10.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:32e79d5ae975f7c2cc29f7104691fc9be5ee3724f24e1a7254d72f6219672108"}, + {file = "yarl-1.10.0-cp312-cp312-win32.whl", hash = "sha256:762a196612c2aba4197cd271da65fe08308f7ddf130dc63842c7a76d774b6a2c"}, + {file = "yarl-1.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:8c6214071f653d21bb7b43f7ee519afcbf7084263bb43408f4939d14558290db"}, + {file = "yarl-1.10.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:0e0aea8319fdc1ac340236e58b0b7dc763621bce6ce98124a9d58104cafd0aaa"}, + {file = "yarl-1.10.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0b3bf343b4ef9ec600d75363eb9b48ab3bd53b53d4e1c5a9fbf0cfe7ba73a47f"}, + {file = "yarl-1.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:05b07e6e0f715eaae9d927a302d9220724392f3c0b4e7f8dfa174bf2e1b8433e"}, + {file = "yarl-1.10.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d7bd531d7eec4aa7ef8a99fef91962eeea5158a53af0ec507c476ddf8ebc29c"}, + {file = "yarl-1.10.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:183136dc5d5411872e7529c924189a2e26fac5a7f9769cf13ef854d1d653ad36"}, + {file = "yarl-1.10.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c77a3c10af4aaf8891578fe492ef0990c65cf7005dd371f5ea8007b420958bf6"}, + {file = "yarl-1.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:030d41d48217b180c5a176e59c49d212d54d89f6f53640fa4c1a1766492aec27"}, + {file = "yarl-1.10.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f4f43ba30d604ba391bc7fe2dd104d6b87b62b0de4bbde79e362524b8a1eb75"}, + {file = "yarl-1.10.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:637dd0f55d1781d4634c23994101c509e455b5ab61af9086b5763b7eca9359aa"}, + {file = "yarl-1.10.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:99e7459ee86a3b81e57777afd3825b8b1acaac8a99f9c0bd02415d80eb3c371b"}, + {file = "yarl-1.10.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a80cdb3c15c15b33ecdb080546dcb022789b0084ca66ad41ffa0fe09857fca11"}, + {file = "yarl-1.10.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:1824bfb932d8100e5c94f4f98c078f23ebc6f6fa93acc3d95408762089c54a06"}, + {file = "yarl-1.10.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:90fd64ce00f594db02f603efa502521c440fa1afcf6266be82eb31f19d2d9561"}, + {file = "yarl-1.10.0-cp313-cp313-win32.whl", hash = "sha256:687131ee4d045f3d58128ca28f5047ec902f7760545c39bbe003cc737c5a02b5"}, + {file = "yarl-1.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:493ad061ee025c5ed3a60893cd70204eead1b3f60ccc90682e752f95b845bd46"}, + {file = "yarl-1.10.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:cd65588273d19f8483bc8f32a6fcf602e94a9a7ba287a1725977bd9527cd6c0c"}, + {file = "yarl-1.10.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6f64f8681671624f539eea5564518bc924524c25eb90ab24a7eddc2d872e668e"}, + {file = "yarl-1.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3576ed2c51f8525d4ff5c3279247aacff9540bb43b292c4a37a8e6c6e1691adb"}, + {file = "yarl-1.10.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca42a9281807fdf8fba86e671d8fdd76f92e9302a6d332957f2bae51c774f8a7"}, + {file = "yarl-1.10.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:54a4b5e6a060d46cad6a3cf340f4cb268e6fbc89c589d82a2da58f7db47c47c8"}, + {file = "yarl-1.10.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6eec21d8c3aa932c5a89480b58fa877e9c48092ab838ccc76788cbc917ceec0d"}, + {file = "yarl-1.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:273baee8a8af5989d5aab51c740e65bc2b1fc6619b9dd192cd16a3fae51100be"}, + {file = "yarl-1.10.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c1bf63ba496cd4f12d30e916d9a52daa6c91433fedd9cd0d99fef3e13232836f"}, + {file = "yarl-1.10.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:f8e24b9a4afdffab399191a9f0b0e80eabc7b7fdb9f2dbccdeb8e4d28e5c57bb"}, + {file = "yarl-1.10.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:4c46454fafa31f7241083a0dd21814f63e0fcb4ae49662dc7e286fd6a5160ea1"}, + {file = "yarl-1.10.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:beda87b63c08fb4df8cc5353eeefe68efe12aa4f5284958bd1466b14c85e508e"}, + {file = "yarl-1.10.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:9a8d6a0e2b5617b5c15c59db25f20ba429f1fea810f2c09fbf93067cb21ab085"}, + {file = "yarl-1.10.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:b453b3dbc1ed4c2907632d05b378123f3fb411cad05d8d96de7d95104ef11c70"}, + {file = "yarl-1.10.0-cp38-cp38-win32.whl", hash = "sha256:1ea30675fbf0ad6795c100da677ef6a8960a7db05ac5293f02a23c2230203c89"}, + {file = "yarl-1.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:347011ad09a8f9be3d41fe2d7d611c3a4de4d49aa77bcb9a8c03c7a82fc45248"}, + {file = "yarl-1.10.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:18bc4600eed1907762c1816bb16ac63bc52912e53b5e9a353eb0935a78e95496"}, + {file = "yarl-1.10.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eeb6a40c5ae2616fd38c1e039c6dd50031bbfbc2acacfd7b70a5d64fafc70901"}, + {file = "yarl-1.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:bc544248b5263e1c0f61332ccf35e37404b54213f77ed17457f857f40af51452"}, + {file = "yarl-1.10.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3352c69dc235850d6bf8ddad915931f00dcab208ac4248b9af46175204c2f5f9"}, + {file = "yarl-1.10.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:af5b52bfbbd5eb208cf1afe23c5ada443929e9b9d79e9fbc66cacc07e4e39748"}, + {file = "yarl-1.10.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1eafa7317063de4bc310716cdd9026c13f00b1629e649079a6908c3aafdf5046"}, + {file = "yarl-1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a162cf04fd1e8d81025ec651d14cac4f6e0ca73a3c0a9482de8691b944e3098a"}, + {file = "yarl-1.10.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:179b1df5e9cd99234ea65e63d5bfc6dd524b2c3b6cf68a14b94ccbe01ab37ddd"}, + {file = "yarl-1.10.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:32d2e46848dea122484317485129f080220aa84aeb6a9572ad9015107cebeb07"}, + {file = "yarl-1.10.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:aa1aeb99408be0ca774c5126977eb085fedda6dd7d9198ce4ceb2d06a44325c7"}, + {file = "yarl-1.10.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:d2366e2f987f69752f0588d2035321aaf24272693d75f7f6bb7e8a0f48f7ccdd"}, + {file = "yarl-1.10.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:e8da33665ecc64cd3e593098adb449f9c65b4e3bc6338e75ad592da15453d898"}, + {file = "yarl-1.10.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5b46c603bee1f2dd407b8358c2afc9b0472a22ccca528f114e1f4cd30dfecd22"}, + {file = "yarl-1.10.0-cp39-cp39-win32.whl", hash = "sha256:96422a3322b4d954f4c52403a2fc129ad118c151ee60a717847fb46a8480d1e1"}, + {file = "yarl-1.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:52d1ae09b0764017e330bb5bf9af760c0168c564225085bb806f687bccffda8a"}, + {file = "yarl-1.10.0-py3-none-any.whl", hash = "sha256:99eaa7d53f509ba1c2fea8fdfec15ba3cd36caca31d57ec6665073b148b5f260"}, + {file = "yarl-1.10.0.tar.gz", hash = "sha256:3bf10a395adac62177ba8ea738617e8de6cbb1cea6aa5d5dd2accde704fc8195"}, ] [package.dependencies] @@ -2190,20 +2259,24 @@ multidict = ">=4.0" [[package]] name = "zipp" -version = "3.18.1" +version = "3.20.1" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" files = [ - {file = "zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b"}, - {file = "zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715"}, + {file = "zipp-3.20.1-py3-none-any.whl", hash = "sha256:9960cd8967c8f85a56f920d5d507274e74f9ff813a0ab8889a5b5be2daf44064"}, + {file = "zipp-3.20.1.tar.gz", hash = "sha256:c22b14cc4763c5a5b04134207736c107db42e9d3ef2d9779d465f5f1bcba572b"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "6ba79f41a3da51a0bb9223846b122a582421de50bd82d785fa3d67cf224f3a67" +content-hash = "bb085c926d7eaa9a9e2953b6b45afd56ffc86bc957627a50ed23de92f14ca69f" diff --git a/pyproject.toml b/pyproject.toml index ccfb556a..84372b90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,21 +1,21 @@ [tool.poetry] name = "netbox_ansible_modules" -version = "3.19.1" +version = "3.20.0" description = "Ansible collection to interact with NetBox's API" authors = ["Mikhail Yohman "] license = "GPLv3" [tool.poetry.dependencies] python = "^3.10" -ansible-core = "2.15.9" +ansible-core = "^2.16" black = "*" codecov = "*" -coverage = "6.5.*" +coverage = "7.3.2" deepdiff = "*" cryptography = "*" jinja2 = "*" jmespath = "*" -pynetbox = "^7.3" +pynetbox = "*" pytest = "*" pytest-mock = "*" pytest-xdist = "*" diff --git a/tests/integration/inventory b/tests/integration/inventory index ab3861cf..3e3f652e 100644 --- a/tests/integration/inventory +++ b/tests/integration/inventory @@ -1,2 +1,2 @@ [testgroup] -testhost ansible_connection="local" ansible_pipelining="yes" ansible_python_interpreter="/Users/rodvand/collections/ansible_collections/netbox/netbox/venv/bin/python3.9" \ No newline at end of file +testhost ansible_connection="local" ansible_pipelining="yes" ansible_python_interpreter="/Users/rodvand/ansible_collections/netbox/netbox/venv/bin/python" diff --git a/tests/integration/targets/inventory-v4.1/.gitignore b/tests/integration/targets/inventory-v4.1/.gitignore new file mode 100644 index 00000000..df76504d --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/.gitignore @@ -0,0 +1 @@ +runme_config \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/aliases b/tests/integration/targets/inventory-v4.1/aliases new file mode 100644 index 00000000..a3a2089b --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/aliases @@ -0,0 +1 @@ +# https://docs.ansible.com/ansible/devel/dev_guide/testing/sanity/integration-aliases.html diff --git a/tests/integration/targets/inventory-v4.1/compare_inventory_json.py b/tests/integration/targets/inventory-v4.1/compare_inventory_json.py new file mode 100755 index 00000000..ccdf8bd5 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/compare_inventory_json.py @@ -0,0 +1,152 @@ +#!/usr/bin/env python + +# Inspired by community.aws collection script_inventory_ec2 test +# https://github.com/ansible-collections/community.aws/blob/master/tests/integration/targets/script_inventory_ec2/inventory_diff.py + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +import argparse +import json +import sys +from operator import itemgetter + +from deepdiff import DeepDiff + +# NetBox includes "created" and "last_updated" times on objects. These end up in the interfaces objects that are included verbatim from the NetBox API. +# "url" may be different if local tests use a different host/port +# Remove these from files saved in git as test data +KEYS_REMOVE = frozenset(["created", "last_updated", "url"]) + +# Ignore these when performing diffs as they will be different for each test run +# (Was previously keys specific to NetBox 2.6) +KEYS_IGNORE = frozenset() + +# Rack Groups became hierarchical in NetBox 2.8. Don't bother comparing against test data in NetBox 2.7 +KEYS_IGNORE_27 = frozenset( + [ + "rack_groups", # host var + "rack_group_parent_rack_group", # group, group_names_raw = False + "parent_rack_group", # group, group_names_raw = True + ] +) + + +# Assume the object will not be recursive, as it originally came from JSON +def remove_keys(obj, keys): + if isinstance(obj, dict): + keys_to_remove = keys.intersection(obj.keys()) + for key in keys_to_remove: + del obj[key] + + for key, value in obj.items(): + remove_keys(value, keys) + + elif isinstance(obj, list): + # Iterate over temporary copy, as we may remove items + for item in obj[:]: + if isinstance(item, str) and item in keys: + # List contains a string that we want to remove + # eg. a group name in list of groups + obj.remove(item) + remove_keys(item, keys) + + +def sort_hostvar_arrays(obj): + meta = obj.get("_meta") + if not meta: + return + + hostvars = meta.get("hostvars") + if not hostvars: + return + + for _, host in hostvars.items(): # pylint: disable=disallowed-name + if interfaces := host.get("interfaces"): + host["interfaces"] = sorted(interfaces, key=itemgetter("id")) + + if services := host.get("services"): + host["services"] = sorted(services, key=itemgetter("id")) + + +def read_json(filename): + with open(filename, "r", encoding="utf-8") as file: + return json.loads(file.read()) + + +def write_json(filename, data): + with open(filename, "w", encoding="utf-8") as file: + json.dump(data, file, indent=4) + + +def main(): + parser = argparse.ArgumentParser(description="Diff Ansible inventory JSON output") + parser.add_argument( + "filename_a", + metavar="ORIGINAL.json", + type=str, + help="Original json to test against", + ) + parser.add_argument( + "filename_b", + metavar="NEW.json", + type=str, + help="Newly generated json to compare against original", + ) + parser.add_argument( + "--write", + action="store_true", + help=( + "When comparing files, various keys are removed. " + "This option will not compare the files, and instead writes ORIGINAL.json to NEW.json after removing these keys. " + "This is used to clean the test json files before saving to the git repo. " + "For example, this removes dates. " + ), + ) + parser.add_argument( + "--netbox-version", + metavar="VERSION", + type=str, + help=( + "Apply comparison specific to NetBox version. " + "For example, rack_groups arrays will only contain a single item in v2.7, so are ignored in the comparison." + ), + ) + + args = parser.parse_args() + + data_a = read_json(args.filename_a) + + if args.write: + # When writing test data, only remove "remove_keys" that will change on every git commit. + # This makes diffs more easily readable to ensure changes to test data look correct. + remove_keys(data_a, KEYS_REMOVE) + sort_hostvar_arrays(data_a) + write_json(args.filename_b, data_a) + + else: + data_b = read_json(args.filename_b) + + # Ignore keys that we don't want to diff, in addition to the ones removed that change on every commit + keys = KEYS_REMOVE.union(KEYS_IGNORE) + remove_keys(data_a, keys) + remove_keys(data_b, keys) + + sort_hostvar_arrays(data_a) + sort_hostvar_arrays(data_b) + + # Perform the diff + result = DeepDiff(data_a, data_b, ignore_order=True) + + if result: + # Dictionary is not empty - print differences + print(json.dumps(result, sort_keys=True, indent=4)) + sys.exit(1) + else: + # Success, no differences + sys.exit(0) + + +if __name__ == "__main__": + main() diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-bearer-token.json b/tests/integration/targets/inventory-v4.1/files/test-inventory-bearer-token.json new file mode 100644 index 00000000..83245831 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-bearer-token.json @@ -0,0 +1,1347 @@ +{ + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "config_context": {}, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [], + "manufacturer": "cisco", + "rack": "Test Rack Site 2", + "rack_role": "test-rack-role", + "regions": [], + "role": "core-switch", + "serial": "", + "services": [], + "site": "test-site2", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "config_context": {}, + "custom_fields": {}, + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "Ethernet1/1", + "display_url": "http://localhost:32768/dcim/interfaces/1/", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/3/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One" + }, + "display": "Ethernet2/1", + "display_url": "http://localhost:32768/dcim/interfaces/2/", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/4/", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/6/", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "telnet (TCP/23)", + "display_url": "http://localhost:32768/ipam/services/3/", + "id": 3, + "ipaddresses": [], + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/11/", + "enabled": true, + "id": 11, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/12/", + "enabled": true, + "id": 12, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [], + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/4/", + "id": 4, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "config_context": {}, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "config_context": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet1", + "display_url": "http://localhost:32768/dcim/interfaces/3/", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/1/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet2", + "display_url": "http://localhost:32768/dcim/interfaces/4/", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "display_url": "http://localhost:32768/ipam/ip-addresses/2/", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/5/", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/1/", + "id": 1, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + }, + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "http (TCP/80)", + "display_url": "http://localhost:32768/ipam/services/2/", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1 + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2 + } + ], + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/1/", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/2/", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/3/", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/4/", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/5/", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/6/", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/7/", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/8/", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/9/", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/10/", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "all": { + "children": [ + "ungrouped", + "site_test_site2", + "region_other_region", + "region_parent_region", + "site_group_other_site_group", + "site_group_parent_site_group", + "rack_Test_Rack_Site_2", + "rack_role_test_rack_role", + "role_core_switch", + "device_type_cisco_test", + "manufacturer_cisco", + "status_active", + "device_type_nexus_parent", + "service_telnet", + "rack_Test_Rack", + "service_ssh", + "service_http", + "cluster_Test_Cluster_2", + "cluster_type_test_cluster_type", + "is_virtual", + "cluster_Test_Cluster", + "cluster_group_test_cluster_group" + ] + }, + "cluster_Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "cluster_group_test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_type_test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "device_type_cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "device_type_nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "location_parent_rack_group": { + "children": [ + "location_test_rack_group" + ] + }, + "location_test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "manufacturer_cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "rack_Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "rack_Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "rack_role_test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "region_parent_region": { + "children": [ + "region_test_region" + ] + }, + "region_test_region": { + "children": [ + "site_test_site" + ] + }, + "role_core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "service_http": { + "hosts": [ + "test100" + ] + }, + "service_ssh": { + "hosts": [ + "test100", + "Test VM With Spaces" + ] + }, + "service_telnet": { + "hosts": [ + "Test Nexus One" + ] + }, + "site_group_parent_site_group": { + "children": [ + "site_group_test_site_group" + ] + }, + "site_test_site": { + "children": [ + "location_parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "site_test_site2": { + "hosts": [ + "R1-Device" + ] + }, + "status_active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-bearer-token.yml b/tests/integration/targets/inventory-v4.1/files/test-inventory-bearer-token.yml new file mode 100644 index 00000000..a19b60db --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-bearer-token.yml @@ -0,0 +1,32 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: http://localhost:32768 +token: + type: Token + value: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +config_context: true +plurals: false +interfaces: true +services: true + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - services + - status diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2-filter.json b/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2-filter.json new file mode 100644 index 00000000..945e4f37 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2-filter.json @@ -0,0 +1,1170 @@ +{ + "_meta": { + "hostvars": { + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "config_context": {}, + "custom_fields": {}, + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "Ethernet1/1", + "display_url": "http://localhost:32768/dcim/interfaces/1/", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/3/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One" + }, + "display": "Ethernet2/1", + "display_url": "http://localhost:32768/dcim/interfaces/2/", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/4/", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/6/", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "telnet (TCP/23)", + "display_url": "http://localhost:32768/ipam/services/3/", + "id": 3, + "ipaddresses": [], + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "config_context": {}, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "config_context": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet1", + "display_url": "http://localhost:32768/dcim/interfaces/3/", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/1/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet2", + "display_url": "http://localhost:32768/dcim/interfaces/4/", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "display_url": "http://localhost:32768/ipam/ip-addresses/2/", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/5/", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/1/", + "id": 1, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + }, + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "http (TCP/80)", + "display_url": "http://localhost:32768/ipam/services/2/", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1 + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2 + } + ], + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/1/", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/2/", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/3/", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/4/", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/5/", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/6/", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/7/", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/8/", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/9/", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/10/", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "all": { + "children": [ + "ungrouped", + "site_test_site2", + "region_other_region", + "region_parent_region", + "site_group_other_site_group", + "site_group_parent_site_group", + "role_core_switch", + "device_type_nexus_parent", + "manufacturer_cisco", + "service_telnet", + "status_active", + "rack_Test_Rack", + "device_type_cisco_test", + "service_ssh", + "service_http", + "cluster_Test_Cluster", + "cluster_group_test_cluster_group", + "cluster_type_test_cluster_type", + "is_virtual" + ] + }, + "cluster_Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_group_test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_type_test_cluster_type": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "device_type_cisco_test": { + "hosts": [ + "TestDeviceR1", + "test100" + ] + }, + "device_type_nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "is_virtual": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "location_parent_rack_group": { + "children": [ + "location_test_rack_group" + ] + }, + "location_test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "manufacturer_cisco": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "rack_Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "region_parent_region": { + "children": [ + "region_test_region" + ] + }, + "region_test_region": { + "children": [ + "site_test_site" + ] + }, + "role_core_switch": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "service_http": { + "hosts": [ + "test100" + ] + }, + "service_ssh": { + "hosts": [ + "test100" + ] + }, + "service_telnet": { + "hosts": [ + "Test Nexus One" + ] + }, + "site_group_parent_site_group": { + "children": [ + "site_group_test_site_group" + ] + }, + "site_test_site": { + "children": [ + "location_parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "status_active": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2-filter.yml b/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2-filter.yml new file mode 100644 index 00000000..49f306a7 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2-filter.yml @@ -0,0 +1,33 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: http://localhost:32768 +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +config_context: true +plurals: false +interfaces: true +services: true + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - services + - status + +query_filters: + - site: "{{ 'TEST-SITE' | lower }}" diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2.json b/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2.json new file mode 100644 index 00000000..0542ee50 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2.json @@ -0,0 +1,390 @@ +{ + "Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "locations": [], + "manufacturer": "cisco", + "rack": "Test Rack Site 2", + "rack_id": "1", + "rack_role": "test-rack-role", + "regions": [], + "role": "core-switch", + "serial": "", + "site": "test-site2", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [], + "serial": "", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "rack_id": "2", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "VC1": { + "ansible_host": "nexus.example.com", + "custom_fields": {}, + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "local_context_data": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "disk": 170, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [], + "serial": "", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "active": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "all": { + "children": [ + "ungrouped", + "test_site2", + "other_region", + "parent_region", + "other_site_group", + "parent_site_group", + "Test_Rack_Site_2", + "test_rack_role", + "core_switch", + "cisco_test", + "cisco", + "active", + "nexus_parent", + "jinja_test_group", + "Test_Rack", + "Test_Cluster_2", + "test_cluster_type", + "is_virtual", + "Test_Cluster", + "test_cluster_group" + ] + }, + "cisco": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "core_switch": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "jinja_test_group": { + "hosts": [ + "TestDeviceR1", + "Test VM With Spaces" + ] + }, + "nexus_parent": { + "hosts": [ + "VC1" + ] + }, + "parent_rack_group": { + "children": [ + "test_rack_group" + ] + }, + "parent_region": { + "children": [ + "test_region" + ] + }, + "parent_site_group": { + "children": [ + "test_site_group" + ] + }, + "test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "test_rack_group": { + "hosts": [ + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "test_region": { + "children": [ + "test_site" + ] + }, + "test_site": { + "children": [ + "parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_site2": { + "hosts": [ + "R1-Device" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2.yml b/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2.yml new file mode 100644 index 00000000..67f9c49b --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-jinja2.yml @@ -0,0 +1,62 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: http://localhost:32768 +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +# Cache is not for performance of tests, but to test the caching option works +# Also set on test-inventory-plurals.yml so that we actually hit the cache on one of these runs +cache: true +cache_timeout: 3600 +cache_plugin: jsonfile +cache_connection: /tmp/inventory_netbox + +config_context: false +plurals: false +interfaces: false +services: false +group_names_raw: true +virtual_chassis_name: true +dns_name: true +ansible_host_dns_name: true + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status + +query_filters: "" + +device_query_filters: + - role: "{{ 'CORE-SWITCH' | lower }}" + +vm_query_filters: + - cluster_type: "{{ 'TEST-CLUSTER-TYPE' | lower }}" + +# See Constructed for details +# https://docs.ansible.com/ansible/latest/plugins/inventory/constructed.html + +compose: + rack_id: rack.id + ntp_servers: config_context.ntp_servers + +keyed_groups: + - prefix: rack + key: rack.name + +groups: + jinja_test_group: inventory_hostname.startswith('Test') diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-legacy.json b/tests/integration/targets/inventory-v4.1/files/test-inventory-legacy.json new file mode 100644 index 00000000..42794219 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-legacy.json @@ -0,0 +1,441 @@ +{ + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [], + "manufacturers": [ + "cisco" + ], + "rack_role": "test-rack-role", + "racks": [ + "Test Rack Site 2" + ], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site2" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "nexus-parent" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "telnet (TCP/23)", + "display_url": "http://localhost:32768/ipam/services/3/", + "id": 3, + "ipaddresses": [], + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/4/", + "id": 4, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "racks": [ + "Test Rack" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB12345678", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/1/", + "id": 1, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + }, + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "http (TCP/80)", + "display_url": "http://localhost:32768/ipam/services/2/", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1 + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2 + } + ], + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "disk": 170, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "all": { + "children": [ + "ungrouped" + ] + }, + "ungrouped": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-legacy.yml b/tests/integration/targets/inventory-v4.1/files/test-inventory-legacy.yml new file mode 100644 index 00000000..259c3934 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-legacy.yml @@ -0,0 +1,10 @@ +--- +# To generate the json result, I checked out nb_inventory.yml from the v0.2.0 release 2d6894b, +# and then ran it against this inventory with the latest test data. + +# Checks that substantial work on the inventory does not diverge from what existing users are using by default. + +plugin: netbox.netbox.nb_inventory +api_endpoint: http://localhost:32768 +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-noracks.json b/tests/integration/targets/inventory-v4.1/files/test-inventory-noracks.json new file mode 100644 index 00000000..250a3ea9 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-noracks.json @@ -0,0 +1,1377 @@ +{ + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [], + "is_virtual": false, + "local_context_data": [ + null + ], + "manufacturers": [ + "cisco" + ], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site2" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "nexus-parent" + ], + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "Ethernet1/1", + "display_url": "http://localhost:32768/dcim/interfaces/1/", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/3/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One" + }, + "display": "Ethernet2/1", + "display_url": "http://localhost:32768/dcim/interfaces/2/", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/4/", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/6/", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "manufacturers": [ + "cisco" + ], + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "telnet (TCP/23)", + "display_url": "http://localhost:32768/ipam/services/3/", + "id": 3, + "ipaddresses": [], + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/11/", + "enabled": true, + "id": 11, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/12/", + "enabled": true, + "id": 12, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [], + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/4/", + "id": 4, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [], + "is_virtual": false, + "local_context_data": [ + null + ], + "manufacturers": [ + "cisco" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB12345678", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "config_context": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet1", + "display_url": "http://localhost:32768/dcim/interfaces/3/", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/1/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet2", + "display_url": "http://localhost:32768/dcim/interfaces/4/", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "display_url": "http://localhost:32768/ipam/ip-addresses/2/", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/5/", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "manufacturers": [ + "cisco" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/1/", + "id": 1, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + }, + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "http (TCP/80)", + "display_url": "http://localhost:32768/ipam/services/2/", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1 + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2 + } + ], + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/1/", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/2/", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/3/", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/4/", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/5/", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/6/", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/7/", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/8/", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/9/", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/10/", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "all": { + "children": [ + "ungrouped", + "sites_test_site2", + "region_other_region", + "region_parent_region", + "site_group_other_site_group", + "site_group_parent_site_group", + "device_roles_core_switch", + "device_types_cisco_test", + "manufacturers_cisco", + "status_active", + "device_types_nexus_parent", + "cluster_Test_Cluster_2", + "cluster_type_test_cluster_type", + "is_virtual", + "cluster_Test_Cluster", + "cluster_group_test_cluster_group" + ] + }, + "cluster_Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "cluster_group_test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_type_test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "device_roles_core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "device_types_cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "device_types_nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "location_parent_rack_group": { + "children": [ + "location_test_rack_group" + ] + }, + "location_test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "manufacturers_cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "region_parent_region": { + "children": [ + "region_test_region" + ] + }, + "region_test_region": { + "children": [ + "sites_test_site" + ] + }, + "site_group_parent_site_group": { + "children": [ + "site_group_test_site_group" + ] + }, + "sites_test_site": { + "children": [ + "location_parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "sites_test_site2": { + "hosts": [ + "R1-Device" + ] + }, + "status_active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-noracks.yml b/tests/integration/targets/inventory-v4.1/files/test-inventory-noracks.yml new file mode 100644 index 00000000..f21f3ca6 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-noracks.yml @@ -0,0 +1,28 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: http://localhost:32768 +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +config_context: true +plurals: true +interfaces: true +services: true +racks: false + +group_by: + - sites + - tenants + - location + - tags + - device_roles + - device_types + - manufacturers + - platforms + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-options-flatten.json b/tests/integration/targets/inventory-v4.1/files/test-inventory-options-flatten.json new file mode 100644 index 00000000..d0698bbb --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-options-flatten.json @@ -0,0 +1,1302 @@ +{ + "Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [], + "manufacturer": "cisco", + "rack": "Test Rack Site 2", + "rack_role": "test-rack-role", + "regions": [], + "role": "core-switch", + "serial": "", + "services": [], + "site": "test-site2", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "Ethernet1/1", + "display_url": "http://localhost:32768/dcim/interfaces/1/", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/3/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One" + }, + "display": "Ethernet2/1", + "display_url": "http://localhost:32768/dcim/interfaces/2/", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/4/", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/6/", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "telnet (TCP/23)", + "display_url": "http://localhost:32768/ipam/services/3/", + "id": 3, + "ipaddresses": [], + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/11/", + "enabled": true, + "id": 11, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/12/", + "enabled": true, + "id": 12, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [], + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/4/", + "id": 4, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "device_type": "cisco-test", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet1", + "display_url": "http://localhost:32768/dcim/interfaces/3/", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/1/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet2", + "display_url": "http://localhost:32768/dcim/interfaces/4/", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "display_url": "http://localhost:32768/ipam/ip-addresses/2/", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/5/", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "ntp_servers": [ + "pool.ntp.org" + ], + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/1/", + "id": 1, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + }, + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "http (TCP/80)", + "display_url": "http://localhost:32768/ipam/services/2/", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1 + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2 + } + ], + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/1/", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/2/", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/3/", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/4/", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/5/", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/6/", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/7/", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/8/", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/9/", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/10/", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "all": { + "children": [ + "ungrouped", + "test_site2", + "other_region", + "parent_region", + "other_site_group", + "parent_site_group", + "Test_Rack_Site_2", + "test_rack_role", + "core_switch", + "cisco_test", + "cisco", + "active", + "nexus_parent", + "Test_Rack", + "Test_Cluster_2", + "test_cluster_type", + "is_virtual", + "Test_Cluster", + "test_cluster_group" + ] + }, + "cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "parent_rack_group": { + "children": [ + "test_rack_group" + ] + }, + "parent_region": { + "children": [ + "test_region" + ] + }, + "parent_site_group": { + "children": [ + "test_site_group" + ] + }, + "test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "test_region": { + "children": [ + "test_site" + ] + }, + "test_site": { + "children": [ + "parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_site2": { + "hosts": [ + "R1-Device" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-options-flatten.yml b/tests/integration/targets/inventory-v4.1/files/test-inventory-options-flatten.yml new file mode 100644 index 00000000..73d6beec --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-options-flatten.yml @@ -0,0 +1,41 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: http://localhost:32768 +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +# Use cache on this test to make sure interfaces is tested via the cache +cache: true +cache_timeout: 3600 +cache_plugin: jsonfile +cache_connection: /tmp/inventory_netbox + +config_context: true +flatten_config_context: true +flatten_custom_fields: true +flatten_local_context_data: true +plurals: false +interfaces: true +services: true +fetch_all: false +max_uri_length: 0 +group_names_raw: true + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-options.json b/tests/integration/targets/inventory-v4.1/files/test-inventory-options.json new file mode 100644 index 00000000..0542ee50 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-options.json @@ -0,0 +1,390 @@ +{ + "Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "locations": [], + "manufacturer": "cisco", + "rack": "Test Rack Site 2", + "rack_id": "1", + "rack_role": "test-rack-role", + "regions": [], + "role": "core-switch", + "serial": "", + "site": "test-site2", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [], + "serial": "", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "rack_id": "2", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "VC1": { + "ansible_host": "nexus.example.com", + "custom_fields": {}, + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "local_context_data": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "disk": 170, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [], + "serial": "", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "active": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "all": { + "children": [ + "ungrouped", + "test_site2", + "other_region", + "parent_region", + "other_site_group", + "parent_site_group", + "Test_Rack_Site_2", + "test_rack_role", + "core_switch", + "cisco_test", + "cisco", + "active", + "nexus_parent", + "jinja_test_group", + "Test_Rack", + "Test_Cluster_2", + "test_cluster_type", + "is_virtual", + "Test_Cluster", + "test_cluster_group" + ] + }, + "cisco": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "core_switch": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "jinja_test_group": { + "hosts": [ + "TestDeviceR1", + "Test VM With Spaces" + ] + }, + "nexus_parent": { + "hosts": [ + "VC1" + ] + }, + "parent_rack_group": { + "children": [ + "test_rack_group" + ] + }, + "parent_region": { + "children": [ + "test_region" + ] + }, + "parent_site_group": { + "children": [ + "test_site_group" + ] + }, + "test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "test_rack_group": { + "hosts": [ + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "test_region": { + "children": [ + "test_site" + ] + }, + "test_site": { + "children": [ + "parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_site2": { + "hosts": [ + "R1-Device" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-options.yml b/tests/integration/targets/inventory-v4.1/files/test-inventory-options.yml new file mode 100644 index 00000000..f6597c66 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-options.yml @@ -0,0 +1,62 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: http://localhost:32768 +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +# Cache is not for performance of tests, but to test the caching option works +# Also set on test-inventory-plurals.yml so that we actually hit the cache on one of these runs +cache: true +cache_timeout: 3600 +cache_plugin: jsonfile +cache_connection: /tmp/inventory_netbox + +config_context: false +plurals: false +interfaces: false +services: false +group_names_raw: true +virtual_chassis_name: true +dns_name: true +ansible_host_dns_name: true + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status + +query_filters: "" + +device_query_filters: + - role: core-switch + +vm_query_filters: + - cluster_type: test-cluster-type + +# See Constructed for details +# https://docs.ansible.com/ansible/latest/plugins/inventory/constructed.html + +compose: + rack_id: rack.id + ntp_servers: config_context.ntp_servers + +keyed_groups: + - prefix: rack + key: rack.name + +groups: + jinja_test_group: inventory_hostname.startswith('Test') diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals-flatten.json b/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals-flatten.json new file mode 100644 index 00000000..4bad3dca --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals-flatten.json @@ -0,0 +1,446 @@ +{ + "Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [], + "manufacturers": [ + "cisco" + ], + "rack_role": "test-rack-role", + "racks": [ + "Test Rack Site 2" + ], + "regions": [], + "serial": "", + "site_groups": [], + "sites": [ + "test-site2" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "device_roles": [ + "core-switch" + ], + "device_types": [ + "nexus-parent" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "serial": "", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "racks": [ + "Test Rack" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB12345678", + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "ntp_servers": [ + "pool.ntp.org" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB01234567", + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "disk": 170, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "serial": "", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "all": { + "children": [ + "ungrouped", + "test_site2", + "other_region", + "parent_region", + "other_site_group", + "parent_site_group", + "Test_Rack_Site_2", + "test_rack_role", + "core_switch", + "cisco_test", + "cisco", + "active", + "nexus_parent", + "Test_Rack", + "Test_Cluster_2", + "test_cluster_type", + "is_virtual", + "Test_Cluster", + "test_cluster_group" + ] + }, + "cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "parent_rack_group": { + "children": [ + "test_rack_group" + ] + }, + "parent_region": { + "children": [ + "test_region" + ] + }, + "parent_site_group": { + "children": [ + "test_site_group" + ] + }, + "test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "test_region": { + "children": [ + "test_site" + ] + }, + "test_site": { + "children": [ + "parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_site2": { + "hosts": [ + "R1-Device" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals-flatten.yml b/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals-flatten.yml new file mode 100644 index 00000000..33213ff5 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals-flatten.yml @@ -0,0 +1,33 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: http://localhost:32768 +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +config_context: true +flatten_config_context: true +flatten_custom_fields: true +plurals: true +interfaces: false +services: false +fetch_all: true +group_names_raw: true + +group_by: + - sites + - tenants + - racks + - location + - rack_role + - tags + - device_roles + - device_types + - manufacturers + - platforms + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals.json b/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals.json new file mode 100644 index 00000000..fb34d7fa --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals.json @@ -0,0 +1,1421 @@ +{ + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [], + "manufacturers": [ + "cisco" + ], + "rack_role": "test-rack-role", + "racks": [ + "Test Rack Site 2" + ], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site2" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "nexus-parent" + ], + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "Ethernet1/1", + "display_url": "http://localhost:32768/dcim/interfaces/1/", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/3/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One" + }, + "display": "Ethernet2/1", + "display_url": "http://localhost:32768/dcim/interfaces/2/", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/4/", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/6/", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "telnet (TCP/23)", + "display_url": "http://localhost:32768/ipam/services/3/", + "id": 3, + "ipaddresses": [], + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/11/", + "enabled": true, + "id": 11, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/12/", + "enabled": true, + "id": 12, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/4/", + "id": 4, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "racks": [ + "Test Rack" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB12345678", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "config_context": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet1", + "display_url": "http://localhost:32768/dcim/interfaces/3/", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/1/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet2", + "display_url": "http://localhost:32768/dcim/interfaces/4/", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "display_url": "http://localhost:32768/ipam/ip-addresses/2/", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/5/", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/1/", + "id": 1, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + }, + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "http (TCP/80)", + "display_url": "http://localhost:32768/ipam/services/2/", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1 + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2 + } + ], + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/1/", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/2/", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/3/", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/4/", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/5/", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/6/", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/7/", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/8/", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/9/", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/10/", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "all": { + "children": [ + "ungrouped", + "sites_test_site2", + "region_other_region", + "region_parent_region", + "site_group_other_site_group", + "site_group_parent_site_group", + "racks_Test_Rack_Site_2", + "rack_role_test_rack_role", + "device_roles_core_switch", + "device_types_cisco_test", + "manufacturers_cisco", + "status_active", + "device_types_nexus_parent", + "racks_Test_Rack", + "cluster_Test_Cluster_2", + "cluster_type_test_cluster_type", + "is_virtual", + "cluster_Test_Cluster", + "cluster_group_test_cluster_group" + ] + }, + "cluster_Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "cluster_group_test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_type_test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "device_roles_core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "device_types_cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "device_types_nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "location_parent_rack_group": { + "children": [ + "location_test_rack_group" + ] + }, + "location_test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "manufacturers_cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "rack_role_test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "racks_Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "racks_Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "region_parent_region": { + "children": [ + "region_test_region" + ] + }, + "region_test_region": { + "children": [ + "sites_test_site" + ] + }, + "site_group_parent_site_group": { + "children": [ + "site_group_test_site_group" + ] + }, + "sites_test_site": { + "children": [ + "location_parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "sites_test_site2": { + "hosts": [ + "R1-Device" + ] + }, + "status_active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals.yml b/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals.yml new file mode 100644 index 00000000..1e53fd0b --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory-plurals.yml @@ -0,0 +1,38 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: http://localhost:32768 +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +cache: true +cache_timeout: 3600 +cache_plugin: jsonfile +cache_connection: /tmp/inventory_netbox + +config_context: true +plurals: true +interfaces: true +services: true + +# Enough to fit only 2 devices, so tests chunking logic +max_uri_length: 80 +fetch_all: false + +group_by: + - sites + - tenants + - racks + - location + - rack_role + - tags + - device_roles + - device_types + - manufacturers + - platforms + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory.json b/tests/integration/targets/inventory-v4.1/files/test-inventory.json new file mode 100644 index 00000000..b7e51862 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory.json @@ -0,0 +1,1423 @@ +{ + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "config_context": {}, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [], + "manufacturer": "cisco", + "rack": "Test Rack Site 2", + "rack_role": "test-rack-role", + "regions": [], + "role": "core-switch", + "serial": "", + "services": [], + "site": "test-site2", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "config_context": {}, + "custom_fields": {}, + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "Ethernet1/1", + "display_url": "http://localhost:32768/dcim/interfaces/1/", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/3/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One" + }, + "display": "Ethernet2/1", + "display_url": "http://localhost:32768/dcim/interfaces/2/", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/4/", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/6/", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One" + }, + "display": "telnet (TCP/23)", + "display_url": "http://localhost:32768/ipam/services/3/", + "id": 3, + "ipaddresses": [], + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/11/", + "enabled": true, + "id": 11, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/12/", + "enabled": true, + "id": 12, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [], + "serial": "", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/4/", + "id": 4, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "TestDeviceR1": { + "config_context": {}, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "test100": { + "asset_tag": "123456789", + "config_context": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet1", + "display_url": "http://localhost:32768/dcim/interfaces/3/", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "display_url": "http://localhost:32768/ipam/ip-addresses/1/", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "GigabitEthernet2", + "display_url": "http://localhost:32768/dcim/interfaces/4/", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "display_url": "http://localhost:32768/ipam/ip-addresses/2/", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "wlink1", + "display_url": "http://localhost:32768/dcim/interfaces/5/", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "ssh (TCP/22)", + "display_url": "http://localhost:32768/ipam/services/1/", + "id": 1, + "ipaddresses": [], + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + }, + { + "comments": "", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100" + }, + "display": "http (TCP/80)", + "display_url": "http://localhost:32768/ipam/services/2/", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1 + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2 + } + ], + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [ + { + "custom_fields": {}, + "description": "", + "display": "disk1", + "display_url": "http://localhost:32768/virtualization/virtual-disks/1/", + "id": 1, + "name": "disk1", + "size": 60, + "tags": [], + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + } + }, + { + "custom_fields": {}, + "description": "", + "display": "disk2", + "display_url": "http://localhost:32768/virtualization/virtual-disks/2/", + "id": 2, + "name": "disk2", + "size": 110, + "tags": [], + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + } + } + ] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/1/", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/2/", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/3/", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/4/", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/5/", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [ + { + "custom_fields": {}, + "description": "", + "display": "disk1", + "display_url": "http://localhost:32768/virtualization/virtual-disks/1/", + "id": 1, + "name": "disk1", + "size": 60, + "tags": [], + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + } + }, + { + "custom_fields": {}, + "description": "", + "display": "disk2", + "display_url": "http://localhost:32768/virtualization/virtual-disks/2/", + "id": 2, + "name": "disk2", + "size": 110, + "tags": [], + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm" + } + } + ] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth0", + "display_url": "http://localhost:32768/virtualization/interfaces/6/", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth1", + "display_url": "http://localhost:32768/virtualization/interfaces/7/", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth2", + "display_url": "http://localhost:32768/virtualization/interfaces/8/", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth3", + "display_url": "http://localhost:32768/virtualization/interfaces/9/", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "custom_fields": {}, + "description": "", + "display": "Eth4", + "display_url": "http://localhost:32768/virtualization/interfaces/10/", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + } + } + }, + "all": { + "children": [ + "ungrouped", + "site_test_site2", + "region_other_region", + "region_parent_region", + "site_group_other_site_group", + "site_group_parent_site_group", + "rack_Test_Rack_Site_2", + "rack_role_test_rack_role", + "role_core_switch", + "device_type_cisco_test", + "manufacturer_cisco", + "status_active", + "device_type_nexus_parent", + "service_telnet", + "rack_Test_Rack", + "service_ssh", + "service_http", + "cluster_Test_Cluster_2", + "cluster_type_test_cluster_type", + "is_virtual", + "cluster_Test_Cluster", + "cluster_group_test_cluster_group" + ] + }, + "cluster_Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "cluster_group_test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_type_test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "device_type_cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "device_type_nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "location_parent_rack_group": { + "children": [ + "location_test_rack_group" + ] + }, + "location_test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "manufacturer_cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "rack_Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "rack_Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "rack_role_test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "region_parent_region": { + "children": [ + "region_test_region" + ] + }, + "region_test_region": { + "children": [ + "site_test_site" + ] + }, + "role_core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "service_http": { + "hosts": [ + "test100" + ] + }, + "service_ssh": { + "hosts": [ + "test100", + "Test VM With Spaces" + ] + }, + "service_telnet": { + "hosts": [ + "Test Nexus One" + ] + }, + "site_group_parent_site_group": { + "children": [ + "site_group_test_site_group" + ] + }, + "site_test_site": { + "children": [ + "location_parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "site_test_site2": { + "hosts": [ + "R1-Device" + ] + }, + "status_active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.1/files/test-inventory.yml b/tests/integration/targets/inventory-v4.1/files/test-inventory.yml new file mode 100644 index 00000000..a24cd7bb --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/files/test-inventory.yml @@ -0,0 +1,31 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: http://localhost:32768 +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +config_context: true +plurals: false +interfaces: true +virtual_disks: true +services: true + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - services + - status diff --git a/tests/integration/targets/inventory-v4.1/runme.sh b/tests/integration/targets/inventory-v4.1/runme.sh new file mode 100755 index 00000000..f0ea70d0 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/runme.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +set -o xtrace # Print commands as they're run +set -o errexit # abort on nonzero exitstatus +set -o nounset # abort on unbound variable +set -o pipefail # don't hide errors within pipes + +# Directory of this script +SCRIPT_DIR="$( dirname "${BASH_SOURCE[0]}" )" +RUNME_CONFIG="$SCRIPT_DIR/runme_config" +INVENTORIES_DIR="$SCRIPT_DIR/files" + +# Load runme_config, if exists - the only way to pass environment when run through ansible-test +if [[ -f "$RUNME_CONFIG" ]] +then + source "$RUNME_CONFIG" +fi + +declare -a COMPARE_OPTIONS # empty array + +# Check if NETBOX_VERSION has been set by runme_config, and if so, pass to compare_inventory_json.py +if [[ "${NETBOX_VERSION:-}" == "v4.1" ]] +then + COMPARE_OPTIONS+=(--netbox-version "${NETBOX_VERSION}") +fi + +# OUTPUT_DIR is set by ansible-test +# OUTPUT_INVENTORY_JSON is only set if running hacking/update_test_inventories.sh to update the test diff data +if [[ -n "${OUTPUT_INVENTORY_JSON:-}" ]] +then + OUTPUT_DIR="$OUTPUT_INVENTORY_JSON" + + # Clean up JSON fields we don't want to store and compare against in tests (creation times, etc.) + COMPARE_OPTIONS+=(--write) +fi + +echo OUTPUT_DIR="$OUTPUT_DIR" + +inventory () { + if [[ -n "${OUTPUT_INVENTORY_JSON:-}" ]] + then + # Running for the purpose of updating test data + ansible-inventory "$@" + else + # Running inside ansible-test + # Run through python.py just to make sure we've definitely got the coverage environment set up + # Just running ansible-inventory directly may not actually find the right one in PATH + python.py "$(command -v ansible-inventory)" "$@" + fi +} + + +RESULT=0 + +for INVENTORY in "$INVENTORIES_DIR"/*.yml +do + NAME="$(basename "$INVENTORY")" + NAME_WITHOUT_EXTENSION="${NAME%.yml}" + + OUTPUT_JSON="$OUTPUT_DIR/$NAME_WITHOUT_EXTENSION.json" + inventory -vvvv --list --inventory "$INVENTORY" --output="$OUTPUT_JSON" + + # Compare the output + if ! "$SCRIPT_DIR/compare_inventory_json.py" "${COMPARE_OPTIONS[@]}" "$INVENTORIES_DIR/$NAME_WITHOUT_EXTENSION.json" "$OUTPUT_JSON" + then + # Returned non-zero status + RESULT=1 + fi + +done + +exit $RESULT diff --git a/tests/integration/targets/inventory-v4.1/runme_config.template b/tests/integration/targets/inventory-v4.1/runme_config.template new file mode 100644 index 00000000..80b42a32 --- /dev/null +++ b/tests/integration/targets/inventory-v4.1/runme_config.template @@ -0,0 +1,6 @@ +# runme_config is source'd by runme.sh to set environment variables used to modify the test against different versions of NetBox. +# .travis.yml uses render_config.sh to generate it from runme_config.template +# There is no other way to pass environment variables to a runme.sh integration test. +# (integration_config.yml files are only helpful to ansible yaml-based tests) + +export NETBOX_VERSION=${VERSION} diff --git a/tests/integration/targets/regression-v4.1/tasks/main.yml b/tests/integration/targets/regression-v4.1/tasks/main.yml new file mode 100644 index 00000000..5bc0bd70 --- /dev/null +++ b/tests/integration/targets/regression-v4.1/tasks/main.yml @@ -0,0 +1,284 @@ +--- +## +## +### TEST NETBOX CONNECTION FAILURE +## +## +- name: TEST NETBOX CONNECTION FAILURE + connection: local + block: + - name: 1 - Device with required information + netbox.netbox.netbox_device: + netbox_url: http://some-random-invalid-URL + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: R1 + device_type: Cisco Test + device_role: Core Switch + site: Test Site + status: Staged + state: present + register: test_one + ignore_errors: true + + - name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is failed + - test_one['msg'] == "Failed to establish connection to NetBox API" + + - name: 2 - Check to see if netbox_prefix with parent defined will pass via check-mode + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + parent: 10.10.0.0/16 + prefix_length: 24 + first_available: true + state: present + register: test_two + check_mode: true + + - name: 2 - ASSERT + ansible.builtin.assert: + that: + - test_two is changed + - test_two['msg'] == "New prefix created within 10.10.0.0/16" + + - name: "3 - Add device with tags - Setup device to test #242" + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: issue-242 + device_type: Cisco Test + device_role: Core Switch + site: Test Site + status: Staged + tags: + - slug: first + - slug: second + + - name: "4 - Add device with tags out of order - shouldn't change - Tests #242 is fixed" + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: issue-242 + device_type: Cisco Test + device_role: Core Switch + site: Test Site + status: Staged + tags: + - slug: second + - slug: first + register: test_four + diff: true + + - name: "4 - Assert not changed - Tests #242 is fixed" + ansible.builtin.assert: + that: + - not test_four["changed"] + + - name: "5 - Add device with extra tag - Tests #242 is fixed" + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: issue-242 + device_type: Cisco Test + device_role: Core Switch + site: Test Site + status: Staged + asset_tag: "1234" + tags: + - slug: second + - slug: third + - slug: first + register: test_five + diff: true + + - name: "5 - Assert added tag - Tests #242 is fixed" + ansible.builtin.assert: + that: + - test_five is changed + - test_five["diff"]["after"]["tags"] is defined + - test_five["device"]["tags"] is defined + + - name: "6 - Loop through and add interface templates to different device interface templates - Fixes #282" + netbox.netbox.netbox_device_interface_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: SFP+ (10GE) + type: SFP+ (10GE) + device_type: "{{ item }}" + register: test_six + loop: + - Cisco Test + - Arista Test + - Nexus Child + - Nexus Parent + + - name: "6 - Assert device type is correct - Fixes #282" + ansible.builtin.assert: + that: + - test_six.results[0]["diff"]["before"]["state"] == "absent" + - test_six.results[0]["diff"]["after"]["state"] == "present" + - test_six.results[0]["interface_template"]["device_type"] == 1 + - test_six.results[1]["diff"]["before"]["state"] == "absent" + - test_six.results[1]["diff"]["after"]["state"] == "present" + - test_six.results[1]["interface_template"]["device_type"] == 2 + - test_six.results[2]["diff"]["before"]["state"] == "absent" + - test_six.results[2]["diff"]["after"]["state"] == "present" + - test_six.results[2]["interface_template"]["device_type"] == 4 + - test_six.results[3]["diff"]["before"]["state"] == "absent" + - test_six.results[3]["diff"]["after"]["state"] == "present" + - test_six.results[3]["interface_template"]["device_type"] == 3 + + - name: 7 - Don't prevent updates to other params if tags are specified + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: issue-242 + device_type: Cisco Test + device_role: Core Switch + site: Test Site + status: Staged + asset_tag: "Null" + tags: + # Changed these for issue #407 to be IDs + - 2 + - 3 + - 1 + register: test_seven + + - name: "5 - Assert added tag - Tests #242 is fixed" + ansible.builtin.assert: + that: + - test_seven is changed + - test_seven["diff"]["after"]["asset_tag"] == "Null" + - test_seven["device"]["asset_tag"] == "Null" + + - name: Add ip address to netbox and don't assign it to a device (Issue 372) + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 10.255.255.1/24 + query_params: + - address + - vrf + state: present + + - name: Update same ip address to attach to a device interface (Issue 372) + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 10.255.255.1/24 + assigned_object: + device: test100 + name: GigabitEthernet1 + query_params: + - address + - vrf + state: present + register: query_params_372 + + - name: Assert ip address was updated and added to device interface + ansible.builtin.assert: + that: + - query_params_372 is changed + - query_params_372['msg'] == 'ip_address 10.255.255.1/24 updated' + - query_params_372['diff']['after']['assigned_object'] == 3 + - query_params_372['diff']['after']['assigned_object_id'] == 3 + - query_params_372['diff']['after']['assigned_object_type'] == 'dcim.interface' + + - name: Validate failure due to invalid child params provided by user + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + termination_a_type: dcim.interface + termination_a: + device: test100 + name: GigabitEthernet1 + termination_b_type: circuits.circuittermination + termination_b: + name: XYZ987 + ignore_errors: true + register: test_results + + - name: "Issue #415 - Assert failure message shows the allowed params and what the user provided" + ansible.builtin.assert: + that: + - test_results is failed + - 'test_results["msg"] == "One or more of the kwargs provided are invalid for circuits.circuittermination, provided kwargs: name. Acceptable kwargs: circuit, + term_side"' + + - name: "Issue #432 - Make sure same IPs get assigned to different device interfaces" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: "{{ item }}" + loop: "{{ data }}" + register: test_results + vars: + data: + - address: 121.121.121.121/32 + assigned_object: + device: Test Nexus One + name: Ethernet1/1 + description: ansible-netbox-1.2.1 + dns_name: ansible-netbox-1.2.1 + role: HSRP + status: Active + - address: 121.121.121.121/32 + assigned_object: + device: Test Nexus Child One + name: Ethernet2/1 + description: ansible-netbox-1.2.1 + dns_name: ansible-netbox-1.2.1 + role: HSRP + status: Active + - address: 1.121.121.121/32 + assigned_object: + device: Test Nexus One + name: Ethernet1/1 + description: ansible-netbox-1.2.1 + dns_name: ansible-netbox-1.2.1 + role: HSRP + status: Active + - address: 1.121.121.121/32 + assigned_object: + device: Test Nexus Child One + name: Ethernet2/1 + description: ansible-netbox-1.2.1 + dns_name: ansible-netbox-1.2.1 + role: HSRP + status: Active + + - name: "ASSERT Issue #432 changes reflect correct device" + ansible.builtin.assert: + that: + - test_results | community.general.json_query('results[?ip_address.address==`1.121.121.121/32`]') | length == 2 + - test_results | community.general.json_query('results[?ip_address.address==`121.121.121.121/32`]') | length == 2 + + - name: "Issue #958 - Make sure we can add same location with different sites" + netbox.netbox.netbox_location: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Office Building + site: "{{ item }}" + loop: + - Test Site + - Test Site2 + register: test_results + + - name: "ASSERT ISSUE #957 - Location has different IDs" + ansible.builtin.assert: + that: + - test_results.results.0.location.id != test_results.results.1.location.id diff --git a/tests/integration/targets/v3.7/tasks/main.yml b/tests/integration/targets/v3.7/tasks/main.yml index d775d188..1423e0a7 100644 --- a/tests/integration/targets/v3.7/tasks/main.yml +++ b/tests/integration/targets/v3.7/tasks/main.yml @@ -316,3 +316,21 @@ ansible.builtin.include_tasks: netbox_virtual_disk.yml tags: - netbox_virtual_disk + +- name: NETBOX_TUNNEL TESTS + ansible.builtin.include_tasks: + file: netbox_tunnel.yml + apply: + tags: + - netbox_tunnel + tags: + - netbox_tunnel + +- name: NETBOX_TUNNEL GROUP TESTS + ansible.builtin.include_tasks: + file: netbox_tunnel_group.yml + apply: + tags: + - netbox_tunnel_group + tags: + - netbox_tunnel_group diff --git a/tests/integration/targets/v3.7/tasks/netbox_tunnel.yml b/tests/integration/targets/v3.7/tasks/netbox_tunnel.yml new file mode 100644 index 00000000..71e98d81 --- /dev/null +++ b/tests/integration/targets/v3.7/tasks/netbox_tunnel.yml @@ -0,0 +1,96 @@ +--- +## +## +### NETBOX_TUNNEL +## +## +- name: "TUNNEL 1: Necessary info creation" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + status: active + encapsulation: ipsec-tunnel + state: present + register: test_one + +- name: "TUNNEL 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tunnel']['name'] == "Test Tunnel" + - test_one['tunnel']['status'] == "active" + - test_one['tunnel']['encapsulation'] == "ipsec-tunnel" + - test_one['msg'] == "tunnel Test Tunnel created" + +- name: "TUNNEL 2: Create duplicate" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + status: active + encapsulation: ipsec-tunnel + state: present + register: test_two + +- name: "TUNNEL 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['tunnel']['name'] == "Test Tunnel" + - test_two['tunnel']['status'] == "active" + - test_two['tunnel']['encapsulation'] == "ipsec-tunnel" + - test_two['msg'] == "tunnel Test Tunnel already exists" + +- name: "TUNNEL 3: Update Existing" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + encapsulation: ipsec-tunnel + description: Test Description + tenant: Test Tenant + tunnel_id: 200 + tags: + - Schnozzberry + state: present + register: test_three + +- name: "TUNNEL: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Test Description" + - test_three['diff']['after']['tenant'] == 1 + - test_three['diff']['after']['tunnel_id'] == 200 + - test_three['diff']['after']['tags'][0] == 4 + - test_three['tunnel']['name'] == "Test Tunnel" + - test_three['tunnel']['tenant'] == 1 + - test_three['tunnel']['tunnel_id'] == 200 + - test_three['tunnel']['description'] == "Test Description" + - test_three['tunnel']['tags'][0] == 4 + - test_three['tunnel']['encapsulation'] == "ipsec-tunnel" + - test_three['msg'] == "tunnel Test Tunnel updated" + +- name: "TUNNEL 4: Delete" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + encapsulation: ipsec-tunnel + state: absent + register: test_four + +- name: "TUNNEL 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "tunnel Test Tunnel deleted" diff --git a/tests/integration/targets/v3.7/tasks/netbox_tunnel_group.yml b/tests/integration/targets/v3.7/tasks/netbox_tunnel_group.yml new file mode 100644 index 00000000..56a2ee15 --- /dev/null +++ b/tests/integration/targets/v3.7/tasks/netbox_tunnel_group.yml @@ -0,0 +1,82 @@ +--- +## +## +### NETBOX_TUNNEL GROUP +## +## +- name: "TUNNEL_GROUP 1: Necessary info creation" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + state: present + register: test_one + +- name: "TUNNEL_GROUP 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tunnel_group']['name'] == "Test Tunnel Group" + - test_one['tunnel_group']['slug'] == "test-tunnel-group" + - test_one['msg'] == "tunnel_group Test Tunnel Group created" + +- name: "TUNNEL_GROUP 2: Create duplicate" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + state: present + register: test_two + +- name: "TUNNEL_GROUP 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['tunnel_group']['name'] == "Test Tunnel Group" + - test_two['tunnel_group']['slug'] == "test-tunnel-group" + - test_two['msg'] == "tunnel_group Test Tunnel Group already exists" + +- name: "TUNNEL_GROUP 3: Update Existing" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + description: Test Description + tags: + - Schnozzberry + state: present + register: test_three + +- name: "TUNNEL_GROUP 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Test Description" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['tunnel_group']['name'] == "Test Tunnel Group" + - test_three['tunnel_group']['slug'] == "test-tunnel-group" + - test_three['tunnel_group']['description'] == "Test Description" + - test_three['tunnel_group']['tags'][0] == 4 + - test_three['msg'] == "tunnel_group Test Tunnel Group updated" + +- name: "TUNNEL_GROUP 4: Delete" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + state: absent + register: test_four + +- name: "TUNNEL_GROUP 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "tunnel_group Test Tunnel Group deleted" diff --git a/tests/integration/targets/v4.0/tasks/main.yml b/tests/integration/targets/v4.0/tasks/main.yml index 11eab01a..f229a24a 100644 --- a/tests/integration/targets/v4.0/tasks/main.yml +++ b/tests/integration/targets/v4.0/tasks/main.yml @@ -158,6 +158,18 @@ - name: NETBOX_VIRTUAL_CHASSIS TESTS ansible.builtin.include_tasks: netbox_virtual_chassis.yml +- name: NETBOX_USER TESTS + ansible.builtin.include_tasks: netbox_user.yml + +- name: NETBOX_USER_GROUP TESTS + ansible.builtin.include_tasks: netbox_user_group.yml + +- name: NETBOX_PERMISSION TESTS + ansible.builtin.include_tasks: netbox_permission.yml + +- name: NETBOX_TOKEN TESTS + ansible.builtin.include_tasks: netbox_token.yml + # Module has to be updated for 3.3 # - name: "NETBOX_CABLE TESTS" # include_tasks: "netbox_cable.yml" @@ -328,3 +340,21 @@ ansible.builtin.include_tasks: netbox_virtual_disk.yml tags: - netbox_virtual_disk + +- name: NETBOX_TUNNEL TESTS + ansible.builtin.include_tasks: + file: netbox_tunnel.yml + apply: + tags: + - netbox_tunnel + tags: + - netbox_tunnel + +- name: NETBOX_TUNNEL GROUP TESTS + ansible.builtin.include_tasks: + file: netbox_tunnel_group.yml + apply: + tags: + - netbox_tunnel_group + tags: + - netbox_tunnel_group diff --git a/tests/integration/targets/v4.0/tasks/netbox_permission.yml b/tests/integration/targets/v4.0/tasks/netbox_permission.yml new file mode 100644 index 00000000..fdc45933 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_permission.yml @@ -0,0 +1,169 @@ +--- +## +## +### NETBOX_PERMISSION +## +## +- name: "PERMISSION 1: Necessary info creation" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission + actions: + - view + object_types: [] + state: present + register: test_one + +- name: "PERMISSION 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['permission']['name'] == "Test Permission" + - test_one['msg'] == "permission Test Permission created" + +- name: "PERMISSION 2: Create duplicate" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission + actions: + - view + object_types: [] + state: present + register: test_two + +- name: "PERMISSION 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['permission']['name'] == "Test Permission" + - test_two['msg'] == "permission Test Permission already exists" + +- name: "PERMISSION 3: Update" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission + description: The test permission + enabled: false + actions: + - view + - add + - change + - delete + - extreme_administration + object_types: + - vpn.tunneltermination + - wireless.wirelesslan + constraints: + name: Foo + state: present + register: test_three + +- name: "PERMISSION 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "The test permission" + - test_three['permission']['name'] == "Test Permission" + - test_three['permission']['description'] == "The test permission" + - test_three['permission']['enabled'] == False + - test_three['permission']['actions'] == ["view", "add", "change", "delete", "extreme_administration"] + - test_three['permission']['object_types'] == ["vpn.tunneltermination", "wireless.wirelesslan"] + - test_three['permission']['constraints']["name"] == "Foo" + - test_three['msg'] == "permission Test Permission updated" + +- name: "PERMISSION 4: Create second permission" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission 2 + actions: + - view + object_types: [] + state: present + register: test_four + +- name: "PERMISSION 4: Create second permission" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['permission']['name'] == "Test Permission 2" + - test_four['msg'] == "permission Test Permission 2 created" + +- name: "PERMISSION 5: Add permission to group" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + permissions: + - Test Permission + state: present + register: test_five + +- name: "PERMISSION 5: ASSERT - Add permission to group" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['user_group']['permissions'] == [1] + +- name: "PERMISSION 6: Add permission to user" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword + permissions: + - Test Permission 2 + state: present + register: test_six + +- name: "PERMISSION 6: ASSERT - Add permission to user" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['user']['permissions'] == [2] + +- name: "PERMISSION 7: Delete" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission + state: absent + register: test_seven + +- name: "PERMISSION 7: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_seven is changed + - test_seven['diff']['before']['state'] == "present" + - test_seven['diff']['after']['state'] == "absent" + - test_seven['msg'] == "permission Test Permission deleted" + +- name: "PERMISSION 8: Delete non existing" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission + state: absent + register: test_eight + +- name: "PERMISSION 8: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_eight['changed'] + - test_eight['permission'] == None + - test_eight['msg'] == "permission Test Permission already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_token.yml b/tests/integration/targets/v4.0/tasks/netbox_token.yml new file mode 100644 index 00000000..f149ef9c --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_token.yml @@ -0,0 +1,107 @@ +--- +## +## +### NETBOX_PERMISSION +## +## +- name: "TOKEN: Set up user" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword + state: present + +- name: "TOKEN 1: Necessary info creation" + netbox.netbox.netbox_token: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + user: TestUser + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: present + register: test_one + +- name: "TOKEN 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['token']['user'] == 3 + - test_one['msg'] == "token ******** created" + +- name: "TOKEN 2: Create duplicate" + netbox.netbox.netbox_token: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + user: TestUser + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: present + register: test_two + +- name: "TOKEN 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['msg'] == "token ******** already exists" + +# TODO: https://github.com/netbox-community/netbox/issues/17279 +# TODO: A netbox bug is causing the key to change when updating tokens +# TODO: just skip the update test for now +# - name: "TOKEN 3: Update" +# netbox.netbox.netbox_token: +# netbox_url: http://localhost:32768 +# netbox_token: "0123456789abcdef0123456789abcdef01234567" +# data: +# user: TestUser +# key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +# description: The test token +# write_enabled: false +# expires: 2024-08-26T14:49:01.345000+00:00 +# state: present +# register: test_three +# +# - name: "TOKEN 3: ASSERT - Update" +# ansible.builtin.assert: +# that: +# - test_three is changed +# - test_three['token']['description'] == "The test token" +# - test_three['token']['write_enabled'] == false +# - test_three['token']['expires'] == "2024-08-26T14:49:01.345000+00:00" +# - test_three['msg'] == "token ******** updated" + +- name: "TOKEN 4: Delete" + netbox.netbox.netbox_token: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: absent + register: test_four + +- name: "TOKEN 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "token ******** deleted" + +- name: "TOKEN 5: ASSERT - Delete non existing" + netbox.netbox.netbox_token: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: absent + register: test_five + +- name: "TOKEN 5: ASSERT - Delete non existing" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['token'] == None + - test_five['msg'] == "token ******** already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_tunnel.yml b/tests/integration/targets/v4.0/tasks/netbox_tunnel.yml new file mode 100644 index 00000000..71e98d81 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_tunnel.yml @@ -0,0 +1,96 @@ +--- +## +## +### NETBOX_TUNNEL +## +## +- name: "TUNNEL 1: Necessary info creation" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + status: active + encapsulation: ipsec-tunnel + state: present + register: test_one + +- name: "TUNNEL 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tunnel']['name'] == "Test Tunnel" + - test_one['tunnel']['status'] == "active" + - test_one['tunnel']['encapsulation'] == "ipsec-tunnel" + - test_one['msg'] == "tunnel Test Tunnel created" + +- name: "TUNNEL 2: Create duplicate" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + status: active + encapsulation: ipsec-tunnel + state: present + register: test_two + +- name: "TUNNEL 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['tunnel']['name'] == "Test Tunnel" + - test_two['tunnel']['status'] == "active" + - test_two['tunnel']['encapsulation'] == "ipsec-tunnel" + - test_two['msg'] == "tunnel Test Tunnel already exists" + +- name: "TUNNEL 3: Update Existing" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + encapsulation: ipsec-tunnel + description: Test Description + tenant: Test Tenant + tunnel_id: 200 + tags: + - Schnozzberry + state: present + register: test_three + +- name: "TUNNEL: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Test Description" + - test_three['diff']['after']['tenant'] == 1 + - test_three['diff']['after']['tunnel_id'] == 200 + - test_three['diff']['after']['tags'][0] == 4 + - test_three['tunnel']['name'] == "Test Tunnel" + - test_three['tunnel']['tenant'] == 1 + - test_three['tunnel']['tunnel_id'] == 200 + - test_three['tunnel']['description'] == "Test Description" + - test_three['tunnel']['tags'][0] == 4 + - test_three['tunnel']['encapsulation'] == "ipsec-tunnel" + - test_three['msg'] == "tunnel Test Tunnel updated" + +- name: "TUNNEL 4: Delete" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + encapsulation: ipsec-tunnel + state: absent + register: test_four + +- name: "TUNNEL 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "tunnel Test Tunnel deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_tunnel_group.yml b/tests/integration/targets/v4.0/tasks/netbox_tunnel_group.yml new file mode 100644 index 00000000..91814734 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_tunnel_group.yml @@ -0,0 +1,81 @@ +--- +## +## +### NETBOX_TUNNEL GROUP +## +## +- name: "TUNNEL_GROUP 1: Necessary info creation" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + state: present + register: test_one + +- name: "TUNNEL_GROUP 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tunnel_group']['name'] == "Test Tunnel Group" + - test_one['tunnel_group']['slug'] == "test-tunnel-group" + - test_one['msg'] == "tunnel_group Test Tunnel Group created" + +- name: "TUNNEL_GROUP 2: Create duplicate" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + state: present + register: test_two + +- name: "TUNNEL_GROUP 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['tunnel_group']['name'] == "Test Tunnel Group" + - test_two['tunnel_group']['slug'] == "test-tunnel-group" + - test_two['msg'] == "tunnel_group Test Tunnel Group already exists" + +- name: "TUNNEL_GROUP 3: Update Existing" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + description: Test Description + tags: + - Schnozzberry + state: present + register: test_three + +- name: "TUNNEL_GROUP 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Test Description" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['tunnel_group']['name'] == "Test Tunnel Group" + - test_three['tunnel_group']['description'] == "Test Description" + - test_three['tunnel_group']['tags'][0] == 4 + - test_three['msg'] == "tunnel_group Test Tunnel Group updated" + +- name: "TUNNEL_GROUP 4: Delete" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + state: absent + register: test_four + +- name: "TUNNEL_GROUP 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "tunnel_group Test Tunnel Group deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_user.yml b/tests/integration/targets/v4.0/tasks/netbox_user.yml new file mode 100644 index 00000000..a95e9323 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_user.yml @@ -0,0 +1,105 @@ +--- +## +## +### NETBOX_USER +## +## +- name: "USER 1: Necessary info creation" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword + state: present + register: test_one + +- name: "USESR 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['user']['username'] == "TestUser" + - test_one['user']['display'] == "TestUser" + - test_one['msg'] == "user TestUser created" + +- name: "USER 2: Update password" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword2 + email: my@user.com + state: present + register: test_two + +- name: "USER 2: ASSERT - Update password" + ansible.builtin.assert: + that: + - test_two['changed'] + - test_two['user']['username'] == "TestUser" + - test_two['msg'] == "user TestUser updated" + +- name: "USER 3: Update" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword + email: test@user.com + first_name: Test + last_name: User + is_active: false + is_staff: true + state: present + register: test_three + +- name: "USER 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['first_name'] == "Test" + - test_three['diff']['after']['last_name'] == "User" + - test_three['user']['username'] == "TestUser" + - test_three['user']['email'] == "test@user.com" + - test_three['user']['first_name'] == "Test" + - test_three['user']['last_name'] == "User" + - test_three['user']['is_active'] == False + - test_three['user']['is_staff'] == True + - test_three['msg'] == "user TestUser updated" + +- name: "USER 4: Delete" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + state: absent + register: test_four + +- name: "USER 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "user TestUser deleted" + +- name: "USER 5: ASSERT - Delete non existing" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + state: absent + register: test_five + +- name: "USER 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['user'] == None + - test_five['msg'] == "user TestUser already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_user_group.yml b/tests/integration/targets/v4.0/tasks/netbox_user_group.yml new file mode 100644 index 00000000..b6f87059 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_user_group.yml @@ -0,0 +1,127 @@ +--- +## +## +### NETBOX_USER_GROUP +## +## +- name: "USER_GROUP 1: Necessary info creation" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + state: present + register: test_one + +- name: "USER_GROUP 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['user_group']['name'] == "Test User Group" + - test_one['msg'] == "user_group Test User Group created" + +- name: "USER_GROUP 2: Create duplicate" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + state: present + register: test_two + +- name: "USER_GROUP 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['user_group']['name'] == "Test User Group" + - test_two['msg'] == "user_group Test User Group already exists" + +- name: "USER_GROUP 3: Update" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + description: The test group + state: present + register: test_three + +- name: "USER_GROUP 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "The test group" + - test_three['user_group']['name'] == "Test User Group" + - test_three['user_group']['description'] == "The test group" + - test_three['msg'] == "user_group Test User Group updated" + +- name: "USER_GROUP 4: Create second group" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group 2 + state: present + register: test_four + +- name: "USER_GROUP 4: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['user_group']['name'] == "Test User Group 2" + - test_four['msg'] == "user_group Test User Group 2 created" + +- name: "USER_GROUP 5: Add user to group" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword + groups: + - Test User Group + state: present + register: test_five + +- name: "USER_GROUP 5: ASSERT - Add user to group" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['user']['groups'] == [1] + +- name: "USER_GROUP 6: Delete" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + state: absent + register: test_six + +- name: "USER_GROUP 6: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "present" + - test_six['diff']['after']['state'] == "absent" + - test_six['msg'] == "user_group Test User Group deleted" + +- name: "USER_GROUP 6: ASSERT - Delete non existing" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + state: absent + register: test_seven + +- name: "USER_GROUP 7: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_seven['changed'] + - test_seven['user_group'] == None + - test_seven['msg'] == "user_group Test User Group already absent" diff --git a/tests/integration/targets/v4.1/tasks/main.yml b/tests/integration/targets/v4.1/tasks/main.yml new file mode 100644 index 00000000..1d56afb9 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/main.yml @@ -0,0 +1,394 @@ +--- +- name: NETBOX_DEVICE TESTS + ansible.builtin.include_tasks: netbox_device.yml + +- name: NETBOX_DEVICE_INTERFACE TESTS + ansible.builtin.include_tasks: netbox_device_interface.yml + +- name: NETBOX_DEVICE_INTERFACE_TEMPLATE TESTS + ansible.builtin.include_tasks: netbox_device_interface_template.yml + +- name: NETBOX_IP_ADDRESS TESTS + ansible.builtin.include_tasks: netbox_ip_address.yml + +- name: NETBOX_PREFIX TESTS + ansible.builtin.include_tasks: netbox_prefix.yml + +- name: NETBOX_SITE TESTS + ansible.builtin.include_tasks: netbox_site.yml + +- name: NETBOX_SITE_GROUP TESTS + ansible.builtin.include_tasks: netbox_site_group.yml + +- name: NETBOX_CONTACT TESTS + ansible.builtin.include_tasks: netbox_contact.yml + +- name: NETBOX_CONTACT_ROLE TESTS + ansible.builtin.include_tasks: netbox_contact_role.yml + +- name: NETBOX_TENTANT TESTS + ansible.builtin.include_tasks: netbox_tenant.yml + +- name: NETBOX_TENTANT_GROUP TESTS + ansible.builtin.include_tasks: netbox_tenant_group.yml + +- name: NETBOX_RACK TESTS + ansible.builtin.include_tasks: + file: netbox_rack.yml + apply: + tags: + - netbox_rack + tags: + - netbox_rack + +- name: NETBOX_RACK_ROLE TESTS + ansible.builtin.include_tasks: netbox_rack_role.yml + +- name: NETBOX_LOCATION TESTS + ansible.builtin.include_tasks: netbox_location.yml + +- name: NETBOX_MANUFACTURER TESTS + ansible.builtin.include_tasks: netbox_manufacturer.yml + +- name: NETBOX_PLATFORM TESTS + ansible.builtin.include_tasks: netbox_platform.yml + +- name: NETBOX_DEVICE_TYPE TESTS + ansible.builtin.include_tasks: netbox_device_type.yml + +- name: NETBOX_DEVICE_ROLE TESTS + ansible.builtin.include_tasks: netbox_device_role.yml + +- name: NETBOX_IPAM_ROLE TESTS + ansible.builtin.include_tasks: netbox_ipam_role.yml + +- name: NETBOX_VLAN_GROUP TESTS + ansible.builtin.include_tasks: netbox_vlan_group.yml + +- name: NETBOX_VLAN TESTS + ansible.builtin.include_tasks: netbox_vlan.yml + +- name: NETBOX_VRF TESTS + ansible.builtin.include_tasks: netbox_vrf.yml + +- name: NETBOX_RIR TESTS + ansible.builtin.include_tasks: netbox_rir.yml + +- name: NETBOX_AGGREGATE TESTS + ansible.builtin.include_tasks: netbox_aggregate.yml + +- name: NETBOX_REGION TESTS + ansible.builtin.include_tasks: netbox_region.yml + +- name: NETBOX_DEVICE_BAY TESTS + ansible.builtin.include_tasks: netbox_device_bay.yml + +- name: NETBOX_DEVICE_BAY_TEMPLATE TESTS + ansible.builtin.include_tasks: netbox_device_bay_template.yml + +- name: NETBOX_INVENTORY_ITEM TESTS + ansible.builtin.include_tasks: netbox_inventory_item.yml + +- name: NETBOX_VIRTUAL_MACHINE TESTS + ansible.builtin.include_tasks: + file: netbox_virtual_machine.yml + apply: + tags: + - netbox_virtual_machine + tags: + - netbox_virtual_machine + +- name: NETBOX_CLUSTER TESTS + ansible.builtin.include_tasks: netbox_cluster.yml + +- name: NETBOX_CLUSTER_GROUP TESTS + ansible.builtin.include_tasks: netbox_cluster_group.yml + +- name: NETBOX_CLUSTER_TYPE TESTS + ansible.builtin.include_tasks: netbox_cluster_type.yml + +- name: NETBOX_VM_INTERFACE TESTS + ansible.builtin.include_tasks: netbox_vm_interface.yml + +- name: NETBOX_PROVIDER TESTS + ansible.builtin.include_tasks: netbox_provider.yml + +- name: NETBOX_PROVIDER_NETWORK TESTS + ansible.builtin.include_tasks: netbox_provider_network.yml + +- name: NETBOX_CIRCUIT_TYPE TESTS + ansible.builtin.include_tasks: netbox_circuit_type.yml + +- name: NETBOX_CIRCUIT TESTS + ansible.builtin.include_tasks: netbox_circuit.yml + +- name: NETBOX_CIRCUIT_TERMINATION TESTS + ansible.builtin.include_tasks: netbox_circuit_termination.yml + +- name: NETBOX_REAR_PORT TESTS + ansible.builtin.include_tasks: netbox_rear_port.yml + +- name: NETBOX_REAR_PORT_TEMPLATE TESTS + ansible.builtin.include_tasks: netbox_rear_port_template.yml + +- name: NETBOX_FRONT_PORT TESTS + ansible.builtin.include_tasks: netbox_front_port.yml + +- name: NETBOX_FRONT_PORT_TEMPLATE TESTS + ansible.builtin.include_tasks: netbox_front_port_template.yml + +- name: NETBOX_CONSOLE_PORT TESTS + ansible.builtin.include_tasks: netbox_console_port.yml + +- name: NETBOX_CONSOLE_PORT_TEMPLATE TESTS + ansible.builtin.include_tasks: netbox_console_port_template.yml + +- name: NETBOX_CONSOLE_SERVER_PORT TESTS + ansible.builtin.include_tasks: netbox_console_server_port.yml + +- name: NETBOX_CONSOLE_SERVER_PORT_TEMPLATE TESTS + ansible.builtin.include_tasks: netbox_console_server_port_template.yml + +- name: NETBOX_POWER_PANEL TESTS + ansible.builtin.include_tasks: netbox_power_panel.yml + +- name: NETBOX_POWER_FEED TESTS + ansible.builtin.include_tasks: netbox_power_feed.yml + +- name: NETBOX_POWER_PORT TESTS + ansible.builtin.include_tasks: netbox_power_port.yml + +- name: NETBOX_POWER_PORT_TEMPLATE TESTS + ansible.builtin.include_tasks: netbox_power_port_template.yml + +- name: NETBOX_POWER_OUTLET TESTS + ansible.builtin.include_tasks: netbox_power_outlet.yml + +- name: NETBOX_POWER_OUTLET_TEMPLATE TESTS + ansible.builtin.include_tasks: netbox_power_outlet_template.yml + +- name: NETBOX_VIRTUAL_CHASSIS TESTS + ansible.builtin.include_tasks: netbox_virtual_chassis.yml + +- name: NETBOX_USER_TESTS + ansible.builtin.include_tasks: + file: netbox_user.yml + apply: + tags: + - netbox_user + tags: + - netbox_user + +- name: NETBOX_USER_GROUP_TESTS + ansible.builtin.include_tasks: + file: netbox_user_group.yml + apply: + tags: + - netbox_user_group + tags: + - netbox_user_group + +- name: NETBOX_PERMISSION TESTS + ansible.builtin.include_tasks: netbox_permission.yml + +- name: NETBOX_TOKEN_TESTS + ansible.builtin.include_tasks: + file: netbox_token.yml + apply: + tags: + - netbox_token + tags: + - netbox_token + +# Module has to be updated for 3.3 +# - name: "NETBOX_CABLE TESTS" +# include_tasks: "netbox_cable.yml" + +- name: NETBOX_SERVICE TESTS + ansible.builtin.include_tasks: netbox_service.yml + +- name: NETBOX_LOOKUP TESTS + ansible.builtin.include_tasks: netbox_lookup.yml + +- name: NETBOX_TAG_TESTS + ansible.builtin.include_tasks: + file: netbox_tag.yml + apply: + tags: + - netbox_tag + tags: + - netbox_tag + +- name: NETBOX_ROUTE_TARGET_TESTS + ansible.builtin.include_tasks: + file: netbox_route_target.yml + apply: + tags: + - netbox_route_target + tags: + - netbox_route_target + +- name: NETBOX_WIRELESS_LAN TESTS + ansible.builtin.include_tasks: + file: netbox_wireless_lan.yml + apply: + tags: + - netbox_wireless_lan + tags: + - netbox_wireless_lan + +- name: NETBOX_WIRELESS_LAN_GROUP TESTS + ansible.builtin.include_tasks: + file: netbox_wireless_lan_group.yml + apply: + tags: + - netbox_wireless_lan_group + tags: + - netbox_wireless_lan_group + +- name: NETBOX_WIRELESS_LINK TESTS + ansible.builtin.include_tasks: + file: netbox_wireless_link.yml + apply: + tags: + - netbox_wireless_link + tags: + - netbox_wireless_link + +- name: NETBOX_CUSTOM_FIELD TESTS + ansible.builtin.include_tasks: + file: netbox_custom_field.yml + apply: + tags: + - netbox_custom_field + tags: + - netbox_custom_field + +- name: NETBOX_CUSTOM_LINK TESTS + ansible.builtin.include_tasks: + file: netbox_custom_link.yml + apply: + tags: + - netbox_custom_link + tags: + - netbox_custom_link + +- name: NETBOX_EXPORT_TEMPLATE TESTS + ansible.builtin.include_tasks: + file: netbox_export_template.yml + apply: + tags: + - netbox_export_template + tags: + - netbox_export_template + +# Must update for 3.7 +# - name: "NETBOX_WEBHOOK TESTS" +# include_tasks: +# file: "netbox_webhook.yml" +# apply: +# tags: +# - netbox_webhook +# tags: +# - netbox_webhook + +# - name: "NETBOX_L2VPN TESTS" +# include_tasks: +# file: "netbox_l2vpn.yml" +# apply: +# tags: +# - netbox_l2vpn +# tags: +# - netbox_l2vpn + +# - name: "NETBOX_L2VPN_TERMINATION TESTS" +# include_tasks: +# file: "netbox_l2vpn_termination.yml" +# apply: +# tags: +# - netbox_l2vpn_termination +# tags: +# - netbox_l2vpn_termination + +- name: NETBOX_INVENTORY_ITEM_ROLE TESTS + ansible.builtin.include_tasks: + file: netbox_inventory_item_role.yml + apply: + tags: + - netbox_inventory_item_role + tags: + - netbox_inventory_item_role + +- name: NETBOX_MODULE_TYPE TESTS + ansible.builtin.include_tasks: + file: netbox_module_type.yml + apply: + tags: + - netbox_module_type + tags: + - netbox_module_type + +- name: NETBOX_SERVICE_TEMPLATE TESTS + ansible.builtin.include_tasks: + file: netbox_service_template.yml + apply: + tags: + - netbox_service_template + tags: + - netbox_service_template + +- name: NETBOX_ASN TESTS + ansible.builtin.include_tasks: netbox_asn.yml + +- name: NETBOX_FHRP_GROUP TESTS + ansible.builtin.include_tasks: netbox_fhrp_group.yml + +- name: NETBOX_JOURNAL_ENTRY TESTS + ansible.builtin.include_tasks: + file: netbox_journal_entry.yml + apply: + tags: + - netbox_journal_entry + tags: + - netbox_journal_entry + +- name: NETBOX_FHRP_GROUP_ASSIGNMENT TESTS + ansible.builtin.include_tasks: + file: netbox_fhrp_group_assignment.yml + apply: + tags: + - netbox_fhrp_group_assignmen + tags: + - netbox_fhrp_group_assignmen + +- name: NETBOX_CONFIG_TEMPLATE + ansible.builtin.include_tasks: netbox_config_template.yml + tags: + - netbox_config_template + +- name: NETBOX_VIRTUAL_DISK + ansible.builtin.include_tasks: + file: netbox_virtual_disk.yml + apply: + tags: + - netbox_virtual_disk + tags: + - netbox_virtual_disk + +- name: NETBOX_TUNNEL TESTS + ansible.builtin.include_tasks: + file: netbox_tunnel.yml + apply: + tags: + - netbox_tunnel + tags: + - netbox_tunnel + +- name: NETBOX_TUNNEL GROUP TESTS + ansible.builtin.include_tasks: + file: netbox_tunnel_group.yml + apply: + tags: + - netbox_tunnel_group + tags: + - netbox_tunnel_group diff --git a/tests/integration/targets/v4.1/tasks/netbox_aggregate.yml b/tests/integration/targets/v4.1/tasks/netbox_aggregate.yml new file mode 100644 index 00000000..d45b9c83 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_aggregate.yml @@ -0,0 +1,115 @@ +--- +## +## +### NETBOX_AGGEGATE +## +## +- name: "AGGREGATE 1: Necessary info creation" + netbox.netbox.netbox_aggregate: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 10.0.0.0/8 + rir: Example RIR + state: present + register: test_one + +- name: "AGGREGATE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['aggregate']['prefix'] == "10.0.0.0/8" + # - test_one['aggregate']['family'] == 4 + - test_one['aggregate']['rir'] == 1 + - test_one['msg'] == "aggregate 10.0.0.0/8 created" + +- name: "AGGREGATE 2: Create duplicate" + netbox.netbox.netbox_aggregate: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 10.0.0.0/8 + state: present + register: test_two + +- name: "AGGREGATE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['aggregate']['prefix'] == "10.0.0.0/8" + - test_two['aggregate']['family'] == 4 + - test_two['aggregate']['rir'] == 1 + - test_two['msg'] == "aggregate 10.0.0.0/8 already exists" + +- name: "AGGREGATE 3: ASSERT - Update" + netbox.netbox.netbox_aggregate: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 10.0.0.0/8 + rir: Example RIR + date_added: "1989-01-18" + description: Test Description + tags: + - Schnozzberry + state: present + register: test_three + +- name: "AGGREGATE 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['date_added'] == "1989-01-18" + - test_three['diff']['after']['description'] == "Test Description" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['aggregate']['prefix'] == "10.0.0.0/8" + - test_three['aggregate']['family'] == 4 + - test_three['aggregate']['rir'] == 1 + - test_three['aggregate']['date_added'] == "1989-01-18" + - test_three['aggregate']['description'] == "Test Description" + - test_three['aggregate']['tags'][0] == 4 + - test_three['msg'] == "aggregate 10.0.0.0/8 updated" + +- name: "AGGREGATE 4: ASSERT - Delete" + netbox.netbox.netbox_aggregate: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 10.0.0.0/8 + state: absent + register: test_four + +- name: "AGGREGATE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['aggregate']['prefix'] == "10.0.0.0/8" + - test_four['aggregate']['family'] == 4 + - test_four['aggregate']['rir'] == 1 + - test_four['aggregate']['date_added'] == "1989-01-18" + - test_four['aggregate']['description'] == "Test Description" + - test_four['aggregate']['tags'][0] == 4 + - test_four['msg'] == "aggregate 10.0.0.0/8 deleted" + +- name: "AGGREGATE 5: Necessary info creation" + netbox.netbox.netbox_aggregate: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 2001::/32 + rir: Example RIR + state: present + register: test_five + +- name: "AGGREGATE 5: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['aggregate']['prefix'] == "2001::/32" + # - test_five['aggregate']['family'] == 6 + - test_five['aggregate']['rir'] == 1 + - test_five['msg'] == "aggregate 2001::/32 created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_asn.yml b/tests/integration/targets/v4.1/tasks/netbox_asn.yml new file mode 100644 index 00000000..fab4270a --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_asn.yml @@ -0,0 +1,88 @@ +--- +## +## +### NETBOX_ASN +## +## +- name: "ASN 1: Test ASN creation" + netbox.netbox.netbox_asn: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + asn: 1111111111 + rir: Example RIR + state: present + register: test_one + +- name: "ASN 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['asn']['asn'] == 1111111111 + - test_one['asn']['rir'] == 1 + - test_one['msg'] == "asn 1111111111 created" + +- name: "ASN 2: Create duplicate" + netbox.netbox.netbox_asn: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + asn: 1111111111 + rir: Example RIR + state: present + register: test_two + +- name: "ASN 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['asn']['asn'] == 1111111111 + - test_two['asn']['rir'] == 1 + - test_two['msg'] == "asn 1111111111 already exists" + +- name: "ASN 3: Update ASN with other fields" + netbox.netbox.netbox_asn: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + asn: 1111111111 + rir: Example RIR + tenant: Test Tenant + description: Test description + tags: + - Schnozzberry + state: present + register: test_three + +- name: "ASN 3: ASSERT - Update ASN with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['tenant'] == 1 + - test_three['diff']['after']['description'] == "Test description" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['asn']['asn'] == 1111111111 + - test_three['asn']['rir'] == 1 + - test_three['asn']['tenant'] == 1 + - test_three['asn']['description'] == "Test description" + - test_three['asn']['tags'][0] == 4 + - test_three['msg'] == "asn 1111111111 updated" + +- name: "ASN 4: ASSERT - Delete" + netbox.netbox.netbox_asn: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + asn: 1111111111 + state: absent + register: test_four + +- name: "ASN 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "asn 1111111111 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_cable.yml b/tests/integration/targets/v4.1/tasks/netbox_cable.yml new file mode 100644 index 00000000..d6f0ab02 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_cable.yml @@ -0,0 +1,193 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_CABLE +## +## +- name: "CABLE 1: Necessary info creation" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + termination_a_type: dcim.interface + termination_a: + device: Test Nexus Child One + name: Ethernet2/2 + termination_b_type: dcim.interface + termination_b: + device: Test Nexus Child One + name: Ethernet2/1 + state: present + register: test_one + +- name: "CABLE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['cable']['termination_a_type'] == "dcim.interface" + - test_one['cable']['termination_a_id'] == 15 + - test_one['cable']['termination_b_type'] == "dcim.interface" + - test_one['cable']['termination_b_id'] == 2 + - test_one['msg'] == "cable dcim.interface Ethernet2/2 <> dcim.interface Ethernet2/1 created" + +- name: "CABLE 2: Create duplicate" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + termination_a_type: dcim.interface + termination_a: + device: Test Nexus Child One + name: Ethernet2/2 + termination_b_type: dcim.interface + termination_b: + device: Test Nexus Child One + name: Ethernet2/1 + state: present + register: test_two + +- name: "CABLE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['cable']['termination_a_type'] == "dcim.interface" + - test_two['cable']['termination_a_id'] == 15 + - test_two['cable']['termination_b_type'] == "dcim.interface" + - test_two['cable']['termination_b_id'] == 2 + - test_two['msg'] == "cable dcim.interface Ethernet2/2 <> dcim.interface Ethernet2/1 already exists" + +- name: "CABLE 3: Update Cable with other fields" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + termination_a_type: dcim.interface + termination_a: + device: Test Nexus Child One + name: Ethernet2/2 + termination_b_type: dcim.interface + termination_b: + device: Test Nexus Child One + name: Ethernet2/1 + type: mmf-om4 + status: planned + label: label123 + color: abcdef + length: 30 + length_unit: m + tags: + - Schnozzberry + tenant: Test Tenant + state: present + register: test_three + +- name: "CABLE 3: ASSERT - Update Cable with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "mmf-om4" + - test_three['diff']['after']['status'] == "planned" + - test_three['diff']['after']['label'] == "label123" + - test_three['diff']['after']['color'] == "abcdef" + - test_three['diff']['after']['length'] == 30 + - test_three['diff']['after']['length_unit'] == "m" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['diff']['after']['tenant'] == 1 + - test_three['cable']['termination_a_type'] == "dcim.interface" + - test_three['cable']['termination_a_id'] == 15 + - test_three['cable']['termination_b_type'] == "dcim.interface" + - test_three['cable']['termination_b_id'] == 2 + - test_three['cable']['type'] == "mmf-om4" + - test_three['cable']['status'] == "planned" + - test_three['cable']['label'] == "label123" + - test_three['cable']['color'] == "abcdef" + - test_three['cable']['length'] == 30 + - test_three['cable']['length_unit'] == "m" + - test_three['cable']['tags'][0] == 4 + - test_three['cable']['tenant'] == 1 + - test_three['msg'] == "cable dcim.interface Ethernet2/2 <> dcim.interface Ethernet2/1 updated" + +- name: "CABLE 4: ASSERT - Delete" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + termination_a_type: dcim.interface + termination_a: + device: Test Nexus Child One + name: Ethernet2/2 + termination_b_type: dcim.interface + termination_b: + device: Test Nexus Child One + name: Ethernet2/1 + state: absent + register: test_four + +- name: "CABLE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "cable dcim.interface Ethernet2/2 <> dcim.interface Ethernet2/1 deleted" + +- name: "CABLE 5: Connect Console Port and Console Server Port" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + termination_a_type: dcim.consoleserverport + termination_a: + name: Console Server Port + device: test100 + termination_b_type: dcim.consoleport + termination_b: + name: Console Port + device: test100 + state: present + register: test_five + +- name: "CABLE 5: ASSERT - Connect Console Port and Console Server Port" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['cable']['termination_a_type'] == "dcim.consoleserverport" + - test_five['cable']['termination_a_id'] == 1 + - test_five['cable']['termination_b_type'] == "dcim.consoleport" + - test_five['cable']['termination_b_id'] == 1 + - test_five['msg'] == "cable dcim.consoleserverport Console Server Port <> dcim.consoleport Console Port created" + +- name: "CABLE 6: Circuits Termination as side A" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + termination_a_type: circuits.circuittermination + termination_a: + circuit: Test Circuit Two + term_side: A + termination_b_type: dcim.interface + termination_b: + device: test100 + name: GigabitEthernet2 + state: present + register: test_six + +- name: "CABLE 6: ASSERT - Circuits Termination as side A" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['cable']['termination_a_type'] == "circuits.circuittermination" + - test_six['cable']['termination_a_id'] == 1 + - test_six['cable']['termination_b_type'] == "dcim.interface" + - test_six['cable']['termination_b_id'] == 4 + - test_six['msg'] == "cable circuits.circuittermination 1 <> dcim.interface GigabitEthernet2 created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_circuit.yml b/tests/integration/targets/v4.1/tasks/netbox_circuit.yml new file mode 100644 index 00000000..8bfd265a --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_circuit.yml @@ -0,0 +1,109 @@ +--- +## +## +### NETBOX_CIRCUIT +## +## +- name: "NETBOX_CIRCUIT 1: Create provider within NetBox with only required information" + netbox.netbox.netbox_circuit: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + cid: Test Circuit One + provider: Test Provider + circuit_type: Test Circuit Type + state: present + register: test_one + +- name: "NETBOX_CIRCUIT 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['circuit']['cid'] == "Test Circuit One" + - test_one['circuit']['provider'] == 1 + - test_one['circuit']['type'] == 1 + - test_one['msg'] == "circuit Test Circuit One created" + +- name: "NETBOX_CIRCUIT 2: Duplicate" + netbox.netbox.netbox_circuit: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + cid: Test Circuit One + provider: Test Provider + circuit_type: Test Circuit Type + state: present + register: test_two + +- name: "NETBOX_CIRCUIT 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['circuit']['cid'] == "Test Circuit One" + - test_two['circuit']['provider'] == 1 + - test_two['circuit']['type'] == 1 + - test_two['msg'] == "circuit Test Circuit One already exists" + +- name: "NETBOX_CIRCUIT 3: Update provider with other fields" + netbox.netbox.netbox_circuit: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + cid: Test Circuit One + provider: Test Provider + circuit_type: Test Circuit Type + status: Planned + tenant: Test Tenant + install_date: "2018-12-25" + commit_rate: 10000 + description: "Test circuit " + comments: FAST CIRCUIT + state: present + register: test_three + +- name: "NETBOX_CIRCUIT 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['status'] == "planned" + - test_three['diff']['after']['tenant'] == 1 + - test_three['diff']['after']['install_date'] == "2018-12-25" + - test_three['diff']['after']['commit_rate'] == 10000 + - test_three['diff']['after']['description'] == "Test circuit" + - test_three['diff']['after']['comments'] == "FAST CIRCUIT" + - test_three['circuit']['cid'] == "Test Circuit One" + - test_three['circuit']['provider'] == 1 + - test_three['circuit']['type'] == 1 + - test_three['circuit']['status'] == "planned" + - test_three['circuit']['tenant'] == 1 + - test_three['circuit']['install_date'] == "2018-12-25" + - test_three['circuit']['commit_rate'] == 10000 + - test_three['circuit']['description'] == "Test circuit" + - test_three['circuit']['comments'] == "FAST CIRCUIT" + - test_three['msg'] == "circuit Test Circuit One updated" + +- name: "NETBOX_CIRCUIT 4: Delete provider within netbox" + netbox.netbox.netbox_circuit: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + cid: Test Circuit One + state: absent + register: test_four + +- name: "NETBOX_CIRCUIT 4 : ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['circuit']['cid'] == "Test Circuit One" + - test_four['circuit']['provider'] == 1 + - test_four['circuit']['type'] == 1 + - test_four['circuit']['status'] == "planned" + - test_four['circuit']['tenant'] == 1 + - test_four['circuit']['install_date'] == "2018-12-25" + - test_four['circuit']['commit_rate'] == 10000 + - test_four['circuit']['description'] == "Test circuit" + - test_four['circuit']['comments'] == "FAST CIRCUIT" + - test_four['msg'] == "circuit Test Circuit One deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_circuit_termination.yml b/tests/integration/targets/v4.1/tasks/netbox_circuit_termination.yml new file mode 100644 index 00000000..cbc749f6 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_circuit_termination.yml @@ -0,0 +1,129 @@ +--- +## +## +### NETBOX_CIRCUIT_TERMINATION +## +## +- name: "NETBOX_CIRCUIT_TERMINATION 1: Create provider within NetBox with only required information" + netbox.netbox.netbox_circuit_termination: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + circuit: Test Circuit + term_side: A + site: Test Site + port_speed: 10000 + state: present + register: test_one + +- name: "NETBOX_CIRCUIT_TERMINATION 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['circuit_termination']['circuit'] == 1 + - test_one['circuit_termination']['term_side'] == "A" + - test_one['circuit_termination']['site'] == 1 + - test_one['circuit_termination']['port_speed'] == 10000 + - test_one['msg'] == "circuit_termination test_circuit_a created" + +- name: "NETBOX_CIRCUIT_TERMINATION 2: Duplicate" + netbox.netbox.netbox_circuit_termination: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + circuit: Test Circuit + term_side: A + state: present + register: test_two + +- name: "NETBOX_CIRCUIT_TERMINATION 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['circuit_termination']['circuit'] == 1 + - test_two['circuit_termination']['term_side'] == "A" + - test_two['circuit_termination']['site'] == 1 + - test_two['circuit_termination']['port_speed'] == 10000 + - test_two['msg'] == "circuit_termination test_circuit_a already exists" + +- name: "NETBOX_CIRCUIT_TERMINATION 3: Update provider with other fields" + netbox.netbox.netbox_circuit_termination: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + circuit: Test Circuit + term_side: A + upstream_speed: 1000 + xconnect_id: 10X100 + pp_info: PP10-24 + description: Test description + state: present + register: test_three + +- name: "NETBOX_CIRCUIT_TERMINATION 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['upstream_speed'] == 1000 + - test_three['diff']['after']['xconnect_id'] == "10X100" + - test_three['diff']['after']['pp_info'] == "PP10-24" + - test_three['diff']['after']['description'] == "Test description" + - test_three['circuit_termination']['circuit'] == 1 + - test_three['circuit_termination']['term_side'] == "A" + - test_three['circuit_termination']['site'] == 1 + - test_three['circuit_termination']['port_speed'] == 10000 + - test_three['circuit_termination']['upstream_speed'] == 1000 + - test_three['circuit_termination']['xconnect_id'] == "10X100" + - test_three['circuit_termination']['pp_info'] == "PP10-24" + - test_three['circuit_termination']['description'] == "Test description" + - test_three['msg'] == "circuit_termination test_circuit_a updated" + +- name: "NETBOX_CIRCUIT_TERMINATION 4: Create Z Side" + netbox.netbox.netbox_circuit_termination: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + circuit: Test Circuit + term_side: Z + site: Test Site + port_speed: 10000 + state: present + register: test_four + +- name: "NETBOX_CIRCUIT_TERMINATION 4: ASSERT - Create Z Side" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['circuit_termination']['circuit'] == 1 + - test_four['circuit_termination']['term_side'] == "Z" + - test_four['circuit_termination']['site'] == 1 + - test_four['circuit_termination']['port_speed'] == 10000 + - test_four['msg'] == "circuit_termination test_circuit_z created" + +- name: "NETBOX_CIRCUIT_TERMINATION 5: Delete provider within netbox" + netbox.netbox.netbox_circuit_termination: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + circuit: Test Circuit + term_side: A + state: absent + register: test_five + +- name: "NETBOX_CIRCUIT_TERMINATION 5: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['circuit_termination']['circuit'] == 1 + - test_five['circuit_termination']['term_side'] == "A" + - test_five['circuit_termination']['site'] == 1 + - test_five['circuit_termination']['port_speed'] == 10000 + - test_five['circuit_termination']['upstream_speed'] == 1000 + - test_five['circuit_termination']['xconnect_id'] == "10X100" + - test_five['circuit_termination']['pp_info'] == "PP10-24" + - test_five['circuit_termination']['description'] == "Test description" + - test_five['msg'] == "circuit_termination test_circuit_a deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_circuit_type.yml b/tests/integration/targets/v4.1/tasks/netbox_circuit_type.yml new file mode 100644 index 00000000..08dc6798 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_circuit_type.yml @@ -0,0 +1,96 @@ +--- +## +## +### NETBOX_CIRCUIT_TYPE +## +## +- name: "CIRCUIT_TYPE 1: Necessary info creation" + netbox.netbox.netbox_circuit_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Circuit Type One + state: present + register: test_one + +- name: "CIRCUIT_TYPE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['circuit_type']['name'] == "Test Circuit Type One" + - test_one['circuit_type']['slug'] == "test-circuit-type-one" + - test_one['msg'] == "circuit_type Test Circuit Type One created" + +- name: "CIRCUIT_TYPE 2: Create duplicate" + netbox.netbox.netbox_circuit_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Circuit Type One + state: present + register: test_two + +- name: "CIRCUIT_TYPE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['circuit_type']['name'] == "Test Circuit Type One" + - test_two['circuit_type']['slug'] == "test-circuit-type-one" + - test_two['msg'] == "circuit_type Test Circuit Type One already exists" + +- name: "CIRCUIT_TYPE 3: User specified slug" + netbox.netbox.netbox_circuit_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Circuit Type Two + slug: test-circuit-type-2 + state: present + register: test_three + +- name: "CIRCUIT_TYPE 3: ASSERT - User specified slug" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['circuit_type']['name'] == "Test Circuit Type Two" + - test_three['circuit_type']['slug'] == "test-circuit-type-2" + - test_three['msg'] == "circuit_type Test Circuit Type Two created" + +- name: "CIRCUIT_TYPE 4: ASSERT - Delete" + netbox.netbox.netbox_circuit_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Circuit Type One + state: absent + register: test_four + +- name: "CIRCUIT_TYPE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['circuit_type']['name'] == "Test Circuit Type One" + - test_four['circuit_type']['slug'] == "test-circuit-type-one" + - test_four['msg'] == "circuit_type Test Circuit Type One deleted" + +- name: "CIRCUIT_TYPE 5: ASSERT - Delete" + netbox.netbox.netbox_circuit_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Circuit Type Two + slug: test-circuit-type-2 + state: absent + register: test_five + +- name: "CIRCUIT_TYPE 5: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['circuit_type']['name'] == "Test Circuit Type Two" + - test_five['circuit_type']['slug'] == "test-circuit-type-2" + - test_five['msg'] == "circuit_type Test Circuit Type Two deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_cluster.yml b/tests/integration/targets/v4.1/tasks/netbox_cluster.yml new file mode 100644 index 00000000..b2810a1b --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_cluster.yml @@ -0,0 +1,98 @@ +--- +## +## +### NETBOX_CLUSTER +## +## +- name: "CLUSTER 1: Necessary info creation" + netbox.netbox.netbox_cluster: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster One + cluster_type: Test Cluster Type + state: present + register: test_one + +- name: "CLUSTER 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['cluster']['name'] == "Test Cluster One" + - test_one['cluster']['type'] == 1 + - test_one['msg'] == "cluster Test Cluster One created" + +- name: "CLUSTER 2: Create duplicate" + netbox.netbox.netbox_cluster: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster One + cluster_type: Test Cluster Type + state: present + register: test_two + +- name: "CLUSTER 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['cluster']['name'] == "Test Cluster One" + - test_two['cluster']['type'] == 1 + - test_two['msg'] == "cluster Test Cluster One already exists" + +- name: "CLUSTER 3: Update" + netbox.netbox.netbox_cluster: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster One + cluster_type: Test Cluster Type + cluster_group: Test Cluster Group + site: Test Site + comments: Updated cluster + tenant: Test Tenant + tags: + - Schnozzberry + state: present + register: test_three + +- name: "CLUSTER 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['group'] == 1 + - test_three['diff']['after']['site'] == 1 + - test_three['diff']['after']['comments'] == "Updated cluster" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['diff']['after']['tenant'] == 1 + - test_three['cluster']['name'] == "Test Cluster One" + - test_three['cluster']['type'] == 1 + - test_three['cluster']['group'] == 1 + - test_three['cluster']['site'] == 1 + - test_three['cluster']['comments'] == "Updated cluster" + - test_three['cluster']['tags'][0] == 4 + - test_three['cluster']['tenant'] == 1 + - test_three['msg'] == "cluster Test Cluster One updated" + +- name: "CLUSTER 4: ASSERT - Delete" + netbox.netbox.netbox_cluster: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster One + state: absent + register: test_four + +- name: "CLUSTER 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['cluster']['name'] == "Test Cluster One" + - test_four['cluster']['type'] == 1 + - test_four['cluster']['group'] == 1 + - test_four['cluster']['site'] == 1 + - test_four['cluster']['comments'] == "Updated cluster" + - test_four['cluster']['tags'][0] == 4 + - test_four['msg'] == "cluster Test Cluster One deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_cluster_group.yml b/tests/integration/targets/v4.1/tasks/netbox_cluster_group.yml new file mode 100644 index 00000000..64dda6c4 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_cluster_group.yml @@ -0,0 +1,96 @@ +--- +## +## +### NETBOX_CLUSTER_GROUP +## +## +- name: "CLUSTER_GROUP 1: Necessary info creation" + netbox.netbox.netbox_cluster_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster Group One + state: present + register: test_one + +- name: "CLUSTER_GROUP 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['cluster_group']['name'] == "Test Cluster Group One" + - test_one['cluster_group']['slug'] == "test-cluster-group-one" + - test_one['msg'] == "cluster_group Test Cluster Group One created" + +- name: "CLUSTER_GROUP 2: Create duplicate" + netbox.netbox.netbox_cluster_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster Group One + state: present + register: test_two + +- name: "CLUSTER_GROUP 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['cluster_group']['name'] == "Test Cluster Group One" + - test_two['cluster_group']['slug'] == "test-cluster-group-one" + - test_two['msg'] == "cluster_group Test Cluster Group One already exists" + +- name: "CLUSTER_GROUP 3: User specified slug" + netbox.netbox.netbox_cluster_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster Group Two + slug: test-cluster-group-2 + state: present + register: test_three + +- name: "CLUSTER_GROUP 3: ASSERT - User specified slug" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['cluster_group']['name'] == "Test Cluster Group Two" + - test_three['cluster_group']['slug'] == "test-cluster-group-2" + - test_three['msg'] == "cluster_group Test Cluster Group Two created" + +- name: "CLUSTER_GROUP 4: ASSERT - Delete" + netbox.netbox.netbox_cluster_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster Group One + state: absent + register: test_four + +- name: "CLUSTER_GROUP 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['cluster_group']['name'] == "Test Cluster Group One" + - test_four['cluster_group']['slug'] == "test-cluster-group-one" + - test_four['msg'] == "cluster_group Test Cluster Group One deleted" + +- name: "CLUSTER_GROUP 5: ASSERT - Delete" + netbox.netbox.netbox_cluster_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster Group Two + slug: test-cluster-group-2 + state: absent + register: test_five + +- name: "CLUSTER_GROUP 5: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['cluster_group']['name'] == "Test Cluster Group Two" + - test_five['cluster_group']['slug'] == "test-cluster-group-2" + - test_five['msg'] == "cluster_group Test Cluster Group Two deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_cluster_type.yml b/tests/integration/targets/v4.1/tasks/netbox_cluster_type.yml new file mode 100644 index 00000000..bc09ac8a --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_cluster_type.yml @@ -0,0 +1,96 @@ +--- +## +## +### NETBOX_CLUSTER_TYPE +## +## +- name: "CLUSTER_TYPE 1: Necessary info creation" + netbox.netbox.netbox_cluster_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster Type One + state: present + register: test_one + +- name: "CLUSTER_TYPE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['cluster_type']['name'] == "Test Cluster Type One" + - test_one['cluster_type']['slug'] == "test-cluster-type-one" + - test_one['msg'] == "cluster_type Test Cluster Type One created" + +- name: "CLUSTER_TYPE 2: Create duplicate" + netbox.netbox.netbox_cluster_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster Type One + state: present + register: test_two + +- name: "CLUSTER_TYPE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['cluster_type']['name'] == "Test Cluster Type One" + - test_two['cluster_type']['slug'] == "test-cluster-type-one" + - test_two['msg'] == "cluster_type Test Cluster Type One already exists" + +- name: "CLUSTER_TYPE 3: User specified slug" + netbox.netbox.netbox_cluster_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster Type Two + slug: test-cluster-type-2 + state: present + register: test_three + +- name: "CLUSTER_TYPE 3: ASSERT - User specified slug" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['cluster_type']['name'] == "Test Cluster Type Two" + - test_three['cluster_type']['slug'] == "test-cluster-type-2" + - test_three['msg'] == "cluster_type Test Cluster Type Two created" + +- name: "CLUSTER_TYPE 4: ASSERT - Delete" + netbox.netbox.netbox_cluster_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster Type One + state: absent + register: test_four + +- name: "CLUSTER_TYPE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['cluster_type']['name'] == "Test Cluster Type One" + - test_four['cluster_type']['slug'] == "test-cluster-type-one" + - test_four['msg'] == "cluster_type Test Cluster Type One deleted" + +- name: "CLUSTER_TYPE 5: ASSERT - Delete" + netbox.netbox.netbox_cluster_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Cluster Type Two + slug: test-cluster-type-2 + state: absent + register: test_five + +- name: "CLUSTER_TYPE 5: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['cluster_type']['name'] == "Test Cluster Type Two" + - test_five['cluster_type']['slug'] == "test-cluster-type-2" + - test_five['msg'] == "cluster_type Test Cluster Type Two deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_config_context.yml b/tests/integration/targets/v4.1/tasks/netbox_config_context.yml new file mode 100644 index 00000000..910ec82c --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_config_context.yml @@ -0,0 +1,107 @@ +--- +## +## +### NETBOX_CONFIG_CONTEXTS +## +## +- name: "CONFIG_CONTEXT 1: Necessary info creation" + netbox.netbox.netbox_config_context: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test_context + description: Test context + data: '{ "testkey": { "testsubkey": [ "testvaule" ] } }' + state: present + register: test_one + +- name: "CONFIG_CONTEXT 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['config_context']['name'] == "test_context" + - test_one['config_context']['description'] == "Test context" + - test_one['config_context']['is_active'] == true + - test_one['config_context']['weight'] == 1000 + - test_one['config_context']['data'].testkey.testsubkey[0] == "testvaule" + - test_one['msg'] == "config_context test_context created" + +- name: "CONFIG_CONTEXT 2: Create duplicate" + netbox.netbox.netbox_config_context: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test_context + description: Test context + data: '{ "testkey": { "testsubkey": [ "testvaule" ] } }' + state: present + register: test_two + +- name: "CONFIG_CONTEXT 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['config_context']['name'] == "test_context" + - test_two['msg'] == "config_context test_context already exists" + +- name: "CONFIG_CONTEXT 3: Update data and attach to site" + netbox.netbox.netbox_config_context: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test_context + description: Updated test context + data: '{ "testkey": { "testsubkey": [ "updatedvaule" ] } }' + weight: 100 + sites: [test-site] + state: present + register: test_three + +- name: "CONFIG_CONTEXT 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['data'].testkey.testsubkey[0] == "updatedvaule" + - test_three['diff']['after']['description'] == "Updated test context" + - test_three['diff']['after']['weight'] == 100 + - test_three['diff']['after']['sites'][0] == 1 + - test_three['config_context']['name'] == "test_context" + - test_three['msg'] == "config_context test_context updated" + +- name: "CONFIG_CONTEXT 4: Detach from site" + netbox.netbox.netbox_config_context: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test_context + data: '{ "testkey": { "testsubkey": [ "updatedvaule" ] } }' + sites: [] + state: present + register: test_four + +- name: "CONFIG_CONTEXT 4: ASSERT - Detached" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['after']['sites']|length == 0 + - test_four['config_context']['name'] == "test_context" + - test_four['msg'] == "config_context test_context updated" + +- name: "CONFIG_CONTEXT 5: Delete" + netbox.netbox.netbox_config_context: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test_context + state: absent + register: test_five + +- name: "CONFIG_CONTEXT 5: ASSERT - Deleted" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['config_context']['name'] == "test_context" + - test_five['msg'] == "config_context test_context deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_config_template.yml b/tests/integration/targets/v4.1/tasks/netbox_config_template.yml new file mode 100644 index 00000000..af6cfb47 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_config_template.yml @@ -0,0 +1,82 @@ +--- +## +## +### NETBOX_CONFIG_TEMPLATES +## +## +- name: "CONFIG_TEMPLATES 1: Necessary info creation" + netbox.netbox.netbox_config_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test_template + description: Test template + template_code: test template + state: present + register: test_one + +- name: "CONFIG_TEMPLATES 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['config_template']['name'] == "test_template" + - test_one['config_template']['description'] == "Test template" + - test_one['config_template']['template_code'] == "test template" + - test_one['msg'] == "config_template test_template created" + +- name: "CONFIG_TEMPLATES 2: Create duplicate" + netbox.netbox.netbox_config_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test_template + description: Test template + template_code: test template + state: present + register: test_two + +- name: "CONFIG_TEMPLATES 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['config_template']['name'] == "test_template" + - test_two['msg'] == "config_template test_template already exists" + +- name: "CONFIG_TEMPLATES 3: Update data" + netbox.netbox.netbox_config_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test_template + description: Updated test template + template_code: updated test template + state: present + register: test_three + +- name: "CONFIG_TEMPLATES 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['template_code'] == "updated test template" + - test_three['diff']['after']['description'] == "Updated test template" + - test_three['config_template']['name'] == "test_template" + - test_three['msg'] == "config_template test_template updated" + +- name: "CONFIG_TEMPLATES 4: Delete" + netbox.netbox.netbox_config_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test_template + state: absent + register: test_four + +- name: "CONFIG_TEMPLATES 4: ASSERT - Deleted" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['after']['state'] == "absent" + - test_four['config_template']['name'] == "test_template" + - test_four['msg'] == "config_template test_template deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_console_port.yml b/tests/integration/targets/v4.1/tasks/netbox_console_port.yml new file mode 100644 index 00000000..6be028be --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_console_port.yml @@ -0,0 +1,108 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_CONSOLE_PORT +## +## +- name: "CONSOLE_PORT 1: Necessary info creation" + netbox.netbox.netbox_console_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Port + device: test100 + state: present + register: test_one + +- name: "CONSOLE_PORT 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['console_port']['name'] == "Console Port" + - test_one['console_port']['device'] == 1 + - test_one['msg'] == "console_port Console Port created" + +- name: "CONSOLE_PORT 2: Create duplicate" + netbox.netbox.netbox_console_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Port + device: test100 + state: present + register: test_two + +- name: "CONSOLE_PORT 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['console_port']['name'] == "Console Port" + - test_two['console_port']['device'] == 1 + - test_two['msg'] == "console_port Console Port already exists" + +- name: "CONSOLE_PORT 3: Update Console Port with other fields" + netbox.netbox.netbox_console_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Port + device: test100 + type: usb-a + description: test description + state: present + register: test_three + +- name: "CONSOLE_PORT 3: ASSERT - Update Console Port with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "usb-a" + - test_three['diff']['after']['description'] == "test description" + - test_three['console_port']['name'] == "Console Port" + - test_three['console_port']['device'] == 1 + - test_three['console_port']['type'] == "usb-a" + - test_three['console_port']['description'] == "test description" + - test_three['msg'] == "console_port Console Port updated" + +- name: "CONSOLE_PORT 4: Create Console Port for Delete Test" + netbox.netbox.netbox_console_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Port 2 + device: test100 + state: present + register: test_four + +- name: "CONSOLE_PORT 4: ASSERT - Create Console Port for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['console_port']['name'] == "Console Port 2" + - test_four['console_port']['device'] == 1 + - test_four['msg'] == "console_port Console Port 2 created" + +- name: "CONSOLE_PORT 5: Delete Console Port" + netbox.netbox.netbox_console_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Port 2 + device: test100 + state: absent + register: test_five + +- name: "CONSOLE_PORT 5: ASSERT - Delete Console Port" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "console_port Console Port 2 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_console_port_template.yml b/tests/integration/targets/v4.1/tasks/netbox_console_port_template.yml new file mode 100644 index 00000000..ef614921 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_console_port_template.yml @@ -0,0 +1,105 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_CONSOLE_PORT_TEMPLATE +## +## +- name: "CONSOLE_PORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_console_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Port Template + device_type: Cisco Test + state: present + register: test_one + +- name: "CONSOLE_PORT_TEMPLATE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['console_port_template']['name'] == "Console Port Template" + - test_one['console_port_template']['device_type'] == 1 + - test_one['msg'] == "console_port_template Console Port Template created" + +- name: "CONSOLE_PORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_console_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Port Template + device_type: Cisco Test + state: present + register: test_two + +- name: "CONSOLE_PORT_TEMPLATE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['console_port_template']['name'] == "Console Port Template" + - test_two['console_port_template']['device_type'] == 1 + - test_two['msg'] == "console_port_template Console Port Template already exists" + +- name: "CONSOLE_PORT_TEMPLATE 3: Update Console Port Template with other fields" + netbox.netbox.netbox_console_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Port Template + device_type: Cisco Test + type: usb-a + state: present + register: test_three + +- name: "CONSOLE_PORT_TEMPLATE 3: ASSERT - Update Console Port Template with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "usb-a" + - test_three['console_port_template']['name'] == "Console Port Template" + - test_three['console_port_template']['device_type'] == 1 + - test_three['console_port_template']['type'] == "usb-a" + - test_three['msg'] == "console_port_template Console Port Template updated" + +- name: "CONSOLE_PORT_TEMPLATE 4: Create Console Port Template for Delete Test" + netbox.netbox.netbox_console_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Port Template 2 + device_type: Cisco Test + state: present + register: test_four + +- name: "CONSOLE_PORT_TEMPLATE 4: ASSERT - Create Console Port Template for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['console_port_template']['name'] == "Console Port Template 2" + - test_four['console_port_template']['device_type'] == 1 + - test_four['msg'] == "console_port_template Console Port Template 2 created" + +- name: "CONSOLE_PORT_TEMPLATE 5: Delete Console Port Template" + netbox.netbox.netbox_console_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Port Template 2 + device_type: Cisco Test + state: absent + register: test_five + +- name: "CONSOLE_PORT_TEMPLATE 5: ASSERT - Delete Console Port Template" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "console_port_template Console Port Template 2 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_console_server_port.yml b/tests/integration/targets/v4.1/tasks/netbox_console_server_port.yml new file mode 100644 index 00000000..0ac7b65d --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_console_server_port.yml @@ -0,0 +1,108 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_CONSOLE_SERVER_PORT +## +## +- name: "CONSOLE_SERVER_PORT 1: Necessary info creation" + netbox.netbox.netbox_console_server_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Server Port + device: test100 + state: present + register: test_one + +- name: "CONSOLE_SERVER_PORT 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['console_server_port']['name'] == "Console Server Port" + - test_one['console_server_port']['device'] == 1 + - test_one['msg'] == "console_server_port Console Server Port created" + +- name: "CONSOLE_SERVER_PORT 2: Create duplicate" + netbox.netbox.netbox_console_server_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Server Port + device: test100 + state: present + register: test_two + +- name: "CONSOLE_SERVER_PORT 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['console_server_port']['name'] == "Console Server Port" + - test_two['console_server_port']['device'] == 1 + - test_two['msg'] == "console_server_port Console Server Port already exists" + +- name: "CONSOLE_SERVER_PORT 3: Update Console Server Port with other fields" + netbox.netbox.netbox_console_server_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Server Port + device: test100 + type: usb-a + description: test description + state: present + register: test_three + +- name: "CONSOLE_SERVER_PORT 3: ASSERT - Update Console Server Port with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "usb-a" + - test_three['diff']['after']['description'] == "test description" + - test_three['console_server_port']['name'] == "Console Server Port" + - test_three['console_server_port']['device'] == 1 + - test_three['console_server_port']['type'] == "usb-a" + - test_three['console_server_port']['description'] == "test description" + - test_three['msg'] == "console_server_port Console Server Port updated" + +- name: "CONSOLE_SERVER_PORT 4: Create Console Server Port for Delete Test" + netbox.netbox.netbox_console_server_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Server Port 2 + device: test100 + state: present + register: test_four + +- name: "CONSOLE_SERVER_PORT 4: ASSERT - Create Console Server Port for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['console_server_port']['name'] == "Console Server Port 2" + - test_four['console_server_port']['device'] == 1 + - test_four['msg'] == "console_server_port Console Server Port 2 created" + +- name: "CONSOLE_SERVER_PORT 5: Delete Console Server Port" + netbox.netbox.netbox_console_server_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Server Port 2 + device: test100 + state: absent + register: test_five + +- name: "CONSOLE_SERVER_PORT 5: ASSERT - Delete Console Server Port" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "console_server_port Console Server Port 2 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_console_server_port_template.yml b/tests/integration/targets/v4.1/tasks/netbox_console_server_port_template.yml new file mode 100644 index 00000000..4c7dfc84 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_console_server_port_template.yml @@ -0,0 +1,105 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_CONSOLE_SERVER_PORT_TEMPLATE +## +## +- name: "CONSOLE_SERVER_PORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_console_server_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Server Port Template + device_type: Cisco Test + state: present + register: test_one + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['console_server_port_template']['name'] == "Console Server Port Template" + - test_one['console_server_port_template']['device_type'] == 1 + - test_one['msg'] == "console_server_port_template Console Server Port Template created" + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_console_server_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Server Port Template + device_type: Cisco Test + state: present + register: test_two + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['console_server_port_template']['name'] == "Console Server Port Template" + - test_two['console_server_port_template']['device_type'] == 1 + - test_two['msg'] == "console_server_port_template Console Server Port Template already exists" + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 3: Update Console Server Port Template with other fields" + netbox.netbox.netbox_console_server_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Server Port Template + device_type: Cisco Test + type: usb-a + state: present + register: test_three + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 3: ASSERT - Update Console Server Port Template with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "usb-a" + - test_three['console_server_port_template']['name'] == "Console Server Port Template" + - test_three['console_server_port_template']['device_type'] == 1 + - test_three['console_server_port_template']['type'] == "usb-a" + - test_three['msg'] == "console_server_port_template Console Server Port Template updated" + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 4: Create Console Server Port Template for Delete Test" + netbox.netbox.netbox_console_server_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Server Port Template 2 + device_type: Cisco Test + state: present + register: test_four + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 4: ASSERT - Create Console Server Port Template for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['console_server_port_template']['name'] == "Console Server Port Template 2" + - test_four['console_server_port_template']['device_type'] == 1 + - test_four['msg'] == "console_server_port_template Console Server Port Template 2 created" + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 5: Delete Console Server Port Template" + netbox.netbox.netbox_console_server_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Console Server Port Template 2 + device_type: Cisco Test + state: absent + register: test_five + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 5: ASSERT - Delete Console Server Port Template" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "console_server_port_template Console Server Port Template 2 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_contact.yml b/tests/integration/targets/v4.1/tasks/netbox_contact.yml new file mode 100644 index 00000000..f5ede9c1 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_contact.yml @@ -0,0 +1,100 @@ +--- +## +## +### NETBOX_CONTACT +## +## +- name: 1 - Test contact creation + netbox.netbox.netbox_contact: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Contact ABC + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['contact']['name'] == "Contact ABC" + - test_one['msg'] == "contact Contact ABC created" + +- name: Test duplicate contact + netbox.netbox.netbox_contact: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Contact ABC + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['contact']['name'] == "Contact ABC" + - test_two['msg'] == "contact Contact ABC already exists" + +- name: 3 - Test update + netbox.netbox.netbox_contact: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Contact ABC + title: New Title + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['title'] == "New Title" + - test_three['contact']['name'] == "Contact ABC" + - test_three['contact']['title'] == "New Title" + - test_three['msg'] == "contact Contact ABC updated" + +- name: 4 - Test delete + netbox.netbox.netbox_contact: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Contact ABC + state: absent + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "contact Contact ABC deleted" + +- name: 5 - Create contact with all parameters + netbox.netbox.netbox_contact: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Contact ABC + title: Fancy title + phone: "12345678" + email: contact@contact.com + tags: + - tagA + - tagB + - tagC + state: present + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['contact']['name'] == "Contact ABC" + - test_five['contact']['title'] == "Fancy title" + - test_five['contact']['phone'] == "12345678" + - test_five['contact']['tags'] | length == 3 + - test_five['msg'] == "contact Contact ABC created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_contact_role.yml b/tests/integration/targets/v4.1/tasks/netbox_contact_role.yml new file mode 100644 index 00000000..c84703da --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_contact_role.yml @@ -0,0 +1,94 @@ +--- +## +## +### NETBOX_CONTACT_ROLE +## +## +- name: "CONTACT_ROLE 1: Necessary info creation" + netbox.netbox.netbox_contact_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Contact Role + state: present + register: test_one + +- name: "CONTACT_ROLE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['contact_role']['name'] == "Test Contact Role" + - test_one['contact_role']['slug'] == "test-contact-role" + - test_one['msg'] == "contact_role Test Contact Role created" + +- name: "CONTACT_ROLE 2: Create duplicate" + netbox.netbox.netbox_contact_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Contact Role + state: present + register: test_two + +- name: "CONTACT ROLE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['contact_role']['name'] == "Test Contact Role" + - test_two['contact_role']['slug'] == "test-contact-role" + - test_two['msg'] == "contact_role Test Contact Role already exists" + +- name: "CONTACT_ROLE 3: ASSERT - Update" + netbox.netbox.netbox_contact_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Contact Role + description: Update description + state: present + register: test_three + +- name: "IPAM_ROLE 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Update description" + - test_three['contact_role']['name'] == "Test Contact Role" + - test_three['contact_role']['slug'] == "test-contact-role" + - test_three['contact_role']['description'] == "Update description" + - test_three['msg'] == "contact_role Test Contact Role updated" + +- name: "CONTACT_ROLE 4: ASSERT - Delete" + netbox.netbox.netbox_contact_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Contact Role + state: absent + register: test_four + +- name: "CONTACT_ROLE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "contact_role Test Contact Role deleted" + +- name: "CONTACT_ROLE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_contact_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Contact Role + state: absent + register: test_five + +- name: "CONTACT_ROLE 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['contact_role'] == None + - test_five['msg'] == "contact_role Test Contact Role already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_custom_field.yml b/tests/integration/targets/v4.1/tasks/netbox_custom_field.yml new file mode 100644 index 00000000..a4aba860 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_custom_field.yml @@ -0,0 +1,129 @@ +--- +## +## +### NETBOX_CUSTOM_FIELD +## +## +- name: "CUSTOM_FIELD 1: Necessary info creation" + netbox.netbox.netbox_custom_field: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - dcim.device + name: A_CustomField + type: text + state: present + register: test_one + +- name: "CUSTOM_FIELD 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['custom_field']['name'] == "A_CustomField" + - test_one['custom_field']['required'] == false + - test_one['custom_field']['object_types'] == ["dcim.device"] + - test_one['custom_field']['type'] == "text" + - test_one['custom_field']['weight'] == 100 + - test_one['msg'] == "custom_field A_CustomField created" + +- name: "CUSTOM_FIELD 2: Create duplicate" + netbox.netbox.netbox_custom_field: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - dcim.device + name: A_CustomField + state: present + register: test_two + +- name: "CUSTOM_FIELD 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['custom_field']['name'] == "A_CustomField" + - test_two['msg'] == "custom_field A_CustomField already exists" + +- name: "CUSTOM_FIELD 3: Update data and make it required" + netbox.netbox.netbox_custom_field: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - dcim.device + name: A_CustomField + description: Added a description + required: true + state: present + register: test_three + +- name: "CUSTOM_FIELD 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Added a description" + - test_three['diff']['after']['required'] == true + - test_three['custom_field']['name'] == "A_CustomField" + - test_three['msg'] == "custom_field A_CustomField updated" + +- name: "CUSTOM_FIELD 4: Change content type" + netbox.netbox.netbox_custom_field: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - virtualization.virtualmachine + name: A_CustomField + description: Added a description + required: true + state: present + register: test_four + +- name: "CUSTOM_FIELD 4: ASSERT - Change content type" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['after']['object_types'] == ["virtualization.virtualmachine"] + - test_four['custom_field']['name'] == "A_CustomField" + - test_four['msg'] == "custom_field A_CustomField updated" + +- name: "CUSTOM_FIELD 5: Delete" + netbox.netbox.netbox_custom_field: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: A_CustomField + state: absent + register: test_five + +- name: "CUSTOM_FIELD 5: ASSERT - Deleted" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['custom_field']['name'] == "A_CustomField" + - test_five['msg'] == "custom_field A_CustomField deleted" + +# Change in NetBox 3.7 +# - name: "CUSTOM_FIELD 6: UI Visibility (hidden-ifunset)" +# netbox.netbox.netbox_custom_field: +# netbox_url: http://localhost:32768 +# netbox_token: 0123456789abcdef0123456789abcdef01234567 +# data: +# object_types: +# - "dcim.device" +# name: A_CustomField +# type: text +# ui_visibility: hidden-ifunset +# state: present +# register: test_six + +# - name: "CUSTOM_FIELD 6: UI Visibility (hidden-ifunset)" +# assert: +# that: +# - test_six is changed +# - test_six['custom_field']['name'] == "A_CustomField" +# - test_six['custom_field']['ui_visibility'] == "hidden-ifunset" diff --git a/tests/integration/targets/v4.1/tasks/netbox_custom_link.yml b/tests/integration/targets/v4.1/tasks/netbox_custom_link.yml new file mode 100644 index 00000000..3aa29d95 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_custom_link.yml @@ -0,0 +1,113 @@ +--- +## +## +### NETBOX_CUSTOM_LINK +## +## +- name: "CUSTOM_LINK 1: Necessary info creation" + netbox.netbox.netbox_custom_link: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - dcim.device + name: Custom Link + link_text: Open Web management + link_url: !unsafe https://{{ obj.name }}.domain.local/ + state: present + register: test_one + +- name: "CUSTOM_LINK 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['custom_link']['name'] == "Custom Link" + - test_one['custom_link']['object_types'] == ["dcim.device"] + - test_one['custom_link']['link_text'] == "Open Web management" + - test_one['msg'] == "custom_link Custom Link created" + +- name: "CUSTOM_LINK 2: Create duplicate" + netbox.netbox.netbox_custom_link: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - dcim.device + name: Custom Link + link_text: Open Web management + link_url: !unsafe https://{{ obj.name }}.domain.local/ + state: present + register: test_two + +- name: "CUSTOM_LINK 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['custom_link']['name'] == "Custom Link" + - test_two['msg'] == "custom_link Custom Link already exists" + +- name: "CUSTOM_FIELD 3: Update data and add weight" + netbox.netbox.netbox_custom_link: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - dcim.device + name: Custom Link + link_text: Open Web management + link_url: !unsafe https://{{ obj.name }}.domain.local/ + weight: 50 + state: present + register: test_three + +- name: "CUSTOM_FIELD 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['weight'] == 50 + - test_three['custom_link']['name'] == "Custom Link" + - test_three['msg'] == "custom_link Custom Link updated" + +- name: "CUSTOM_LINK 4: Change content type" + netbox.netbox.netbox_custom_link: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - virtualization.virtualmachine + name: Custom Link + link_text: Open Web management + link_url: !unsafe https://{{ obj.name }}.domain.local/ + state: present + register: test_four + +- name: "CUSTOM_LINK 4: ASSERT - Change content type" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['after']['object_types'] == ["virtualization.virtualmachine"] + - test_four['custom_link']['name'] == "Custom Link" + - test_four['msg'] == "custom_link Custom Link updated" + +- name: "CUSTOM_LINK 5: Delete" + netbox.netbox.netbox_custom_link: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - virtualization.virtualmachine + name: Custom Link + link_text: Open Web management + link_url: !unsafe https://{{ obj.name }}.domain.local/ + state: absent + register: test_five + +- name: "CUSTOM_LINK 5: ASSERT - Deleted" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['custom_link']['name'] == "Custom Link" + - test_five['msg'] == "custom_link Custom Link deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_device.yml b/tests/integration/targets/v4.1/tasks/netbox_device.yml new file mode 100644 index 00000000..4d42e6e7 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_device.yml @@ -0,0 +1,243 @@ +--- +## +## +### NETBOX_DEVICE +## +## +- name: 1 - Device with required information + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: R1 + device_type: + id: "1" + device_role: Core Switch + site: Test Site + status: Staged + state: present + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == 'absent' + - test_one['diff']['after']['state'] == 'present' + - test_one['device']['name'] == "R1" + - test_one['device']['role'] == 1 + - test_one['device']['device_type'] == 1 + - test_one['device']['site'] == 1 + - test_one['device']['status'] == "staged" + - test_one['device']['name'] == "R1" + - test_one['msg'] == "device R1 created" + +- name: 2 - Duplicate device + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: R1 + device_type: Cisco Test + device_role: Core Switch + site: Test Site + status: Staged + state: present + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['device']['name'] == "R1" + - test_two['device']['role'] == 1 + - test_two['device']['device_type'] == 1 + - test_two['device']['site'] == 1 + - test_two['device']['status'] == "staged" + - test_two['msg'] == "device R1 already exists" + +- name: 3 - Update device + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: R1 + serial: FXS1001 + local_context_data: + bgp_as: "65412" + virtual_chassis: VC1 + vc_position: 3 + vc_priority: 15 + location: Test Rack Group + state: present + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['serial'] == "FXS1001" + - test_three['diff']['after']['local_context_data']["bgp_as"] == "65412" + - test_three['diff']['after']['virtual_chassis'] == 1 + - test_three['diff']['after']['vc_position'] == 3 + - test_three['diff']['after']['vc_priority'] == 15 + - test_three['device']['name'] == "R1" + - test_three['device']['role'] == 1 + - test_three['device']['device_type'] == 1 + - test_three['device']['site'] == 1 + - test_three['device']['status'] == "staged" + - test_three['device']['serial'] == "FXS1001" + - test_three['device']['local_context_data']["bgp_as"] == "65412" + - test_three['device']['virtual_chassis'] == 1 + - test_three['device']['vc_position'] == 3 + - test_three['device']['vc_priority'] == 15 + - test_three['device']['location'] == 1 + - test_three['msg'] == "device R1 updated" + +- name: 3.1 - Update device name using query_params + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: R1-changed-name + serial: FXS1001 + query_params: + - serial + state: present + register: test_three_dot_one + +- name: 3.1 - ASSERT + ansible.builtin.assert: + that: + - test_three_dot_one is changed + - test_three_dot_one['diff']['after']['name'] == "R1-changed-name" + - test_three_dot_one['device']['role'] == 1 + - test_three_dot_one['device']['device_type'] == 1 + - test_three_dot_one['device']['site'] == 1 + - test_three_dot_one['device']['status'] == "staged" + - test_three_dot_one['device']['serial'] == "FXS1001" + - test_three_dot_one['device']['local_context_data']["bgp_as"] == "65412" + - test_three_dot_one['msg'] == "device R1-changed-name updated" + +- name: 4 - Create device with tags and assign to rack + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: TestR1 + device_type: "1841" + device_role: Core Switch + site: Test Site2 + rack: Test Rack Site 2 + position: 35.5 + face: Front + tags: + - schnozzberry + tenant: Test Tenant + asset_tag: "1234" + state: present + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['device']['name'] == "TestR1" + - test_four['device']['role'] == 1 + - test_four['device']['device_type'] == 5 + - test_four['device']['site'] == 2 + - test_four['device']['status'] == "active" + - test_four['device']['rack'] == 1 + - test_four['device']['tags'][0] == 4 + - test_four['device']['tenant'] == 1 + - test_four['device']['asset_tag'] == '1234' + - test_four['msg'] == "device TestR1 created" + +- name: 5 - Delete previous device + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: TestR1 + state: absent + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "device TestR1 deleted" + +- name: 6 - Delete R1 + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: R1-changed-name + state: absent + register: test_six + +- name: 6 - ASSERT + ansible.builtin.assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "present" + - test_six['diff']['after']['state'] == "absent" + - test_six['msg'] == "device R1-changed-name deleted" + +- name: 7 - Add primary_ip4/6 to test100 + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test100 + primary_ip4: 172.16.180.1/24 + primary_ip6: 2001::1:1/64 + state: present + register: test_seven + +- name: 7 - ASSERT + ansible.builtin.assert: + that: + - test_seven is changed + - test_seven['diff']['after']['primary_ip4'] == 1 + - test_seven['diff']['after']['primary_ip6'] == 2 + - test_seven['device']['name'] == "test100" + - test_seven['device']['role'] == 1 + - test_seven['device']['device_type'] == 1 + - test_seven['device']['site'] == 1 + - test_seven['device']['status'] == "active" + - test_seven['device']['primary_ip4'] == 1 + - test_seven['device']['primary_ip6'] == 2 + - test_seven['msg'] == "device test100 updated" + +- name: 8 - Device with empty string name + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "" + device_type: + id: 1 + device_role: Core Switch + site: Test Site + status: Staged + state: present + register: test_eight + +- name: 8 - ASSERT + ansible.builtin.assert: + that: + - test_eight is changed + - test_eight['diff']['before']['state'] == 'absent' + - test_eight['diff']['after']['state'] == 'present' + - test_eight['device']['role'] == 1 + - test_eight['device']['device_type'] == 1 + - test_eight['device']['site'] == 1 + - test_eight['device']['status'] == "staged" + - "'-' in test_eight['device']['name']" + - test_eight['device']['name'] | length == 36 diff --git a/tests/integration/targets/v4.1/tasks/netbox_device_bay.yml b/tests/integration/targets/v4.1/tasks/netbox_device_bay.yml new file mode 100644 index 00000000..b892d216 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_device_bay.yml @@ -0,0 +1,87 @@ +--- +## +## +### NETBOX_DEVICE_BAY +## +## +- name: "DEVICE_BAY 1: Necessary info creation" + netbox.netbox.netbox_device_bay: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: Test Nexus One + name: Device Bay One + state: present + register: test_one + +- name: "DEVICE_BAY 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['device_bay']['name'] == "Device Bay One" + - test_one['device_bay']['device'] == 4 + - test_one['msg'] == "device_bay Device Bay One created" + +- name: "DEVICE_BAY 2: Create duplicate" + netbox.netbox.netbox_device_bay: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: Test Nexus One + name: Device Bay One + state: present + register: test_two + +- name: "DEVICE_BAY 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['device_bay']['name'] == "Device Bay One" + - test_two['device_bay']['device'] == 4 + - test_two['msg'] == "device_bay Device Bay One already exists" + +- name: "DEVICE_BAY 3: ASSERT - Update" + netbox.netbox.netbox_device_bay: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: Test Nexus One + name: Device Bay One + installed_device: Test Nexus Child One + tags: + - Schnozzberry + state: present + register: test_three + +- name: "DEVICE_BAY 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['installed_device'] == 5 + - test_three['diff']['after']['tags'][0] == 4 + - test_three['device_bay']['name'] == "Device Bay One" + - test_three['device_bay']['device'] == 4 + - test_three['device_bay']['installed_device'] == 5 + - test_three['device_bay']['tags'][0] == 4 + - test_three['msg'] == "device_bay Device Bay One updated" + +- name: "DEVICE_BAY 4: ASSERT - Delete" + netbox.netbox.netbox_device_bay: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Device Bay One + state: absent + register: test_four + +- name: "DEVICE_BAY 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['device_bay']['name'] == "Device Bay One" + - test_four['device_bay']['device'] == 4 + - test_four['device_bay']['installed_device'] == 5 + - test_four['device_bay']['tags'][0] == 4 + - test_four['msg'] == "device_bay Device Bay One deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_device_bay_template.yml b/tests/integration/targets/v4.1/tasks/netbox_device_bay_template.yml new file mode 100644 index 00000000..c2ba1e32 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_device_bay_template.yml @@ -0,0 +1,81 @@ +--- +## +## +### NETBOX_DEVICE_BAY_TEMPLATE +## +## +- name: "DEVICE_BAY_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_device_bay_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: WS Test 3850 + name: Device Bay Template One + state: present + register: test_one + +- name: "DEVICE_BAY_TEMPLATE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['device_bay_template']['name'] == "Device Bay Template One" + - test_one['device_bay_template']['device_type'] == 7 + - test_one['msg'] == "device_bay_template Device Bay Template One created" + +- name: "DEVICE_BAY_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_device_bay_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: WS Test 3850 + name: Device Bay Template One + state: present + register: test_two + +- name: "DEVICE_BAY_TEMPLATE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['device_bay_template']['name'] == "Device Bay Template One" + - test_two['device_bay_template']['device_type'] == 7 + - test_two['msg'] == "device_bay_template Device Bay Template One already exists" + +- name: "DEVICE_BAY_TEMPLATE 3: ASSERT - Create Device Bay Template for Delete Test" + netbox.netbox.netbox_device_bay_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: WS Test 3850 + name: Device Bay Template Two + state: present + register: test_three + +- name: "DEVICE_BAY_TEMPLATE 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['device_bay_template']['name'] == "Device Bay Template Two" + - test_three['device_bay_template']['device_type'] == 7 + - test_three['msg'] == "device_bay_template Device Bay Template Two created" + +- name: "DEVICE_BAY_TEMPLATE 4: ASSERT - Delete" + netbox.netbox.netbox_device_bay_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Device Bay Template Two + device_type: WS Test 3850 + state: absent + register: test_four + +- name: "DEVICE_BAY_TEMPLATE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['device_bay_template']['name'] == "Device Bay Template Two" + - test_four['device_bay_template']['device_type'] == 7 + - test_four['msg'] == "device_bay_template Device Bay Template Two deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_device_interface.yml b/tests/integration/targets/v4.1/tasks/netbox_device_interface.yml new file mode 100644 index 00000000..dd3c2383 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_device_interface.yml @@ -0,0 +1,312 @@ +--- +# NETBOX_DEVICE_INTERFACE + +- name: 1 - Interface with required information + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet3 + type: 1000Base-T (1GE) + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['msg'] == "interface GigabitEthernet3 created" + - test_one['diff']['before']['state'] == 'absent' + - test_one['diff']['after']['state'] == 'present' + - test_one['interface']['name'] == "GigabitEthernet3" + - test_one['interface']['device'] == 1 + +- name: 2 - Update test100 - GigabitEthernet3 + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet3 + mtu: 1600 + enabled: false + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - test_two is changed + - test_two['msg'] == "interface GigabitEthernet3 updated" + - test_two['diff']['after']['enabled'] == false + - test_two['diff']['after']['mtu'] == 1600 + - test_two['interface']['name'] == "GigabitEthernet3" + - test_two['interface']['device'] == 1 + - test_two['interface']['enabled'] == false + - test_two['interface']['mtu'] == 1600 + +- name: 3 - Delete interface test100 - GigabitEthernet3 + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet3 + state: absent + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['msg'] == "interface GigabitEthernet3 deleted" + - test_three['diff']['before']['state'] == "present" + - test_three['diff']['after']['state'] == "absent" + +- name: 4 - Create LAG with several specified options + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: port-channel1 + type: Link Aggregation Group (LAG) + mtu: 1600 + mgmt_only: false + mode: Access + state: present + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['msg'] == "interface port-channel1 created" + - test_four['diff']['before']['state'] == 'absent' + - test_four['diff']['after']['state'] == 'present' + - test_four['interface']['name'] == "port-channel1" + - test_four['interface']['device'] == 1 + - test_four['interface']['enabled'] == true + - test_four['interface']['type'] == "lag" + - test_four['interface']['mgmt_only'] == false + - test_four['interface']['mode'] == "access" + - test_four['interface']['mtu'] == 1600 + +- name: 5 - Create interface and assign it to parent LAG + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet3 + enabled: false + type: 1000Base-T (1GE) + lag: + name: port-channel1 + mtu: 1600 + mgmt_only: false + mode: Access + state: present + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['msg'] == "interface GigabitEthernet3 created" + - test_five['diff']['before']['state'] == 'absent' + - test_five['diff']['after']['state'] == 'present' + - test_five['interface']['name'] == "GigabitEthernet3" + - test_five['interface']['device'] == 1 + - test_five['interface']['enabled'] == false + - test_five['interface']['type'] == "1000base-t" + - test_five['interface']['mgmt_only'] == false + - test_five['interface']['lag'] == test_four["interface"]["id"] + - test_five['interface']['mode'] == "access" + - test_five['interface']['mtu'] == 1600 + +- name: 6 - Create interface as trunk port + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet21 + enabled: false + type: 1000Base-T (1GE) + untagged_vlan: + name: Wireless + site: Test Site + tagged_vlans: + - name: Data + site: Test Site + - name: VoIP + site: Test Site + mtu: 1600 + mgmt_only: true + mode: Tagged + state: present + register: test_six + +- name: 6 - ASSERT + ansible.builtin.assert: + that: + - test_six is changed + - test_six['msg'] == "interface GigabitEthernet21 created" + - test_six['diff']['before']['state'] == 'absent' + - test_six['diff']['after']['state'] == 'present' + - test_six['interface']['name'] == "GigabitEthernet21" + - test_six['interface']['device'] == 1 + - test_six['interface']['enabled'] == false + - test_six['interface']['type'] == "1000base-t" + - test_six['interface']['mgmt_only'] == true + - test_six['interface']['mode'] == "tagged" + - test_six['interface']['mtu'] == 1600 + - test_six['interface']['tagged_vlans'] == [2, 3] + - test_six['interface']['untagged_vlan'] == 1 + +- name: 7 - Duplicate Interface + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet1 + register: test_seven + +- name: 7 - ASSERT + ansible.builtin.assert: + that: + - not test_seven['changed'] + - test_seven['msg'] == "interface GigabitEthernet1 already exists" + - test_seven['interface']['name'] == "GigabitEthernet1" + - test_seven['interface']['device'] == 1 + +- name: Add port-channel1 to R1 to test finding proper port-channel1 + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: R1-Device + name: port-channel1 + type: Link Aggregation Group (LAG) + +- name: 8 - Create interface and assign it to parent LAG - non dict + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet4 + enabled: false + type: 1000Base-T (1GE) + lag: port-channel1 + mtu: 1600 + mgmt_only: false + mode: Access + state: present + register: test_eight + +- name: 8 - ASSERT + ansible.builtin.assert: + that: + - test_eight is changed + - test_eight['msg'] == "interface GigabitEthernet4 created" + - test_eight['diff']['before']['state'] == 'absent' + - test_eight['diff']['after']['state'] == 'present' + - test_eight['interface']['name'] == "GigabitEthernet4" + - test_eight['interface']['device'] == 1 + - test_eight['interface']['enabled'] == false + - test_eight['interface']['type'] == "1000base-t" + - test_eight['interface']['mgmt_only'] == false + - test_eight['interface']['lag'] == 10 + - test_eight['interface']['mode'] == "access" + - test_eight['interface']['mtu'] == 1600 + +- name: 9 - Create interface on VC child + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: Test Nexus Child One + name: Ethernet2/2 + type: 1000Base-T (1GE) + state: present + register: test_nine + +- name: 9 - ASSERT + ansible.builtin.assert: + that: + - test_nine is changed + - test_nine['msg'] == "interface Ethernet2/2 created" + - test_nine['diff']['before']['state'] == 'absent' + - test_nine['diff']['after']['state'] == 'present' + - test_nine['interface']['name'] == "Ethernet2/2" + - test_nine['interface']['device'] == 5 + - test_nine['interface']['enabled'] == true + - test_nine['interface']['type'] == "1000base-t" + +- name: 10 - Update interface on VC child + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: Test Nexus One + name: Ethernet2/2 + description: Updated child interface from parent device + type: 1000Base-T (1GE) + update_vc_child: true + state: present + register: test_ten + +- name: 10 - ASSERT + ansible.builtin.assert: + that: + - test_ten is changed + - test_ten['msg'] == "interface Ethernet2/2 updated" + - test_ten['diff']['after']['description'] == 'Updated child interface from parent device' + - test_ten['interface']['name'] == "Ethernet2/2" + - test_ten['interface']['device'] == 5 + - test_ten['interface']['enabled'] == true + - test_ten['interface']['type'] == "1000base-t" + - test_ten['interface']['description'] == 'Updated child interface from parent device' + +- name: 11 - Update interface on VC child w/o update_vc_child + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: Test Nexus One + name: Ethernet2/2 + description: Updated child interface from parent device - test + type: 1000Base-T (1GE) + state: present + ignore_errors: true + register: test_eleven + +- name: 11 - ASSERT + ansible.builtin.assert: + that: + - test_eleven is failed + - test_eleven['msg'] == "Must set update_vc_child to True to allow child device interface modification" + +- name: 12 - Create interface and mark it as connected + netbox.netbox.netbox_device_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet5 + type: 1000Base-T (1GE) + mark_connected: true + register: test_twelve + +- name: 12- ASSERT + ansible.builtin.assert: + that: + - test_twelve is changed + - test_twelve['msg'] == "interface GigabitEthernet5 created" + - test_twelve['diff']['before']['state'] == 'absent' + - test_twelve['diff']['after']['state'] == 'present' + - test_twelve['interface']['name'] == "GigabitEthernet5" + - test_twelve['interface']['device'] == 1 + - test_twelve['interface']['mark_connected'] == true diff --git a/tests/integration/targets/v4.1/tasks/netbox_device_interface_template.yml b/tests/integration/targets/v4.1/tasks/netbox_device_interface_template.yml new file mode 100644 index 00000000..abe8f340 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_device_interface_template.yml @@ -0,0 +1,109 @@ +--- +## +## +### NETBOX_DEVICE_INTERFACE_TEMPLATE +## +## +- name: 1 - Interface with required information + netbox.netbox.netbox_device_interface_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: Arista Test + name: 10GBASE-T (10GE) + type: 10gbase-t + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['msg'] == "interface_template 10GBASE-T (10GE) created" + - test_one['diff']['before']['state'] == 'absent' + - test_one['diff']['after']['state'] == 'present' + - test_one['interface_template']['name'] == "10GBASE-T (10GE)" + - test_one['interface_template']['device_type'] == 2 + - test_one['interface_template']['type'] == '10gbase-t' + +- name: 2 - Update 10GBASE-T (10GE) + netbox.netbox.netbox_device_interface_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: Arista Test + name: 10GBASE-T (10GE) + type: 10gbase-t + mgmt_only: true + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - test_two is changed + - test_two['msg'] == "interface_template 10GBASE-T (10GE) updated" + - test_two['diff']['after']['mgmt_only'] == true + - test_two['interface_template']['name'] == "10GBASE-T (10GE)" + - test_two['interface_template']['device_type'] == 2 + - test_two['interface_template']['mgmt_only'] == true + +- name: 3 - Delete interface template 10GBASE-T (10GE) + netbox.netbox.netbox_device_interface_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: Arista Test + name: 10GBASE-T (10GE) + type: 10gbase-t + state: absent + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['msg'] == "interface_template 10GBASE-T (10GE) deleted" + - test_three['diff']['before']['state'] == "present" + - test_three['diff']['after']['state'] == "absent" + +- name: 4 - Create LAG with several specified options + netbox.netbox.netbox_device_interface_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: Arista Test + name: port channel template + type: lag + mgmt_only: false + state: present + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['msg'] == "interface_template port channel template created" + - test_four['diff']['before']['state'] == 'absent' + - test_four['diff']['after']['state'] == 'present' + - test_four['interface_template']['name'] == "port channel template" + - test_four['interface_template']['device_type'] == 2 + - test_four['interface_template']['type'] == "lag" + - test_four['interface_template']['mgmt_only'] == false + +- name: 5 - Duplicate Interface Template port channel template + netbox.netbox.netbox_device_interface_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: Arista Test + name: port channel template + type: lag + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['msg'] == "interface_template port channel template already exists" + - test_five['interface_template']['name'] == "port channel template" + - test_five['interface_template']['device_type'] == 2 + - test_five['interface_template']['type'] == "lag" diff --git a/tests/integration/targets/v4.1/tasks/netbox_device_role.yml b/tests/integration/targets/v4.1/tasks/netbox_device_role.yml new file mode 100644 index 00000000..b85ee2c8 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_device_role.yml @@ -0,0 +1,101 @@ +--- +## +## +### NETBOX_DEVICE_ROLE +## +## +- name: "DEVICE_ROLE 1: Necessary info creation" + netbox.netbox.netbox_device_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Device Role + color: FFFFFF + state: present + register: test_one + +- name: "DEVICE_ROLE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['device_role']['name'] == "Test Device Role" + - test_one['device_role']['slug'] == "test-device-role" + - test_one['device_role']['color'] == "ffffff" + - test_one['msg'] == "device_role Test Device Role created" + +- name: "DEVICE_ROLE 2: Create duplicate" + netbox.netbox.netbox_device_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Device Role + color: FFFFFF + state: present + register: test_two + +- name: "DEVICE_ROLE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['device_role']['name'] == "Test Device Role" + - test_two['device_role']['slug'] == "test-device-role" + - test_two['device_role']['color'] == "ffffff" + - test_two['msg'] == "device_role Test Device Role already exists" + +- name: "DEVICE_ROLE 3: ASSERT - Update" + netbox.netbox.netbox_device_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Device Role + color: "003EFF" + vm_role: false + state: present + register: test_three + +- name: "DEVICE_ROLE 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['color'] == "003eff" + - test_three['diff']['after']['vm_role'] == false + - test_three['device_role']['name'] == "Test Device Role" + - test_three['device_role']['slug'] == "test-device-role" + - test_three['device_role']['color'] == "003eff" + - test_three['device_role']['vm_role'] == false + - test_three['msg'] == "device_role Test Device Role updated" + +- name: "DEVICE_ROLE 4: ASSERT - Delete" + netbox.netbox.netbox_device_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Device Role + state: absent + register: test_four + +- name: "DEVICE_ROLE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "device_role Test Device Role deleted" + +- name: "DEVICE_ROLE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_device_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Device Role + state: absent + register: test_five + +- name: "DEVICE_ROLE 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['device_role'] == None + - test_five['msg'] == "device_role Test Device Role already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_device_type.yml b/tests/integration/targets/v4.1/tasks/netbox_device_type.yml new file mode 100644 index 00000000..3027f6fd --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_device_type.yml @@ -0,0 +1,132 @@ +--- +## +## +### NETBOX_DEVICE_TYPE +## +## +- name: "DEVICE_TYPE 1: Necessary info creation" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + slug: test-device-type + model: ws-test-3750 + manufacturer: Test Manufacturer + state: present + register: test_one + +- name: "DEVICE_TYPE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['device_type']['slug'] == "test-device-type" + - test_one['device_type']['model'] == "ws-test-3750" + - test_one['device_type']['manufacturer'] == 3 + - test_one['msg'] == "device_type test-device-type created" + +- name: "DEVICE_TYPE 2: Create duplicate" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + slug: test-device-type + model: ws-test-3750 + manufacturer: Test Manufacturer + state: present + register: test_two + +- name: "DEVICE_TYPE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_one['device_type']['slug'] == "test-device-type" + - test_one['device_type']['model'] == "ws-test-3750" + - test_one['device_type']['manufacturer'] == 3 + - test_two['msg'] == "device_type test-device-type already exists" + +- name: "DEVICE_TYPE 3: ASSERT - Update" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + slug: test-device-type + model: ws-test-3750 + manufacturer: Test Manufacturer + part_number: ws-3750g-v2 + u_height: 1.5 + is_full_depth: false + subdevice_role: parent + state: present + register: test_three + +- name: "DEVICE_TYPE 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['is_full_depth'] == false + - test_three['diff']['after']['part_number'] == "ws-3750g-v2" + - test_three['diff']['after']['subdevice_role'] == "parent" + - test_three['device_type']['slug'] == "test-device-type" + - test_three['device_type']['model'] == "ws-test-3750" + - test_three['device_type']['manufacturer'] == 3 + - test_three['device_type']['is_full_depth'] == false + - test_three['device_type']['part_number'] == "ws-3750g-v2" + - test_three['device_type']['subdevice_role'] == "parent" + - test_three['msg'] == "device_type test-device-type updated" + +- name: "DEVICE_TYPE 4: ASSERT - Delete" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + model: test-device-type + state: absent + register: test_four + +- name: "DEVICE_TYPE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "device_type test-device-type deleted" + +- name: "DEVICE_TYPE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + model: Test Device Type + state: absent + register: test_five + +- name: "DEVICE_TYPE 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['device_type'] == None + - test_five['msg'] == "device_type Test Device Type already absent" + +- name: "DEVICE_TYPE 6: Without Slug" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + model: WS Test 3850 + manufacturer: Test Manufacturer + subdevice_role: parent + state: present + register: test_six + +- name: "DEVICE_TYPE 6: ASSERT - Without Slug" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['device_type']['slug'] == "ws-test-3850" + - test_six['device_type']['model'] == "WS Test 3850" + - test_six['device_type']['manufacturer'] == 3 + - test_six['msg'] == "device_type WS Test 3850 created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_export_template.yml b/tests/integration/targets/v4.1/tasks/netbox_export_template.yml new file mode 100644 index 00000000..1e7535c0 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_export_template.yml @@ -0,0 +1,118 @@ +--- +## +## +### NETBOX_EXPORT_TEMPLATE +## +## +- name: "EXPORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_export_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - dcim.device + name: Example Export Template + description: Export Devices + template_code: !unsafe >- + {% for obj in queryset %}{{ obj.name }}{% endfor %} + state: present + register: test_one + +- name: "EXPORT_TEMPLATE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['export_template']['name'] == "Example Export Template" + - test_one['export_template']['object_types'] == ["dcim.device"] + - test_one['export_template']['description'] == "Export Devices" + - test_one['msg'] == "export_template Example Export Template created" + +- name: "EXPORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_export_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - dcim.device + name: Example Export Template + description: Export Devices + template_code: !unsafe >- + {% for obj in queryset %}{{ obj.name }}{% endfor %} + state: present + register: test_two + +- name: "EXPORT_TEMPLATE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['export_template']['name'] == "Example Export Template" + - test_two['msg'] == "export_template Example Export Template already exists" + +- name: "EXPORT_TEMPLATE 3: Update data and remove as_attachment" + netbox.netbox.netbox_export_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - dcim.device + name: Example Export Template + description: Export Devices + template_code: !unsafe >- + {% for obj in queryset %}{{ obj.name }}{% endfor %} + as_attachment: false + state: present + register: test_three + +- name: "EXPORT_TEMPLATE 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['as_attachment'] == false + - test_three['export_template']['name'] == "Example Export Template" + - test_three['msg'] == "export_template Example Export Template updated" + +- name: "EXPORT_TEMPLATE 4: Change content type" + netbox.netbox.netbox_export_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - virtualization.virtualmachine + name: Example Export Template + description: Export Devices + template_code: !unsafe >- + {% for obj in queryset %}{{ obj.name }}{% endfor %} + state: present + register: test_four + +- name: "EXPORT_TEMPLATE 4: ASSERT - Change content type" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['after']['object_types'] == ["virtualization.virtualmachine"] + - test_four['export_template']['name'] == "Example Export Template" + - test_four['msg'] == "export_template Example Export Template updated" + +- name: "EXPORT_TEMPLATE 5: Delete" + netbox.netbox.netbox_export_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + object_types: + - virtualization.virtualmachine + name: Example Export Template + description: Export Devices + template_code: !unsafe >- + {% for obj in queryset %}{{ obj.name }}{% endfor %} + state: absent + register: test_five + +- name: "EXPORT_TEMPLATE 5: ASSERT - Deleted" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['export_template']['name'] == "Example Export Template" + - test_five['msg'] == "export_template Example Export Template deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_fhrp_group.yml b/tests/integration/targets/v4.1/tasks/netbox_fhrp_group.yml new file mode 100644 index 00000000..eed3f2f8 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_fhrp_group.yml @@ -0,0 +1,91 @@ +--- +## +## +### NETBOX_FHRP_GROUP +## +## +- name: "FHRP group 1: Test FHRP group creation" + netbox.netbox.netbox_fhrp_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + protocol: glbp + group_id: 111 + state: present + register: test_one + +- name: "FHRP group: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['fhrp_group']['group_id'] == 111 + - test_one['fhrp_group']['protocol'] == "glbp" + - test_one['msg'] == "fhrp_group 111 created" + +- name: "FHRP group 2: Create duplicate" + netbox.netbox.netbox_fhrp_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + protocol: glbp + group_id: 111 + state: present + register: test_two + +- name: "FHRP group 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['fhrp_group']['group_id'] == 111 + - test_two['fhrp_group']['protocol'] == "glbp" + - test_two['msg'] == "fhrp_group 111 already exists" + +- name: "FHRP group 3: Update FHRP group with other fields" + netbox.netbox.netbox_fhrp_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + protocol: glbp + group_id: 111 + auth_type: md5 + auth_key: 11111 + description: Test description + tags: + - Schnozzberry + state: present + register: test_three + +- name: "FHRP group 3: ASSERT - Update FHRP group with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['auth_type'] == "md5" + - test_three['diff']['after']['auth_key'] == "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER" + - test_three['diff']['after']['description'] == "Test description" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['fhrp_group']['group_id'] == 111 + - test_three['fhrp_group']['protocol'] == "glbp" + - test_three['fhrp_group']['auth_type'] == "md5" + - test_three['fhrp_group']['auth_key'] == "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER" + - test_three['fhrp_group']['description'] == "Test description" + - test_three['fhrp_group']['tags'][0] == 4 + - test_three['msg'] == "fhrp_group 111 updated" + +- name: "FHRP group 4: ASSERT - Delete" + netbox.netbox.netbox_fhrp_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + group_id: 111 + state: absent + register: test_four + +- name: "FHRP group 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "fhrp_group 111 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_fhrp_group_assignment.yml b/tests/integration/targets/v4.1/tasks/netbox_fhrp_group_assignment.yml new file mode 100644 index 00000000..2dd2f6d6 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_fhrp_group_assignment.yml @@ -0,0 +1,92 @@ +--- +## +## +### NETBOX_FHRP_GROUP_ASSIGNMENT +## +## +- name: "FHRP group assignment 1: Test FHRP group assignment creation" + netbox.netbox.netbox_fhrp_group_assignment: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + fhrp_group: 1 + interface_type: dcim.interface + interface_id: 1 + priority: 1 + state: present + register: test_one + +- name: "FHRP group assignment: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['fhrp_group_assignment']['group'] == 1 + - test_one['fhrp_group_assignment']['interface_type'] == "dcim.interface" + - test_one['fhrp_group_assignment']['interface_id'] == 1 + - test_one['fhrp_group_assignment']['priority'] == 1 + - test_one['msg'] == "fhrp_group_assignment fhrp_group 1 > dcim.interface 1 created" + +- name: "FHRP group assignment 2: Create duplicate" + netbox.netbox.netbox_fhrp_group_assignment: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + fhrp_group: 1 + interface_type: dcim.interface + interface_id: 1 + priority: 1 + state: present + register: test_two + +- name: "FHRP group assignment 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['fhrp_group_assignment']['group'] == 1 + - test_two['fhrp_group_assignment']['interface_type'] == "dcim.interface" + - test_two['fhrp_group_assignment']['interface_id'] == 1 + - test_two['fhrp_group_assignment']['priority'] == 1 + - test_two['msg'] == "fhrp_group_assignment fhrp_group 1 > dcim.interface 1 already exists" + +- name: "FHRP group assignment 3: Update FHRP group assignment" + netbox.netbox.netbox_fhrp_group_assignment: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + fhrp_group: 1 + interface_type: dcim.interface + interface_id: 1 + priority: 2 + state: present + register: test_three + +- name: "FHRP group assignment 3: ASSERT - Update FHRP group assignment" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['fhrp_group_assignment']['group'] == 1 + - test_three['fhrp_group_assignment']['interface_type'] == "dcim.interface" + - test_three['fhrp_group_assignment']['interface_id'] == 1 + - test_three['fhrp_group_assignment']['priority'] == 2 + - test_three['msg'] == "fhrp_group_assignment fhrp_group 1 > dcim.interface 1 updated" + +- name: "FHRP group assignment 4: Delete FHRP group assignment" + netbox.netbox.netbox_fhrp_group_assignment: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + fhrp_group: 1 + interface_type: dcim.interface + interface_id: 1 + state: absent + register: test_four + +- name: "FHRP group assignment 3: ASSERT - Delete FHRP group assignment" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "fhrp_group_assignment fhrp_group 1 > dcim.interface 1 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_front_port.yml b/tests/integration/targets/v4.1/tasks/netbox_front_port.yml new file mode 100644 index 00000000..7088bbee --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_front_port.yml @@ -0,0 +1,150 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_FRONT_PORT +## +## +- name: "FRONT_PORT 1: Necessary info creation" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port + device: test100 + type: bnc + rear_port: Rear Port + state: present + register: test_one + +- name: "FRONT_PORT 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['front_port']['name'] == "Front Port" + - test_one['front_port']['device'] == 1 + - test_one['front_port']['type'] == "bnc" + - test_one['front_port']['rear_port'] == 1 + - test_one['msg'] == "front_port Front Port created" + +- name: "FRONT_PORT 2: Create duplicate" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port + device: test100 + type: bnc + rear_port: Rear Port + state: present + register: test_two + +- name: "FRONT_PORT 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['front_port']['name'] == "Front Port" + - test_two['front_port']['device'] == 1 + - test_two['front_port']['type'] == "bnc" + - test_two['front_port']['rear_port'] == 1 + - test_two['msg'] == "front_port Front Port already exists" + +- name: "FRONT_PORT 3: Update Front Port with other fields" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port + device: test100 + type: bnc + rear_port: Rear Port + rear_port_position: 5 + description: test description + state: present + register: test_three + +- name: "FRONT_PORT 3: ASSERT - Update Front Port with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['rear_port_position'] == 5 + - test_three['diff']['after']['description'] == "test description" + - test_three['front_port']['name'] == "Front Port" + - test_three['front_port']['device'] == 1 + - test_three['front_port']['type'] == "bnc" + - test_three['front_port']['rear_port'] == 1 + - test_three['front_port']['rear_port_position'] == 5 + - test_three['front_port']['description'] == "test description" + - test_three['msg'] == "front_port Front Port updated" + +- name: "FRONT_PORT 4: Create Front Port for Delete Test" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port 2 + device: test100 + type: bnc + rear_port: Rear Port + state: present + register: test_four + +- name: "FRONT_PORT 4: ASSERT - Create Front Port for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['front_port']['name'] == "Front Port 2" + - test_four['front_port']['device'] == 1 + - test_four['front_port']['type'] == "bnc" + - test_four['front_port']['rear_port'] == 1 + - test_four['msg'] == "front_port Front Port 2 created" + +- name: "FRONT_PORT 5: Delete Front Port" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port 2 + device: test100 + type: bnc + rear_port: Rear Port + state: absent + register: test_five + +- name: "FRONT_PORT 5: ASSERT - Delete Front Port" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "front_port Front Port 2 deleted" + +- name: "FRONT_PORT 6: Create duplicate with rear_port dictionary" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port + device: test100 + type: bnc + rear_port: + device: test100 + name: Rear Port + state: present + register: test_six + +- name: "FRONT_PORT 6: ASSERT - Create duplicate with rear_port dictionary" + ansible.builtin.assert: + that: + - not test_six['changed'] + - test_six['front_port']['name'] == "Front Port" + - test_six['front_port']['device'] == 1 + - test_six['front_port']['type'] == "bnc" + - test_six['front_port']['rear_port'] == 1 + - test_six['msg'] == "front_port Front Port already exists" diff --git a/tests/integration/targets/v4.1/tasks/netbox_front_port_template.yml b/tests/integration/targets/v4.1/tasks/netbox_front_port_template.yml new file mode 100644 index 00000000..966279fa --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_front_port_template.yml @@ -0,0 +1,147 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_FRONT_PORT_TEMPLATE +## +## +- name: "FRONT_PORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port Template + device_type: Cisco Test + type: bnc + rear_port_template: Rear Port Template + state: present + register: test_one + +- name: "FRONT_PORT_TEMPLATE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['front_port_template']['name'] == "Front Port Template" + - test_one['front_port_template']['device_type'] == 1 + - test_one['front_port_template']['type'] == "bnc" + - test_one['front_port_template']['rear_port'] == 1 + - test_one['msg'] == "front_port_template Front Port Template created" + +- name: "FRONT_PORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port Template + device_type: Cisco Test + type: bnc + rear_port_template: Rear Port Template + state: present + register: test_two + +- name: "FRONT_PORT_TEMPLATE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['front_port_template']['name'] == "Front Port Template" + - test_two['front_port_template']['device_type'] == 1 + - test_two['front_port_template']['type'] == "bnc" + - test_two['front_port_template']['rear_port'] == 1 + - test_two['msg'] == "front_port_template Front Port Template already exists" + +- name: "FRONT_PORT_TEMPLATE 3: Update Front Port Template with other fields" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port Template + device_type: Cisco Test + type: bnc + rear_port_template: Rear Port Template + rear_port_template_position: 5 + state: present + register: test_three + +- name: "FRONT_PORT_TEMPLATE 3: ASSERT - Update Front Port Template with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['rear_port_position'] == 5 + - test_three['front_port_template']['name'] == "Front Port Template" + - test_three['front_port_template']['device_type'] == 1 + - test_three['front_port_template']['type'] == "bnc" + - test_three['front_port_template']['rear_port_position'] == 5 + - test_three['front_port_template']['rear_port'] == 1 + - test_three['msg'] == "front_port_template Front Port Template updated" + +- name: "FRONT_PORT_TEMPLATE 4: Create Front Port Template for Delete Test" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port Template 2 + device_type: Cisco Test + type: bnc + rear_port_template: Rear Port Template + state: present + register: test_four + +- name: "FRONT_PORT_TEMPLATE 4: ASSERT - Create Front Port Template for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['front_port_template']['name'] == "Front Port Template 2" + - test_four['front_port_template']['device_type'] == 1 + - test_four['front_port_template']['type'] == "bnc" + - test_four['front_port_template']['rear_port'] == 1 + - test_four['msg'] == "front_port_template Front Port Template 2 created" + +- name: "FRONT_PORT_TEMPLATE 5: Delete Front Port Template" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port Template 2 + device_type: Cisco Test + type: bnc + rear_port_template: Rear Port Template + state: absent + register: test_five + +- name: "FRONT_PORT_TEMPLATE 5: ASSERT - Delete Front Port Template" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "front_port_template Front Port Template 2 deleted" + +- name: "FRONT_PORT 6: Create duplicate with rear_port_template dictionary" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Front Port Template + device_type: Cisco Test + type: bnc + rear_port_template: + device: Cisco Test + name: Rear Port Template + state: present + register: test_six + +- name: "FRONT_PORT 6: ASSERT - Create duplicate with rear_port_template dictionary" + ansible.builtin.assert: + that: + - not test_six['changed'] + - test_six['front_port_template']['name'] == "Front Port Template" + - test_six['front_port_template']['device_type'] == 1 + - test_six['front_port_template']['type'] == "bnc" + - test_six['front_port_template']['rear_port'] == 1 + - test_six['msg'] == "front_port_template Front Port Template already exists" diff --git a/tests/integration/targets/v4.1/tasks/netbox_inventory_item.yml b/tests/integration/targets/v4.1/tasks/netbox_inventory_item.yml new file mode 100644 index 00000000..5b330c3a --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_inventory_item.yml @@ -0,0 +1,203 @@ +--- +## +## +### NETBOX_INVENTORY_ITEM +## +## +- name: "INVENTORY_ITEM 1: Necessary info creation" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: 10G-SFP+ + state: present + register: test_one + +- name: "INVENTORY_ITEM 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one.diff.before.state == "absent" + - test_one.diff.after.state == "present" + - test_one.inventory_item.name == "10G-SFP+" + - test_one.inventory_item.device == 1 + - test_one.msg == "inventory_item 10G-SFP+ created" + +- name: "INVENTORY_ITEM 2: Create duplicate" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: 10G-SFP+ + state: present + register: test_two + +- name: "INVENTORY_ITEM 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two.changed + - test_two.inventory_item.name == "10G-SFP+" + - test_two.inventory_item.device == 1 + - test_two.msg == "inventory_item 10G-SFP+ already exists" + +- name: "INVENTORY_ITEM 3: Update properties" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: 10G-SFP+ + manufacturer: Cisco + part_id: 10G-SFP+ + serial: "1234" + asset_tag: "1234" + description: New SFP + discovered: true + tags: + - Schnozzberry + state: present + register: test_three + +- name: "INVENTORY_ITEM 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three.diff.after.asset_tag == "1234" + - test_three.diff.after.serial == "1234" + - test_three.diff.after.description == "New SFP" + - test_three.diff.after.manufacturer == 1 + - test_three.diff.after.part_id == "10G-SFP+" + - test_three.diff.after.tags[0] == 4 + - test_three.diff.after.discovered == True + - test_three.inventory_item.name == "10G-SFP+" + - test_three.inventory_item.device == 1 + - test_three.inventory_item.asset_tag == "1234" + - test_three.inventory_item.serial == "1234" + - test_three.inventory_item.description == "New SFP" + - test_three.inventory_item.manufacturer == 1 + - test_three.inventory_item.part_id == "10G-SFP+" + - test_three.inventory_item.tags[0] == 4 + - test_three.inventory_item.discovered == True + - test_three.msg == "inventory_item 10G-SFP+ updated" + +- name: "INVENTORY_ITEM 4: Delete inventory item" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: 10G-SFP+ + state: absent + register: test_four + +- name: "INVENTORY_ITEM 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four.inventory_item.name == "10G-SFP+" + - test_four.inventory_item.device == 1 + - test_four.inventory_item.asset_tag == "1234" + - test_four.inventory_item.serial == "1234" + - test_four.inventory_item.description == "New SFP" + - test_four.inventory_item.manufacturer == 1 + - test_four.inventory_item.part_id == "10G-SFP+" + - test_four.inventory_item.tags[0] == 4 + - test_four.msg == "inventory_item 10G-SFP+ deleted" + +- name: "INVENTORY_ITEM 5: PREWORK - Create inventory item role" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Processor + color: FFFFFF + state: present + register: test_five_prework + +- name: "INVENTORY_ITEM 5: Create inventory item with role" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: test_processor + inventory_item_role: Processor + state: present + register: test_five + +- name: "INVENTORY_ITEM 5: ASSERT - Inventory item creation with role" + ansible.builtin.assert: + that: + - test_five is changed + - test_five.diff.before.state == "absent" + - test_five.diff.after.state == "present" + - test_five.inventory_item.name == "test_processor" + - test_five.inventory_item.role == test_five_prework.inventory_item_role.id + - test_five.inventory_item.device == 1 + - test_five.msg == "inventory_item test_processor created" + +- name: "INVENTORY_ITEM 6: Create inventory item with missing role" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: test_processor + inventory_item_role: Foo + state: present + ignore_errors: true + register: test_six + +- name: "INVENTORY_ITEM 6: ASSERT - Inventory item creation with missing role" + ansible.builtin.assert: + that: + - test_six.failed + - test_six.msg == "Could not resolve id of inventory_item_role: Foo" + +- name: "INVENTORY_ITEM 7: Create inventory item with component" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: test_component + component_type: dcim.interface + component: + name: GigabitEthernet2 + device: test100 + state: present + register: test_seven + +- name: "INVENTORY_ITEM 7: ASSERT - Inventory item creation with component" + ansible.builtin.assert: + that: + - test_seven is changed + - test_seven.diff.before.state == "absent" + - test_seven.diff.after.state == "present" + - test_seven.inventory_item.name == "test_component" + - test_seven.inventory_item.component_type == "dcim.interface" + - test_seven.inventory_item.component_id == 4 + - test_seven.inventory_item.device == 1 + - test_seven.msg == "inventory_item test_component created" + +- name: "INVENTORY_ITEM 8: Create inventory item with missing component_type" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: test_component + component: + name: GigabitEthernet2 + device: test100 + state: present + ignore_errors: true + register: test_eight + +- name: "INVENTORY_ITEM 8: ASSERT - Inventory item creation with missing component_type" + ansible.builtin.assert: + that: + - test_eight.failed + - test_eight.msg == "parameters are required together: component_type, component" diff --git a/tests/integration/targets/v4.1/tasks/netbox_inventory_item_role.yml b/tests/integration/targets/v4.1/tasks/netbox_inventory_item_role.yml new file mode 100644 index 00000000..71d86d74 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_inventory_item_role.yml @@ -0,0 +1,98 @@ +--- +## +## +### NETBOX_INVENTORY_ITEM_ROLE +## +## +- name: "INVENTORY_ITEM_ROLE 1: Necessary info creation" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Inventory Item Role + color: FFFFFF + state: present + register: test_one + +- name: "INVENTORY_ITEM_ROLE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['inventory_item_role']['name'] == "Test Inventory Item Role" + - test_one['inventory_item_role']['slug'] == "test-inventory-item-role" + - test_one['inventory_item_role']['color'] == "ffffff" + - test_one['msg'] == "inventory_item_role Test Inventory Item Role created" + +- name: "INVENTORY_ITEM_ROLE 2: Create duplicate" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Inventory Item Role + color: FFFFFF + state: present + register: test_two + +- name: "INVENTORY_ITEM_ROLE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['inventory_item_role']['name'] == "Test Inventory Item Role" + - test_two['inventory_item_role']['slug'] == "test-inventory-item-role" + - test_two['inventory_item_role']['color'] == "ffffff" + - test_two['msg'] == "inventory_item_role Test Inventory Item Role already exists" + +- name: "INVENTORY_ITEM_ROLE 3: ASSERT - Update" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Inventory Item Role + color: "003EFF" + state: present + register: test_three + +- name: "INVENTORY_ITEM_ROLE 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['color'] == "003eff" + - test_three['inventory_item_role']['name'] == "Test Inventory Item Role" + - test_three['inventory_item_role']['slug'] == "test-inventory-item-role" + - test_three['inventory_item_role']['color'] == "003eff" + - test_three['msg'] == "inventory_item_role Test Inventory Item Role updated" + +- name: "INVENTORY_ITEM_ROLE 4: ASSERT - Delete" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Inventory Item Role + state: absent + register: test_four + +- name: "INVENTORY_ITEM_ROLE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "inventory_item_role Test Inventory Item Role deleted" + +- name: "INVENTORY_ITEM_ROLE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Inventory Item Role + state: absent + register: test_five + +- name: "INVENTORY_ITEM_ROLE 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['inventory_item_role'] == None + - test_five['msg'] == "inventory_item_role Test Inventory Item Role already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_ip_address.yml b/tests/integration/targets/v4.1/tasks/netbox_ip_address.yml new file mode 100644 index 00000000..8813f8dc --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_ip_address.yml @@ -0,0 +1,352 @@ +--- +## +## +### NETBOX_IP_ADDRESS +## +## +- name: "1 - Create IP address within NetBox with only required information - State: Present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 192.168.1.10/30 + state: present + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['msg'] == "ip_address 192.168.1.10/30 created" + - test_one['ip_address']['address'] == "192.168.1.10/30" + +- name: 2 - Update 192.168.1.10/30 + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 192.168.1.10/30 + description: Updated ip address + tags: + - Updated + state: present + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - test_two is changed + - test_two['diff']['after']['description'] == "Updated ip address" + - test_two['diff']['after']['tags'][0] == 10 + - test_two['msg'] == "ip_address 192.168.1.10/30 updated" + - test_two['ip_address']['address'] == "192.168.1.10/30" + - test_two['ip_address']['tags'][0] == 10 + - test_two['ip_address']['description'] == "Updated ip address" + +- name: "3 - Delete IP - 192.168.1.10 - State: Absent" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 192.168.1.10/30 + state: absent + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "present" + - test_three['diff']['after']['state'] == "absent" + - test_three['msg'] == "ip_address 192.168.1.10/30 deleted" + +- name: "4 - Create IP in global VRF - 192.168.1.20/30 - State: Present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 192.168.1.20/30 + state: present + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['msg'] == "ip_address 192.168.1.20/30 created" + - test_four['ip_address']['address'] == "192.168.1.20/30" + +# Enforce uniqueness in NetBox 3.7 +# - name: "5 - Create IP in global VRF - 192.168.1.20/30 - State: New" +# netbox.netbox.netbox_ip_address: +# netbox_url: http://localhost:32768 +# netbox_token: 0123456789abcdef0123456789abcdef01234567 +# data: +# address: 192.168.1.20/30 +# state: new +# register: test_five + +# - name: "5 - ASSERT" +# assert: +# that: +# - test_five is changed +# - test_five['diff']['before']['state'] == "absent" +# - test_five['diff']['after']['state'] == "present" +# - test_five['msg'] == "ip_address 192.168.1.20/30 created" +# - test_five['ip_address']['address'] == "192.168.1.20/30" + +- name: "6 - Create new address with only prefix specified - State: new" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 192.168.100.0/24 + state: new + register: test_six + +- name: 6 - ASSERT + ansible.builtin.assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['msg'] == "ip_address 192.168.100.1/24 created" + - test_six['ip_address']['address'] == "192.168.100.1/24" + +- name: 7 - Create IP address with several specified + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + family: 4 + address: 172.16.1.20/24 + vrf: Test VRF + tenant: Test Tenant + status: Reserved + role: Loopback + description: Test description + tags: + - Schnozzberry + state: present + register: test_seven + +- name: 7 - ASSERT + ansible.builtin.assert: + that: + - test_seven is changed + - test_seven['diff']['before']['state'] == "absent" + - test_seven['diff']['after']['state'] == "present" + - test_seven['msg'] == "ip_address 172.16.1.20/24 created" + - test_seven['ip_address']['address'] == "172.16.1.20/24" + - test_seven['ip_address']['description'] == "Test description" + - test_seven['ip_address']['family'] == 4 + - test_seven['ip_address']['role'] == "loopback" + - test_seven['ip_address']['status'] == "reserved" + - test_seven['ip_address']['tags'][0] == 4 + - test_seven['ip_address']['tenant'] == 1 + - test_seven['ip_address']['vrf'] == 1 + +- name: 8 - Create IP address and assign a nat_inside IP + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + family: 4 + address: 10.10.1.30/16 + vrf: Test VRF + nat_inside: + address: 172.16.1.20 + vrf: Test VRF + register: test_eight + +- name: 8 - ASSERT + ansible.builtin.assert: + that: + - test_eight is changed + - test_eight['diff']['before']['state'] == "absent" + - test_eight['diff']['after']['state'] == "present" + - test_eight['msg'] == "ip_address 10.10.1.30/16 created" + - test_eight['ip_address']['address'] == "10.10.1.30/16" + - test_eight['ip_address']['family'] == 4 + - test_eight['ip_address'].get('nat_inside') + - test_eight['ip_address']['vrf'] == 1 + +- name: "9 - Create IP address on GigabitEthernet2 - test100 - State: present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + family: 4 + address: 10.10.200.30/16 + assigned_object: + name: GigabitEthernet2 + device: test100 + register: test_nine + +- name: 9 - ASSERT + ansible.builtin.assert: + that: + - test_nine is changed + - test_nine['diff']['before']['state'] == "absent" + - test_nine['diff']['after']['state'] == "present" + - test_nine['msg'] == "ip_address 10.10.200.30/16 created" + - test_nine['ip_address']['address'] == "10.10.200.30/16" + - test_nine['ip_address']['family'] == 4 + - test_nine['ip_address']['assigned_object_type'] == "dcim.interface" + - test_nine['ip_address']['assigned_object_id'] == 4 + +- name: "10 - Create IP address on GigabitEthernet2 - test100 - State: new" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + family: 4 + prefix: 10.10.0.0/16 + assigned_object: + name: GigabitEthernet2 + device: test100 + state: new + register: test_ten + +- name: 10 - ASSERT + ansible.builtin.assert: + that: + - test_ten is changed + - test_ten['diff']['before']['state'] == "absent" + - test_ten['diff']['after']['state'] == "present" + - test_ten['msg'] == "ip_address 10.10.0.1/16 created" + - test_ten['ip_address']['address'] == "10.10.0.1/16" + - test_ten['ip_address']['family'] == 4 + - test_ten['ip_address']['assigned_object_type'] == "dcim.interface" + - test_ten['ip_address']['assigned_object_id'] == 4 + +- name: "11 - Create IP address on GigabitEthernet2 - test100 - State: present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + family: 4 + prefix: 192.168.100.0/24 + assigned_object: + name: GigabitEthernet2 + device: test100 + state: present + register: test_eleven + +- name: 11 - ASSERT + ansible.builtin.assert: + that: + - test_eleven is changed + - test_eleven['diff']['before']['state'] == "absent" + - test_eleven['diff']['after']['state'] == "present" + - test_eleven['msg'] == "ip_address 192.168.100.2/24 created" + - test_eleven['ip_address']['address'] == "192.168.100.2/24" + +- name: 12 - Duplicate - 192.168.100.2/24 on interface + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 192.168.100.2/24 + assigned_object: + name: GigabitEthernet2 + device: test100 + state: present + register: test_twelve + +- name: 12 - ASSERT + ansible.builtin.assert: + that: + - not test_twelve['changed'] + - test_twelve['msg'] == "ip_address 192.168.100.2/24 already exists" + - test_twelve['ip_address']['address'] == "192.168.100.2/24" + - test_twelve['ip_address']['assigned_object_type'] == "dcim.interface" + - test_twelve['ip_address']['assigned_object_id'] == 4 + +- name: 13 - Duplicate - 192.168.100.2/24 + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 192.168.100.2/24 + state: present + register: test_thirteen + +- name: 13 - ASSERT + ansible.builtin.assert: + that: + - not test_thirteen['changed'] + - test_thirteen['msg'] == "ip_address 192.168.100.2/24 already exists" + - test_thirteen['ip_address']['address'] == "192.168.100.2/24" + +- name: "14 - Create IP address on Eth0 - test100-vm - State: present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + family: 4 + address: 10.188.1.100/24 + assigned_object: + name: Eth0 + virtual_machine: test100-vm + register: test_fourteen + +- name: 14 - ASSERT + ansible.builtin.assert: + that: + - test_fourteen is changed + - test_fourteen['diff']['before']['state'] == "absent" + - test_fourteen['diff']['after']['state'] == "present" + - test_fourteen['msg'] == "ip_address 10.188.1.100/24 created" + - test_fourteen['ip_address']['address'] == "10.188.1.100/24" + - test_fourteen['ip_address']['family'] == 4 + - test_fourteen['ip_address']['assigned_object_type'] == "virtualization.vminterface" + - test_fourteen['ip_address']['assigned_object_id'] == 1 + +# Enforce uniqueness in NetBox 3.7 +# - name: "15 - Create same IP address on Eth0 - test101-vm - State: present" +# netbox.netbox.netbox_ip_address: +# netbox_url: http://localhost:32768 +# netbox_token: 0123456789abcdef0123456789abcdef01234567 +# data: +# family: 4 +# address: 10.188.1.100/24 +# assigned_object: +# name: Eth0 +# virtual_machine: test101-vm +# state: "present" +# register: test_fifteen + +# - name: "15 - ASSERT" +# assert: +# that: +# - test_fifteen is changed +# - test_fifteen['diff']['before']['state'] == "absent" +# - test_fifteen['diff']['after']['state'] == "present" +# - test_fifteen['msg'] == "ip_address 10.188.1.100/24 created" +# - test_fifteen['ip_address']['address'] == "10.188.1.100/24" +# - test_fifteen['ip_address']['family'] == 4 +# - test_fifteen['ip_address']['assigned_object_type'] == "virtualization.vminterface" +# - test_fifteen['ip_address']['assigned_object_id'] == 6 + +- name: "16 - Create IP address with no mask - State: Present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 10.120.10.1 + state: present + register: test_sixteen + +- name: 16 - ASSERT + ansible.builtin.assert: + that: + - test_sixteen is changed + - test_sixteen['diff']['before']['state'] == "absent" + - test_sixteen['diff']['after']['state'] == "present" + - test_sixteen['msg'] == "ip_address 10.120.10.1/32 created" + - test_sixteen['ip_address']['address'] == "10.120.10.1/32" diff --git a/tests/integration/targets/v4.1/tasks/netbox_ipam_role.yml b/tests/integration/targets/v4.1/tasks/netbox_ipam_role.yml new file mode 100644 index 00000000..9f376c2e --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_ipam_role.yml @@ -0,0 +1,94 @@ +--- +## +## +### NETBOX_IPAM_ROLE +## +## +- name: "IPAM_ROLE 1: Necessary info creation" + netbox.netbox.netbox_ipam_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test IPAM Role + state: present + register: test_one + +- name: "IPAM_ROLE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['role']['name'] == "Test IPAM Role" + - test_one['role']['slug'] == "test-ipam-role" + - test_one['msg'] == "role Test IPAM Role created" + +- name: "IPAM_ROLE 2: Create duplicate" + netbox.netbox.netbox_ipam_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test IPAM Role + state: present + register: test_two + +- name: "IPAM_ROLE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['role']['name'] == "Test IPAM Role" + - test_two['role']['slug'] == "test-ipam-role" + - test_two['msg'] == "role Test IPAM Role already exists" + +- name: "IPAM_ROLE 3: ASSERT - Update" + netbox.netbox.netbox_ipam_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test IPAM Role + weight: 4096 + state: present + register: test_three + +- name: "IPAM_ROLE 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['weight'] == 4096 + - test_three['role']['name'] == "Test IPAM Role" + - test_three['role']['slug'] == "test-ipam-role" + - test_three['role']['weight'] == 4096 + - test_three['msg'] == "role Test IPAM Role updated" + +- name: "IPAM_ROLE 4: ASSERT - Delete" + netbox.netbox.netbox_ipam_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test IPAM Role + state: absent + register: test_four + +- name: "IPAM_ROLE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "role Test IPAM Role deleted" + +- name: "IPAM_ROLE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_ipam_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test IPAM Role + state: absent + register: test_five + +- name: "IPAM_ROLE 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['role'] == None + - test_five['msg'] == "role Test IPAM Role already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_journal_entry.yml b/tests/integration/targets/v4.1/tasks/netbox_journal_entry.yml new file mode 100644 index 00000000..7eead8db --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_journal_entry.yml @@ -0,0 +1,26 @@ +--- +## +## +### NETBOX_JOURNAL_ENTRY +## +## +- name: "JOURNAL ENTRY 1: Creation" + netbox.netbox.netbox_journal_entry: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + assigned_object_type: dcim.device + assigned_object_id: 1 + comments: | + Comment on device + state: new + register: test_one + +- name: "JOURNAL_ENTRY 1: ASSERT - Creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['journal_entry']['kind'] == "info" + - test_one['msg'] == "journal_entry created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_l2vpn.yml b/tests/integration/targets/v4.1/tasks/netbox_l2vpn.yml new file mode 100644 index 00000000..655be945 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_l2vpn.yml @@ -0,0 +1,99 @@ +--- +## +## +### NETBOX_L2VPN +## +## +- name: "L2VPN 1: Necessary info creation" + netbox.netbox.netbox_l2vpn: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test L2VPN + type: vxlan + state: present + register: test_one + +- name: "L2VPN 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['l2vpn']['name'] == "Test L2VPN" + - test_one['l2vpn']['type'] == "vxlan" + - test_one['msg'] == "l2vpn Test L2VPN created" + +- name: "L2VPN 2: Create duplicate" + netbox.netbox.netbox_l2vpn: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test L2VPN + type: vxlan + state: present + register: test_two + +- name: "L2VPN 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['l2vpn']['name'] == "Test L2VPN" + - test_two['l2vpn']['type'] == "vxlan" + - test_two['msg'] == "l2vpn Test L2VPN already exists" + +- name: "L2VPN 4: ASSERT - Update" + netbox.netbox.netbox_l2vpn: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test L2VPN + type: vxlan + tenant: Test Tenant + description: Updated description + import_targets: + - 4000:4000 + - 5000:5000 + export_targets: + - 6000:6000 + tags: + - Schnozzberry + state: present + register: test_four + +- name: "L2VPN: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['after']['description'] == "Updated description" + - test_four['diff']['after']['import_targets'] == [1, 2] + - test_four['diff']['after']['export_targets'] == [3] + - test_four['diff']['after']['tags'][0] == 4 + - test_four['l2vpn']['name'] == "Test L2VPN" + - test_four['l2vpn']['tenant'] == 1 + - test_four['l2vpn']['import_targets'] == [1, 2] + - test_four['l2vpn']['export_targets'] == [3] + - test_four['l2vpn']['description'] == "Updated description" + - test_four['l2vpn']['tags'][0] == 4 + - test_four['msg'] == "l2vpn Test L2VPN updated" + +- name: "L2VPN: ASSERT - Delete" + netbox.netbox.netbox_l2vpn: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test L2VPN + type: vxlan + state: absent + register: test_six + +- name: "L2VPN 6: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['l2vpn']['name'] == "Test L2VPN" + - test_six['l2vpn']['tenant'] == 1 + - test_six['l2vpn']['type'] == "vxlan" + - test_six['l2vpn']['description'] == "Updated description" + - test_six['l2vpn']['tags'][0] == 4 + - test_six['msg'] == "l2vpn Test L2VPN deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_l2vpn_termination.yml b/tests/integration/targets/v4.1/tasks/netbox_l2vpn_termination.yml new file mode 100644 index 00000000..0dd53994 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_l2vpn_termination.yml @@ -0,0 +1,94 @@ +--- +## +## +### NETBOX_L2VPN_TERMINATION +## +## +- name: "L2VPN_TERMINATION 1: Necessary info creation" + netbox.netbox.netbox_l2vpn_termination: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + l2vpn: 1 + assigned_object_type: dcim.interface + assigned_object_id: 1 + state: present + register: test_one + +- name: "L2VPN_TERMINATION 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['l2vpn_termination']['l2vpn'] == 1 + - test_one['l2vpn_termination']['assigned_object_type'] == "dcim.interface" + - test_one['l2vpn_termination']['assigned_object_id'] == 1 + - test_one['msg'] == "l2vpn_termination l2vpn 1 <> dcim.interface 1 created" + +- name: "L2VPN_TERMINATION 2: Create duplicate" + netbox.netbox.netbox_l2vpn_termination: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + l2vpn: 1 + assigned_object_type: dcim.interface + assigned_object_id: 1 + state: present + register: test_two + +- name: "L2VPN_TERMINATION 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['l2vpn_termination']['l2vpn'] == 1 + - test_two['l2vpn_termination']['assigned_object_type'] == "dcim.interface" + - test_two['l2vpn_termination']['assigned_object_id'] == 1 + - test_two['msg'] == "l2vpn_termination l2vpn 1 <> dcim.interface 1 already exists" + +- name: "L2VPN_TERMINATION 3: Update" + netbox.netbox.netbox_l2vpn_termination: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + l2vpn: 1 + assigned_object_type: dcim.interface + assigned_object_id: 1 + tags: + - Schnozzberry + state: present + register: test_three + +- name: "L2VPN_TERMINATION 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['tags'][0] == 4 + - test_three['l2vpn_termination']['l2vpn'] == 1 + - test_three['l2vpn_termination']['assigned_object_type'] == "dcim.interface" + - test_three['l2vpn_termination']['assigned_object_id'] == 1 + - test_three['l2vpn_termination']['tags'][0] == 4 + - test_three['msg'] == "l2vpn_termination l2vpn 1 <> dcim.interface 1 updated" + +- name: "L2VPN_TERMINATION 4: Delete" + netbox.netbox.netbox_l2vpn_termination: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + l2vpn: 1 + assigned_object_type: dcim.interface + assigned_object_id: 1 + state: absent + register: test_four + +- name: "L2VPN_TERMINATION 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['l2vpn_termination']['l2vpn'] == 1 + - test_four['l2vpn_termination']['assigned_object_type'] == "dcim.interface" + - test_four['l2vpn_termination']['assigned_object_id'] == 1 + - test_four['l2vpn_termination']['tags'][0] == 4 + - test_four['msg'] == "l2vpn_termination l2vpn 1 <> dcim.interface 1 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_location.yml b/tests/integration/targets/v4.1/tasks/netbox_location.yml new file mode 100644 index 00000000..2e37c768 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_location.yml @@ -0,0 +1,85 @@ +--- +## +## +### NETBOX_LOCATION +## +## +- name: "LOCATION 1: Necessary info creation" + netbox.netbox.netbox_location: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Location + site: Test Site + state: present + register: test_one + +- name: "LOCATION 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['location']['name'] == "Location" + - test_one['location']['slug'] == "location" + - test_one['location']['site'] == 1 + - test_one['msg'] == "location Location created" + +- name: "LOCATION 2: Create duplicate" + netbox.netbox.netbox_location: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Location + site: Test Site + state: present + register: test_two + +- name: "LOCATION 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['location']['name'] == "Location" + - test_two['location']['slug'] == "location" + - test_two['location']['site'] == 1 + - test_two['msg'] == "location Location already exists" + +- name: "LOCATION 3: Update" + netbox.netbox.netbox_location: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Location + parent_location: Parent Rack Group + description: This is a location + state: present + register: test_three + +- name: "LOCATION 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['parent'] == 2 + - test_three['diff']['after']['description'] == "This is a location" + - test_three['location']['name'] == "Location" + - test_three['location']['slug'] == "location" + - test_three['location']['parent'] == 2 + - test_three['location']['description'] == "This is a location" + - test_three['msg'] == "location Location updated" + +- name: "LOCATION 4: Delete" + netbox.netbox.netbox_location: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Location + state: absent + register: test_four + +- name: "LOCATION 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "location Location deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_lookup.yml b/tests/integration/targets/v4.1/tasks/netbox_lookup.yml new file mode 100644 index 00000000..3d54e02b --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_lookup.yml @@ -0,0 +1,90 @@ +--- +## +## +### NETBOX_LOOKUP +## +## +- name: "NETBOX_LOOKUP 1: Lookup returns exactly two sites" + ansible.builtin.assert: + that: query_result == "3" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'sites', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') | count }}" + +- name: "NETBOX_LOOKUP 2: Query doesn't return Wibble (sanity check json_query)" + ansible.builtin.assert: + that: query_result == "0" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') | community.general.json_query('[?value.display==`Wibble`]') + | count }}" + +- name: "NETBOX_LOOKUP 3: Device query returns exactly one TestDeviceR1" + ansible.builtin.assert: + that: query_result == "1" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') | community.general.json_query('[?value.display==`TestDeviceR1`]') + | count }}" + +- name: "NETBOX_LOOKUP 4: VLAN ID 400 can be queried and is named 'Test VLAN'" + ansible.builtin.assert: + that: query_result == 'Test VLAN' + vars: + query_result: "{{ (query('netbox.netbox.nb_lookup', 'vlans', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') | community.general.json_query('[?value.vid==`400`].value.name'))[0] + }}" + +- name: "NETBOX_LOOKUP 5: Add one of two devices for lookup filter test." + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: L1 + device_type: Cisco Test + device_role: Core Switch + site: Test Site + status: Staged + tags: + - nolookup + state: present + +- name: "NETBOX_LOOKUP 6: Add two of two devices for lookup filter test." + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: L2 + device_type: Cisco Test + device_role: Core Switch + site: Test Site2 + status: Staged + tags: + - lookup + state: present + +- name: "NETBOX_LOOKUP 7: Device query returns exactly the L2 device" + ansible.builtin.assert: + that: query_result == "1" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_filter='role=core-switch tag=lookup', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') + | community.general.json_query('[?value.display==`L2`]') | count }}" + +- name: "NETBOX_LOOKUP 8: Device query specifying raw data returns payload without key/value dict" + ansible.builtin.assert: + that: query_result == "1" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_filter='role=core-switch tag=lookup', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567', + raw_data=True) | community.general.json_query('[?display==`L2`]') | count }}" + +- name: "NETBOX_LOOKUP 9: Device query specifying multiple sites, Make sure L1 and L2 are in the results" + ansible.builtin.assert: + that: + - "'L1' in query_result" + - "'L2' in query_result" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_filter='role=core-switch site=test-site site=test-site2', api_endpoint='http://localhost:32768', + token='0123456789abcdef0123456789abcdef01234567', raw_data=True) | community.general.json_query('[*].display') }}" + +- name: "NETBOX_LOOKUP 10: Device query by ID" + ansible.builtin.assert: + that: query_result + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_filter='id=1', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') + }}" diff --git a/tests/integration/targets/v4.1/tasks/netbox_manufacturer.yml b/tests/integration/targets/v4.1/tasks/netbox_manufacturer.yml new file mode 100644 index 00000000..39804659 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_manufacturer.yml @@ -0,0 +1,91 @@ +--- +## +## +### NETBOX_MANUFACTURER +## +## +- name: "MANUFACTURER 1: Necessary info creation" + netbox.netbox.netbox_manufacturer: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Manufacturer Two + state: present + register: test_one + +- name: "MANUFACTURER 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['manufacturer']['name'] == "Test Manufacturer Two" + - test_one['manufacturer']['slug'] == "test-manufacturer-two" + - test_one['msg'] == "manufacturer Test Manufacturer Two created" + +- name: "MANUFACTURER 2: Create duplicate" + netbox.netbox.netbox_manufacturer: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Manufacturer Two + state: present + register: test_two + +- name: "MANUFACTURER 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['manufacturer']['name'] == "Test Manufacturer Two" + - test_two['manufacturer']['slug'] == "test-manufacturer-two" + - test_two['msg'] == "manufacturer Test Manufacturer Two already exists" + +- name: "MANUFACTURER 3: Update" + netbox.netbox.netbox_manufacturer: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test manufacturer two + state: present + register: test_three + +- name: "MANUFACTURER 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three['changed'] + - test_three['manufacturer']['name'] == "test manufacturer two" + - test_three['manufacturer']['slug'] == "test-manufacturer-two" + - test_three['msg'] == "manufacturer test manufacturer two updated" + +- name: "MANUFACTURER 4: ASSERT - Delete" + netbox.netbox.netbox_manufacturer: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: test manufacturer two + state: absent + register: test_four + +- name: "MANUFACTURER 3: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "manufacturer test manufacturer two deleted" + +- name: "MANUFACTURER 5: ASSERT - Delete non existing" + netbox.netbox.netbox_manufacturer: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Manufacturer Two + state: absent + register: test_five + +- name: "MANUFACTURER 5: ASSERT - Delete non existing" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['manufacturer'] == None + - test_five['msg'] == "manufacturer Test Manufacturer Two already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_module.yml b/tests/integration/targets/v4.1/tasks/netbox_module.yml new file mode 100644 index 00000000..0a18f389 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_module.yml @@ -0,0 +1,107 @@ +--- +## +## +### NETBOX_MODULE +## +## +- name: "MODULE 1: Necessary info creation" + netbox.netbox.netbox_module: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: C9300-DEMO + module_bay: Network Module + module_type: C9300-NM-8X + state: present + register: test_one + +- name: "MODULE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['module']['device'] == "C9300-DEMO" + - test_one['module']['module_bay'] == "Network Module" + - test_one['module']['module_type'] == "C9300-NM-8X" + - test_one['msg'] == "module ws-test-3750 created" + +- name: "MODULE 2: Create duplicate" + netbox.netbox.netbox_module: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: C9300-DEMO + module_bay: Network Module + module_type: C9300-NM-8X + state: present + register: test_two + +- name: "MODULE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['module']['device'] == "C9300-DEMO" + - test_two['module']['module_bay'] == "Network Module" + - test_two['module']['module_type'] == "C9300-NM-8X" + - test_two['msg'] == "module C9300-NM-8X already exists in slot Network Module of C9300-DEMO" + +- name: "MODULE 3: ASSERT - Update" + netbox.netbox.netbox_module: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: C9300-DEMO + module_bay: Network Module + module_type: C9300-NM-8X + serial: XXXNNNNXXXX + state: present + register: test_three + +- name: "MODULE 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['serial'] == "XXXNNNNXXXX" + - test_three['module']['device'] == "C9300-DEMO" + - test_three['module']['module_bay'] == "Network Module" + - test_three['module']['module_type'] == "C9300-NM-8X" + - test_three['module']['serial'] == "XXXNNNNXXXX" + - test_three['msg'] == "module C9300-DEMO - Network Module - C9300-NM-8X updated" + +- name: "MODULE 4: ASSERT - Delete" + netbox.netbox.netbox_module: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: C9300-DEMO + module_bay: Network Module + module_type: C9300-NM-8X + state: absent + register: test_four + +- name: "MODULE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "module C9300-NM-8X deleted in slot Network Module of C9300-DEMO" + +- name: "MODULE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_module: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: C9300-DEMO + module_bay: Network Module + module_type: C9300-NM-2Y + state: absent + register: test_five + +- name: "MODULE 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['module'] == None + - test_five['msg'] == "module Test Module Type already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_module_bay.yml b/tests/integration/targets/v4.1/tasks/netbox_module_bay.yml new file mode 100644 index 00000000..843a4767 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_module_bay.yml @@ -0,0 +1,105 @@ +--- +## +## +### NETBOX_MODULE_BAY +## +## +- name: "MODULE 1: Necessary info creation" + netbox.netbox.netbox_module_bay: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: C9300-DEMO + name: Network Module + position: 0 + state: present + register: test_one + +- name: "MODULE BAY 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['module_bay']['device'] == "C9300-DEMO" + - test_one['module_bay']['name'] == "Network Module" + - test_one['module_bay']['position'] == "0" + - test_one['msg'] == "module_bay Network Module in C9300-DEMO position 0 created" + +- name: "MODULE BAY 2: Create duplicate" + netbox.netbox.netbox_module_bay: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: C9300-DEMO + name: Network Module + position: 0 + state: present + register: test_two + +- name: "MODULE BAY 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['module_bay']['device'] == "C9300-DEMO" + - test_two['module_bay']['name'] == "Network Module" + - test_two['module_bay']['position'] == "0" + - test_two['msg'] == "module_bay Network Module in C9300-DEMO position 0 already exists" + +- name: "MODULE BAY 3: ASSERT - Update" + netbox.netbox.netbox_module_bay: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: C9300-DEMO + name: Network Module + position: 0 + label: TEST + state: present + register: test_three + +- name: "MODULE BAY 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['label'] == "TEST" + - test_three['module_bay']['device'] == "C9300-DEMO" + - test_three['module_bay']['name'] == "Network Module" + - test_three['module_bay']['position'] == "0" + - test_three['module_bay']['label'] == "TEST" + - test_three['msg'] == "module_bay Network Module in C9300-DEMO position 0 updated with label TEST" + +- name: "MODULE BAY 4: ASSERT - Delete" + netbox.netbox.netbox_module_bay: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: C9300-DEMO + name: Network Module + state: absent + register: test_four + +- name: "MODULE BAY 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "module_bay Network Module in C9300-DEMO position 0 deleted" + +- name: "MODULE BAY 5: ASSERT - Delete non existing" + netbox.netbox.netbox_module_bay: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: C9300-DEMO + name: Network Module + state: absent + register: test_five + +- name: "MODULE BAY 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['module_bay'] == None + - test_five['msg'] == "module_bay Network Module already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_module_type.yml b/tests/integration/targets/v4.1/tasks/netbox_module_type.yml new file mode 100644 index 00000000..8ab07780 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_module_type.yml @@ -0,0 +1,97 @@ +--- +## +## +### NETBOX_MODULE_TYPE +## +## +- name: "MODULE_TYPE 1: Necessary info creation" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + model: ws-test-3750 + manufacturer: Test Manufacturer + state: present + register: test_one + +- name: "MODULE_TYPE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['module_type']['model'] == "ws-test-3750" + - test_one['module_type']['manufacturer'] == 3 + - test_one['msg'] == "module_type ws-test-3750 created" + +- name: "MODULE_TYPE 2: Create duplicate" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + model: ws-test-3750 + manufacturer: Test Manufacturer + state: present + register: test_two + +- name: "MODULE_TYPE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_one['module_type']['model'] == "ws-test-3750" + - test_one['module_type']['manufacturer'] == 3 + - test_two['msg'] == "module_type ws-test-3750 already exists" + +- name: "MODULE_TYPE 3: ASSERT - Update" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + model: ws-test-3750 + manufacturer: Test Manufacturer + part_number: ws-3750g-v2 + state: present + register: test_three + +- name: "MODULE_TYPE 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['part_number'] == "ws-3750g-v2" + - test_three['module_type']['model'] == "ws-test-3750" + - test_three['module_type']['manufacturer'] == 3 + - test_three['module_type']['part_number'] == "ws-3750g-v2" + - test_three['msg'] == "module_type ws-test-3750 updated" + +- name: "MODULE_TYPE 4: ASSERT - Delete" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + model: ws-test-3750 + state: absent + register: test_four + +- name: "MODULE_TYPE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "module_type ws-test-3750 deleted" + +- name: "MODULE_TYPE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + model: Test Module Type + state: absent + register: test_five + +- name: "MODULE_TYPE 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['module_type'] == None + - test_five['msg'] == "module_type Test Module Type already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_permission.yml b/tests/integration/targets/v4.1/tasks/netbox_permission.yml new file mode 100644 index 00000000..86599114 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_permission.yml @@ -0,0 +1,169 @@ +--- +## +## +### NETBOX_PERMISSION +## +## +- name: "PERMISSION 1: Necessary info creation" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission + actions: + - view + object_types: [] + state: present + register: test_one + +- name: "PERMISSION 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['permission']['name'] == "Test Permission" + - test_one['msg'] == "permission Test Permission created" + +- name: "PERMISSION 2: Create duplicate" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission + actions: + - view + object_types: [] + state: present + register: test_two + +- name: "PERMISSION 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['permission']['name'] == "Test Permission" + - test_two['msg'] == "permission Test Permission already exists" + +- name: "PERMISSION 3: Update" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission + description: The test permission + enabled: false + actions: + - view + - add + - change + - delete + - extreme_administration + object_types: + - vpn.tunneltermination + - wireless.wirelesslan + constraints: + name: Foo + state: present + register: test_three + +- name: "PERMISSION 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "The test permission" + - test_three['permission']['name'] == "Test Permission" + - test_three['permission']['description'] == "The test permission" + - test_three['permission']['enabled'] == False + - test_three['permission']['actions'] == ["view", "add", "change", "delete", "extreme_administration"] + - test_three['permission']['object_types'] == ["vpn.tunneltermination", "wireless.wirelesslan"] + - test_three['permission']['constraints']["name"] == "Foo" + - test_three['msg'] == "permission Test Permission updated" + +- name: "PERMISSION 4: Create second permission" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission 2 + actions: + - view + object_types: [] + state: present + register: test_four + +- name: "PERMISSION 4: Create second permission" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['permission']['name'] == "Test Permission 2" + - test_four['msg'] == "permission Test Permission 2 created" + +- name: "PERMISSION 5: Add permission to group" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + permissions: + - Test Permission + state: present + register: test_five + +- name: "PERMISSION 5: ASSERT - Add permission to group" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['user_group']['permissions'] == [1] + +- name: "PERMISSION 6: Add permission to user" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword2 + permissions: + - Test Permission 2 + state: present + register: test_six + +- name: "PERMISSION 6: ASSERT - Add permission to user" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['user']['permissions'] == [2] + +- name: "PERMISSION 7: Delete" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission + state: absent + register: test_seven + +- name: "PERMISSION 7: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_seven is changed + - test_seven['diff']['before']['state'] == "present" + - test_seven['diff']['after']['state'] == "absent" + - test_seven['msg'] == "permission Test Permission deleted" + +- name: "PERMISSION 8: Delete non existing" + netbox.netbox.netbox_permission: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Permission + state: absent + register: test_eight + +- name: "PERMISSION 8: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_eight['changed'] + - test_eight['permission'] == None + - test_eight['msg'] == "permission Test Permission already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_platform.yml b/tests/integration/targets/v4.1/tasks/netbox_platform.yml new file mode 100644 index 00000000..8a36ef2c --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_platform.yml @@ -0,0 +1,92 @@ +--- +## +## +### NETBOX_PLATFORM +## +## +- name: "PLATFORM 1: Necessary info creation" + netbox.netbox.netbox_platform: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Platform + state: present + register: test_one + +- name: "PLATFORM 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['platform']['name'] == "Test Platform" + - test_one['platform']['slug'] == "test-platform" + - test_one['msg'] == "platform Test Platform created" + +- name: "PLATFORM 2: Create duplicate" + netbox.netbox.netbox_platform: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Platform + state: present + register: test_two + +- name: "PLATFORM 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['platform']['name'] == "Test Platform" + - test_two['platform']['slug'] == "test-platform" + - test_two['msg'] == "platform Test Platform already exists" + +- name: "PLATFORM 3: ASSERT - Update" + netbox.netbox.netbox_platform: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Platform + manufacturer: Test Manufacturer + state: present + register: test_three + +- name: "PLATFORM 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['manufacturer'] == 3 + - test_three['platform']['manufacturer'] == 3 + - test_three['msg'] == "platform Test Platform updated" + +- name: "PLATFORM 4: ASSERT - Delete" + netbox.netbox.netbox_platform: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Platform + state: absent + register: test_four + +- name: "PLATFORM 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "platform Test Platform deleted" + +- name: "PLATFORM 5: ASSERT - Delete non existing" + netbox.netbox.netbox_platform: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Platform + state: absent + register: test_five + +- name: "PLATFORM 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['platform'] == None + - test_five['msg'] == "platform Test Platform already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_power_feed.yml b/tests/integration/targets/v4.1/tasks/netbox_power_feed.yml new file mode 100644 index 00000000..f4ac71e0 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_power_feed.yml @@ -0,0 +1,126 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_FEED +## +## +- name: "POWER_FEED 1: Necessary info creation" + netbox.netbox.netbox_power_feed: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Feed + power_panel: Power Panel + state: present + register: test_one + +- name: "POWER_FEED 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_feed']['name'] == "Power Feed" + - test_one['power_feed']['power_panel'] == 1 + - test_one['msg'] == "power_feed Power Feed created" + +- name: "POWER_FEED 2: Create duplicate" + netbox.netbox.netbox_power_feed: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Feed + power_panel: Power Panel + state: present + register: test_two + +- name: "POWER_FEED 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['power_feed']['name'] == "Power Feed" + - test_two['power_feed']['power_panel'] == 1 + - test_two['msg'] == "power_feed Power Feed already exists" + +- name: "POWER_FEED 3: Update power_feed with other fields" + netbox.netbox.netbox_power_feed: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Feed + power_panel: Power Panel + status: offline + type: redundant + supply: dc + phase: three-phase + voltage: 400 + amperage: 32 + max_utilization: 25 + comments: totally normal power feed + state: present + register: test_three + +- name: "POWER_FEED 3: ASSERT - Update power_feed with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['status'] == "offline" + - test_three['diff']['after']['type'] == "redundant" + - test_three['diff']['after']['supply'] == "dc" + - test_three['diff']['after']['phase'] == "three-phase" + - test_three['diff']['after']['voltage'] == 400 + - test_three['diff']['after']['amperage'] == 32 + - test_three['diff']['after']['max_utilization'] == 25 + - test_three['diff']['after']['comments'] == "totally normal power feed" + - test_three['power_feed']['name'] == "Power Feed" + - test_three['power_feed']['power_panel'] == 1 + - test_three['power_feed']['status'] == "offline" + - test_three['power_feed']['type'] == "redundant" + - test_three['power_feed']['supply'] == "dc" + - test_three['power_feed']['phase'] == "three-phase" + - test_three['power_feed']['voltage'] == 400 + - test_three['power_feed']['amperage'] == 32 + - test_three['power_feed']['max_utilization'] == 25 + - test_three['power_feed']['comments'] == "totally normal power feed" + - test_three['msg'] == "power_feed Power Feed updated" + +- name: "POWER_FEED 4: Create Power Feed for Delete Test" + netbox.netbox.netbox_power_feed: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Feed 2 + power_panel: Power Panel + state: present + register: test_four + +- name: "POWER_FEED 4: ASSERT - Create Power Feed for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_feed']['name'] == "Power Feed 2" + - test_four['power_feed']['power_panel'] == 1 + - test_four['msg'] == "power_feed Power Feed 2 created" + +- name: "POWER_FEED 5: Delete Power Feed" + netbox.netbox.netbox_power_feed: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Feed 2 + power_panel: Power Panel + state: absent + register: test_five + +- name: "POWER_FEED 5: ASSERT - Delete Power Feed" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_feed Power Feed 2 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_power_outlet.yml b/tests/integration/targets/v4.1/tasks/netbox_power_outlet.yml new file mode 100644 index 00000000..84f9d325 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_power_outlet.yml @@ -0,0 +1,114 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_OUTLET +## +## +- name: "POWER_OUTLET 1: Necessary info creation" + netbox.netbox.netbox_power_outlet: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Outlet + device: Device Power Tests + state: present + register: test_one + +- name: "POWER_OUTLET 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_outlet']['name'] == "Power Outlet" + - test_one['power_outlet']['device'] == 10 + - test_one['msg'] == "power_outlet Power Outlet created" + +- name: "POWER_OUTLET 2: Create duplicate" + netbox.netbox.netbox_power_outlet: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Outlet + device: Device Power Tests + state: present + register: test_two + +- name: "POWER_OUTLET 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['power_outlet']['name'] == "Power Outlet" + - test_two['power_outlet']['device'] == 10 + - test_two['msg'] == "power_outlet Power Outlet already exists" + +- name: "POWER_OUTLET 3: Update power_outlet with other fields" + netbox.netbox.netbox_power_outlet: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Outlet + device: Device Power Tests + type: ita-e + power_port: Power Port + feed_leg: B + description: test description + state: present + register: test_three + +- name: "POWER_OUTLET 3: ASSERT - Update power_outlet with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "ita-e" + - test_three['diff']['after']['power_port'] == 1 + - test_three['diff']['after']['feed_leg'] == "B" + - test_three['diff']['after']['description'] == "test description" + - test_three['power_outlet']['name'] == "Power Outlet" + - test_three['power_outlet']['device'] == 10 + - test_three['power_outlet']['type'] == "ita-e" + - test_three['power_outlet']['power_port'] == 1 + - test_three['power_outlet']['feed_leg'] == "B" + - test_three['power_outlet']['description'] == "test description" + - test_three['msg'] == "power_outlet Power Outlet updated" + +- name: "POWER_OUTLET 4: Create Power Outlet for Delete Test" + netbox.netbox.netbox_power_outlet: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Outlet 2 + device: Device Power Tests + state: present + register: test_four + +- name: "POWER_OUTLET 4: ASSERT - Create Power Outlet for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_outlet']['name'] == "Power Outlet 2" + - test_four['power_outlet']['device'] == 10 + - test_four['msg'] == "power_outlet Power Outlet 2 created" + +- name: "POWER_OUTLET 5: Delete Power Outlet" + netbox.netbox.netbox_power_outlet: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Outlet 2 + device: Device Power Tests + state: absent + register: test_five + +- name: "POWER_OUTLET 5: ASSERT - Delete Power Outlet" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_outlet Power Outlet 2 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_power_outlet_template.yml b/tests/integration/targets/v4.1/tasks/netbox_power_outlet_template.yml new file mode 100644 index 00000000..14ff49d0 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_power_outlet_template.yml @@ -0,0 +1,111 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_OUTLET_TEMPLATE +## +## +- name: "POWER_OUTLET_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_power_outlet_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Outlet Template + device_type: Device Type Power Tests + state: present + register: test_one + +- name: "POWER_OUTLET_TEMPLATE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_outlet_template']['name'] == "Power Outlet Template" + - test_one['power_outlet_template']['device_type'] == 8 + - test_one['msg'] == "power_outlet_template Power Outlet Template created" + +- name: "POWER_OUTLET_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_power_outlet_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Outlet Template + device_type: Device Type Power Tests + state: present + register: test_two + +- name: "POWER_OUTLET_TEMPLATE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['power_outlet_template']['name'] == "Power Outlet Template" + - test_two['power_outlet_template']['device_type'] == 8 + - test_two['msg'] == "power_outlet_template Power Outlet Template already exists" + +- name: "POWER_OUTLET_TEMPLATE 3: Update power_outlet_template with other fields" + netbox.netbox.netbox_power_outlet_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Outlet Template + device_type: Device Type Power Tests + type: ita-e + power_port_template: Power Port Template + feed_leg: B + state: present + register: test_three + +- name: "POWER_OUTLET_TEMPLATE 3: ASSERT - Update power_outlet_template with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "ita-e" + - test_three['diff']['after']['power_port'] == 1 + - test_three['diff']['after']['feed_leg'] == "B" + - test_three['power_outlet_template']['name'] == "Power Outlet Template" + - test_three['power_outlet_template']['device_type'] == 8 + - test_three['power_outlet_template']['type'] == "ita-e" + - test_three['power_outlet_template']['power_port'] == 1 + - test_three['power_outlet_template']['feed_leg'] == "B" + - test_three['msg'] == "power_outlet_template Power Outlet Template updated" + +- name: "POWER_OUTLET_TEMPLATE 4: Create Power Outlet Template for Delete Test" + netbox.netbox.netbox_power_outlet_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Outlet Template 2 + device_type: Device Type Power Tests + state: present + register: test_four + +- name: "POWER_OUTLET_TEMPLATE 4: ASSERT - Create Power Outlet Template for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_outlet_template']['name'] == "Power Outlet Template 2" + - test_four['power_outlet_template']['device_type'] == 8 + - test_four['msg'] == "power_outlet_template Power Outlet Template 2 created" + +- name: "POWER_OUTLET_TEMPLATE 5: Delete Power Outlet Template" + netbox.netbox.netbox_power_outlet_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Outlet Template 2 + device_type: Device Type Power Tests + state: absent + register: test_five + +- name: "POWER_OUTLET_TEMPLATE 5: ASSERT - Delete Power Outlet Template" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_outlet_template Power Outlet Template 2 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_power_panel.yml b/tests/integration/targets/v4.1/tasks/netbox_power_panel.yml new file mode 100644 index 00000000..e568a75f --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_power_panel.yml @@ -0,0 +1,105 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_PANEL +## +## +- name: "POWER_PANEL 1: Necessary info creation" + netbox.netbox.netbox_power_panel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Panel + site: Test Site + state: present + register: test_one + +- name: "POWER_PANEL 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_panel']['name'] == "Power Panel" + - test_one['power_panel']['site'] == 1 + - test_one['msg'] == "power_panel Power Panel created" + +- name: "POWER_PANEL 2: Create duplicate" + netbox.netbox.netbox_power_panel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Panel + site: Test Site + state: present + register: test_two + +- name: "POWER_PANEL 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['power_panel']['name'] == "Power Panel" + - test_two['power_panel']['site'] == 1 + - test_two['msg'] == "power_panel Power Panel already exists" + +- name: "POWER_PANEL 3: Update power_panel with other fields" + netbox.netbox.netbox_power_panel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Panel + site: Test Site + location: Test Rack Group + state: present + register: test_three + +- name: "POWER_PANEL 3: ASSERT - Update power_panel with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['location'] == 1 + - test_three['power_panel']['name'] == "Power Panel" + - test_three['power_panel']['site'] == 1 + - test_three['power_panel']['location'] == 1 + - test_three['msg'] == "power_panel Power Panel updated" + +- name: "POWER_PANEL 4: Create Power Panel for Delete Test" + netbox.netbox.netbox_power_panel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Panel 2 + site: Test Site + state: present + register: test_four + +- name: "POWER_PANEL 4: ASSERT - Create Power Panel for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_panel']['name'] == "Power Panel 2" + - test_four['power_panel']['site'] == 1 + - test_four['msg'] == "power_panel Power Panel 2 created" + +- name: "POWER_PANEL 5: Delete Power Panel" + netbox.netbox.netbox_power_panel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Panel 2 + site: Test Site + state: absent + register: test_five + +- name: "POWER_PANEL 5: ASSERT - Delete Power Panel" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_panel Power Panel 2 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_power_port.yml b/tests/integration/targets/v4.1/tasks/netbox_power_port.yml new file mode 100644 index 00000000..311820cc --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_power_port.yml @@ -0,0 +1,125 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_PORT +## +## +- name: "POWER_PORT 0: Create device for testing power ports" + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Device Power Tests + device_type: Cisco Test + device_role: Core Switch + site: Test Site + state: present + +- name: "POWER_PORT 1: Necessary info creation" + netbox.netbox.netbox_power_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Port + device: Device Power Tests + state: present + register: test_one + +- name: "POWER_PORT 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_port']['name'] == "Power Port" + - test_one['power_port']['device'] == 10 + - test_one['msg'] == "power_port Power Port created" + +- name: "POWER_PORT 2: Create duplicate" + netbox.netbox.netbox_power_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Port + device: Device Power Tests + state: present + register: test_two + +- name: "POWER_PORT 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['power_port']['name'] == "Power Port" + - test_two['power_port']['device'] == 10 + - test_two['msg'] == "power_port Power Port already exists" + +- name: "POWER_FEED 3: Update power_port with other fields" + netbox.netbox.netbox_power_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Port + device: Device Power Tests + type: ita-e + allocated_draw: 10 + maximum_draw: 20 + description: test description + state: present + register: test_three + +- name: "POWER_FEED 3: ASSERT - Update power_port with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "ita-e" + - test_three['diff']['after']['allocated_draw'] == 10 + - test_three['diff']['after']['maximum_draw'] == 20 + - test_three['diff']['after']['description'] == "test description" + - test_three['power_port']['name'] == "Power Port" + - test_three['power_port']['device'] == 10 + - test_three['power_port']['type'] == "ita-e" + - test_three['power_port']['allocated_draw'] == 10 + - test_three['power_port']['maximum_draw'] == 20 + - test_three['power_port']['description'] == "test description" + - test_three['msg'] == "power_port Power Port updated" + +- name: "POWER_PORT 4: Create Power Port for Delete Test" + netbox.netbox.netbox_power_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Port 2 + device: Device Power Tests + state: present + register: test_four + +- name: "POWER_PORT 4: ASSERT - Create Power Port for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_port']['name'] == "Power Port 2" + - test_four['power_port']['device'] == 10 + - test_four['msg'] == "power_port Power Port 2 created" + +- name: "POWER_PORT 5: Delete Power Port" + netbox.netbox.netbox_power_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Port 2 + device: Device Power Tests + state: absent + register: test_five + +- name: "POWER_PORT 5: ASSERT - Delete Power Port" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_port Power Port 2 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_power_port_template.yml b/tests/integration/targets/v4.1/tasks/netbox_power_port_template.yml new file mode 100644 index 00000000..b413c29c --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_power_port_template.yml @@ -0,0 +1,212 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_PORT_TEMPLATE +## +## +- name: "POWER_PORT_TEMPLATE 0.1: Create device type for testing power ports on device types" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + model: Device Type Power Tests + manufacturer: Test Manufacturer + state: present + +- name: "POWER_PORT_TEMPLATE 0.2: Create module type for testing power ports on module types" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + model: Module Type Power Tests + manufacturer: Test Manufacturer + state: present + +- name: "POWER_PORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Port Template + device_type: Device Type Power Tests + state: present + register: test_one + +- name: "POWER_PORT_TEMPLATE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_port_template']['name'] == "Power Port Template" + - test_one['power_port_template']['device_type'] == 8 + - test_one['msg'] == "power_port_template Power Port Template created" + +- name: "POWER_PORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Port Template + device_type: Device Type Power Tests + state: present + register: test_two + +- name: "POWER_PORT_TEMPLATE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['power_port_template']['name'] == "Power Port Template" + - test_two['power_port_template']['device_type'] == 8 + - test_two['msg'] == "power_port_template Power Port Template already exists" + +- name: "POWER_PORT_TEMPLATE 3: Update power_port_template with other fields" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Port Template + device_type: Device Type Power Tests + type: ita-e + allocated_draw: 10 + maximum_draw: 20 + state: present + register: test_three + +- name: "POWER_PORT_TEMPLATE 3: ASSERT - Update power_port_template with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "ita-e" + - test_three['diff']['after']['allocated_draw'] == 10 + - test_three['diff']['after']['maximum_draw'] == 20 + - test_three['power_port_template']['name'] == "Power Port Template" + - test_three['power_port_template']['device_type'] == 8 + - test_three['power_port_template']['type'] == "ita-e" + - test_three['power_port_template']['allocated_draw'] == 10 + - test_three['power_port_template']['maximum_draw'] == 20 + - test_three['msg'] == "power_port_template Power Port Template updated" + +- name: "POWER_PORT_TEMPLATE 4: Create Power Port Template for Delete Test" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Port Template 2 + device_type: Device Type Power Tests + state: present + register: test_four + +- name: "POWER_PORT_TEMPLATE 4: ASSERT - Create Power Port Template for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_port_template']['name'] == "Power Port Template 2" + - test_four['power_port_template']['device_type'] == 8 + - test_four['msg'] == "power_port_template Power Port Template 2 created" + +- name: "POWER_PORT_TEMPLATE 5: Delete Power Port Template" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Power Port Template 2 + device_type: Device Type Power Tests + state: absent + register: test_five + +- name: "POWER_PORT_TEMPLATE 5: ASSERT - Delete Power Port Template" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_port_template Power Port Template 2 deleted" + +- name: "POWER_PORT_TEMPLATE 6: Necessary info creation" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Module Power Port Template + module_type: Module Type Power Tests + state: present + register: test_six + +- name: "POWER_PORT_TEMPLATE 6: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['power_port_template']['name'] == "Module Power Port Template" + - test_six['power_port_template']['module_type'] == 1 + - test_six['msg'] == "power_port_template Module Power Port Template created" + +- name: "POWER_PORT_TEMPLATE 7: Create duplicate" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Module Power Port Template + module_type: Module Type Power Tests + state: present + register: test_seven + +- name: "POWER_PORT_TEMPLATE 7: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_seven['changed'] + - test_seven['power_port_template']['name'] == "Module Power Port Template" + - test_seven['power_port_template']['module_type'] == 1 + - test_seven['msg'] == "power_port_template Module Power Port Template already exists" + +- name: "POWER_PORT_TEMPLATE 8: Update power_port_template with other fields" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Module Power Port Template + module_type: Module Type Power Tests + type: ita-e + allocated_draw: 10 + maximum_draw: 20 + state: present + register: test_eight + +- name: "POWER_PORT_TEMPLATE 8: ASSERT - Update power_port_template with other fields" + ansible.builtin.assert: + that: + - test_eight is changed + - test_eight['diff']['after']['type'] == "ita-e" + - test_eight['diff']['after']['allocated_draw'] == 10 + - test_eight['diff']['after']['maximum_draw'] == 20 + - test_eight['power_port_template']['name'] == "Module Power Port Template" + - test_eight['power_port_template']['module_type'] == 1 + - test_eight['power_port_template']['type'] == "ita-e" + - test_eight['power_port_template']['allocated_draw'] == 10 + - test_eight['power_port_template']['maximum_draw'] == 20 + - test_eight['msg'] == "power_port_template Module Power Port Template updated" + +- name: "POWER_PORT_TEMPLATE 9: Delete Power Port Template" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Module Power Port Template + module_type: Module Type Power Tests + state: absent + register: test_nine + +- name: "POWER_PORT_TEMPLATE 9: ASSERT - Delete Power Port Template" + ansible.builtin.assert: + that: + - test_nine is changed + - test_nine['diff']['before']['state'] == "present" + - test_nine['diff']['after']['state'] == "absent" + - test_nine['msg'] == "power_port_template Module Power Port Template deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_prefix.yml b/tests/integration/targets/v4.1/tasks/netbox_prefix.yml new file mode 100644 index 00000000..64adae85 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_prefix.yml @@ -0,0 +1,245 @@ +--- +## +## +### NETBOX_PREFIX +## +## +- name: 1 - Create prefix within NetBox with only required information + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 10.156.0.0/19 + state: present + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['msg'] == "prefix 10.156.0.0/19 created" + - test_one['prefix']['prefix'] == "10.156.0.0/19" + +- name: 2 - Duplicate + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 10.156.0.0/19 + state: present + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['msg'] == "prefix 10.156.0.0/19 already exists" + - test_two['prefix']['prefix'] == "10.156.0.0/19" + +- name: 3 - Update 10.156.0.0/19 + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 10.156.0.0/19 + site: Test Site + status: Reserved + description: This prefix has been updated + state: present + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['site'] == 1 + - test_three['diff']['after']['status'] == "reserved" + - test_three['diff']['after']['description'] == "This prefix has been updated" + - test_three['msg'] == "prefix 10.156.0.0/19 updated" + - test_three['prefix']['prefix'] == "10.156.0.0/19" + - test_three['prefix']['site'] == 1 + - test_three['prefix']['status'] == "reserved" + - test_three['prefix']['description'] == "This prefix has been updated" + +- name: 4 - Delete prefix within netbox + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 10.156.0.0/19 + state: absent + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "prefix 10.156.0.0/19 deleted" + +- name: 5 - Create prefix with several specified options + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + family: 4 + prefix: 10.156.32.0/19 + site: Test Site + vrf: Test VRF + tenant: Test Tenant + vlan: + name: Test VLAN + site: Test Site + tenant: Test Tenant + vlan_group: Test Vlan Group + status: Reserved + prefix_role: Network of care + description: Test description + is_pool: true + tags: + - Schnozzberry + state: present + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['msg'] == "prefix 10.156.32.0/19 created" + - test_five['prefix']['prefix'] == "10.156.32.0/19" + - test_five['prefix']['family'] == 4 + - test_five['prefix']['site'] == 1 + - test_five['prefix']['vrf'] == 1 + - test_five['prefix']['tenant'] == 1 + - test_five['prefix']['vlan'] == 4 + - test_five['prefix']['status'] == "reserved" + - test_five['prefix']['role'] == 1 + - test_five['prefix']['description'] == "Test description" + - test_five['prefix']['is_pool'] == true + - test_five['prefix']['tags'][0] == 4 + +- name: 6 - Get a new /24 inside 10.156.0.0/19 within NetBox - Parent doesn't exist + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + parent: 10.156.0.0/19 + prefix_length: 24 + state: present + first_available: true + register: test_six + +- name: 6 - ASSERT + ansible.builtin.assert: + that: + - not test_six['changed'] + - test_six['msg'] == "Parent prefix does not exist - 10.156.0.0/19" + +- name: 7 - Create prefix within NetBox with only required information + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 10.156.0.0/19 + state: present + register: test_seven + +- name: 7 - ASSERT + ansible.builtin.assert: + that: + - test_seven is changed + - test_seven['diff']['before']['state'] == "absent" + - test_seven['diff']['after']['state'] == "present" + - test_seven['msg'] == "prefix 10.156.0.0/19 created" + - test_seven['prefix']['prefix'] == "10.156.0.0/19" + +- name: 8 - Get a new /24 inside 10.156.0.0/19 within NetBox + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + parent: 10.156.0.0/19 + prefix_length: 24 + state: present + first_available: true + register: test_eight + +- name: 8 - ASSERT + ansible.builtin.assert: + that: + - test_eight is changed + - test_eight['diff']['before']['state'] == "absent" + - test_eight['diff']['after']['state'] == "present" + - test_eight['msg'] == "prefix 10.156.0.0/24 created" + - test_eight['prefix']['prefix'] == "10.156.0.0/24" + +- name: 9 - Create 10.157.0.0/19 + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + prefix: 10.157.0.0/19 + vrf: Test VRF + site: Test Site + state: present + register: test_nine + +- name: 9 - ASSERT + ansible.builtin.assert: + that: + - test_nine is changed + - test_nine['diff']['before']['state'] == "absent" + - test_nine['diff']['after']['state'] == "present" + - test_nine['msg'] == "prefix 10.157.0.0/19 created" + - test_nine['prefix']['prefix'] == "10.157.0.0/19" + - test_nine['prefix']['site'] == 1 + - test_nine['prefix']['vrf'] == 1 + +- name: 10 - Get a new /24 inside 10.157.0.0/19 within NetBox with additional values + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + parent: 10.157.0.0/19 + prefix_length: 24 + vrf: Test VRF + site: Test Site + state: present + first_available: true + register: test_ten + +- name: 10 - ASSERT + ansible.builtin.assert: + that: + - test_ten is changed + - test_ten['diff']['before']['state'] == "absent" + - test_ten['diff']['after']['state'] == "present" + - test_ten['msg'] == "prefix 10.157.0.0/24 created" + - test_ten['prefix']['prefix'] == "10.157.0.0/24" + - test_ten['prefix']['site'] == 1 + - test_ten['prefix']['vrf'] == 1 + +- name: 11 - Get a new /24 inside 10.156.0.0/19 within NetBox + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + parent: 10.156.0.0/19 + prefix_length: 24 + state: present + first_available: true + register: test_eleven + +- name: 11 - ASSERT + ansible.builtin.assert: + that: + - test_eleven is changed + - test_eleven['diff']['before']['state'] == "absent" + - test_eleven['diff']['after']['state'] == "present" + - test_eleven['msg'] == "prefix 10.156.1.0/24 created" + - test_eleven['prefix']['prefix'] == "10.156.1.0/24" diff --git a/tests/integration/targets/v4.1/tasks/netbox_provider.yml b/tests/integration/targets/v4.1/tasks/netbox_provider.yml new file mode 100644 index 00000000..ec7b2c30 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_provider.yml @@ -0,0 +1,79 @@ +--- +## +## +### NETBOX_PROVIDER +## +## +- name: "NETBOX_PROVIDER 1: Create provider within NetBox with only required information" + netbox.netbox.netbox_provider: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Provider One + state: present + register: test_one + +- name: "NETBOX_PROVIDER 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['provider']['name'] == "Test Provider One" + - test_one['provider']['slug'] == "test-provider-one" + - test_one['msg'] == "provider Test Provider One created" + +- name: "NETBOX_PROVIDER 2: Duplicate" + netbox.netbox.netbox_provider: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Provider One + state: present + register: test_two + +- name: "NETBOX_PROVIDER 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['provider']['name'] == "Test Provider One" + - test_two['provider']['slug'] == "test-provider-one" + - test_two['msg'] == "provider Test Provider One already exists" + +- name: "NETBOX_PROVIDER 3: Update provider with other fields" + netbox.netbox.netbox_provider: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Provider One + comments: BAD PROVIDER + state: present + register: test_three + +- name: "NETBOX_PROVIDER 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['comments'] == "BAD PROVIDER" + - test_three['provider']['name'] == "Test Provider One" + - test_three['provider']['slug'] == "test-provider-one" + - test_three['provider']['comments'] == "BAD PROVIDER" + - test_three['msg'] == "provider Test Provider One updated" + +- name: "NETBOX_PROVIDER 4: Delete provider within netbox" + netbox.netbox.netbox_provider: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Provider One + state: absent + register: test_four + +- name: "NETBOX_PROVIDER 4 : ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['provider']['name'] == "Test Provider One" + - test_four['provider']['slug'] == "test-provider-one" + - test_four['provider']['comments'] == "BAD PROVIDER" + - test_four['msg'] == "provider Test Provider One deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_provider_network.yml b/tests/integration/targets/v4.1/tasks/netbox_provider_network.yml new file mode 100644 index 00000000..6f8b2b33 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_provider_network.yml @@ -0,0 +1,83 @@ +--- +## +## +### NETBOX_PROVIDER +## +## +- name: "NETBOX_PROVIDER_NETWORK 1: Create provider network within NetBox with only required information" + netbox.netbox.netbox_provider_network: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + provider: Test Provider + name: Test Provider Network One + state: present + register: test_one + +- name: "NETBOX_PROVIDER_NETWORK 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['provider_network']['name'] == "Test Provider Network One" + - test_one['msg'] == "provider_network Test Provider Network One created" + +- name: "NETBOX_PROVIDER_NETWORK 2: Duplicate" + netbox.netbox.netbox_provider_network: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + provider: Test Provider + name: Test Provider Network One + state: present + register: test_two + +- name: "NETBOX_PROVIDER_NETWORK 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['provider_network']['name'] == "Test Provider Network One" + - test_two['msg'] == "provider_network Test Provider Network One already exists" + +- name: "NETBOX_PROVIDER_NETWORK 3: Update provider network with other fields" + netbox.netbox.netbox_provider_network: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + provider: Test Provider + name: Test Provider Network One + description: Describe a Provider Network + comments: A provider network + state: present + register: test_three + +- name: "NETBOX_PROVIDER_NETWORK 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['comments'] == "A provider network" + - test_three['diff']['after']['description'] == "Describe a Provider Network" + - test_three['provider_network']['name'] == "Test Provider Network One" + - test_three['provider_network']['comments'] == "A provider network" + - test_three['provider_network']['description'] == "Describe a Provider Network" + - test_three['msg'] == "provider_network Test Provider Network One updated" + +- name: "NETBOX_PROVIDER_NETWORK 4: Delete provider within netbox" + netbox.netbox.netbox_provider_network: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + provider: Test Provider + name: Test Provider Network One + state: absent + register: test_four + +- name: "NETBOX_PROVIDER_NETWORK 4 : ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['provider_network']['name'] == "Test Provider Network One" + - test_four['provider_network']['comments'] == "A provider network" + - test_four['provider_network']['description'] == "Describe a Provider Network" + - test_four['msg'] == "provider_network Test Provider Network One deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_rack.yml b/tests/integration/targets/v4.1/tasks/netbox_rack.yml new file mode 100644 index 00000000..59d97fa5 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_rack.yml @@ -0,0 +1,226 @@ +--- +## +## +### NETBOX_RACK +## +## +- name: 1 - Test rack creation + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test rack one + site: Test Site + location: Test Rack Group + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rack']['name'] == "Test rack one" + - test_one['rack']['site'] == 1 + +- name: Test duplicate rack + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test rack one + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['rack']['name'] == "Test rack one" + - test_two['rack']['site'] == 1 + - test_two['msg'] == "rack Test rack one already exists" + +- name: 3 - Create new rack with similar name + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test rack - Test Site + site: Test Site + state: present + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['rack']['name'] == "Test rack - Test Site" + - test_three['rack']['site'] == 1 + - test_three['msg'] == "rack Test rack - Test Site created" + +- name: 4 - Attempt to create Test rack one again + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test rack one + site: Test Site + location: Test Rack Group + state: present + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - not test_four['changed'] + - test_four['rack']['name'] == "Test rack one" + - test_four['rack']['site'] == 1 + - test_four['msg'] == "rack Test rack one already exists" + +- name: 5 - Update Test rack one with more options + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test rack one + site: Test Site + rack_role: Test Rack Role + location: Test Rack Group + facility_id: EQUI10291 + tenant: Test Tenant + status: Available + serial: FXS10001 + asset_tag: "1234" + width: 23 + u_height: 48 + type: 2-post frame + outer_width: 32 + outer_depth: 24 + outer_unit: Inches + comments: Just testing rack module + tags: + - Schnozzberry + state: present + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['after']['asset_tag'] == "1234" + - test_five['diff']['after']['comments'] == "Just testing rack module" + - test_five['diff']['after']['facility_id'] == "EQUI10291" + - test_five['diff']['after']['outer_depth'] == 24 + - test_five['diff']['after']['outer_unit'] == "in" + - test_five['diff']['after']['outer_width'] == 32 + - test_five['diff']['after']['role'] == 1 + - test_five['diff']['after']['serial'] == "FXS10001" + - test_five['diff']['after']['status'] == "available" + - test_five['diff']['after']['tenant'] == 1 + - test_five['diff']['after']['tags'][0] == 4 + - test_five['diff']['after']['form_factor'] == "2-post-frame" + - test_five['diff']['after']['u_height'] == 48 + - test_five['diff']['after']['width'] == 23 + - test_five['rack']['name'] == "Test rack one" + - test_five['rack']['site'] == 1 + - test_five['rack']['asset_tag'] == "1234" + - test_five['rack']['comments'] == "Just testing rack module" + - test_five['rack']['facility_id'] == "EQUI10291" + - test_five['rack']['location'] == 1 + - test_five['rack']['outer_depth'] == 24 + - test_five['rack']['outer_unit'] == "in" + - test_five['rack']['outer_width'] == 32 + - test_five['rack']['role'] == 1 + - test_five['rack']['serial'] == "FXS10001" + - test_five['rack']['status'] == "available" + - test_five['rack']['tenant'] == 1 + - test_five['rack']['tags'][0] == 4 + - test_five['rack']['form_factor'] == "2-post-frame" + - test_five['rack']['u_height'] == 48 + - test_five['rack']['width'] == 23 + - test_five['msg'] == "rack Test rack one updated" + +- name: 6 - Update Test rack one with same options + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test rack one + site: Test Site + rack_role: Test Rack Role + location: Test Rack Group + facility_id: EQUI10291 + tenant: Test Tenant + status: Available + serial: FXS10001 + asset_tag: "1234" + width: 23 + u_height: 48 + type: 2-post frame + outer_width: 32 + outer_depth: 24 + outer_unit: Inches + comments: Just testing rack module + tags: + - Schnozzberry + state: present + register: test_six + +- name: 6 - ASSERT + ansible.builtin.assert: + that: + - test_six is not changed + - test_six['rack']['name'] == "Test rack one" + - test_six['rack']['site'] == 1 + - test_six['rack']['asset_tag'] == "1234" + - test_six['rack']['comments'] == "Just testing rack module" + - test_six['rack']['facility_id'] == "EQUI10291" + - test_six['rack']['location'] == 1 + - test_six['rack']['outer_depth'] == 24 + - test_six['rack']['outer_unit'] == "in" + - test_six['rack']['outer_width'] == 32 + - test_six['rack']['role'] == 1 + - test_six['rack']['serial'] == "FXS10001" + - test_six['rack']['status'] == "available" + - test_six['rack']['tenant'] == 1 + - test_six['rack']['tags'][0] == 4 + - test_six['rack']['form_factor'] == "2-post-frame" + - test_six['rack']['u_height'] == 48 + - test_six['rack']['width'] == 23 + +- name: 7 - Create rack with same asset tag and serial number + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test rack two + site: Test Site + serial: FXS10001 + asset_tag: "1234" + state: present + ignore_errors: true + register: test_seven + +- name: 7 - ASSERT + ansible.builtin.assert: + that: + - test_seven is failed + - "'asset tag already exists' in test_seven['msg']" + +- name: 8 - Test delete + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test rack one + state: absent + register: test_eight + +- name: 8 - ASSERT + ansible.builtin.assert: + that: + - test_eight is changed + - test_eight['diff']['before']['state'] == "present" + - test_eight['diff']['after']['state'] == "absent" + - test_eight['msg'] == "rack Test rack one deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_rack_group.yml b/tests/integration/targets/v4.1/tasks/netbox_rack_group.yml new file mode 100644 index 00000000..40dba840 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_rack_group.yml @@ -0,0 +1,62 @@ +--- +## +## +### NETBOX_RACK_GROUP +## +## +- name: "RACK_GROUP 1: Necessary info creation" + netbox.netbox.netbox_rack_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rack Group + site: Test Site + state: present + register: test_one + +- name: "RACK_GROUP 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rack_group']['name'] == "Rack Group" + - test_one['rack_group']['slug'] == "rack-group" + - test_one['rack_group']['site'] == 1 + - test_one['msg'] == "rack_group Rack Group created" + +- name: "RACK_GROUP 2: Create duplicate" + netbox.netbox.netbox_rack_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rack Group + site: Test Site + state: present + register: test_two + +- name: "RACK_GROUP 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['rack_group']['name'] == "Rack Group" + - test_two['rack_group']['slug'] == "rack-group" + - test_two['rack_group']['site'] == 1 + - test_two['msg'] == "rack_group Rack Group already exists" + +- name: "RACK_GROUP 3: ASSERT - Delete" + netbox.netbox.netbox_rack_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rack Group + state: absent + register: test_three + +- name: "RACK_GROUP 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "present" + - test_three['diff']['after']['state'] == "absent" + - test_three['msg'] == "rack_group Rack Group deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_rack_role.yml b/tests/integration/targets/v4.1/tasks/netbox_rack_role.yml new file mode 100644 index 00000000..ff0d6b4d --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_rack_role.yml @@ -0,0 +1,81 @@ +--- +## +## +### NETBOX_RACK_ROLE +## +## +- name: "RACK_ROLE 1: Necessary info creation" + netbox.netbox.netbox_rack_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rack Role + color: ffffff + state: present + register: test_one + +- name: "RACK_ROLE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rack_role']['name'] == "Rack Role" + - test_one['rack_role']['slug'] == "rack-role" + - test_one['rack_role']['color'] == "ffffff" + - test_one['msg'] == "rack_role Rack Role created" + +- name: "RACK_ROLE 2: Create duplicate" + netbox.netbox.netbox_rack_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rack Role + state: present + register: test_two + +- name: "RACK_ROLE 1: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['rack_role']['name'] == "Rack Role" + - test_two['rack_role']['slug'] == "rack-role" + - test_two['rack_role']['color'] == "ffffff" + - test_two['msg'] == "rack_role Rack Role already exists" + +- name: "RACK_ROLE 3: Update" + netbox.netbox.netbox_rack_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rack Role + color: "003EFF" + state: present + register: test_three + +- name: "RACK_ROLE 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['color'] == "003eff" + - test_three['rack_role']['name'] == "Rack Role" + - test_three['rack_role']['slug'] == "rack-role" + - test_three['rack_role']['color'] == "003eff" + - test_three['msg'] == "rack_role Rack Role updated" + +- name: "RACK_ROLE 4: Delete" + netbox.netbox.netbox_rack_role: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rack Role + state: absent + register: test_four + +- name: "RACK_ROLE 4: ASSERT - Update" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "rack_role Rack Role deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_rear_port.yml b/tests/integration/targets/v4.1/tasks/netbox_rear_port.yml new file mode 100644 index 00000000..d186233b --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_rear_port.yml @@ -0,0 +1,139 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_REAR_PORT +## +## +- name: "REAR_PORT 1: Necessary info creation" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port + device: test100 + type: bnc + state: present + register: test_one + +- name: "REAR_PORT 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rear_port']['name'] == "Rear Port" + - test_one['rear_port']['device'] == 1 + - test_one['rear_port']['type'] == "bnc" + - test_one['msg'] == "rear_port Rear Port created" + +- name: "REAR_PORT 2: Create duplicate" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port + device: test100 + type: bnc + state: present + register: test_two + +- name: "REAR_PORT 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['rear_port']['name'] == "Rear Port" + - test_two['rear_port']['device'] == 1 + - test_two['rear_port']['type'] == "bnc" + - test_two['msg'] == "rear_port Rear Port already exists" + +- name: "REAR_PORT 3: Update Rear Port with other fields" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port + device: test100 + type: bnc + positions: 5 + description: test description + state: present + register: test_three + +- name: "REAR_PORT 3: ASSERT - Update Rear Port with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['positions'] == 5 + - test_three['diff']['after']['description'] == "test description" + - test_three['rear_port']['name'] == "Rear Port" + - test_three['rear_port']['device'] == 1 + - test_three['rear_port']['type'] == "bnc" + - test_three['rear_port']['positions'] == 5 + - test_three['rear_port']['description'] == "test description" + - test_three['msg'] == "rear_port Rear Port updated" + +- name: "REAR_PORT 4: Create Rear Port for Delete Test" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port 2 + device: test100 + type: bnc + state: present + register: test_four + +- name: "REAR_PORT 4: ASSERT - Create Rear Port for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['rear_port']['name'] == "Rear Port 2" + - test_four['rear_port']['device'] == 1 + - test_four['rear_port']['type'] == "bnc" + - test_four['msg'] == "rear_port Rear Port 2 created" + +- name: "REAR_PORT 5: Delete Rear Port" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port 2 + device: test100 + type: bnc + state: absent + register: test_five + +- name: "REAR_PORT 5: ASSERT - Delete Rear Port" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "rear_port Rear Port 2 deleted" + +- name: "REAR_PORT 6: Create second Rear Port" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port + device: Test Nexus One + type: bnc + state: present + register: test_six + +- name: "REAR_PORT 6: ASSERT - Create second Rear Port" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['rear_port']['name'] == "Rear Port" + - test_six['rear_port']['device'] == 4 + - test_six['rear_port']['type'] == "bnc" + - test_six['msg'] == "rear_port Rear Port created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_rear_port_template.yml b/tests/integration/targets/v4.1/tasks/netbox_rear_port_template.yml new file mode 100644 index 00000000..5342627d --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_rear_port_template.yml @@ -0,0 +1,136 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_REAR_PORT_TEMPLATE +## +## +- name: "REAR_PORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port Template + device_type: Cisco Test + type: bnc + state: present + register: test_one + +- name: "REAR_PORT_TEMPLATE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rear_port_template']['name'] == "Rear Port Template" + - test_one['rear_port_template']['device_type'] == 1 + - test_one['rear_port_template']['type'] == "bnc" + - test_one['msg'] == "rear_port_template Rear Port Template created" + +- name: "REAR_PORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port Template + device_type: Cisco Test + type: bnc + state: present + register: test_two + +- name: "REAR_PORT_TEMPLATE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['rear_port_template']['name'] == "Rear Port Template" + - test_two['rear_port_template']['device_type'] == 1 + - test_two['rear_port_template']['type'] == "bnc" + - test_two['msg'] == "rear_port_template Rear Port Template already exists" + +- name: "REAR_PORT_TEMPLATE 3: Update Rear Port Template with other fields" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port Template + device_type: Cisco Test + type: bnc + positions: 5 + state: present + register: test_three + +- name: "REAR_PORT_TEMPLATE 3: ASSERT - Update Rear Port Template with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['positions'] == 5 + - test_three['rear_port_template']['name'] == "Rear Port Template" + - test_three['rear_port_template']['device_type'] == 1 + - test_three['rear_port_template']['type'] == "bnc" + - test_three['rear_port_template']['positions'] == 5 + - test_three['msg'] == "rear_port_template Rear Port Template updated" + +- name: "REAR_PORT_TEMPLATE 4: Create Rear Port Template for Delete Test" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port Template 2 + device_type: Cisco Test + type: bnc + state: present + register: test_four + +- name: "REAR_PORT_TEMPLATE 4: ASSERT - Create Rear Port Template for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['rear_port_template']['name'] == "Rear Port Template 2" + - test_four['rear_port_template']['device_type'] == 1 + - test_four['rear_port_template']['type'] == "bnc" + - test_four['msg'] == "rear_port_template Rear Port Template 2 created" + +- name: "REAR_PORT_TEMPLATE 5: Delete Rear Port Template" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port Template 2 + device_type: Cisco Test + type: bnc + state: absent + register: test_five + +- name: "REAR_PORT_TEMPLATE 5: ASSERT - Delete Rear Port Template" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "rear_port_template Rear Port Template 2 deleted" + +- name: "REAR_PORT_TEMPLATE 6: Create second Rear Port Template" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Rear Port Template 2 + device_type: Arista Test + type: bnc + state: present + register: test_six + +- name: "REAR_PORT_TEMPLATE 6: ASSERT - Create second Rear Port Template" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['rear_port_template']['name'] == "Rear Port Template 2" + - test_six['rear_port_template']['device_type'] == 2 + - test_six['rear_port_template']['type'] == "bnc" + - test_six['msg'] == "rear_port_template Rear Port Template 2 created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_region.yml b/tests/integration/targets/v4.1/tasks/netbox_region.yml new file mode 100644 index 00000000..0395db43 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_region.yml @@ -0,0 +1,79 @@ +--- +## +## +### NETBOX_REGION +## +## +- name: "REGION 1: Necessary info creation" + netbox.netbox.netbox_region: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Region One + state: present + register: test_one + +- name: "REGION 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['region']['name'] == "Test Region One" + - test_one['region']['slug'] == "test-region-one" + - test_one['msg'] == "region Test Region One created" + +- name: "REGION 2: Create duplicate" + netbox.netbox.netbox_region: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Region One + state: present + register: test_two + +- name: "REGION 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['region']['name'] == "Test Region One" + - test_two['region']['slug'] == "test-region-one" + - test_two['msg'] == "region Test Region One already exists" + +- name: "REGION 3: ASSERT - Update" + netbox.netbox.netbox_region: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Region One + parent_region: Test Region + state: present + register: test_three + +- name: "REGION 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['parent'] == 1 + - test_three['region']['name'] == "Test Region One" + - test_three['region']['slug'] == "test-region-one" + - test_three['region']['parent'] == 1 + - test_three['msg'] == "region Test Region One updated" + +- name: "REGION 4: ASSERT - Delete" + netbox.netbox.netbox_region: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Region One + state: absent + register: test_four + +- name: "REGION 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['region']['name'] == "Test Region One" + - test_four['region']['slug'] == "test-region-one" + - test_four['region']['parent'] == 1 + - test_four['msg'] == "region Test Region One deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_rir.yml b/tests/integration/targets/v4.1/tasks/netbox_rir.yml new file mode 100644 index 00000000..3a7bf79f --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_rir.yml @@ -0,0 +1,79 @@ +--- +## +## +### NETBOX_RIR +## +## +- name: "RIR 1: Necessary info creation" + netbox.netbox.netbox_rir: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test RIR One + state: present + register: test_one + +- name: "RIR 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rir']['name'] == "Test RIR One" + - test_one['rir']['slug'] == "test-rir-one" + - test_one['msg'] == "rir Test RIR One created" + +- name: "RIR 2: Create duplicate" + netbox.netbox.netbox_rir: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test RIR One + state: present + register: test_two + +- name: "RIR 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['rir']['name'] == "Test RIR One" + - test_two['rir']['slug'] == "test-rir-one" + - test_two['msg'] == "rir Test RIR One already exists" + +- name: "RIR 3: ASSERT - Update" + netbox.netbox.netbox_rir: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test RIR One + is_private: true + state: present + register: test_three + +- name: "RIR 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['is_private'] == true + - test_three['rir']['name'] == "Test RIR One" + - test_three['rir']['slug'] == "test-rir-one" + - test_three['rir']['is_private'] == true + - test_three['msg'] == "rir Test RIR One updated" + +- name: "RIR 4: ASSERT - Delete" + netbox.netbox.netbox_rir: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test RIR One + state: absent + register: test_four + +- name: "RIR 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['rir']['name'] == "Test RIR One" + - test_four['rir']['slug'] == "test-rir-one" + - test_four['rir']['is_private'] == true + - test_four['msg'] == "rir Test RIR One deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_route_target.yml b/tests/integration/targets/v4.1/tasks/netbox_route_target.yml new file mode 100644 index 00000000..c2576c4c --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_route_target.yml @@ -0,0 +1,204 @@ +--- +# +# ADD (CHECK MODE) +- name: "NETBOX_ROUTE_TARGET_ADD: Check Mode - Add all fields except description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: 65000:65001 + tenant: Test Tenant + tags: + - first + - second + check_mode: true + register: test_results + +- name: "NETBOX_ROUTE_TARGET_ADD: (ASSERT) Check Mode - Add all fields except description" + ansible.builtin.assert: + that: + - test_results is changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['diff']['after']['state'] == "present" + - test_results['diff']['before']['state'] == "absent" + - test_results['msg'] == "route_target 65000:65001 created" + +# ADD +- name: "NETBOX_ROUTE_TARGET_ADD: Add all fields except description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: 65000:65001 + tenant: Test Tenant + tags: + - first + - second + register: test_results + +- name: "NETBOX_ROUTE_TARGET_ADD: (ASSERT) Add all fields except description" + ansible.builtin.assert: + that: + - test_results is changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['diff']['after']['state'] == "present" + - test_results['diff']['before']['state'] == "absent" + - test_results['msg'] == "route_target 65000:65001 created" + +# ADD (IDEMPOTENT) +- name: "NETBOX_ROUTE_TARGET_ADD_IDEM: (IDEMPOTENT) Add all fields except description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: 65000:65001 + tenant: Test Tenant + tags: + - first + - second + register: test_results + +- name: "NETBOX_ROUTE_TARGET_ADD_IDEM: (IDEMPOTENT) Add all fields except description" + ansible.builtin.assert: + that: + - test_results is not changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['msg'] == "route_target 65000:65001 already exists" + +# +# UPDATE (CHECK MODE) +- name: "NETBOX_ROUTE_TARGET_UPDATE: Check Mode - Update description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: 65000:65001 + description: NEW DESCRIPTION + tenant: Test Tenant + tags: + - first + - second + check_mode: true + register: test_results + +- name: "NETBOX_ROUTE_TARGET_UPDATE: (ASSERT) Check Mode - Update description" + ansible.builtin.assert: + that: + - test_results is changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['route_target']['description'] == "NEW DESCRIPTION" + - test_results['diff']['after']['description'] == "NEW DESCRIPTION" + - test_results['diff']['before']['description'] == "" + - test_results['msg'] == "route_target 65000:65001 updated" + +# UPDATE +- name: "NETBOX_ROUTE_TARGET_UPDATE: Update description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: 65000:65001 + tenant: Test Tenant + description: NEW DESCRIPTION + tags: + - first + - second + register: test_results + +- name: "NETBOX_ROUTE_TARGET_UPDATE: (ASSERT) Update description" + ansible.builtin.assert: + that: + - test_results is changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['route_target']['description'] == "NEW DESCRIPTION" + - test_results['diff']['after']['description'] == "NEW DESCRIPTION" + - test_results['diff']['before']['description'] == "" + - test_results['msg'] == "route_target 65000:65001 updated" + +# UPDATE (IDEMPOTENT) +- name: "NETBOX_ROUTE_TARGET_UPDATE_IDEM: (IDEMPOTENT) Update description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: 65000:65001 + tenant: Test Tenant + description: NEW DESCRIPTION + tags: + - first + - second + register: test_results + +- name: "NETBOX_ROUTE_TARGET_UPDATE_IDEM: (IDEMPOTENT) Update description" + ansible.builtin.assert: + that: + - test_results is not changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['route_target']['description'] == "NEW DESCRIPTION" + - test_results['msg'] == "route_target 65000:65001 already exists" + +# +# DELETE (CHECK MODE) +- name: "NETBOX_ROUTE_TARGET_DELETE: Check Mode - Delete route target" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: 65000:65001 + state: absent + check_mode: true + register: test_results + +- name: "NETBOX_ROUTE_TARGET_DELETE: (ASSERT) Check Mode - Delete route target" + ansible.builtin.assert: + that: + - test_results is changed + - test_results['diff']['after']['state'] == "absent" + - test_results['diff']['before']['state'] == "present" + - test_results['msg'] == "route_target 65000:65001 deleted" + +# DELETE +- name: "NETBOX_ROUTE_TARGET_DELETE: Delete route target" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: 65000:65001 + state: absent + register: test_results + +- name: "NETBOX_ROUTE_TARGET_DELETE: (ASSERT) Delete route target" + ansible.builtin.assert: + that: + - test_results is changed + - test_results['diff']['after']['state'] == "absent" + - test_results['diff']['before']['state'] == "present" + - test_results['msg'] == "route_target 65000:65001 deleted" + +# DELETE (IDEMPOTENT) +- name: "NETBOX_ROUTE_TARGET_DELETE_IDEM: (IDEMPOTENT) Delete route target" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: 65000:65001 + state: absent + register: test_results + +- name: "NETBOX_ROUTE_TARGET_DELETE_IDEM: (IDEMPOTENT) Delete route target" + ansible.builtin.assert: + that: + - test_results is not changed + - test_results['msg'] == "route_target 65000:65001 already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_service.yml b/tests/integration/targets/v4.1/tasks/netbox_service.yml new file mode 100644 index 00000000..d937e50a --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_service.yml @@ -0,0 +1,196 @@ +--- +## +## +### NETBOX_SERVICE +## +## +- name: 1 - Device with required information needs to add new service + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: FOR_SERVICE + device_type: Cisco Test + device_role: Core Switch + site: Test Site + status: Staged + state: present + +- name: "NETBOX_SERVICE: Create new service" + netbox.netbox.netbox_service: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: FOR_SERVICE + name: node-exporter + port: 9100 + protocol: TCP + state: present + register: test_service_create + +- name: NETBOX_SERVICE ASSERT - Create + ansible.builtin.assert: + that: + - test_service_create is changed + - test_service_create['services']['name'] == "node-exporter" + - test_service_create['services']['ports'] == [9100] + - test_service_create['services']['protocol'] == "tcp" + - test_service_create['diff']['after']['state'] == "present" + - test_service_create['diff']['before']['state'] == "absent" + - test_service_create['msg'] == "services node-exporter created" + +- name: "NETBOX_SERVICE: Test idempotence" + netbox.netbox.netbox_service: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: FOR_SERVICE + name: node-exporter + port: 9100 + protocol: TCP + state: present + register: test_service_idempotence + +- name: NETBOX_SERVICE ASSERT - Not changed + ansible.builtin.assert: + that: + - test_service_idempotence['services']['name'] == "node-exporter" + - test_service_idempotence['services']['ports'] == [9100] + - test_service_idempotence['services']['protocol'] == "tcp" + - test_service_idempotence['msg'] == "services node-exporter already exists" + +- name: "NETBOX_SERVICE: Test update" + netbox.netbox.netbox_service: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: FOR_SERVICE + name: node-exporter + ports: + - 9100 + - 9200 + protocol: TCP + tags: + - Schnozzberry + state: present + register: test_service_update + +- name: NETBOX_SERVICE ASSERT - Service has been updated + ansible.builtin.assert: + that: + - test_service_update is changed + - test_service_update['diff']['after']['tags'][0] == 4 + - test_service_update['diff']['after']['ports'] == [9100, 9200] + - test_service_update['msg'] == "services node-exporter updated" + +- name: "NETBOX_SERVICE: Test same details, but different protocol - Create" + netbox.netbox.netbox_service: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: FOR_SERVICE + name: node-exporter + port: 9100 + protocol: UDP + state: present + register: test_service_protocol + +- name: NETBOX_SERVICE ASSERT - Different protocol - Create + ansible.builtin.assert: + that: + - test_service_protocol is changed + - test_service_protocol['diff']['after']['state'] == "present" + - test_service_protocol['diff']['before']['state'] == "absent" + - test_service_protocol['services']['name'] == "node-exporter" + - test_service_protocol['services']['ports'] == [9100] + - test_service_protocol['services']['protocol'] == "udp" + - test_service_protocol['msg'] == "services node-exporter created" + +- name: "NETBOX_SERVICE: Test service deletion" + netbox.netbox.netbox_service: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: FOR_SERVICE + name: node-exporter + port: 9100 + protocol: UDP + state: absent + register: test_service_delete + +- name: NETBOX_SERVICE ASSERT - Service has been deleted + ansible.builtin.assert: + that: + - test_service_delete is changed + - test_service_delete['diff']['after']['state'] == "absent" + - test_service_delete['diff']['before']['state'] == "present" + - test_service_delete['msg'] == "services node-exporter deleted" + +- name: "NETBOX_SERVICE: Test service IP addresses" + netbox.netbox.netbox_service: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: node-exporter + port: 9100 + protocol: UDP + ipaddresses: + - address: 172.16.180.1/24 + state: present + register: test_service_ip_addresses + +- name: NETBOX_SERVICE ASSERT - Service has been created with IP address + ansible.builtin.assert: + that: + - test_service_ip_addresses is changed + - test_service_ip_addresses['diff']['after']['state'] == "present" + - test_service_ip_addresses['diff']['before']['state'] == "absent" + - test_service_ip_addresses['services']['name'] == "node-exporter" + - test_service_ip_addresses['services']['ports'] == [9100] + - test_service_ip_addresses['services']['protocol'] == "udp" + - test_service_ip_addresses['services']['ipaddresses'] is defined + - test_service_ip_addresses['msg'] == "services node-exporter created" + +- name: "NETBOX_SERVICE: Missing both device & virtual_machine options - Tests required_one_of" + netbox.netbox.netbox_service: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: node-exporter + port: 9100 + protocol: UDP + ipaddresses: + - address: 172.16.180.1/24 + state: present + ignore_errors: true + register: test_service_required_one_of + +- name: NETBOX_SERVICE ASSERT - Failed due to missing arguments + ansible.builtin.assert: + that: + - test_service_required_one_of is failed + - 'test_service_required_one_of["msg"] == "one of the following is required: device, virtual_machine"' + +- name: "NETBOX_SERVICE: Create new service on virtual_machine" + netbox.netbox.netbox_service: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + virtual_machine: test100-vm + name: node-exporter + port: 9100 + protocol: TCP + state: present + register: test_service_create_vm + +- name: NETBOX_SERVICE ASSERT - Create + ansible.builtin.assert: + that: + - test_service_create_vm is changed + - test_service_create_vm['services']['name'] == "node-exporter" + - test_service_create_vm['services']['ports'] == [9100] + - test_service_create_vm['services']['protocol'] == "tcp" + - test_service_create_vm['diff']['after']['state'] == "present" + - test_service_create_vm['diff']['before']['state'] == "absent" + - test_service_create_vm['msg'] == "services node-exporter created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_service_template.yml b/tests/integration/targets/v4.1/tasks/netbox_service_template.yml new file mode 100644 index 00000000..507a566a --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_service_template.yml @@ -0,0 +1,115 @@ +--- +## +## +### NETBOX_SERVICE_TEMPLATE +## +## +- name: "SERVICE_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_service_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Service Template for SSH + ports: + - 22 + protocol: tcp + state: present + register: test_one + +- name: "SERVICE_TEMPLATE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['service_template']['name'] == "Service Template for SSH" + - test_one['service_template']['ports'] == [22] + - test_one['service_template']['protocol'] == "tcp" + - test_one['msg'] == "service_template Service Template for SSH created" + +- name: "SERVICE_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_service_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Service Template for SSH + ports: + - 22 + protocol: tcp + state: present + register: test_two + +- name: "SERVICE_TEMPLATE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['service_template']['name'] == "Service Template for SSH" + - test_two['service_template']['ports'] == [22] + - test_two['service_template']['protocol'] == "tcp" + - test_two['msg'] == "service_template Service Template for SSH already exists" + +- name: "SERVICE_TEMPLATE 3: Update Service Template with other fields" + netbox.netbox.netbox_service_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Service Template for SSH + ports: + - 22 + protocol: tcp + comments: For SSH service + state: present + register: test_three + +- name: "SERVICE_TEMPLATE 3: ASSERT - Update Service Template with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['comments'] == "For SSH service" + - test_three['service_template']['name'] == "Service Template for SSH" + - test_three['service_template']['ports'] == [22] + - test_three['service_template']['protocol'] == "tcp" + - test_three['service_template']['comments'] == "For SSH service" + - test_three['msg'] == "service_template Service Template for SSH updated" + +- name: "SERVICE_TEMPLATE 4: Create Service Template for Delete Test" + netbox.netbox.netbox_service_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Service Template for DNS + ports: + - 53 + protocol: udp + comments: Domain Name System + state: present + register: test_four + +- name: "SERVICE_TEMPLATE 4: ASSERT - Create Service Template for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['service_template']['name'] == "Service Template for DNS" + - test_four['service_template']['ports'] == [53] + - test_four['service_template']['protocol'] == "udp" + - test_four['service_template']['comments'] == "Domain Name System" + - test_four['msg'] == "service_template Service Template for DNS created" + +- name: "SERVICE_TEMPLATE 5: Delete Service Template" + netbox.netbox.netbox_service_template: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Service Template for DNS + state: absent + register: test_five + +- name: "SERVICE_TEMPLATE 5: ASSERT - Delete Service Template" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "service_template Service Template for DNS deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_site.yml b/tests/integration/targets/v4.1/tasks/netbox_site.yml new file mode 100644 index 00000000..a5861522 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_site.yml @@ -0,0 +1,165 @@ +--- +## +## +### NETBOX_SITE +## +## +- name: 1 - Create site within NetBox with only required information + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test - Colorado + state: present + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['site']['name'] == "Test - Colorado" + - test_one['msg'] == "site Test - Colorado created" + +- name: 2 - Duplicate + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test - Colorado + state: present + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['msg'] == "site Test - Colorado already exists" + - test_two['site']['name'] == "Test - Colorado" + +- name: 3 - Update Test - Colorado + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test - Colorado + status: Planned + region: Test Region + state: present + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['status'] == "planned" + - test_three['diff']['after']['region'] == 1 + - test_three['msg'] == "site Test - Colorado updated" + - test_three['site']['name'] == "Test - Colorado" + - test_three['site']['status'] == "planned" + - test_three['site']['region'] == 1 + +- name: 4 - Create site with all parameters + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test - California + status: Planned + region: Test Region + site_group: Test Site Group + tenant: Test Tenant + facility: EquinoxCA7 + time_zone: America/Los Angeles + description: This is a test description + physical_address: Hollywood, CA, 90210 + shipping_address: Hollywood, CA, 90210 + latitude: "22.169141" + longitude: "-100.994041" + comments: "### Placeholder" + slug: test_california + state: present + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['site']['name'] == "Test - California" + - test_four['msg'] == "site Test - California created" + - test_four['site']['status'] == "planned" + - test_four['site']['region'] == 1 + - test_four['site']['group'] == 4 + - test_four['site']['tenant'] == 1 + - test_four['site']['facility'] == "EquinoxCA7" + - test_four['site']['time_zone'] == "America/Los_Angeles" + - test_four['site']['description'] == "This is a test description" + - test_four['site']['physical_address'] == "Hollywood, CA, 90210" + - test_four['site']['shipping_address'] == "Hollywood, CA, 90210" + - test_four['site']['latitude'] == 22.169141 + - test_four['site']['longitude'] == -100.994041 + - test_four['site']['comments'] == "### Placeholder" + - test_four['site']['slug'] == "test_california" + +- name: "NETBOX_SITE_IDEM: Idempotency - Create duplicate site with all parameters" + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test - California + status: Planned + region: Test Region + site_group: Test Site Group + tenant: Test Tenant + facility: EquinoxCA7 + time_zone: America/Los Angeles + description: This is a test description + physical_address: Hollywood, CA, 90210 + shipping_address: Hollywood, CA, 90210 + latitude: "22.169141" + longitude: "-100.994041" + comments: "### Placeholder" + slug: test_california + state: present + register: test_results + +- name: "NETBOX_SITE_IDEM: (ASSERT) Idempotency - Duplicate device site with all parameters" + ansible.builtin.assert: + that: + - test_results is not changed + - test_results['site']['name'] == "Test - California" + - test_results['msg'] == "site Test - California already exists" + - test_results['site']['status'] == "planned" + - test_results['site']['region'] == 1 + - test_results['site']['group'] == 4 + - test_results['site']['tenant'] == 1 + - test_results['site']['facility'] == "EquinoxCA7" + - test_results['site']['time_zone'] == "America/Los_Angeles" + - test_results['site']['description'] == "This is a test description" + - test_results['site']['physical_address'] == "Hollywood, CA, 90210" + - test_results['site']['shipping_address'] == "Hollywood, CA, 90210" + - test_results['site']['latitude'] == 22.169141 + - test_results['site']['longitude'] == -100.994041 + - test_results['site']['comments'] == "### Placeholder" + - test_results['site']['slug'] == "test_california" + +- name: 5 - Delete site within netbox + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test - Colorado + state: absent + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['site']['name'] == "Test - Colorado" + - test_five['msg'] == "site Test - Colorado deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_site_group.yml b/tests/integration/targets/v4.1/tasks/netbox_site_group.yml new file mode 100644 index 00000000..11b9cbb2 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_site_group.yml @@ -0,0 +1,81 @@ +--- +## +## +### NETBOX_SITE_GROUP +## +## +- name: "SITE_GROUP 1: Necessary info creation" + netbox.netbox.netbox_site_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Site Group + state: present + register: test_one + +- name: "SITE_GROUP 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['site_group']['name'] == "Site Group" + - test_one['site_group']['slug'] == "site-group" + - test_one['msg'] == "site_group Site Group created" + +- name: "SITE_GROUP 2: Create duplicate" + netbox.netbox.netbox_site_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Site Group + state: present + register: test_two + +- name: "SITE_GROUP 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['site_group']['name'] == "Site Group" + - test_two['site_group']['slug'] == "site-group" + - test_two['msg'] == "site_group Site Group already exists" + +- name: "SITE_GROUP 3: Update" + netbox.netbox.netbox_site_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Site Group + parent_site_group: Test Site Group + description: This is a site group + state: present + register: test_three + +- name: "SITE_GROUP 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['parent'] == 4 + - test_three['diff']['after']['description'] == "This is a site group" + - test_three['site_group']['name'] == "Site Group" + - test_three['site_group']['slug'] == "site-group" + - test_three['site_group']['parent'] == 4 + - test_three['site_group']['description'] == "This is a site group" + - test_three['msg'] == "site_group Site Group updated" + +- name: "SITE_GROUP 4: Delete" + netbox.netbox.netbox_site_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Site Group + state: absent + register: test_four + +- name: "SITE_GROUP 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "site_group Site Group deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_tag.yml b/tests/integration/targets/v4.1/tasks/netbox_tag.yml new file mode 100644 index 00000000..f3fcbac3 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_tag.yml @@ -0,0 +1,110 @@ +--- +## +## +### NETBOX_TAGS +## +## +- name: "TAG 1: ASSERT - Necessary info creation" + netbox.netbox.netbox_tag: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tag 1 + description: Tag 1 test + color: "0000ff" + state: present + register: test_one + +- name: "TAG 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tags']['color'] == "0000ff" + - test_one['tags']['description'] == "Tag 1 test" + - test_one['tags']['name'] == "Test Tag 1" + - test_one['tags']['slug'] == "test-tag-1" + - test_one['msg'] == "tags Test Tag 1 created" + +- name: "TAG 2: Create duplicate" + netbox.netbox.netbox_tag: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tag 1 + description: Tag 1 test + color: "0000ff" + state: present + register: test_two + +- name: "TAG 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['tags']['name'] == "Test Tag 1" + - test_two['msg'] == "tags Test Tag 1 already exists" + +- name: "TAG 3: ASSERT - Update" + netbox.netbox.netbox_tag: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tag 1 + description: Tag 1 update test + color: "00ff00" + state: present + register: test_three + +- name: "TAG 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['color'] == "00ff00" + - test_three['diff']['after']['description'] == "Tag 1 update test" + - test_three['tags']['name'] == "Test Tag 1" + - test_three['tags']['description'] == "Tag 1 update test" + - test_three['tags']['color'] == "00ff00" + - test_three['msg'] == "tags Test Tag 1 updated" + +- name: "TAG 4: ASSERT - Delete" + netbox.netbox.netbox_tag: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tag 1 + state: absent + register: test_four + +- name: "TAG 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['after']['state'] == "absent" + - test_four['tags']['name'] == "Test Tag 1" + - test_four['tags']['slug'] == "test-tag-1" + - test_four['msg'] == "tags Test Tag 1 deleted" + +- name: "TAG 5: ASSERT - Necessary info creation" + netbox.netbox.netbox_tag: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tag 5 + slug: test-tag-five + description: Tag 5 test + color: "0000ff" + state: present + register: test_five + +- name: "TAG 5: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['tags']['color'] == "0000ff" + - test_five['tags']['description'] == "Tag 5 test" + - test_five['tags']['name'] == "Test Tag 5" + - test_five['tags']['slug'] == "test-tag-five" + - test_five['msg'] == "tags Test Tag 5 created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_tenant.yml b/tests/integration/targets/v4.1/tasks/netbox_tenant.yml new file mode 100644 index 00000000..0731e026 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_tenant.yml @@ -0,0 +1,106 @@ +--- +## +## +### NETBOX_TENANT +## +## +- name: 1 - Test tenant creation + netbox.netbox.netbox_tenant: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Tenant ABC + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tenant']['name'] == "Tenant ABC" + - test_one['tenant']['slug'] == "tenant-abc" + - test_one['msg'] == "tenant Tenant ABC created" + +- name: Test duplicate tenant + netbox.netbox.netbox_tenant: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Tenant ABC + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['tenant']['name'] == "Tenant ABC" + - test_two['tenant']['slug'] == "tenant-abc" + - test_two['msg'] == "tenant Tenant ABC already exists" + +- name: 3 - Test update + netbox.netbox.netbox_tenant: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Tenant ABC + description: Updated description + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Updated description" + - test_three['tenant']['name'] == "Tenant ABC" + - test_three['tenant']['slug'] == "tenant-abc" + - test_three['tenant']['description'] == "Updated description" + - test_three['msg'] == "tenant Tenant ABC updated" + +- name: 4 - Test delete + netbox.netbox.netbox_tenant: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Tenant ABC + state: absent + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "tenant Tenant ABC deleted" + +- name: 5 - Create tenant with all parameters + netbox.netbox.netbox_tenant: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Tenant ABC + description: ABC Incorporated + comments: "### This tenant is super cool" + tenant_group: Test Tenant Group + slug: tenant_abc + tags: + - tagA + - tagB + - tagC + state: present + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['tenant']['name'] == "Tenant ABC" + - test_five['tenant']['slug'] == "tenant_abc" + - test_five['tenant']['description'] == "ABC Incorporated" + - test_five['tenant']['comments'] == "### This tenant is super cool" + - test_five['tenant']['group'] == 1 + - test_five['tenant']['tags'] | length == 3 + - test_five['msg'] == "tenant Tenant ABC created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_tenant_group.yml b/tests/integration/targets/v4.1/tasks/netbox_tenant_group.yml new file mode 100644 index 00000000..f7f57f3c --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_tenant_group.yml @@ -0,0 +1,129 @@ +--- +## +## +### NETBOX_TENANT_GROUP +## +## +- name: 1 - Test tenant group creation + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tenant Group Two + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tenant_group']['name'] == "Test Tenant Group Two" + - test_one['tenant_group']['slug'] == "test-tenant-group-two" + - test_one['msg'] == "tenant_group Test Tenant Group Two created" + +- name: Test duplicate tenant group + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tenant Group Two + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['tenant_group']['name'] == "Test Tenant Group Two" + - test_two['tenant_group']['slug'] == "test-tenant-group-two" + - test_two['msg'] == "tenant_group Test Tenant Group Two already exists" + +- name: 3 - Test delete + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tenant Group Two + state: absent + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "present" + - test_three['diff']['after']['state'] == "absent" + - test_three['msg'] == "tenant_group Test Tenant Group Two deleted" + +- name: 4 - Test tenant group creation with custom slug + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tenant Group ABC + slug: test_tenant_group_four + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['tenant_group']['name'] == "Test Tenant Group ABC" + - test_four['tenant_group']['slug'] == "test_tenant_group_four" + - test_four['msg'] == "tenant_group Test Tenant Group ABC created" + +- name: 5 - Test child tenant group creation + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Child Test Tenant Group + parent_tenant_group: "{{ test_four.tenant_group.slug }}" + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['tenant_group']['name'] == "Child Test Tenant Group" + - test_five['tenant_group']['parent'] == test_four.tenant_group.id + - test_five['msg'] == "tenant_group Child Test Tenant Group created" + +- name: 6 - Test child tenant group deletion + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Child Test Tenant Group + state: absent + register: test_six + +- name: 6 - ASSERT + ansible.builtin.assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "present" + - test_six['diff']['after']['state'] == "absent" + - test_six['msg'] == "tenant_group Child Test Tenant Group deleted" + +- name: 7 - Test deletion of the tenant group with custom slug + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tenant Group ABC + slug: test_tenant_group_four + state: absent + register: test_seven + +- name: 7 - ASSERT + ansible.builtin.assert: + that: + - test_seven is changed + - test_seven['diff']['before']['state'] == "present" + - test_seven['diff']['after']['state'] == "absent" + - test_seven['msg'] == "tenant_group Test Tenant Group ABC deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_token.yml b/tests/integration/targets/v4.1/tasks/netbox_token.yml new file mode 100644 index 00000000..a602883f --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_token.yml @@ -0,0 +1,104 @@ +--- +## +## +### NETBOX_PERMISSION +## +## +- name: "TOKEN: Set up user" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword2 + state: present + +- name: "TOKEN 1: Necessary info creation" + netbox.netbox.netbox_token: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + user: TestUser + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: present + register: test_one + +- name: "TOKEN 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['token']['user'] == 3 + - test_one['msg'] == "token ******** created" + +- name: "TOKEN 2: Create duplicate" + netbox.netbox.netbox_token: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + user: TestUser + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: present + register: test_two + +- name: "TOKEN 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['msg'] == "token ******** already exists" + +- name: "TOKEN 3: Update" + netbox.netbox.netbox_token: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + user: TestUser + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + description: The test token + write_enabled: false + expires: 2024-08-26T14:49:01.345000+00:00 + state: present + register: test_three + +- name: "TOKEN 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['token']['description'] == "The test token" + - test_three['token']['write_enabled'] == false + - test_three['token']['expires'] == "2024-08-26T14:49:01.345000+00:00" + - test_three['msg'] == "token ******** updated" + +- name: "TOKEN 4: Delete" + netbox.netbox.netbox_token: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: absent + register: test_four + +- name: "TOKEN 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "token ******** deleted" + +- name: "TOKEN 5: ASSERT - Delete non existing" + netbox.netbox.netbox_token: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + state: absent + register: test_five + +- name: "TOKEN 5: ASSERT - Delete non existing" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['token'] == None + - test_five['msg'] == "token ******** already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_tunnel.yml b/tests/integration/targets/v4.1/tasks/netbox_tunnel.yml new file mode 100644 index 00000000..71e98d81 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_tunnel.yml @@ -0,0 +1,96 @@ +--- +## +## +### NETBOX_TUNNEL +## +## +- name: "TUNNEL 1: Necessary info creation" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + status: active + encapsulation: ipsec-tunnel + state: present + register: test_one + +- name: "TUNNEL 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tunnel']['name'] == "Test Tunnel" + - test_one['tunnel']['status'] == "active" + - test_one['tunnel']['encapsulation'] == "ipsec-tunnel" + - test_one['msg'] == "tunnel Test Tunnel created" + +- name: "TUNNEL 2: Create duplicate" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + status: active + encapsulation: ipsec-tunnel + state: present + register: test_two + +- name: "TUNNEL 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['tunnel']['name'] == "Test Tunnel" + - test_two['tunnel']['status'] == "active" + - test_two['tunnel']['encapsulation'] == "ipsec-tunnel" + - test_two['msg'] == "tunnel Test Tunnel already exists" + +- name: "TUNNEL 3: Update Existing" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + encapsulation: ipsec-tunnel + description: Test Description + tenant: Test Tenant + tunnel_id: 200 + tags: + - Schnozzberry + state: present + register: test_three + +- name: "TUNNEL: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Test Description" + - test_three['diff']['after']['tenant'] == 1 + - test_three['diff']['after']['tunnel_id'] == 200 + - test_three['diff']['after']['tags'][0] == 4 + - test_three['tunnel']['name'] == "Test Tunnel" + - test_three['tunnel']['tenant'] == 1 + - test_three['tunnel']['tunnel_id'] == 200 + - test_three['tunnel']['description'] == "Test Description" + - test_three['tunnel']['tags'][0] == 4 + - test_three['tunnel']['encapsulation'] == "ipsec-tunnel" + - test_three['msg'] == "tunnel Test Tunnel updated" + +- name: "TUNNEL 4: Delete" + netbox.netbox.netbox_tunnel: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel + encapsulation: ipsec-tunnel + state: absent + register: test_four + +- name: "TUNNEL 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "tunnel Test Tunnel deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_tunnel_group.yml b/tests/integration/targets/v4.1/tasks/netbox_tunnel_group.yml new file mode 100644 index 00000000..91814734 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_tunnel_group.yml @@ -0,0 +1,81 @@ +--- +## +## +### NETBOX_TUNNEL GROUP +## +## +- name: "TUNNEL_GROUP 1: Necessary info creation" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + state: present + register: test_one + +- name: "TUNNEL_GROUP 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tunnel_group']['name'] == "Test Tunnel Group" + - test_one['tunnel_group']['slug'] == "test-tunnel-group" + - test_one['msg'] == "tunnel_group Test Tunnel Group created" + +- name: "TUNNEL_GROUP 2: Create duplicate" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + state: present + register: test_two + +- name: "TUNNEL_GROUP 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['tunnel_group']['name'] == "Test Tunnel Group" + - test_two['tunnel_group']['slug'] == "test-tunnel-group" + - test_two['msg'] == "tunnel_group Test Tunnel Group already exists" + +- name: "TUNNEL_GROUP 3: Update Existing" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + description: Test Description + tags: + - Schnozzberry + state: present + register: test_three + +- name: "TUNNEL_GROUP 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Test Description" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['tunnel_group']['name'] == "Test Tunnel Group" + - test_three['tunnel_group']['description'] == "Test Description" + - test_three['tunnel_group']['tags'][0] == 4 + - test_three['msg'] == "tunnel_group Test Tunnel Group updated" + +- name: "TUNNEL_GROUP 4: Delete" + netbox.netbox.netbox_tunnel_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test Tunnel Group + state: absent + register: test_four + +- name: "TUNNEL_GROUP 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "tunnel_group Test Tunnel Group deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_user.yml b/tests/integration/targets/v4.1/tasks/netbox_user.yml new file mode 100644 index 00000000..360ba6c3 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_user.yml @@ -0,0 +1,105 @@ +--- +## +## +### NETBOX_USER +## +## +- name: "USER 1: Necessary info creation" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword1 + state: present + register: test_one + +- name: "USESR 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['user']['username'] == "TestUser" + - test_one['user']['display'] == "TestUser" + - test_one['msg'] == "user TestUser created" + +- name: "USER 2: Update password" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword2 + email: my@user.com + state: present + register: test_two + +- name: "USER 2: ASSERT - Update password" + ansible.builtin.assert: + that: + - test_two['changed'] + - test_two['user']['username'] == "TestUser" + - test_two['msg'] == "user TestUser updated" + +- name: "USER 3: Update" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword1 + email: test@user.com + first_name: Test + last_name: User + is_active: false + is_staff: true + state: present + register: test_three + +- name: "USER 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['first_name'] == "Test" + - test_three['diff']['after']['last_name'] == "User" + - test_three['user']['username'] == "TestUser" + - test_three['user']['email'] == "test@user.com" + - test_three['user']['first_name'] == "Test" + - test_three['user']['last_name'] == "User" + - test_three['user']['is_active'] == False + - test_three['user']['is_staff'] == True + - test_three['msg'] == "user TestUser updated" + +- name: "USER 4: Delete" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + state: absent + register: test_four + +- name: "USER 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "user TestUser deleted" + +- name: "USER 5: ASSERT - Delete non existing" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + state: absent + register: test_five + +- name: "USER 5: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_five['changed'] + - test_five['user'] == None + - test_five['msg'] == "user TestUser already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_user_group.yml b/tests/integration/targets/v4.1/tasks/netbox_user_group.yml new file mode 100644 index 00000000..03dfbe5e --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_user_group.yml @@ -0,0 +1,127 @@ +--- +## +## +### NETBOX_USER_GROUP +## +## +- name: "USER_GROUP 1: Necessary info creation" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + state: present + register: test_one + +- name: "USER_GROUP 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['user_group']['name'] == "Test User Group" + - test_one['msg'] == "user_group Test User Group created" + +- name: "USER_GROUP 2: Create duplicate" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + state: present + register: test_two + +- name: "USER_GROUP 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['user_group']['name'] == "Test User Group" + - test_two['msg'] == "user_group Test User Group already exists" + +- name: "USER_GROUP 3: Update" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + description: The test group + state: present + register: test_three + +- name: "USER_GROUP 3: ASSERT - Update" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "The test group" + - test_three['user_group']['name'] == "Test User Group" + - test_three['user_group']['description'] == "The test group" + - test_three['msg'] == "user_group Test User Group updated" + +- name: "USER_GROUP 4: Create second group" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group 2 + state: present + register: test_four + +- name: "USER_GROUP 4: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['user_group']['name'] == "Test User Group 2" + - test_four['msg'] == "user_group Test User Group 2 created" + +- name: "USER_GROUP 5: Add user to group" + netbox.netbox.netbox_user: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + username: TestUser + password: TestPassword2 + groups: + - Test User Group + state: present + register: test_five + +- name: "USER_GROUP 5: ASSERT - Add user to group" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['user']['groups'] == [1] + +- name: "USER_GROUP 6: Delete" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + state: absent + register: test_six + +- name: "USER_GROUP 6: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "present" + - test_six['diff']['after']['state'] == "absent" + - test_six['msg'] == "user_group Test User Group deleted" + +- name: "USER_GROUP 6: ASSERT - Delete non existing" + netbox.netbox.netbox_user_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test User Group + state: absent + register: test_seven + +- name: "USER_GROUP 7: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not test_seven['changed'] + - test_seven['user_group'] == None + - test_seven['msg'] == "user_group Test User Group already absent" diff --git a/tests/integration/targets/v4.1/tasks/netbox_virtual_chassis.yml b/tests/integration/targets/v4.1/tasks/netbox_virtual_chassis.yml new file mode 100644 index 00000000..395be839 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_virtual_chassis.yml @@ -0,0 +1,131 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_VIRTUAL_CHASSIS +## +## +- name: "VIRTUAL_CHASSIS 0: Create device for testing virtual chassis" + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Device Virtual Chassis Tests + device_type: Cisco Test + device_role: Core Switch + site: Test Site + vc_position: 1 + vc_priority: 1 + state: present + +- name: "VIRTUAL_CHASSIS 1: Necessary info creation" + netbox.netbox.netbox_virtual_chassis: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: First VC + master: Device Virtual Chassis Tests + state: present + register: test_one + +- name: "VIRTUAL_CHASSIS 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['virtual_chassis']['master'] == 11 + - test_one['virtual_chassis']['name'] == "First VC" + - test_one['msg'] == "virtual_chassis First VC created" + +- name: "VIRTUAL_CHASSIS 2: Create duplicate" + netbox.netbox.netbox_virtual_chassis: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: First VC + master: Device Virtual Chassis Tests + state: present + register: test_two + +- name: "VIRTUAL_CHASSIS 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['virtual_chassis']['master'] == 11 + - test_two['virtual_chassis']['name'] == "First VC" + - test_two['msg'] == "virtual_chassis First VC already exists" + +- name: "POWER_FEED 3: Update virtual_chassis with other fields" + netbox.netbox.netbox_virtual_chassis: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: First VC + master: Device Virtual Chassis Tests + domain: Domain Text + state: present + register: test_three + +- name: "POWER_FEED 3: ASSERT - Update virtual_chassis with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['domain'] == "Domain Text" + - test_three['virtual_chassis']['master'] == 11 + - test_three['virtual_chassis']['domain'] == "Domain Text" + - test_three['virtual_chassis']['name'] == "First VC" + - test_three['msg'] == "virtual_chassis First VC updated" + +- name: "VIRTUAL_CHASSIS 4: Create device for testing virtual chassis deletion" + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Device Virtual Chassis Tests 2 + device_type: Cisco Test + device_role: Core Switch + site: Test Site + vc_position: 1 + vc_priority: 15 + state: present + +- name: "VIRTUAL_CHASSIS 4: Create Virtual Chassis for Delete Test" + netbox.netbox.netbox_virtual_chassis: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Second VC + master: Device Virtual Chassis Tests 2 + state: present + register: test_four + +- name: "VIRTUAL_CHASSIS 4: ASSERT - Create Virtual Chassis for Delete Test" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['virtual_chassis']['master'] == 12 + - test_four['virtual_chassis']['name'] == "Second VC" + - test_four['msg'] == "virtual_chassis Second VC created" + +- name: "VIRTUAL_CHASSIS 5: Delete Virtual Chassis" + netbox.netbox.netbox_virtual_chassis: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Second VC + master: Device Virtual Chassis Tests 2 + state: absent + register: test_five + +- name: "VIRTUAL_CHASSIS 5: ASSERT - Delete Virtual Chassis" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "virtual_chassis Second VC deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_virtual_disk.yml b/tests/integration/targets/v4.1/tasks/netbox_virtual_disk.yml new file mode 100644 index 00000000..5b17eadd --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_virtual_disk.yml @@ -0,0 +1,87 @@ +--- +## +## +### NETBOX_VIRTUAL_DISK +## +## +- name: "NETBOX_VIRTUAL_DISK 1: Necessary info creation" + netbox.netbox.netbox_virtual_disk: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + virtual_machine: test100-vm + name: disk0 + size: 50 + state: present + register: test_one + +- name: "NETBOX_VIRTUAL_DISK 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['virtual_disk']['name'] == "disk0" + - test_one['virtual_disk']['virtual_machine'] == 1 + - test_one['msg'] == "virtual_disk disk0 created" + +- name: "NETBOX_VIRTUAL_DISK 2: Create duplicate" + netbox.netbox.netbox_virtual_disk: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + virtual_machine: test100-vm + name: disk0 + size: 50 + state: present + register: test_two + +- name: "NETBOX_VIRTUAL_DISK 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['virtual_disk']['name'] == "disk0" + - test_two['virtual_disk']['virtual_machine'] == 1 + - test_two['msg'] == "virtual_disk disk0 already exists" + +- name: "NETBOX_VIRTUAL_DISK 3: Update" + netbox.netbox.netbox_virtual_disk: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + virtual_machine: test100-vm + name: disk0 + size: 60 + tags: + - Schnozzberry + state: present + register: test_three + +- name: "NETBOX_VIRTUAL_DISK 4: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['size'] == 60 + - test_three['virtual_disk']['name'] == "disk0" + - test_three['virtual_disk']['virtual_machine'] == 1 + - test_three['virtual_disk']['size'] == 60 + - test_three['virtual_disk']['tags'][0] == 4 + - test_three['msg'] == "virtual_disk disk0 updated" + +- name: "NETBOX_VIRTUAL_DISK 4: ASSERT - Delete" + netbox.netbox.netbox_virtual_disk: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: disk0 + virtual_machine: test100-vm + state: absent + register: test_four + +- name: "NETBOX_VIRTUAL_DISK 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['virtual_disk']['name'] == "disk0" + - test_four['virtual_disk']['virtual_machine'] == 1 + - test_four['msg'] == "virtual_disk disk0 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_virtual_machine.yml b/tests/integration/targets/v4.1/tasks/netbox_virtual_machine.yml new file mode 100644 index 00000000..6ef7f1f4 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_virtual_machine.yml @@ -0,0 +1,131 @@ +--- +## +## +### NETBOX_VIRTUAL_MACHINES +## +## +- name: "VIRTUAL_MACHINE 1: Necessary info creation" + netbox.netbox.netbox_virtual_machine: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VM One + cluster: Test Cluster + state: present + register: test_one + +- name: "VIRTUAL_MACHINE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['virtual_machine']['name'] == "Test VM One" + - test_one['virtual_machine']['cluster'] == 1 + - test_one['msg'] == "virtual_machine Test VM One created" + +- name: "VIRTUAL_MACHINE 2: Create duplicate" + netbox.netbox.netbox_virtual_machine: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VM One + cluster: Test Cluster + state: present + register: test_two + +- name: "VIRTUAL_MACHINE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['virtual_machine']['name'] == "Test VM One" + - test_two['virtual_machine']['cluster'] == 1 + - test_two['msg'] == "virtual_machine Test VM One already exists" + +- name: "VIRTUAL_MACHINE 3: Update" + netbox.netbox.netbox_virtual_machine: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VM One + cluster: Test Cluster + serial: 12345678 + vcpus: 8.5 + memory: 8 + status: Planned + virtual_machine_role: Test VM Role + tags: + - Schnozzberry + state: present + register: test_three + +- name: "VIRTUAL_MACHINE 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['vcpus'] == 8.5 + - test_three['diff']['after']['memory'] == 8 + - test_three['diff']['after']['status'] == "planned" + - test_three['diff']['after']['role'] == 2 + - test_three['diff']['after']['serial'] == "12345678" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['virtual_machine']['name'] == "Test VM One" + - test_three['virtual_machine']['cluster'] == 1 + - test_three['virtual_machine']['vcpus'] == 8.5 + - test_three['virtual_machine']['memory'] == 8 + - test_three['virtual_machine']['status'] == "planned" + - test_three['virtual_machine']['role'] == 2 + - test_three['virtual_machine']['serial'] == "12345678" + - test_three['virtual_machine']['tags'][0] == 4 + - test_three['msg'] == "virtual_machine Test VM One updated" + +- name: "VIRTUAL_MACHINE 4: Test idempotence" + netbox.netbox.netbox_virtual_machine: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VM One + cluster: Test Cluster + vcpus: 8.5 + memory: 8 + status: Planned + virtual_machine_role: Test VM Role + tags: + - Schnozzberry + state: present + register: test_four_idempotence + +- name: "VIRTUAL_MACHINE 4: ASSERT - Not changed" + ansible.builtin.assert: + that: + - test_four_idempotence is not changed + - test_four_idempotence['virtual_machine']['name'] == "Test VM One" + - test_four_idempotence['virtual_machine']['cluster'] == 1 + - test_four_idempotence['virtual_machine']['vcpus'] == 8.5 + - test_four_idempotence['virtual_machine']['memory'] == 8 + - test_four_idempotence['virtual_machine']['status'] == "planned" + - test_four_idempotence['virtual_machine']['role'] == 2 + - test_four_idempotence['virtual_machine']['tags'][0] == 4 + - test_four_idempotence['msg'] == "virtual_machine Test VM One already exists" + +- name: "VIRTUAL_MACHINE 5: Delete" + netbox.netbox.netbox_virtual_machine: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VM One + state: absent + register: test_five + +- name: "VIRTUAL_MACHINE 5: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['virtual_machine']['name'] == "Test VM One" + - test_five['virtual_machine']['cluster'] == 1 + - test_five['virtual_machine']['vcpus'] == 8.5 + - test_five['virtual_machine']['memory'] == 8 + - test_five['virtual_machine']['status'] == "planned" + - test_five['virtual_machine']['role'] == 2 + - test_five['virtual_machine']['tags'][0] == 4 + - test_five['msg'] == "virtual_machine Test VM One deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_vlan.yml b/tests/integration/targets/v4.1/tasks/netbox_vlan.yml new file mode 100644 index 00000000..463873ca --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_vlan.yml @@ -0,0 +1,193 @@ +--- +## +## +### NETBOX_VLAN +## +## +- name: "VLAN 1: Necessary info creation" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VLAN 500 + vid: 500 + state: present + register: test_one + +- name: "VLAN 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['vlan']['name'] == "Test VLAN 500" + - test_one['vlan']['vid'] == 500 + - test_one['msg'] == "vlan Test VLAN 500 created" + +- name: "VLAN 2: Create duplicate" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VLAN 500 + vid: 500 + state: present + register: test_two + +- name: "VLAN 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['vlan']['name'] == "Test VLAN 500" + - test_two['vlan']['vid'] == 500 + - test_two['msg'] == "vlan Test VLAN 500 already exists" + +- name: "VLAN 3: Create VLAN with same name, but different site" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VLAN 500 + vid: 500 + site: Test Site + tenant: Test Tenant + vlan_group: Test VLAN Group + state: present + register: test_three + +- name: "VLAN 3: ASSERT - Create VLAN with same name, but different site" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['vlan']['name'] == "Test VLAN 500" + - test_three['vlan']['vid'] == 500 + - test_three['vlan']['site'] == 1 + - test_three['vlan']['group'] == 1 + - test_three['msg'] == "vlan Test VLAN 500 created" + +- name: "VLAN 4: ASSERT - Update" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VLAN 500 + vid: 500 + tenant: Test Tenant + vlan_group: Test VLAN Group + status: Reserved + vlan_role: Network of care + description: Updated description + site: Test Site + tags: + - Schnozzberry + state: present + register: test_four + +- name: "VLAN 4: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['after']['status'] == "reserved" + - test_four['diff']['after']['role'] == 1 + - test_four['diff']['after']['description'] == "Updated description" + - test_four['diff']['after']['tags'][0] == 4 + - test_four['vlan']['name'] == "Test VLAN 500" + - test_four['vlan']['tenant'] == 1 + - test_four['vlan']['site'] == 1 + - test_four['vlan']['group'] == 1 + - test_four['vlan']['status'] == "reserved" + - test_four['vlan']['role'] == 1 + - test_four['vlan']['description'] == "Updated description" + - test_four['vlan']['tags'][0] == 4 + - test_four['msg'] == "vlan Test VLAN 500 updated" + +- name: "VLAN: ASSERT - IDEMPOTENT WITH VLAN_GROUP" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VLAN 500 + vid: 500 + tenant: Test Tenant + vlan_group: Test VLAN Group + status: Reserved + vlan_role: Network of care + description: Updated description + site: Test Site + tags: + - Schnozzberry + state: present + register: idempotent_vlan_group + +- name: "VLAN: ASSERT - IDEMPOTENT WITH VLAN_GROUP" + ansible.builtin.assert: + that: + - idempotent_vlan_group is not changed + +- name: "VLAN: Create VLAN with same name, but different vlan_group" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VLAN 500 + vid: 500 + site: Test Site + tenant: Test Tenant + vlan_group: Test VLAN Group 2 + state: present + register: new_vlan_group + +- name: "VLAN: ASSERT - Create VLAN with same name, but different vlan_group" + ansible.builtin.assert: + that: + - new_vlan_group is changed + - new_vlan_group['diff']['before']['state'] == "absent" + - new_vlan_group['diff']['after']['state'] == "present" + - new_vlan_group['vlan']['name'] == "Test VLAN 500" + - new_vlan_group['vlan']['vid'] == 500 + - new_vlan_group['vlan']['site'] == 1 + - new_vlan_group['vlan']['group'] == 2 + - new_vlan_group['msg'] == "vlan Test VLAN 500 created" + +- name: "VLAN 5: ASSERT - Delete more than one result" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VLAN 500 + state: absent + ignore_errors: true + register: test_five + +- name: "VLAN 5: ASSERT - Delete more than one result" + ansible.builtin.assert: + that: + - test_five is failed + - test_five['msg'] == "More than one result returned for Test VLAN 500" + +- name: "VLAN 6: ASSERT - Delete" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VLAN 500 + site: Test Site + vlan_group: Test VLAN Group + state: absent + register: test_six + +- name: "VLAN 6: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['vlan']['name'] == "Test VLAN 500" + - test_six['vlan']['tenant'] == 1 + - test_six['vlan']['site'] == 1 + - test_six['vlan']['group'] == 1 + - test_six['vlan']['status'] == "reserved" + - test_six['vlan']['role'] == 1 + - test_six['vlan']['description'] == "Updated description" + - test_six['vlan']['tags'][0] == 4 + - test_six['msg'] == "vlan Test VLAN 500 deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_vlan_group.yml b/tests/integration/targets/v4.1/tasks/netbox_vlan_group.yml new file mode 100644 index 00000000..9dd4d178 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_vlan_group.yml @@ -0,0 +1,314 @@ +--- +## +## +### NETBOX_VLAN_GROUP +## +## +- name: "VLAN_GROUP 1: Necessary info creation" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group One + scope_type: dcim.site + scope: Test Site + state: present + register: results + +- name: "VLAN_GROUP 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - results is changed + - results['diff']['before']['state'] == "absent" + - results['diff']['after']['state'] == "present" + - results['vlan_group']['name'] == "VLAN Group One" + - results['vlan_group']['slug'] == "vlan-group-one" + - results['vlan_group']['scope_type'] == "dcim.site" + - results['vlan_group']['scope_id'] == 1 + - results['msg'] == "vlan_group VLAN Group One created" + +- name: "VLAN_GROUP 2: Create duplicate" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group One + scope_type: dcim.site + scope: Test Site + state: present + register: results + +- name: "VLAN_GROUP 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not results['changed'] + - results['vlan_group']['name'] == "VLAN Group One" + - results['vlan_group']['slug'] == "vlan-group-one" + - results['vlan_group']['scope_type'] == "dcim.site" + - results['vlan_group']['scope_id'] == 1 + - results['msg'] == "vlan_group VLAN Group One already exists" + +- name: "VLAN_GROUP 3: ASSERT - Create with same name, different site" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group One + scope_type: dcim.site + scope: Test Site2 + state: present + register: results + +- name: "VLAN_GROUP 3: ASSERT - Create with same name, different site" + ansible.builtin.assert: + that: + - results is changed + - results['vlan_group']['name'] == "VLAN Group One" + - results['vlan_group']['slug'] == "vlan-group-one" + - results['vlan_group']['scope_type'] == "dcim.site" + - results['vlan_group']['scope_id'] == 2 + - results['msg'] == "vlan_group VLAN Group One created" + +- name: "VLAN_GROUP 4: ASSERT - Create vlan group, no site" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group One + state: present + ignore_errors: true + register: results + +- name: "VLAN_GROUP 4: ASSERT - Create with same name, different site" + ansible.builtin.assert: + that: + - results is failed + - results['msg'] == "More than one result returned for VLAN Group One" + +- name: "VLAN_GROUP 5: ASSERT - Delete" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group One + scope_type: dcim.site + scope: Test Site2 + state: absent + register: results + +- name: "VLAN_GROUP 5: ASSERT - Delete" + ansible.builtin.assert: + that: + - results is changed + - results['diff']['before']['state'] == "present" + - results['diff']['after']['state'] == "absent" + - results['vlan_group']['name'] == "VLAN Group One" + - results['vlan_group']['slug'] == "vlan-group-one" + - results['vlan_group']['scope_type'] == "dcim.site" + - results['vlan_group']['scope_id'] == 2 + - results['msg'] == "vlan_group VLAN Group One deleted" + +- name: "VLAN_GROUP 6: ASSERT - Delete non existing" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group One + scope_type: dcim.site + scope: Test Site2 + state: absent + register: results + +- name: "VLAN_GROUP 6: ASSERT - Delete non existing`" + ansible.builtin.assert: + that: + - not results['changed'] + - results['vlan_group'] == None + - results['msg'] == "vlan_group VLAN Group One already absent" + +- name: "VLAN_GROUP 7: Necessary info creation - scope_type: dcim.location" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group Location + scope_type: dcim.location + scope: Test Rack Group + state: present + register: results + +- name: "VLAN_GROUP 7: ASSERT - Necessary info creation - scope_type: dcim.location" + ansible.builtin.assert: + that: + - results is changed + - results['diff']['before']['state'] == "absent" + - results['diff']['after']['state'] == "present" + - results['vlan_group']['name'] == "VLAN Group Location" + - results['vlan_group']['slug'] == "vlan-group-location" + - results['vlan_group']['scope_type'] == "dcim.location" + - results['vlan_group']['scope_id'] == 1 + - results['msg'] == "vlan_group VLAN Group Location created" + +- name: "VLAN_GROUP 8: Necessary info creation - scope_type: dcim.rack" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group Rack + scope_type: dcim.rack + scope: Test Rack + state: present + register: results + +- name: "VLAN_GROUP 8: ASSERT - Necessary info creation - scope_type: dcim.rack" + ansible.builtin.assert: + that: + - results is changed + - results['diff']['before']['state'] == "absent" + - results['diff']['after']['state'] == "present" + - results['vlan_group']['name'] == "VLAN Group Rack" + - results['vlan_group']['slug'] == "vlan-group-rack" + - results['vlan_group']['scope_type'] == "dcim.rack" + - results['vlan_group']['scope_id'] == 2 + - results['msg'] == "vlan_group VLAN Group Rack created" + +- name: "VLAN_GROUP 9: Necessary info creation - scope_type: dcim.region" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group Region + scope_type: dcim.region + scope: Test Region + state: present + register: results + +- name: "VLAN_GROUP 9: ASSERT - Necessary info creation - scope_type: dcim.region" + ansible.builtin.assert: + that: + - results is changed + - results['diff']['before']['state'] == "absent" + - results['diff']['after']['state'] == "present" + - results['vlan_group']['name'] == "VLAN Group Region" + - results['vlan_group']['slug'] == "vlan-group-region" + - results['vlan_group']['scope_type'] == "dcim.region" + - results['vlan_group']['scope_id'] == 1 + - results['msg'] == "vlan_group VLAN Group Region created" + +- name: "VLAN_GROUP 10: Necessary info creation - scope_type: dcim.sitegroup" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group Site Group + scope_type: dcim.sitegroup + scope: Test Site Group + state: present + register: results + +- name: "VLAN_GROUP 10: ASSERT - Necessary info creation - scope_type: dcim.sitegroup" + ansible.builtin.assert: + that: + - results is changed + - results['diff']['before']['state'] == "absent" + - results['diff']['after']['state'] == "present" + - results['vlan_group']['name'] == "VLAN Group Site Group" + - results['vlan_group']['slug'] == "vlan-group-site-group" + - results['vlan_group']['scope_type'] == "dcim.sitegroup" + - results['vlan_group']['scope_id'] == 4 + - results['msg'] == "vlan_group VLAN Group Site Group created" + +# Commented out due to invalid content type being reported back by API +# - name: "VLAN_GROUP 11: Necessary info creation - scope_type: virtualization.cluster" +# netbox.netbox.netbox_vlan_group: +# netbox_url: http://localhost:32768 +# netbox_token: 0123456789abcdef0123456789abcdef01234567 +# data: +# name: "VLAN Group Cluster" +# scope_type: "virtualization.cluster" +# scope: Test Cluster +# state: present +# register: results + +# - name: "VLAN_GROUP 11: ASSERT - Necessary info creation - scope_type: virtualization.cluster" +# assert: +# that: +# - results is changed +# - results['diff']['before']['state'] == "absent" +# - results['diff']['after']['state'] == "present" +# - results['vlan_group']['name'] == "VLAN Group Cluster" +# - results['vlan_group']['slug'] == "vlan-group-cluster" +# - results['vlan_group']['scope_type'] == "virtualization.cluster" +# - results['vlan_group']['scope_id'] == 1 +# - results['msg'] == "vlan_group VLAN Group Cluster created" + +# - name: "VLAN_GROUP 12: Necessary info creation - scope_type: virtualization.clustergroup" +# netbox.netbox.netbox_vlan_group: +# netbox_url: http://localhost:32768 +# netbox_token: 0123456789abcdef0123456789abcdef01234567 +# data: +# name: "VLAN Group Cluster Group" +# scope_type: "virtualization.clustergroup" +# scope: Test Cluster Group +# state: present +# register: results + +# - name: "VLAN_GROUP 12: ASSERT - Necessary info creation - scope_type: virtualization.clustergroup" +# assert: +# that: +# - results is changed +# - results['diff']['before']['state'] == "absent" +# - results['diff']['after']['state'] == "present" +# - results['vlan_group']['name'] == "VLAN Group Cluster Group" +# - results['vlan_group']['slug'] == "vlan-group-cluster-group" +# - results['vlan_group']['scope_type'] == "virtualization.clustergroup" +# - results['vlan_group']['scope_id'] == 1 +# - results['msg'] == "vlan_group VLAN Group Cluster Group created" + +- name: "VLAN_GROUP 12: Update Description - scope_type: dcim.location" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group Location + scope_type: dcim.location + scope: Test Rack Group + description: Ansible updated description + state: present + register: results + +- name: "VLAN_GROUP 12: ASSERT - Update Description - scope_type: dcim.location" + ansible.builtin.assert: + that: + - results is changed + - results['diff']['before']['description'] == "" + - results['diff']['after']['description'] == "Ansible updated description" + - results['vlan_group']['name'] == "VLAN Group Location" + - results['vlan_group']['slug'] == "vlan-group-location" + - results['vlan_group']['scope_type'] == "dcim.location" + - results['vlan_group']['scope_id'] == 1 + - results['vlan_group']['description'] == "Ansible updated description" + - results['msg'] == "vlan_group VLAN Group Location updated" + +- name: "VLAN_GROUP 12: Update Description (IDEM) - scope_type: dcim.location" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: VLAN Group Location + scope_type: dcim.location + scope: Test Rack Group + description: Ansible updated description + state: present + register: results + +- name: "VLAN_GROUP 12: ASSERT - Update Description (IDEM) - scope_type: dcim.location" + ansible.builtin.assert: + that: + - results is not changed + - results['vlan_group']['name'] == "VLAN Group Location" + - results['vlan_group']['slug'] == "vlan-group-location" + - results['vlan_group']['scope_type'] == "dcim.location" + - results['vlan_group']['scope_id'] == 1 + - results['vlan_group']['description'] == "Ansible updated description" + - results['msg'] == "vlan_group VLAN Group Location already exists" diff --git a/tests/integration/targets/v4.1/tasks/netbox_vm_interface.yml b/tests/integration/targets/v4.1/tasks/netbox_vm_interface.yml new file mode 100644 index 00000000..6ca36e1e --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_vm_interface.yml @@ -0,0 +1,159 @@ +--- +## +## +### NETBOX_VM_INTERFACE +## +## +- name: "NETBOX_VM_INTERFACE 1: Necessary info creation" + netbox.netbox.netbox_vm_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + virtual_machine: test100-vm + name: Eth10 + state: present + register: test_one + +- name: "NETBOX_VM_INTERFACE 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['interface']['name'] == "Eth10" + - test_one['interface']['virtual_machine'] == 1 + - test_one['msg'] == "interface Eth10 created" + +- name: "NETBOX_VM_INTERFACE 2: Create duplicate" + netbox.netbox.netbox_vm_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + virtual_machine: test100-vm + name: Eth10 + state: present + register: test_two + +- name: "NETBOX_VM_INTERFACE 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['interface']['name'] == "Eth10" + - test_two['interface']['virtual_machine'] == 1 + - test_two['msg'] == "interface Eth10 already exists" + +- name: "NETBOX_VM_INTERFACE 3: Updated" + netbox.netbox.netbox_vm_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + virtual_machine: test100-vm + name: Eth10 + enabled: false + mtu: 9000 + mac_address: "00:00:00:AA:AA:01" + description: Updated test100-vm + mode: Tagged + # untagged_vlan: + # name: Wireless + # site: Test Site + # tagged_vlans: + # - name: Data + # site: Test Site + # - name: VoIP + # site: Test Site + tags: + - Schnozzberry + state: present + register: test_three + +- name: "NETBOX_VM_INTERFACE 4: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['enabled'] == false + - test_three['diff']['after']['mtu'] == 9000 + - test_three['diff']['after']['mac_address'] == "00:00:00:AA:AA:01" + - test_three['diff']['after']['description'] == "Updated test100-vm" + - test_three['diff']['after']['mode'] == "tagged" + # - test_three['diff']['after']['untagged_vlan'] == 1 + # - test_three['diff']['after']['tagged_vlans'] == [2, 3] + - test_three['diff']['after']['tags'][0] == 4 + - test_three['interface']['name'] == "Eth10" + - test_three['interface']['virtual_machine'] == 1 + - test_three['interface']['enabled'] == false + - test_three['interface']['mtu'] == 9000 + - test_three['interface']['mac_address'] == "00:00:00:AA:AA:01" + - test_three['interface']['description'] == "Updated test100-vm" + - test_three['interface']['mode'] == "tagged" + # - test_three['interface']['untagged_vlan'] == 1 + # - test_three['interface']['tagged_vlans'] == [2, 3] + - test_three['interface']['tags'][0] == 4 + - test_three['msg'] == "interface Eth10 updated" + +- name: "NETBOX_VM_INTERFACE 4: ASSERT - Delete" + netbox.netbox.netbox_vm_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Eth10 + virtual_machine: test100-vm + state: absent + register: test_four + +- name: "NETBOX_VM_INTERFACE 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['interface']['name'] == "Eth10" + - test_four['interface']['virtual_machine'] == 1 + - test_four['msg'] == "interface Eth10 deleted" + +- name: "NETBOX_VM_INTERFACE 5: Attempt to update interface with same name on other VMs" + netbox.netbox.netbox_vm_interface: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + virtual_machine: test100-vm + name: Eth0 + enabled: false + mtu: 9000 + mac_address: "00:00:00:AA:AA:01" + description: Updated test100-vm Eth0 intf + mode: Tagged + # untagged_vlan: + # name: Wireless + # site: Test Site + # tagged_vlans: + # - name: Data + # site: Test Site + # - name: VoIP + # site: Test Site + tags: + - Schnozzberry + state: present + register: test_five + +- name: "NETBOX_VM_INTERFACE 5: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['after']['enabled'] == false + - test_five['diff']['after']['mtu'] == 9000 + - test_five['diff']['after']['mac_address'] == "00:00:00:AA:AA:01" + - test_five['diff']['after']['description'] == "Updated test100-vm Eth0 intf" + - test_five['diff']['after']['mode'] == "tagged" + # - test_five['diff']['after']['untagged_vlan'] == 1 + # - test_five['diff']['after']['tagged_vlans'] == [2, 3] + - test_five['diff']['after']['tags'][0] == 4 + - test_five['interface']['name'] == "Eth0" + - test_five['interface']['virtual_machine'] == 1 + - test_five['interface']['enabled'] == false + - test_five['interface']['mtu'] == 9000 + - test_five['interface']['mac_address'] == "00:00:00:AA:AA:01" + - test_five['interface']['description'] == "Updated test100-vm Eth0 intf" + - test_five['interface']['mode'] == "tagged" + # - test_five['interface']['untagged_vlan'] == 1 + # - test_five['interface']['tagged_vlans'] == [2, 3] + - test_five['interface']['tags'][0] == 4 + - test_five['msg'] == "interface Eth0 updated" diff --git a/tests/integration/targets/v4.1/tasks/netbox_vrf.yml b/tests/integration/targets/v4.1/tasks/netbox_vrf.yml new file mode 100644 index 00000000..1da7ae38 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_vrf.yml @@ -0,0 +1,137 @@ +--- +## +## +### NETBOX_VRF +## +## +- name: "VRF 1: Necessary info creation" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VRF One + state: present + register: test_one + +- name: "VRF 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['vrf']['name'] == "Test VRF One" + - test_one['msg'] == "vrf Test VRF One created" + +- name: "VRF 2: Create duplicate" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VRF One + state: present + register: test_two + +- name: "VRF 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['vrf']['name'] == "Test VRF One" + - test_two['msg'] == "vrf Test VRF One already exists" + +- name: "VRF 3: Create VRF with same name, but different tenant" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VRF One + tenant: Test Tenant + state: present + register: test_three + +- name: "VRF 3: ASSERT - Create VRF with same name, but different site" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['vrf']['name'] == "Test VRF One" + - test_three['vrf']['tenant'] == 1 + - test_three['msg'] == "vrf Test VRF One created" + +- name: "VRF 4: ASSERT - Update" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VRF One + rd: "65001:1" + enforce_unique: false + tenant: Test Tenant + description: Updated description + import_targets: + - 4000:4000 + - 5000:5000 + export_targets: + - 5000:5000 + tags: + - Schnozzberry + state: present + register: test_four + +- name: "VRF 4: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['after']['rd'] == "65001:1" + - test_four['diff']['after']['enforce_unique'] == false + - test_four['diff']['after']['description'] == "Updated description" + - test_four['diff']['after']['tags'][0] == 4 + - test_four['diff']['after']['import_targets'] | length == 2 + - test_four['diff']['after']['export_targets'] | length == 1 + - test_four['vrf']['name'] == "Test VRF One" + - test_four['vrf']['tenant'] == 1 + - test_four['vrf']['rd'] == "65001:1" + - test_four['vrf']['enforce_unique'] == false + - test_four['vrf']['description'] == "Updated description" + - test_four['vrf']['tags'][0] == 4 + - test_four['vrf']['import_targets'] | length == 2 + - test_four['vrf']['export_targets'] | length == 1 + - test_four['msg'] == "vrf Test VRF One updated" + +- name: "VRF 5: ASSERT - Delete more than one result" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VRF One + state: absent + ignore_errors: true + register: test_five + +- name: "VRF 5: ASSERT - Delete more than one result" + ansible.builtin.assert: + that: + - test_five is failed + - test_five['msg'] == "More than one result returned for Test VRF One" + +- name: "VRF 6: ASSERT - Delete" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Test VRF One + tenant: Test Tenant + state: absent + register: test_six + +- name: "VRF 6: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_six is changed + - test_six['vrf']['name'] == "Test VRF One" + - test_six['vrf']['tenant'] == 1 + - test_six['vrf']['rd'] == "65001:1" + - test_six['vrf']['enforce_unique'] == false + - test_six['vrf']['description'] == "Updated description" + - test_six['vrf']['tags'][0] == 4 + - test_six['msg'] == "vrf Test VRF One deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_webhook.yml b/tests/integration/targets/v4.1/tasks/netbox_webhook.yml new file mode 100644 index 00000000..a3d5a382 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_webhook.yml @@ -0,0 +1,121 @@ +--- +## +## +### NETBOX_WEBHOOK +## +## +- name: "WEBHOOK 1: Necessary info creation" + netbox.netbox.netbox_webhook: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + content_types: + - dcim.device + name: Example Webhook + type_create: true + payload_url: https://payload.url + body_template: !unsafe >- + {{ data }} + state: present + register: test_one + +- name: "WEBHOOK 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['webhook']['name'] == "Example Webhook" + - test_one['webhook']['type_create'] == True + - test_one['webhook']['payload_url'] == "https://payload.url" + - test_one['webhook']['content_types'] == ["dcim.device"] + - test_one['msg'] == "webhook Example Webhook created" + +- name: "WEBHOOK 2: Create duplicate" + netbox.netbox.netbox_webhook: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + content_types: + - dcim.device + name: Example Webhook + type_create: true + payload_url: https://payload.url + body_template: !unsafe >- + {{ data }} + state: present + register: test_two + +- name: "WEBHOOK 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['webhook']['name'] == "Example Webhook" + - test_two['msg'] == "webhook Example Webhook already exists" + +- name: "WEBHOOK 3: Update data and add on delete" + netbox.netbox.netbox_webhook: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + content_types: + - dcim.device + type_create: true + type_delete: true + name: Example Webhook + payload_url: https://payload.url + body_template: !unsafe >- + {{ data }} + state: present + register: test_three + +- name: "WEBHOOK 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['webhook']['name'] == "Example Webhook" + - test_three['msg'] == "webhook Example Webhook updated" + +- name: "WEBHOOK 4: Change content type" + netbox.netbox.netbox_webhook: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + content_types: + - virtualization.virtualmachine + name: Example Webhook + payload_url: https://payload.url + body_template: !unsafe >- + {{ data }} + state: present + register: test_four + +- name: "WEBHOOK 4: ASSERT - Change content type" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['after']['content_types'] == ["virtualization.virtualmachine"] + - test_four['webhook']['name'] == "Example Webhook" + - test_four['msg'] == "webhook Example Webhook updated" + +- name: "WEBHOOK 5: Delete" + netbox.netbox.netbox_webhook: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + content_types: + - virtualization.virtualmachine + name: Example Webhook + payload_url: https://payload.url + body_template: !unsafe >- + {{ data }} + state: absent + register: test_five + +- name: "WEBHOOK 5: ASSERT - Deleted" + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['webhook']['name'] == "Example Webhook" + - test_five['msg'] == "webhook Example Webhook deleted" diff --git a/tests/integration/targets/v4.1/tasks/netbox_wireless_lan.yml b/tests/integration/targets/v4.1/tasks/netbox_wireless_lan.yml new file mode 100644 index 00000000..e70fd3e5 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_wireless_lan.yml @@ -0,0 +1,103 @@ +--- +## +## +### NETBOX_WIRELESS_LAN +## +## +- name: 1 - Test wireless LAN creation + netbox.netbox.netbox_wireless_lan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + ssid: Wireless LAN One + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['wireless_lan']['ssid'] == "Wireless LAN One" + - test_one['msg'] == "wireless_lan Wireless LAN One created" + +- name: Test duplicate wireless LAN + netbox.netbox.netbox_wireless_lan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + ssid: Wireless LAN One + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['wireless_lan']['ssid'] == "Wireless LAN One" + - test_two['msg'] == "wireless_lan Wireless LAN One already exists" + +- name: 3 - Test update + netbox.netbox.netbox_wireless_lan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + ssid: Wireless LAN One + description: New Description + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "New Description" + - test_three['wireless_lan']['ssid'] == "Wireless LAN One" + - test_three['wireless_lan']['description'] == "New Description" + - test_three['msg'] == "wireless_lan Wireless LAN One updated" + +- name: 4 - Test delete + netbox.netbox.netbox_wireless_lan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + ssid: Wireless LAN One + state: absent + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "wireless_lan Wireless LAN One deleted" + +- name: 5 - Create wireless LAN with all parameters + netbox.netbox.netbox_wireless_lan: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + ssid: Wireless Network One + description: Cool Wireless Network + auth_type: wpa-enterprise + auth_cipher: aes + auth_psk: psk123456 + tags: + - tagA + - tagB + - tagC + state: present + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['wireless_lan']['ssid'] == "Wireless Network One" + - test_five['wireless_lan']['description'] == "Cool Wireless Network" + - test_five['wireless_lan']['auth_type'] == "wpa-enterprise" + - test_five['wireless_lan']['auth_cipher'] == "aes" + - test_five['wireless_lan']['auth_psk'] == "psk123456" + # - test_five['wireless_lan']['tags'] | length == 3 + - test_five['msg'] == "wireless_lan Wireless Network One created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_wireless_lan_group.yml b/tests/integration/targets/v4.1/tasks/netbox_wireless_lan_group.yml new file mode 100644 index 00000000..57daaf62 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_wireless_lan_group.yml @@ -0,0 +1,97 @@ +--- +## +## +### NETBOX_WIRELESS_LAN_GROUP +## +## +- name: 1 - Test wireless LAN group creation + netbox.netbox.netbox_wireless_lan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Wireless LAN Group One + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['wireless_lan_group']['name'] == "Wireless LAN Group One" + - test_one['msg'] == "wireless_lan_group Wireless LAN Group One created" + +- name: Test duplicate wireless LAN group + netbox.netbox.netbox_wireless_lan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Wireless LAN Group One + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['wireless_lan_group']['name'] == "Wireless LAN Group One" + - test_two['msg'] == "wireless_lan_group Wireless LAN Group One already exists" + +- name: 3 - Test update + netbox.netbox.netbox_wireless_lan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Wireless LAN Group One + description: New Description + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "New Description" + - test_three['wireless_lan_group']['name'] == "Wireless LAN Group One" + - test_three['wireless_lan_group']['description'] == "New Description" + - test_three['msg'] == "wireless_lan_group Wireless LAN Group One updated" + +- name: 4 - Test delete + netbox.netbox.netbox_wireless_lan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Wireless LAN Group One + state: absent + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "wireless_lan_group Wireless LAN Group One deleted" + +- name: 5 - Create wireless LAN group with all parameters + netbox.netbox.netbox_wireless_lan_group: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Wireless LAN Group One + description: Cool Wireless LAN Group + tags: + - tagA + - tagB + - tagC + state: present + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['wireless_lan_group']['name'] == "Wireless LAN Group One" + - test_five['wireless_lan_group']['description'] == "Cool Wireless LAN Group" + - test_five['wireless_lan_group']['tags'] | length == 3 + - test_five['msg'] == "wireless_lan_group Wireless LAN Group One created" diff --git a/tests/integration/targets/v4.1/tasks/netbox_wireless_link.yml b/tests/integration/targets/v4.1/tasks/netbox_wireless_link.yml new file mode 100644 index 00000000..b026db81 --- /dev/null +++ b/tests/integration/targets/v4.1/tasks/netbox_wireless_link.yml @@ -0,0 +1,130 @@ +--- +## +## +### NETBOX_WIRELESS_LINK +## +## +- name: 1 - Test wireless link creation + netbox.netbox.netbox_wireless_link: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + interface_a: + device: Test Nexus One + name: wlink1 + interface_b: + device: test100 + name: wlink1 + register: test_one + +- name: 1 - ASSERT + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['wireless_link']['interface_a'] == 6 + - test_one['wireless_link']['interface_b'] == 5 + - test_one['msg'] == "wireless_link Test Nexus One wlink1 <> test100 wlink1 created" + +- name: Test duplicate wireless link + netbox.netbox.netbox_wireless_link: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + interface_a: + device: Test Nexus One + name: wlink1 + interface_b: + device: test100 + name: wlink1 + register: test_two + +- name: 2 - ASSERT + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['msg'] == "wireless_link Test Nexus One wlink1 <> test100 wlink1 already exists" + +- name: 3 - Test update + netbox.netbox.netbox_wireless_link: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + interface_a: + device: Test Nexus One + name: wlink1 + interface_b: + device: test100 + name: wlink1 + status: planned + register: test_three + +- name: 3 - ASSERT + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['status'] == "planned" + - test_three['wireless_link']['status'] == "planned" + - test_three['msg'] == "wireless_link Test Nexus One wlink1 <> test100 wlink1 updated" + +- name: 4 - Test delete + netbox.netbox.netbox_wireless_link: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + interface_a: + device: Test Nexus One + name: wlink1 + interface_b: + device: test100 + name: wlink1 + state: absent + register: test_four + +- name: 4 - ASSERT + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "wireless_link Test Nexus One wlink1 <> test100 wlink1 deleted" + +- name: 5 - Create wireless link with all parameters + netbox.netbox.netbox_wireless_link: + netbox_url: http://localhost:32768 + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + interface_a: + device: Test Nexus One + name: wlink1 + interface_b: + device: test100 + name: wlink1 + ssid: Wireless Network One + description: Cool Wireless Network + auth_type: wpa-enterprise + auth_cipher: aes + auth_psk: psk123456 + tags: + - tagA + - tagB + - tagC + state: present + register: test_five + +- name: 5 - ASSERT + ansible.builtin.assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['wireless_link']['ssid'] == "Wireless Network One" + - test_five['wireless_link']['description'] == "Cool Wireless Network" + - test_five['wireless_link']['interface_a'] == 6 + - test_five['wireless_link']['interface_b'] == 5 + - test_five['wireless_link']['auth_type'] == "wpa-enterprise" + - test_five['wireless_link']['auth_cipher'] == "aes" + - test_five['wireless_link']['auth_psk'] == "psk123456" + # - test_five['wireless_link']['tags'] | length == 3 + - test_five['msg'] == "wireless_link Test Nexus One wlink1 <> test100 wlink1 created" diff --git a/tests/netbox-docker/v4.1/docker-compose.override.yml b/tests/netbox-docker/v4.1/docker-compose.override.yml new file mode 100644 index 00000000..9c15b8c2 --- /dev/null +++ b/tests/netbox-docker/v4.1/docker-compose.override.yml @@ -0,0 +1,25 @@ +--- +version: "3.4" +services: + netbox-worker: &netbox-override + image: netboxcommunity/netbox:v4.1 + healthcheck: + start_period: 300s + timeout: 3s + interval: 15s + test: ps -aux | grep -v grep | grep -q rqworker || exit 1 + netbox: + <<: *netbox-override + ports: + - 32768:8080 + healthcheck: + start_period: 300s + timeout: 3s + interval: 15s + test: curl -f http://localhost:8080/login/ || exit 1 + environment: + SKIP_SUPERUSER: "false" + SUPERUSER_API_TOKEN: "0123456789abcdef0123456789abcdef01234567" + SUPERUSER_EMAIL: admin@localhost.com + SUPERUSER_NAME: admin + SUPERUSER_PASSWORD: admin diff --git a/tests/unit/inventory/test_nb_inventory.py b/tests/unit/inventory/test_nb_inventory.py index 4b502a8a..93a59217 100644 --- a/tests/unit/inventory/test_nb_inventory.py +++ b/tests/unit/inventory/test_nb_inventory.py @@ -34,6 +34,18 @@ ) +class MockInventory: + + def __init__(self): + self.variables = {} + + def set_variable(self, hostname, key, value): + if hostname not in self.variables: + self.variables[hostname] = {} + + self.variables[hostname][key] = value + + @pytest.fixture def inventory_fixture( allowed_device_query_parameters_fixture, allowed_vm_query_parameters_fixture @@ -46,6 +58,9 @@ def inventory_fixture( inventory.allowed_device_query_parameters = allowed_device_query_parameters_fixture inventory.allowed_vm_query_parameters = allowed_vm_query_parameters_fixture + # Inventory mock, to validate what has been set via inventory.inventory.set_variable + inventory.inventory = MockInventory() + return inventory @@ -260,3 +275,24 @@ def test_extract_custom_fields(inventory_fixture, custom_fields, expected): ) assert extracted_custom_fields == expected + + +def test_rename_variables(inventory_fixture): + inventory_fixture.rename_variables = inventory_fixture.parse_rename_variables( + ( + {"pattern": r"cluster(.*)", "repl": r"netbox_cluster\1"}, + {"pattern": r"ansible_host", "repl": r"host"}, + ) + ) + + inventory_fixture._set_variable("host", "ansible_fqdn", "host.example.org") + inventory_fixture._set_variable("host", "ansible_host", "host") + inventory_fixture._set_variable("host", "cluster", "staging") + inventory_fixture._set_variable("host", "cluster_id", "0xdeadbeef") + + assert inventory_fixture.inventory.variables["host"] == { + "ansible_fqdn": "host.example.org", + "host": "host", + "netbox_cluster": "staging", + "netbox_cluster_id": "0xdeadbeef", + }