diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f215a59a2..0d71beeb4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,28 @@ NetBox.NetBox Release Notes .. contents:: Topics +v3.18.0 +======= + +Minor Changes +------------- + +- nb_inventory - Add Virtual Disks to inventory [#1188](https://github.com/netbox-community/ansible_modules/pull/1188) +- nb_inventory - Don't extract null values from custom fields [#1184](https://github.com/netbox-community/ansible_modules/pull/1184) +- nb_inventory - Improve documentation for oob_ip_as_primary_ip [#1218](https://github.com/netbox-community/ansible_modules/pull/1218) +- nb_inventory - Make oob_ip available regardless of oob_ip_as_primary_ip option [#1211](https://github.com/netbox-community/ansible_modules/pull/1211) +- nb_lookup - Add custom field choice set [#1186](https://github.com/netbox-community/ansible_modules/pull/1186) +- nb_lookup - Add endpoint for Virtual Disks [#1177](https://github.com/netbox-community/ansible_modules/pull/1177) +- netbox_device_type and netbox_rack - Change u_height to float [#1200](https://github.com/netbox-community/ansible_modules/pull/1200) +- netbox_export_templates - Update documentation [#1214](https://github.com/netbox-community/ansible_modules/pull/1214) +- netbox_power_port - Add label [#1202](https://github.com/netbox-community/ansible_modules/pull/1202) + +New Modules +----------- + +- netbox.netbox.netbox_custom_field_choice_set - Create, updates, or removes Custom Field Choice sets +- netbox.netbox.netbox_module_bay - Create, updates, or removes Module Bay + v3.17.0 ======= diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index f113070a6..1c1567a80 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -858,3 +858,25 @@ releases: name: netbox_virtual_disk namespace: '' release_date: '2024-02-14' + 3.18.0: + changes: + minor_changes: + - nb_lookup - Add endpoint for Virtual Disks [#1177](https://github.com/netbox-community/ansible_modules/pull/1177) + - nb_lookup - Add custom field choice set [#1186](https://github.com/netbox-community/ansible_modules/pull/1186) + - nb_inventory - Don't extract null values from custom fields [#1184](https://github.com/netbox-community/ansible_modules/pull/1184) + - nb_inventory - Add Virtual Disks to inventory [#1188](https://github.com/netbox-community/ansible_modules/pull/1188) + - netbox_device_type and netbox_rack - Change u_height to float [#1200](https://github.com/netbox-community/ansible_modules/pull/1200) + - netbox_power_port - Add label [#1202](https://github.com/netbox-community/ansible_modules/pull/1202) + - nb_inventory - Make oob_ip available regardless of oob_ip_as_primary_ip option [#1211](https://github.com/netbox-community/ansible_modules/pull/1211) + - netbox_export_templates - Update documentation [#1214](https://github.com/netbox-community/ansible_modules/pull/1214) + - nb_inventory - Improve documentation for oob_ip_as_primary_ip [#1218](https://github.com/netbox-community/ansible_modules/pull/1218) + modules: + - description: Create, updates, or removes Custom Field Choice sets + name: netbox_custom_field_choice_set + namespace: '' + - description: Create, updates, or removes Module Bay + name: netbox_module_bay + namespace: '' + - description: Create, updates, or removes Module + namespace: '' + release_date: '2024-05-05' diff --git a/docs/conf.py b/docs/conf.py index cc5034ae0..87cfe5e7a 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.17.0" +release = "3.18.0" # -- General configuration --------------------------------------------------- diff --git a/docs/plugins/index.rst b/docs/plugins/index.rst index caf18e175..81f04d1cf 100644 --- a/docs/plugins/index.rst +++ b/docs/plugins/index.rst @@ -9,7 +9,7 @@ Netbox.Netbox ============= -Collection version 3.17.0 +Collection version 3.18.0 .. contents:: :local: @@ -73,6 +73,7 @@ Modules * :ansplugin:`netbox_contact_group module ` -- Creates or removes contact groups from NetBox * :ansplugin:`netbox_contact_role module ` -- Creates or removes contact roles from NetBox * :ansplugin:`netbox_custom_field module ` -- Creates, updates or deletes custom fields within NetBox +* :ansplugin:`netbox_custom_field_choice_set module ` -- Creates, updates or deletes custom field choice sets within Netbox * :ansplugin:`netbox_custom_link module ` -- Creates, updates or deletes custom links within NetBox * :ansplugin:`netbox_device module ` -- Create, update or delete devices within NetBox * :ansplugin:`netbox_device_bay module ` -- Create, update or delete device bays within NetBox @@ -95,6 +96,8 @@ Modules * :ansplugin:`netbox_l2vpn_termination module ` -- Create, update or delete L2VPNs terminations within NetBox * :ansplugin:`netbox_location module ` -- Create, update or delete locations within NetBox * :ansplugin:`netbox_manufacturer module ` -- Create or delete manufacturers within NetBox +* :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_platform module ` -- Create or delete platforms within NetBox * :ansplugin:`netbox_power_feed module ` -- Create, update or delete power feeds within NetBox @@ -156,6 +159,7 @@ Modules netbox_contact_group_module netbox_contact_role_module netbox_custom_field_module + netbox_custom_field_choice_set_module netbox_custom_link_module netbox_device_module netbox_device_bay_module @@ -178,6 +182,8 @@ Modules netbox_l2vpn_termination_module netbox_location_module netbox_manufacturer_module + netbox_module_module + netbox_module_bay_module netbox_module_type_module netbox_platform_module netbox_power_feed_module diff --git a/docs/plugins/nb_inventory_inventory.rst b/docs/plugins/nb_inventory_inventory.rst index f52447e4e..ea6711489 100644 --- a/docs/plugins/nb_inventory_inventory.rst +++ b/docs/plugins/nb_inventory_inventory.rst @@ -23,7 +23,7 @@ netbox.netbox.nb_inventory inventory -- NetBox inventory source .. Collection note .. note:: - This inventory plugin is part of the `netbox.netbox collection `_ (version 3.17.0). + This inventory plugin is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -1694,6 +1694,51 @@ Parameters :ansible-option-default-bold:`Default:` :ansible-option-default:`4000` + .. raw:: html + + + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.nb_inventory_inventory__parameter-oob_ip_as_primary_ip: + + .. rst-class:: ansible-option-title + + **oob_ip_as_primary_ip** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`boolean` + + + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Use out of band IP as \`ansible host\` + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)` + - :ansible-option-choices-entry:`true` + + .. raw:: html
@@ -2324,6 +2369,54 @@ Parameters - :ansible-option-choices-entry:`true` + .. raw:: html + + + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.nb_inventory_inventory__parameter-virtual_disks: + + .. rst-class:: ansible-option-title + + **virtual_disks** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`boolean` + + :ansible-option-versionadded:`added in netbox.netbox 3.18.0` + + + + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + If True, it adds the virtual disks information in host vars. + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)` + - :ansible-option-choices-entry:`true` + + .. raw:: html
@@ -2518,6 +2611,7 @@ Authors - Nikhil Singh Baliyan (@nikkytub) - Sander Steffann (@steffann) - Douglas Heriot (@DouglasHeriot) +- Thore Knickrehm (@tkn2023) .. hint:: diff --git a/docs/plugins/nb_lookup_lookup.rst b/docs/plugins/nb_lookup_lookup.rst index 530466b7c..426b77580 100644 --- a/docs/plugins/nb_lookup_lookup.rst +++ b/docs/plugins/nb_lookup_lookup.rst @@ -23,7 +23,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.17.0). + This lookup plugin is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_aggregate_module.rst b/docs/plugins/netbox_aggregate_module.rst index 96cea2629..fe57cd6f7 100644 --- a/docs/plugins/netbox_aggregate_module.rst +++ b/docs/plugins/netbox_aggregate_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_asn_module.rst b/docs/plugins/netbox_asn_module.rst index 39088eaae..8a9337e7a 100644 --- a/docs/plugins/netbox_asn_module.rst +++ b/docs/plugins/netbox_asn_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_cable_module.rst b/docs/plugins/netbox_cable_module.rst index ff0b43a32..3bbcd412d 100644 --- a/docs/plugins/netbox_cable_module.rst +++ b/docs/plugins/netbox_cable_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_circuit_module.rst b/docs/plugins/netbox_circuit_module.rst index 2c0f3595f..4c00f4555 100644 --- a/docs/plugins/netbox_circuit_module.rst +++ b/docs/plugins/netbox_circuit_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_circuit_termination_module.rst b/docs/plugins/netbox_circuit_termination_module.rst index adb846b95..dfcd65f8f 100644 --- a/docs/plugins/netbox_circuit_termination_module.rst +++ b/docs/plugins/netbox_circuit_termination_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_circuit_type_module.rst b/docs/plugins/netbox_circuit_type_module.rst index bd35a9d91..9ad126b18 100644 --- a/docs/plugins/netbox_circuit_type_module.rst +++ b/docs/plugins/netbox_circuit_type_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_cluster_group_module.rst b/docs/plugins/netbox_cluster_group_module.rst index b0c95357f..547713794 100644 --- a/docs/plugins/netbox_cluster_group_module.rst +++ b/docs/plugins/netbox_cluster_group_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_cluster_module.rst b/docs/plugins/netbox_cluster_module.rst index c17b01a0d..f38502ebe 100644 --- a/docs/plugins/netbox_cluster_module.rst +++ b/docs/plugins/netbox_cluster_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_cluster_type_module.rst b/docs/plugins/netbox_cluster_type_module.rst index 7841e23cf..65bdb5e20 100644 --- a/docs/plugins/netbox_cluster_type_module.rst +++ b/docs/plugins/netbox_cluster_type_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_config_context_module.rst b/docs/plugins/netbox_config_context_module.rst index 3d87bdac4..e1e8705fa 100644 --- a/docs/plugins/netbox_config_context_module.rst +++ b/docs/plugins/netbox_config_context_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_config_template_module.rst b/docs/plugins/netbox_config_template_module.rst index 65031d5e6..33c652098 100644 --- a/docs/plugins/netbox_config_template_module.rst +++ b/docs/plugins/netbox_config_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_console_port_module.rst b/docs/plugins/netbox_console_port_module.rst index 52b0685ed..75f18bcd8 100644 --- a/docs/plugins/netbox_console_port_module.rst +++ b/docs/plugins/netbox_console_port_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_console_port_template_module.rst b/docs/plugins/netbox_console_port_template_module.rst index 748e3cafa..08dd9215f 100644 --- a/docs/plugins/netbox_console_port_template_module.rst +++ b/docs/plugins/netbox_console_port_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_console_server_port_module.rst b/docs/plugins/netbox_console_server_port_module.rst index abeddaff6..eb14d265b 100644 --- a/docs/plugins/netbox_console_server_port_module.rst +++ b/docs/plugins/netbox_console_server_port_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_console_server_port_template_module.rst b/docs/plugins/netbox_console_server_port_template_module.rst index a733f1e00..a36a72d5b 100644 --- a/docs/plugins/netbox_console_server_port_template_module.rst +++ b/docs/plugins/netbox_console_server_port_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_contact_group_module.rst b/docs/plugins/netbox_contact_group_module.rst index b02ed35d7..af898bc34 100644 --- a/docs/plugins/netbox_contact_group_module.rst +++ b/docs/plugins/netbox_contact_group_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_contact_module.rst b/docs/plugins/netbox_contact_module.rst index 9997173a4..37d57552f 100644 --- a/docs/plugins/netbox_contact_module.rst +++ b/docs/plugins/netbox_contact_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_contact_role_module.rst b/docs/plugins/netbox_contact_role_module.rst index baf0bcbc1..e17d765e1 100644 --- a/docs/plugins/netbox_contact_role_module.rst +++ b/docs/plugins/netbox_contact_role_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_custom_field_choice_set_module.rst b/docs/plugins/netbox_custom_field_choice_set_module.rst new file mode 100644 index 000000000..8b4e168b0 --- /dev/null +++ b/docs/plugins/netbox_custom_field_choice_set_module.rst @@ -0,0 +1,762 @@ + +.. Document meta + +:orphan: + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. meta:: + :antsibull-docs: 2.7.0 + +.. Anchors + +.. _ansible_collections.netbox.netbox.netbox_custom_field_choice_set_module: + +.. Anchors: short name for ansible.builtin + +.. Title + +netbox.netbox.netbox_custom_field_choice_set module -- Creates, updates or deletes custom field choice sets within Netbox ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This module is part of the `netbox.netbox collection `_ (version 3.18.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_custom_field_choice_set`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in netbox.netbox 3.18.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Creates, updates or removes custom fields choice sets from Netbox + + +.. Aliases + + +.. Requirements + +.. _ansible_collections.netbox.netbox.netbox_custom_field_choice_set_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_custom_field_choice_set_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_custom_field_choice_set_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 choice set + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_custom_field_choice_set_module__parameter-data/base_choices: + + .. rst-class:: ansible-option-title + + **base_choices** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Selection of base choice to use in the choice set + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`"IATA"` + - :ansible-option-choices-entry:`"ISO\_3166"` + - :ansible-option-choices-entry:`"UN\_LOCODE"` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_custom_field_choice_set_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 choice set + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_custom_field_choice_set_module__parameter-data/extra_choices: + + .. rst-class:: ansible-option-title + + **extra_choices** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`list` / :ansible-option-elements:`elements=list` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + List of available choices in the choice set + + + .. rst-class:: ansible-option-line + + :ansible-option-default-bold:`Default:` :ansible-option-default:`[]` + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_custom_field_choice_set_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 choice set + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_custom_field_choice_set_module__parameter-data/order_alphabetically: + + .. rst-class:: ansible-option-title + + **order_alphabetically** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`boolean` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + Order the choices alphabetically + + + .. 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_custom_field_choice_set_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_custom_field_choice_set_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_custom_field_choice_set_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_custom_field_choice_set_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_custom_field_choice_set_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:: + - This should be run with connection \ :literal:`local`\ and hosts \ :literal:`localhost`\ + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: "Test Netbox custom_field_choice_set module" + connection: local + hosts: localhost + tasks: + - name: Create a choice set with choices + netbox.netbox.netbox_custom_field_choice_set: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: "ChoiceSetName" + description: "Choice Set Description" + extra_choices: + - ['choice1', 'label1'] + - ['choice2', 'label2'] + + - name: Create a choice set with a base choice + netbox.netbox.netbox_custom_field_choice_set: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: "ChoiceSetName" + description: "Choice Set Description" + order_alphabetically: true + base_choices: "IATA" + + + + +.. 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_custom_field_choice_set_module__return-custom_field_choice_set: + + .. rst-class:: ansible-option-title + + **custom_field_choice_set** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Serialized object as created/existent/updated/deleted within NetBox + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` always + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_custom_field_choice_set_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 + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Philipp Rintz (@p-rintz) + + + +.. 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_custom_field_module.rst b/docs/plugins/netbox_custom_field_module.rst index 24d2e6e43..cae37424e 100644 --- a/docs/plugins/netbox_custom_field_module.rst +++ b/docs/plugins/netbox_custom_field_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -160,25 +160,25 @@ Parameters * - .. raw:: html
-
+
.. raw:: latex \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} - .. _ansible_collections.netbox.netbox.netbox_custom_field_module__parameter-data/choices: + .. _ansible_collections.netbox.netbox.netbox_custom_field_module__parameter-data/choice_set: .. rst-class:: ansible-option-title - **choices** + **choice_set** .. raw:: html - + .. ansible-option-type-line:: - :ansible-option-type:`list` / :ansible-option-elements:`elements=string` + :ansible-option-type:`string` .. raw:: html @@ -192,7 +192,7 @@ Parameters
- List of available choices (for selection fields) + The name of the choice set to use (for selection fields) .. raw:: html @@ -1149,6 +1149,18 @@ Examples name: A Custom Field type: text + - name: Create a custom field of type selection + netbox.netbox.netbox_custom_field: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: "Custom_Field" + content_types: + - dcim.device + - virtualization.virtualmachine + type: select + choice_set: A Choice Set name + - name: Update the custom field to make it required netbox.netbox.netbox_custom_field: netbox_url: http://netbox.local diff --git a/docs/plugins/netbox_custom_link_module.rst b/docs/plugins/netbox_custom_link_module.rst index 3348ef6fe..d5da98511 100644 --- a/docs/plugins/netbox_custom_link_module.rst +++ b/docs/plugins/netbox_custom_link_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_device_bay_module.rst b/docs/plugins/netbox_device_bay_module.rst index 56b730e40..64ca07256 100644 --- a/docs/plugins/netbox_device_bay_module.rst +++ b/docs/plugins/netbox_device_bay_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_device_bay_template_module.rst b/docs/plugins/netbox_device_bay_template_module.rst index 0c255076f..cbd59637f 100644 --- a/docs/plugins/netbox_device_bay_template_module.rst +++ b/docs/plugins/netbox_device_bay_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_device_interface_module.rst b/docs/plugins/netbox_device_interface_module.rst index c80d1af13..a1b1126d5 100644 --- a/docs/plugins/netbox_device_interface_module.rst +++ b/docs/plugins/netbox_device_interface_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_device_interface_template_module.rst b/docs/plugins/netbox_device_interface_template_module.rst index 56f28d7be..02f883336 100644 --- a/docs/plugins/netbox_device_interface_template_module.rst +++ b/docs/plugins/netbox_device_interface_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_device_module.rst b/docs/plugins/netbox_device_module.rst index 47d068742..55fbde240 100644 --- a/docs/plugins/netbox_device_module.rst +++ b/docs/plugins/netbox_device_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -846,7 +846,7 @@ Parameters .. ansible-option-type-line:: - :ansible-option-type:`integer` + :ansible-option-type:`float` .. raw:: html @@ -1602,7 +1602,7 @@ Examples data: name: Test Device rack: Test Rack - position: 10 + position: 10.5 face: Front state: present diff --git a/docs/plugins/netbox_device_role_module.rst b/docs/plugins/netbox_device_role_module.rst index 575aa75e2..d2b2c6fae 100644 --- a/docs/plugins/netbox_device_role_module.rst +++ b/docs/plugins/netbox_device_role_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_device_type_module.rst b/docs/plugins/netbox_device_type_module.rst index 97e4d9c61..4412fac8d 100644 --- a/docs/plugins/netbox_device_type_module.rst +++ b/docs/plugins/netbox_device_type_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -726,7 +726,7 @@ Parameters .. ansible-option-type-line:: - :ansible-option-type:`integer` + :ansible-option-type:`float` .. raw:: html @@ -1087,7 +1087,7 @@ Examples model: ws-test-3750 manufacturer: Test Manufacturer part_number: ws-3750g-v2 - u_height: 1 + u_height: 1.5 is_full_depth: False subdevice_role: parent state: present diff --git a/docs/plugins/netbox_export_template_module.rst b/docs/plugins/netbox_export_template_module.rst index 695917d5c..82827bb79 100644 --- a/docs/plugins/netbox_export_template_module.rst +++ b/docs/plugins/netbox_export_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -719,29 +719,37 @@ Examples .. code-block:: yaml+jinja - - name: "Test NetBox custom_link module" + - name: "Test NetBox export_templates module" connection: local hosts: localhost tasks: - - name: Create a custom link on device + - name: "Ensure export template for /etc/hosts entries exists" netbox.netbox.netbox_export_template: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: - content_type: "dcim.device" - name: Custom Link - link_text: "Open Web Management" - link_url: !unsafe https://{{ obj.name }}.domain.local - - - name: Delete the custom link + content_types: ["dcim.device", "virtualization.virtualmachine"] + name: /etc/hosts + description: "Generate entries for /etc/hosts" + as_attachment: true + template_code: !unsafe | + {% for vm in queryset -%} + {%- if vm.primary_ip4 and vm.primary_ip6 %} + {{ vm.primary_ip4.address.ip }} {{ vm.primary_ip6.address.ip }} {{ vm }} + {%- elif vm.primary_ip4 %} + {{ vm.primary_ip4.address.ip }} {{ vm }} + {%- elif vm.primary_ip6 %} + {{ vm.primary_ip6.address.ip }} {{ vm }} + {%- endif -%} + {%- endfor %} + + - name: Delete the export template netbox.netbox.netbox_export_template: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: - content_type: "dcim.device" - name: Custom Link - link_text: "Open Web Management" - link_url: !unsafe https://{{ obj.name }}.domain.local + content_type: "dcim.device" + name: /etc/hosts state: absent diff --git a/docs/plugins/netbox_fhrp_group_assignment_module.rst b/docs/plugins/netbox_fhrp_group_assignment_module.rst index 493125183..5abb70084 100644 --- a/docs/plugins/netbox_fhrp_group_assignment_module.rst +++ b/docs/plugins/netbox_fhrp_group_assignment_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_fhrp_group_module.rst b/docs/plugins/netbox_fhrp_group_module.rst index 15d4c16d2..8afcf6262 100644 --- a/docs/plugins/netbox_fhrp_group_module.rst +++ b/docs/plugins/netbox_fhrp_group_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_front_port_module.rst b/docs/plugins/netbox_front_port_module.rst index b2914909b..0333c2ccb 100644 --- a/docs/plugins/netbox_front_port_module.rst +++ b/docs/plugins/netbox_front_port_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_front_port_template_module.rst b/docs/plugins/netbox_front_port_template_module.rst index ad173b378..3fd593dc6 100644 --- a/docs/plugins/netbox_front_port_template_module.rst +++ b/docs/plugins/netbox_front_port_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_interface_module.rst b/docs/plugins/netbox_interface_module.rst index 53fe418d2..2aa24f73a 100644 --- a/docs/plugins/netbox_interface_module.rst +++ b/docs/plugins/netbox_interface_module.rst @@ -18,7 +18,7 @@ netbox.netbox.netbox_interface .. Collection note .. note:: - This plugin was part of the `netbox.netbox collection `_ (version 3.17.0). + This plugin was part of the `netbox.netbox collection `_ (version 3.18.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 86a7ad6e5..018c4318e 100644 --- a/docs/plugins/netbox_inventory_item_module.rst +++ b/docs/plugins/netbox_inventory_item_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_inventory_item_role_module.rst b/docs/plugins/netbox_inventory_item_role_module.rst index bf115eb58..933d52e5f 100644 --- a/docs/plugins/netbox_inventory_item_role_module.rst +++ b/docs/plugins/netbox_inventory_item_role_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_ip_address_module.rst b/docs/plugins/netbox_ip_address_module.rst index 77500a2be..7820c28ee 100644 --- a/docs/plugins/netbox_ip_address_module.rst +++ b/docs/plugins/netbox_ip_address_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_ipam_role_module.rst b/docs/plugins/netbox_ipam_role_module.rst index 10819760e..72c1a7795 100644 --- a/docs/plugins/netbox_ipam_role_module.rst +++ b/docs/plugins/netbox_ipam_role_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_journal_entry_module.rst b/docs/plugins/netbox_journal_entry_module.rst index 8811c918c..b93be3f61 100644 --- a/docs/plugins/netbox_journal_entry_module.rst +++ b/docs/plugins/netbox_journal_entry_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_l2vpn_module.rst b/docs/plugins/netbox_l2vpn_module.rst index 1cb005521..51aae8bad 100644 --- a/docs/plugins/netbox_l2vpn_module.rst +++ b/docs/plugins/netbox_l2vpn_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_l2vpn_termination_module.rst b/docs/plugins/netbox_l2vpn_termination_module.rst index 7a718c357..456635103 100644 --- a/docs/plugins/netbox_l2vpn_termination_module.rst +++ b/docs/plugins/netbox_l2vpn_termination_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_location_module.rst b/docs/plugins/netbox_location_module.rst index 366ff9452..cc792a21c 100644 --- a/docs/plugins/netbox_location_module.rst +++ b/docs/plugins/netbox_location_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_manufacturer_module.rst b/docs/plugins/netbox_manufacturer_module.rst index b162c04f5..338b46357 100644 --- a/docs/plugins/netbox_manufacturer_module.rst +++ b/docs/plugins/netbox_manufacturer_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_module_bay_module.rst b/docs/plugins/netbox_module_bay_module.rst new file mode 100644 index 000000000..613de7741 --- /dev/null +++ b/docs/plugins/netbox_module_bay_module.rst @@ -0,0 +1,825 @@ + +.. Document meta + +:orphan: + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. meta:: + :antsibull-docs: 2.7.0 + +.. Anchors + +.. _ansible_collections.netbox.netbox.netbox_module_bay_module: + +.. Anchors: short name for ansible.builtin + +.. Title + +netbox.netbox.netbox_module_bay module -- Create, update or delete module bay within NetBox ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This module is part of the `netbox.netbox collection `_ (version 3.18.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_module_bay`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in netbox.netbox 3.18.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Creates, updates or removes module bay from NetBox + + +.. Aliases + + +.. Requirements + +.. _ansible_collections.netbox.netbox.netbox_module_bay_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_module_bay_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_module_bay_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 module bay configuration + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_bay_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_module_bay_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 module bay + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_bay_module__parameter-data/device: + + .. rst-class:: ansible-option-title + + **device** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The device of the module bay + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_bay_module__parameter-data/label: + + .. rst-class:: ansible-option-title + + **label** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The label of the module bay + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_bay_module__parameter-data/name: + + .. rst-class:: ansible-option-title + + **name** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The model of the module bay + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_bay_module__parameter-data/position: + + .. rst-class:: ansible-option-title + + **position** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The position of the module bay + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_bay_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 module bay may need to be associated with + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_module_bay_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_module_bay_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_module_bay_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_module_bay_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_module_bay_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 module bay within NetBox with only required information + netbox.netbox.netbox_module_bay: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + device: C9300-DEMO + name: C9300-DEMO-SLOT-0 + position: 0 + state: present + + - name: Delete module bay within netbox + netbox.netbox.netbox_module_bay: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: C9300-DEMO-SLOT-0 + 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_module_bay_module__return-module_bay: + + .. rst-class:: ansible-option-title + + **module_bay** + + .. 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 + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_module_bay_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 + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Erwan TONNERRE (@etonnerre) + + + +.. 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_module_module.rst b/docs/plugins/netbox_module_module.rst new file mode 100644 index 000000000..e014a8f2f --- /dev/null +++ b/docs/plugins/netbox_module_module.rst @@ -0,0 +1,984 @@ + +.. Document meta + +:orphan: + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. meta:: + :antsibull-docs: 2.7.0 + +.. Anchors + +.. _ansible_collections.netbox.netbox.netbox_module_module: + +.. Anchors: short name for ansible.builtin + +.. Title + +netbox.netbox.netbox_module module -- Create, update or delete module within NetBox ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This module is part of the `netbox.netbox collection `_ (version 3.18.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_module`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in netbox.netbox 3.18.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Creates, updates or removes module from NetBox + + +.. Aliases + + +.. Requirements + +.. _ansible_collections.netbox.netbox.netbox_module_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_module_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_module_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 device type configuration + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_module__parameter-data/asset_tag: + + .. rst-class:: ansible-option-title + + **asset_tag** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The asset tag of the modyle + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_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 module + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_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_module_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 module + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_module__parameter-data/device: + + .. rst-class:: ansible-option-title + + **device** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The device of the module + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_module__parameter-data/module_bay: + + .. rst-class:: ansible-option-title + + **module_bay** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The module bay of the module + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_module__parameter-data/module_type: + + .. rst-class:: ansible-option-title + + **module_type** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`any` / :ansible-option-required:`required` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The module type of the module + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_module__parameter-data/serial: + + .. rst-class:: ansible-option-title + + **serial** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The weight of the device type + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_module__parameter-data/status: + + .. rst-class:: ansible-option-title + + **status** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The status of the module + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`"offline"` + - :ansible-option-choices-entry:`"active"` + - :ansible-option-choices-entry:`"planned"` + - :ansible-option-choices-entry:`"staged"` + - :ansible-option-choices-entry:`"side-to-rear"` + - :ansible-option-choices-entry:`"failed"` + - :ansible-option-choices-entry:`"decommissioning"` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_module_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 module may need to be associated with + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_module_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_module_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_module_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_module_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_module_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 module type within NetBox with only required information + netbox.netbox.netbox_module: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + device: C9300-DEMO + module_bay: Network Module + module_type: C9300-NM-8X + state: present + + - name: Create module type within NetBox + netbox.netbox.netbox_module: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + device: + name: C9300-DEMO + site: EUPARIS + module_bay: + name: Network Module + position: 1 + module_type: + manufacturer: Cisco + model: C9300-NM-8X + state: present + + - name: Delete module type within netbox + netbox.netbox.netbox_module: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + device: C9300-DEMO + module_bay: Network Module + module_type: C9300-NM-8X + asset_tag: 00001 + serial: XXXNNNNXXXX + 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_module_module__return-module: + + .. rst-class:: ansible-option-title + + **module** + + .. 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 + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_module_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 + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Erwan TONNERRE (@etonnerre) + + + +.. 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_module_type_module.rst b/docs/plugins/netbox_module_type_module.rst index c1b65065f..b139455b6 100644 --- a/docs/plugins/netbox_module_type_module.rst +++ b/docs/plugins/netbox_module_type_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_platform_module.rst b/docs/plugins/netbox_platform_module.rst index a7fd21759..b7280a3ef 100644 --- a/docs/plugins/netbox_platform_module.rst +++ b/docs/plugins/netbox_platform_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_power_feed_module.rst b/docs/plugins/netbox_power_feed_module.rst index 25e68e30c..e75e1191c 100644 --- a/docs/plugins/netbox_power_feed_module.rst +++ b/docs/plugins/netbox_power_feed_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_power_outlet_module.rst b/docs/plugins/netbox_power_outlet_module.rst index cc2155a48..4069dde6f 100644 --- a/docs/plugins/netbox_power_outlet_module.rst +++ b/docs/plugins/netbox_power_outlet_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_power_outlet_template_module.rst b/docs/plugins/netbox_power_outlet_template_module.rst index 3e17dded5..8455ed9d8 100644 --- a/docs/plugins/netbox_power_outlet_template_module.rst +++ b/docs/plugins/netbox_power_outlet_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_power_panel_module.rst b/docs/plugins/netbox_power_panel_module.rst index 4ce4ead6e..34c656caf 100644 --- a/docs/plugins/netbox_power_panel_module.rst +++ b/docs/plugins/netbox_power_panel_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_power_port_module.rst b/docs/plugins/netbox_power_port_module.rst index 9172b6cd6..52529d411 100644 --- a/docs/plugins/netbox_power_port_module.rst +++ b/docs/plugins/netbox_power_port_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -279,6 +279,51 @@ Parameters The device the power port is attached to + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.netbox.netbox.netbox_power_port_module__parameter-data/label: + + .. rst-class:: ansible-option-title + + **label** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + :ansible-option-versionadded:`added in netbox.netbox 3.18.0` + + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The label of the power port + + .. raw:: html
diff --git a/docs/plugins/netbox_power_port_template_module.rst b/docs/plugins/netbox_power_port_template_module.rst index 566ad28d6..cf841798f 100644 --- a/docs/plugins/netbox_power_port_template_module.rst +++ b/docs/plugins/netbox_power_port_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_prefix_module.rst b/docs/plugins/netbox_prefix_module.rst index b2dff30a0..41790ddba 100644 --- a/docs/plugins/netbox_prefix_module.rst +++ b/docs/plugins/netbox_prefix_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_provider_module.rst b/docs/plugins/netbox_provider_module.rst index 18baee358..ff113b098 100644 --- a/docs/plugins/netbox_provider_module.rst +++ b/docs/plugins/netbox_provider_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_provider_network_module.rst b/docs/plugins/netbox_provider_network_module.rst index f1a2b19cb..6e8561392 100644 --- a/docs/plugins/netbox_provider_network_module.rst +++ b/docs/plugins/netbox_provider_network_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_rack_group_module.rst b/docs/plugins/netbox_rack_group_module.rst index bcc012d38..32cb29754 100644 --- a/docs/plugins/netbox_rack_group_module.rst +++ b/docs/plugins/netbox_rack_group_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_rack_module.rst b/docs/plugins/netbox_rack_module.rst index 2e1b00d40..2af844e18 100644 --- a/docs/plugins/netbox_rack_module.rst +++ b/docs/plugins/netbox_rack_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -1101,7 +1101,7 @@ Parameters .. ansible-option-type-line:: - :ansible-option-type:`integer` + :ansible-option-type:`float` .. raw:: html diff --git a/docs/plugins/netbox_rack_role_module.rst b/docs/plugins/netbox_rack_role_module.rst index ec8c5cefd..47113e874 100644 --- a/docs/plugins/netbox_rack_role_module.rst +++ b/docs/plugins/netbox_rack_role_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_rear_port_module.rst b/docs/plugins/netbox_rear_port_module.rst index cee13bdfa..9af01eeff 100644 --- a/docs/plugins/netbox_rear_port_module.rst +++ b/docs/plugins/netbox_rear_port_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_rear_port_template_module.rst b/docs/plugins/netbox_rear_port_template_module.rst index 0299ae69d..c7d50c12f 100644 --- a/docs/plugins/netbox_rear_port_template_module.rst +++ b/docs/plugins/netbox_rear_port_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_region_module.rst b/docs/plugins/netbox_region_module.rst index 41f7498ea..1f1f5b5b7 100644 --- a/docs/plugins/netbox_region_module.rst +++ b/docs/plugins/netbox_region_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_rir_module.rst b/docs/plugins/netbox_rir_module.rst index 2f278b597..adfa932bc 100644 --- a/docs/plugins/netbox_rir_module.rst +++ b/docs/plugins/netbox_rir_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_route_target_module.rst b/docs/plugins/netbox_route_target_module.rst index 7c0ee6a90..be1d95ae4 100644 --- a/docs/plugins/netbox_route_target_module.rst +++ b/docs/plugins/netbox_route_target_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_service_module.rst b/docs/plugins/netbox_service_module.rst index 7c4ff7ba8..7ebcb52eb 100644 --- a/docs/plugins/netbox_service_module.rst +++ b/docs/plugins/netbox_service_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_service_template_module.rst b/docs/plugins/netbox_service_template_module.rst index 13bc0ba98..a8eaa5549 100644 --- a/docs/plugins/netbox_service_template_module.rst +++ b/docs/plugins/netbox_service_template_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_site_group_module.rst b/docs/plugins/netbox_site_group_module.rst index 90eb0f70c..95b91ae78 100644 --- a/docs/plugins/netbox_site_group_module.rst +++ b/docs/plugins/netbox_site_group_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_site_module.rst b/docs/plugins/netbox_site_module.rst index d625a06a2..4b55f9402 100644 --- a/docs/plugins/netbox_site_module.rst +++ b/docs/plugins/netbox_site_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_tag_module.rst b/docs/plugins/netbox_tag_module.rst index e49f5b968..40d60705c 100644 --- a/docs/plugins/netbox_tag_module.rst +++ b/docs/plugins/netbox_tag_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_tenant_group_module.rst b/docs/plugins/netbox_tenant_group_module.rst index f91fd8ae1..3ed872aa4 100644 --- a/docs/plugins/netbox_tenant_group_module.rst +++ b/docs/plugins/netbox_tenant_group_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_tenant_module.rst b/docs/plugins/netbox_tenant_module.rst index b4f26f78f..8a606978d 100644 --- a/docs/plugins/netbox_tenant_module.rst +++ b/docs/plugins/netbox_tenant_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_virtual_chassis_module.rst b/docs/plugins/netbox_virtual_chassis_module.rst index 17aa18299..ae5726200 100644 --- a/docs/plugins/netbox_virtual_chassis_module.rst +++ b/docs/plugins/netbox_virtual_chassis_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_virtual_disk_module.rst b/docs/plugins/netbox_virtual_disk_module.rst index 3112d6013..c259b5764 100644 --- a/docs/plugins/netbox_virtual_disk_module.rst +++ b/docs/plugins/netbox_virtual_disk_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_virtual_machine_module.rst b/docs/plugins/netbox_virtual_machine_module.rst index 71a95fbca..8c591f537 100644 --- a/docs/plugins/netbox_virtual_machine_module.rst +++ b/docs/plugins/netbox_virtual_machine_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_vlan_group_module.rst b/docs/plugins/netbox_vlan_group_module.rst index 3a3714480..cc2c938dc 100644 --- a/docs/plugins/netbox_vlan_group_module.rst +++ b/docs/plugins/netbox_vlan_group_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_vlan_module.rst b/docs/plugins/netbox_vlan_module.rst index d92f05cc8..b96da4814 100644 --- a/docs/plugins/netbox_vlan_module.rst +++ b/docs/plugins/netbox_vlan_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_vm_interface_module.rst b/docs/plugins/netbox_vm_interface_module.rst index 50a607ad6..af0171388 100644 --- a/docs/plugins/netbox_vm_interface_module.rst +++ b/docs/plugins/netbox_vm_interface_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_vrf_module.rst b/docs/plugins/netbox_vrf_module.rst index 4f9ac686c..8107990ea 100644 --- a/docs/plugins/netbox_vrf_module.rst +++ b/docs/plugins/netbox_vrf_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_webhook_module.rst b/docs/plugins/netbox_webhook_module.rst index bac05070b..fa20b238e 100644 --- a/docs/plugins/netbox_webhook_module.rst +++ b/docs/plugins/netbox_webhook_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_wireless_lan_group_module.rst b/docs/plugins/netbox_wireless_lan_group_module.rst index 95e066f22..479fa8a36 100644 --- a/docs/plugins/netbox_wireless_lan_group_module.rst +++ b/docs/plugins/netbox_wireless_lan_group_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_wireless_lan_module.rst b/docs/plugins/netbox_wireless_lan_module.rst index 63adcd848..285a54ea6 100644 --- a/docs/plugins/netbox_wireless_lan_module.rst +++ b/docs/plugins/netbox_wireless_lan_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/docs/plugins/netbox_wireless_link_module.rst b/docs/plugins/netbox_wireless_link_module.rst index 597ac26f5..adf0384ce 100644 --- a/docs/plugins/netbox_wireless_link_module.rst +++ b/docs/plugins/netbox_wireless_link_module.rst @@ -23,7 +23,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.17.0). + This module is part of the `netbox.netbox collection `_ (version 3.18.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. diff --git a/galaxy.yml b/galaxy.yml index ab142029b..f2431133a 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.17.0 +version: 3.18.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 1c3faae8c..5c69ef1db 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -50,6 +50,8 @@ action_groups: - netbox_l2vpn_termination - netbox_location - netbox_manufacturer + - netbox_module + - netbox_module_bay - netbox_module_type - netbox_platform - netbox_power_feed diff --git a/plugins/inventory/nb_inventory.py b/plugins/inventory/nb_inventory.py index da9f5ed72..77c501939 100644 --- a/plugins/inventory/nb_inventory.py +++ b/plugins/inventory/nb_inventory.py @@ -13,6 +13,7 @@ - Nikhil Singh Baliyan (@nikkytub) - Sander Steffann (@steffann) - Douglas Heriot (@DouglasHeriot) + - Thore Knickrehm (@tkn2023) short_description: NetBox inventory source description: - Get inventory hosts from NetBox @@ -99,6 +100,12 @@ default: True type: boolean version_added: "0.2.1" + virtual_disks: + description: + - If True, it adds the virtual disks information in host vars. + default: False + type: boolean + version_added: "3.18.0" interfaces: description: - If True, it adds the device or virtual machine interface information in host vars. @@ -238,6 +245,10 @@ type: boolean default: True version_added: "3.6.0" + oob_ip_as_primary_ip: + description: Use out of band IP as `ansible host` + type: boolean + default: False """ EXAMPLES = """ @@ -588,7 +599,12 @@ def group_extractors(self): "services": self.extract_services, } ) - + if self.virtual_disks: + extractors.update( + { + "virtual_disks": self.extract_virtual_disks, + } + ) if self.interfaces: extractors.update( { @@ -820,6 +836,13 @@ def extract_primary_ip6(self, host): except Exception: return + def extract_oob_ip(self, host): + try: + address = host["oob_ip"]["address"] + return str(ip_interface(address).ip) + except Exception: + return + def extract_tags(self, host): try: tag_zero = host["tags"][0] @@ -834,6 +857,15 @@ def extract_tags(self, host): except Exception: return host["tags"] + def extract_virtual_disks(self, host): + try: + virtual_disks_lookup = self.vm_virtual_disks_lookup + virtual_disks = deepcopy(list(virtual_disks_lookup[host["id"]].values())) + + return virtual_disks + except Exception: + return + def extract_interfaces(self, host): try: interfaces_lookup = ( @@ -867,7 +899,11 @@ def extract_interfaces(self, host): def extract_custom_fields(self, host): try: - return host["custom_fields"] + return { + key: value + for key, value in host["custom_fields"].items() + if value is not None + } except Exception: return @@ -1295,6 +1331,30 @@ def refresh_services(self): service_id ] = service + def refresh_virtual_disks(self): + url_vm_virtual_disks = ( + self.api_endpoint + "/api/virtualization/virtual-disks/?limit=0" + ) + + vm_virtual_disks = [] + + if self.fetch_all: + vm_virtual_disks = self.get_resource_list(url_vm_virtual_disks) + else: + vm_virtual_disks = self.get_resource_list_chunked( + api_url=url_vm_virtual_disks, + query_key="virtual_machine_id", + query_values=self.vms_lookup.keys(), + ) + + self.vm_virtual_disks_lookup = defaultdict(dict) + + for virtual_disk in vm_virtual_disks: + virtual_disk_id = virtual_disk["id"] + vm_id = virtual_disk["virtual_machine"]["id"] + + self.vm_virtual_disks_lookup[vm_id][virtual_disk_id] = virtual_disk + def refresh_interfaces(self): url_device_interfaces = self.api_endpoint + "/api/dcim/interfaces/?limit=0" url_vm_interfaces = ( @@ -1441,6 +1501,8 @@ def lookup_processes(self): self.refresh_manufacturers_lookup, self.refresh_clusters_lookup, ] + if self.virtual_disks: + lookups.append(self.refresh_virtual_disks) if self.interfaces: lookups.append(self.refresh_interfaces) @@ -1863,6 +1925,12 @@ def _fill_host_variables(self, host, hostname): if extracted_primary_ip6: self.inventory.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) + if self.oob_ip_as_primary_ip: + self.inventory.set_variable(hostname, "ansible_host", extracted_oob_ip) + for attribute, extractor in self.group_extractors.items(): extracted_value = extractor(host) @@ -2040,6 +2108,7 @@ def parse(self, inventory, loader, path, cache=True): self.flatten_local_context_data = self.get_option("flatten_local_context_data") self.flatten_custom_fields = self.get_option("flatten_custom_fields") self.plurals = self.get_option("plurals") + self.virtual_disks = self.get_option("virtual_disks") self.interfaces = self.get_option("interfaces") self.services = self.get_option("services") self.site_data = self.get_option("site_data") @@ -2053,6 +2122,7 @@ def parse(self, inventory, loader, path, cache=True): self.cert = self.get_option("cert") 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._set_authorization() diff --git a/plugins/lookup/nb_lookup.py b/plugins/lookup/nb_lookup.py index 01e4d56aa..b70cb22aa 100644 --- a/plugins/lookup/nb_lookup.py +++ b/plugins/lookup/nb_lookup.py @@ -181,6 +181,9 @@ def get_endpoint(netbox, term): "console-server-ports": {"endpoint": netbox.dcim.console_server_ports}, "content-types": {"endpoint": netbox.extras.content_types}, "custom-fields": {"endpoint": netbox.extras.custom_fields}, + "custom-field-choice-sets": { + "endpoint": netbox.extras.custom_field_choice_sets + }, "custom-links": {"endpoint": netbox.extras.custom_links}, "device-bay-templates": {"endpoint": netbox.dcim.device_bay_templates}, "device-bays": {"endpoint": netbox.dcim.device_bays}, @@ -247,6 +250,7 @@ def get_endpoint(netbox, term): "topology-maps": {"endpoint": netbox.extras.topology_maps}, "users": {"endpoint": netbox.users.users}, "virtual-chassis": {"endpoint": netbox.dcim.virtual_chassis}, + "virtual-disks": {"endpoint": netbox.virtualization.virtual_disks}, "virtual-machines": {"endpoint": netbox.virtualization.virtual_machines}, "virtualization-interfaces": {"endpoint": netbox.virtualization.interfaces}, "vlan-groups": {"endpoint": netbox.ipam.vlan_groups}, diff --git a/plugins/module_utils/netbox_dcim.py b/plugins/module_utils/netbox_dcim.py index 2482c90cf..b9d5edc12 100644 --- a/plugins/module_utils/netbox_dcim.py +++ b/plugins/module_utils/netbox_dcim.py @@ -32,6 +32,8 @@ NB_INVENTORY_ITEM_ROLES = "inventory_item_roles" NB_LOCATIONS = "locations" NB_MANUFACTURERS = "manufacturers" +NB_MODULES = "modules" +NB_MODULE_BAYS = "module_bays" NB_MODULE_TYPES = "module_types" NB_PLATFORMS = "platforms" NB_POWER_FEEDS = "power_feeds" @@ -91,6 +93,9 @@ def run(self): - inventory_item_roles - locations - manufacturers + - modules + - module_bays + - module_types - platforms - power_feeds - power_outlets @@ -150,6 +155,38 @@ def run(self): data.get("termination_b_type"), termination_b_name, ) + elif endpoint_name == "module": + if isinstance( + self.module.params["data"]["device"], dict + ) and self.module.params["data"]["device"].get("name"): + device_name = self.module.params["data"]["device"]["name"] + elif isinstance( + self.module.params["data"]["device"], dict + ) and self.module.params["data"]["device"].get("slug"): + device_name = self.module.params["data"]["device"]["slug"] + else: + device_name = self.module.params["data"]["device"] + if isinstance( + self.module.params["data"]["module_bay"], dict + ) and self.module.params["data"]["module_bay"].get("name"): + module_bay = self.module.params["data"]["module_bay"]["name"] + elif isinstance( + self.module.params["data"]["module_bay"], dict + ) and self.module.params["data"]["module_bay"].get("slug"): + module_bay = self.module.params["data"]["module_bay"]["slug"] + else: + module_bay = self.module.params["data"]["module_bay"] + if isinstance( + self.module.params["data"]["module_type"], dict + ) and self.module.params["data"]["module_bay"].get("model"): + module_type = self.module.params["data"]["module_type"]["model"] + elif isinstance( + self.module.params["data"]["module_type"], dict + ) and self.module.params["data"]["module_bay"].get("part_number"): + module_type = self.module.params["data"]["module_type"]["part_number"] + else: + module_type = self.module.params["data"]["module_type"] + name = "%s: %s (%s)" % (device_name, module_bay, module_type) if self.endpoint in SLUG_REQUIRED: if not data.get("slug"): diff --git a/plugins/module_utils/netbox_extras.py b/plugins/module_utils/netbox_extras.py index 36f4bf864..64eb9c8b9 100644 --- a/plugins/module_utils/netbox_extras.py +++ b/plugins/module_utils/netbox_extras.py @@ -14,6 +14,7 @@ NB_CONFIG_CONTEXTS = "config_contexts" NB_TAGS = "tags" NB_CUSTOM_FIELDS = "custom_fields" +NB_CUSTOM_FIELD_CHOICE_SETS = "custom_field_choice_sets" NB_CUSTOM_LINKS = "custom_links" NB_EXPORT_TEMPLATES = "export_templates" NB_JOURNAL_ENTRIES = "journal_entries" diff --git a/plugins/module_utils/netbox_utils.py b/plugins/module_utils/netbox_utils.py index 04c327ff8..8e9215ef8 100644 --- a/plugins/module_utils/netbox_utils.py +++ b/plugins/module_utils/netbox_utils.py @@ -58,6 +58,8 @@ "inventory_item_roles": {}, "locations": {}, "manufacturers": {}, + "modules": {}, + "module_bays": {}, "module_types": {}, "platforms": {}, "power_feeds": {}, @@ -82,6 +84,7 @@ "config_templates": {}, "tags": {}, "custom_fields": {}, + "custom_field_choice_sets": {}, "custom_links": {}, "export_templates": {}, "journal_entries": {}, @@ -145,6 +148,7 @@ contact_group="name", contact_role="name", custom_field="name", + choice_set="name", custom_link="name", device="name", device_role="slug", @@ -161,6 +165,8 @@ l2vpn_termination="id", location="slug", manufacturer="slug", + modules="id", + module_bays="name", module_type="model", nat_inside="address", nat_outside="address", @@ -226,6 +232,7 @@ "config_context": "config_contexts", "config_template": "config_templates", "contact_groups": "contact_groups", + "choice_set": "custom_field_choice_sets", "dcim.consoleport": "console_ports", "dcim.consoleserverport": "console_server_ports", "dcim.frontport": "front_ports", @@ -254,6 +261,8 @@ "lag": "interfaces", "manufacturer": "manufacturers", "master": "devices", + "module": "modules", + "module_bay": "module_bays", "module_type": "module_types", "nat_inside": "ip_addresses", "nat_outside": "ip_addresses", @@ -338,6 +347,7 @@ "contact_groups": "contact_group", "contact_roles": "contact_role", "custom_fields": "custom_field", + "custom_field_choice_sets": "choice_set", "custom_links": "custom_link", "device_bays": "device_bay", "device_bay_templates": "device_bay_template", @@ -359,6 +369,8 @@ "l2vpn_terminations": "l2vpn_termination", "locations": "location", "manufacturers": "manufacturer", + "modules": "module", + "module_bays": "module_bay", "module_types": "module_type", "platforms": "platform", "power_feeds": "power_feed", @@ -438,6 +450,8 @@ "contact_group": set(["name"]), "contact_role": set(["name"]), "custom_field": set(["name"]), + "custom_field_choice_set": set(["name"]), + "choice_set": set(["name"]), "custom_link": set(["name"]), "dcim.consoleport": set(["name", "device"]), "dcim.consoleserverport": set(["name", "device"]), @@ -477,6 +491,8 @@ ), "lag": set(["name"]), "location": set(["name", "slug", "site"]), + "module": set(["device", "module_bay", "module_type"]), + "module_bay": set(["name"]), "module_type": set(["model"]), "manufacturer": set(["slug"]), "master": set(["name"]), @@ -1072,6 +1088,13 @@ def _build_query_params( query_key: module_data.get("assigned_object_id"), } ) + elif parent == "module": + query_dict.update( + { + "module_bay_id": query_dict.pop("module_bay"), + "module_type_id": query_dict.pop("module_type"), + } + ) elif "_template" in parent: if query_dict.get("device_type"): query_dict["devicetype_id"] = query_dict.pop("device_type") diff --git a/plugins/modules/netbox_custom_field.py b/plugins/modules/netbox_custom_field.py index eadfad6d5..ed9c8ed0a 100644 --- a/plugins/modules/netbox_custom_field.py +++ b/plugins/modules/netbox_custom_field.py @@ -132,12 +132,11 @@ - The regular expression to enforce on text fields required: false type: str - choices: + choice_set: description: - - List of available choices (for selection fields) + - The name of the choice set to use (for selection fields) required: false - type: list - elements: str + type: str required: true """ @@ -157,6 +156,18 @@ name: A Custom Field type: text + - name: Create a custom field of type selection + netbox.netbox.netbox_custom_field: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: "Custom_Field" + content_types: + - dcim.device + - virtualization.virtualmachine + type: select + choice_set: A Choice Set name + - name: Update the custom field to make it required netbox.netbox.netbox_custom_field: netbox_url: http://netbox.local @@ -258,7 +269,10 @@ def main(): validation_minimum=dict(required=False, type="int"), validation_maximum=dict(required=False, type="int"), validation_regex=dict(required=False, type="str"), - choices=dict(required=False, type="list", elements="str"), + choice_set=dict( + required=False, + type="str", + ), ), ) ) diff --git a/plugins/modules/netbox_custom_field_choice_set.py b/plugins/modules/netbox_custom_field_choice_set.py new file mode 100644 index 000000000..89badcbd3 --- /dev/null +++ b/plugins/modules/netbox_custom_field_choice_set.py @@ -0,0 +1,164 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright: (c) 2024, Philipp Rintz (@p-rintz) +# 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_custom_field_choice_set +short_description: Creates, updates or deletes custom field choice sets within Netbox +description: + - Creates, updates or removes custom fields choice sets from Netbox +notes: + - This should be run with connection C(local) and hosts C(localhost) +author: + - Philipp Rintz (@p-rintz) +requirements: + - pynetbox +version_added: "3.18.0" +extends_documentation_fragment: + - netbox.netbox.common +options: + data: + type: dict + description: + - Defines the choice set + suboptions: + name: + description: + - Name of the choice set + required: true + type: str + description: + description: + - Description of the choice set + required: false + type: str + extra_choices: + description: + - List of available choices in the choice set + required: false + default: [] + type: list + elements: list + base_choices: + description: + - Selection of base choice to use in the choice set + required: false + type: str + choices: + - IATA + - ISO_3166 + - UN_LOCODE + order_alphabetically: + description: + - Order the choices alphabetically + required: false + type: bool + required: true +""" + +EXAMPLES = r""" +- name: "Test Netbox custom_field_choice_set module" + connection: local + hosts: localhost + tasks: + - name: Create a choice set with choices + netbox.netbox.netbox_custom_field_choice_set: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: "ChoiceSetName" + description: "Choice Set Description" + extra_choices: + - ['choice1', 'label1'] + - ['choice2', 'label2'] + + - name: Create a choice set with a base choice + netbox.netbox.netbox_custom_field_choice_set: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: "ChoiceSetName" + description: "Choice Set Description" + order_alphabetically: true + base_choices: "IATA" +""" + +RETURN = r""" +custom_field_choice_set: + description: Serialized object as created/existent/updated/deleted within NetBox + returned: always + 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_extras import ( + NetboxExtrasModule, + NB_CUSTOM_FIELD_CHOICE_SETS, +) +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"), + base_choices=dict( + required=False, + type="str", + choices=[ + "IATA", + "ISO_3166", + "UN_LOCODE", + ], + ), + extra_choices=dict( + required=False, + default=[], + type="list", + elements="list", + ), + order_alphabetically=dict(required=False, type="bool"), + ), + ) + ) + ) + + required_if = [ + ("state", "present", ["name"]), + ("state", "absent", ["name"]), + ] + + module = NetboxAnsibleModule( + argument_spec=argument_spec, supports_check_mode=True, required_if=required_if + ) + + netbox_custom_field_choice_set = NetboxExtrasModule( + module, NB_CUSTOM_FIELD_CHOICE_SETS + ) + netbox_custom_field_choice_set.run() + + +if __name__ == "__main__": # pragma: no cover + main() diff --git a/plugins/modules/netbox_device.py b/plugins/modules/netbox_device.py index a76cfe53f..30c8d003c 100644 --- a/plugins/modules/netbox_device.py +++ b/plugins/modules/netbox_device.py @@ -85,7 +85,7 @@ description: - The position of the device in the rack defined above required: false - type: int + type: float face: description: - Required if I(rack) is defined @@ -247,7 +247,7 @@ data: name: Test Device rack: Test Rack - position: 10 + position: 10.5 face: Front state: present """ @@ -296,7 +296,7 @@ def main(): site=dict(required=False, type="raw"), location=dict(required=False, type="raw"), rack=dict(required=False, type="raw"), - position=dict(required=False, type="int"), + position=dict(required=False, type="float"), face=dict( required=False, type="str", diff --git a/plugins/modules/netbox_device_type.py b/plugins/modules/netbox_device_type.py index be67ec7c9..118fbfe77 100644 --- a/plugins/modules/netbox_device_type.py +++ b/plugins/modules/netbox_device_type.py @@ -54,7 +54,7 @@ description: - The height of the device type in rack units required: false - type: int + type: float weight: description: - The weight of the device type @@ -159,7 +159,7 @@ model: ws-test-3750 manufacturer: Test Manufacturer part_number: ws-3750g-v2 - u_height: 1 + u_height: 1.5 is_full_depth: False subdevice_role: parent state: present @@ -210,7 +210,7 @@ def main(): model=dict(required=True, type="raw"), slug=dict(required=False, type="str"), part_number=dict(required=False, type="str"), - u_height=dict(required=False, type="int"), + u_height=dict(required=False, type="float"), weight=dict(required=False, type="float"), weight_unit=dict( required=False, diff --git a/plugins/modules/netbox_export_template.py b/plugins/modules/netbox_export_template.py index ef9ba5f47..bd3056db4 100644 --- a/plugins/modules/netbox_export_template.py +++ b/plugins/modules/netbox_export_template.py @@ -75,29 +75,37 @@ """ EXAMPLES = r""" -- name: "Test NetBox custom_link module" +- name: "Test NetBox export_templates module" connection: local hosts: localhost tasks: - - name: Create a custom link on device + - name: "Ensure export template for /etc/hosts entries exists" netbox.netbox.netbox_export_template: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: - content_type: "dcim.device" - name: Custom Link - link_text: "Open Web Management" - link_url: !unsafe https://{{ obj.name }}.domain.local + content_types: ["dcim.device", "virtualization.virtualmachine"] + name: /etc/hosts + description: "Generate entries for /etc/hosts" + as_attachment: true + template_code: !unsafe | + {% for vm in queryset -%} + {%- if vm.primary_ip4 and vm.primary_ip6 %} + {{ vm.primary_ip4.address.ip }} {{ vm.primary_ip6.address.ip }} {{ vm }} + {%- elif vm.primary_ip4 %} + {{ vm.primary_ip4.address.ip }} {{ vm }} + {%- elif vm.primary_ip6 %} + {{ vm.primary_ip6.address.ip }} {{ vm }} + {%- endif -%} + {%- endfor %} - - name: Delete the custom link + - name: Delete the export template netbox.netbox.netbox_export_template: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: - content_type: "dcim.device" - name: Custom Link - link_text: "Open Web Management" - link_url: !unsafe https://{{ obj.name }}.domain.local + content_type: "dcim.device" + name: /etc/hosts state: absent """ diff --git a/plugins/modules/netbox_module.py b/plugins/modules/netbox_module.py new file mode 100644 index 000000000..3fb75a031 --- /dev/null +++ b/plugins/modules/netbox_module.py @@ -0,0 +1,213 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright: (c) 2022, Erwan TONNERRE (@etonnerre) +# 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_module +short_description: Create, update or delete module within NetBox +description: + - Creates, updates or removes module from NetBox +notes: + - Tags should be defined as a YAML list + - This should be ran with connection C(local) and hosts C(localhost) +author: + - Erwan TONNERRE (@etonnerre) +requirements: + - pynetbox +version_added: '3.18.0' +extends_documentation_fragment: + - netbox.netbox.common +options: + data: + description: + - Defines the device type configuration + suboptions: + device: + description: + - The device of the module + required: True + type: raw + module_bay: + description: + - The module bay of the module + required: true + type: raw + module_type: + description: + - The module type of the module + required: true + type: raw + status: + description: + - The status of the module + choices: + - offline + - active + - planned + - staged + - side-to-rear + - failed + - decommissioning + required: false + type: str + serial: + description: + - The weight of the device type + required: false + type: str + description: + description: + - The description of the module + required: false + type: str + asset_tag: + description: + - The asset tag of the modyle + required: false + type: str + comments: + description: + - Comments that may include additional information in regards to the module + required: false + type: str + tags: + description: + - Any tags that the module 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 + type: dict +""" + +EXAMPLES = r""" +- name: "Test NetBox modules" + connection: local + hosts: localhost + gather_facts: False + + tasks: + - name: Create module type within NetBox with only required information + netbox.netbox.netbox_module: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + device: C9300-DEMO + module_bay: Network Module + module_type: C9300-NM-8X + state: present + + - name: Create module type within NetBox + netbox.netbox.netbox_module: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + device: + name: C9300-DEMO + site: EUPARIS + module_bay: + name: Network Module + position: 1 + module_type: + manufacturer: Cisco + model: C9300-NM-8X + state: present + + - name: Delete module type within netbox + netbox.netbox.netbox_module: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + device: C9300-DEMO + module_bay: Network Module + module_type: C9300-NM-8X + asset_tag: 00001 + serial: XXXNNNNXXXX + state: absent +""" + +RETURN = r""" +module: + 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_dcim import ( + NetboxDcimModule, + NB_MODULES, +) +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( + device=dict(required=True, type="raw"), + module_bay=dict(required=True, type="raw"), + module_type=dict(required=True, type="raw"), + status=dict( + required=False, + type="str", + choices=[ + "offline", + "active", + "planned", + "staged", + "side-to-rear", + "failed", + "decommissioning", + ], + ), + serial=dict(required=False, type="str"), + description=dict(required=False, type="str"), + asset_tag=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", ["device", "module_bay", "module_type", "status"]), + ("state", "absent", ["device", "module_bay", "module_type"]), + ] + + module = NetboxAnsibleModule( + argument_spec=argument_spec, supports_check_mode=True, required_if=required_if + ) + + netbox_device_type = NetboxDcimModule(module, NB_MODULES) + netbox_device_type.run() + + +if __name__ == "__main__": # pragma: no cover + main() diff --git a/plugins/modules/netbox_module_bay.py b/plugins/modules/netbox_module_bay.py new file mode 100644 index 000000000..df8021a7f --- /dev/null +++ b/plugins/modules/netbox_module_bay.py @@ -0,0 +1,156 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright: (c) 2023, Erwan TONNERRE (@etonnerre) +# 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_module_bay +short_description: Create, update or delete module bay within NetBox +description: + - Creates, updates or removes module bay from NetBox +notes: + - Tags should be defined as a YAML list + - This should be ran with connection C(local) and hosts C(localhost) +author: + - Erwan TONNERRE (@etonnerre) +requirements: + - pynetbox +version_added: '3.18.0' +extends_documentation_fragment: + - netbox.netbox.common +options: + data: + description: + - Defines the module bay configuration + suboptions: + device: + description: + - The device of the module bay + required: true + type: raw + name: + description: + - The model of the module bay + required: true + type: raw + label: + description: + - The label of the module bay + required: false + type: str + position: + description: + - The position of the module bay + required: true + type: str + description: + description: + - The description of the module bay + required: false + type: str + tags: + description: + - Any tags that the module bay 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 + type: dict +""" + +EXAMPLES = r""" +- name: "Test NetBox modules" + connection: local + hosts: localhost + gather_facts: False + + tasks: + - name: Create module bay within NetBox with only required information + netbox.netbox.netbox_module_bay: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + device: C9300-DEMO + name: C9300-DEMO-SLOT-0 + position: 0 + state: present + + - name: Delete module bay within netbox + netbox.netbox.netbox_module_bay: + netbox_url: http://netbox.local + netbox_token: thisIsMyToken + data: + name: C9300-DEMO-SLOT-0 + state: absent +""" + +RETURN = r""" +module_bay: + 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_dcim import ( + NetboxDcimModule, + NB_MODULE_BAYS, +) +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( + device=dict(required=True, type="raw"), + name=dict(required=True, type="raw"), + label=dict(required=False, type="str"), + position=dict(required=True, 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", ["device", "name", "position"]), + ("state", "absent", ["name"]), + ] + + module = NetboxAnsibleModule( + argument_spec=argument_spec, supports_check_mode=True, required_if=required_if + ) + + netbox_module_bay = NetboxDcimModule(module, NB_MODULE_BAYS) + netbox_module_bay.run() + + +if __name__ == "__main__": # pragma: no cover + main() diff --git a/plugins/modules/netbox_power_port.py b/plugins/modules/netbox_power_port.py index 7929c4728..579242a67 100644 --- a/plugins/modules/netbox_power_port.py +++ b/plugins/modules/netbox_power_port.py @@ -41,6 +41,12 @@ - The name of the power port required: true type: str + label: + description: + - The label of the power port + required: false + type: str + version_added: "3.18.0" type: description: - The type of the power port @@ -244,6 +250,7 @@ def main(): options=dict( device=dict(required=True, type="raw"), name=dict(required=True, type="str"), + label=dict(required=False, type="str"), type=dict( required=False, choices=[ diff --git a/plugins/modules/netbox_rack.py b/plugins/modules/netbox_rack.py index 2f0901a49..843568955 100644 --- a/plugins/modules/netbox_rack.py +++ b/plugins/modules/netbox_rack.py @@ -106,7 +106,7 @@ description: - The height of the rack in rack units required: false - type: int + type: float desc_units: description: - Rack units will be numbered top-to-bottom @@ -298,7 +298,7 @@ def main(): 23, ], ), - u_height=dict(required=False, type="int"), + u_height=dict(required=False, type="float"), desc_units=dict(required=False, type="bool"), outer_width=dict(required=False, type="int"), outer_depth=dict(required=False, type="int"), diff --git a/poetry.lock b/poetry.lock index 935931202..e1a9ff24f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "aiofiles" @@ -13,87 +13,87 @@ files = [ [[package]] name = "aiohttp" -version = "3.9.2" +version = "3.9.4" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.8" files = [ - {file = "aiohttp-3.9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:772fbe371788e61c58d6d3d904268e48a594ba866804d08c995ad71b144f94cb"}, - {file = "aiohttp-3.9.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:edd4f1af2253f227ae311ab3d403d0c506c9b4410c7fc8d9573dec6d9740369f"}, - {file = "aiohttp-3.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cfee9287778399fdef6f8a11c9e425e1cb13cc9920fd3a3df8f122500978292b"}, - {file = "aiohttp-3.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cc158466f6a980a6095ee55174d1de5730ad7dec251be655d9a6a9dd7ea1ff9"}, - {file = "aiohttp-3.9.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:54ec82f45d57c9a65a1ead3953b51c704f9587440e6682f689da97f3e8defa35"}, - {file = "aiohttp-3.9.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:abeb813a18eb387f0d835ef51f88568540ad0325807a77a6e501fed4610f864e"}, - {file = "aiohttp-3.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc91d07280d7d169f3a0f9179d8babd0ee05c79d4d891447629ff0d7d8089ec2"}, - {file = "aiohttp-3.9.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b65e861f4bebfb660f7f0f40fa3eb9f2ab9af10647d05dac824390e7af8f75b7"}, - {file = "aiohttp-3.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:04fd8ffd2be73d42bcf55fd78cde7958eeee6d4d8f73c3846b7cba491ecdb570"}, - {file = "aiohttp-3.9.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:3d8d962b439a859b3ded9a1e111a4615357b01620a546bc601f25b0211f2da81"}, - {file = "aiohttp-3.9.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:8ceb658afd12b27552597cf9a65d9807d58aef45adbb58616cdd5ad4c258c39e"}, - {file = "aiohttp-3.9.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:0e4ee4df741670560b1bc393672035418bf9063718fee05e1796bf867e995fad"}, - {file = "aiohttp-3.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2dec87a556f300d3211decf018bfd263424f0690fcca00de94a837949fbcea02"}, - {file = "aiohttp-3.9.2-cp310-cp310-win32.whl", hash = "sha256:3e1a800f988ce7c4917f34096f81585a73dbf65b5c39618b37926b1238cf9bc4"}, - {file = "aiohttp-3.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:ea510718a41b95c236c992b89fdfc3d04cc7ca60281f93aaada497c2b4e05c46"}, - {file = "aiohttp-3.9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6aaa6f99256dd1b5756a50891a20f0d252bd7bdb0854c5d440edab4495c9f973"}, - {file = "aiohttp-3.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a27d8c70ad87bcfce2e97488652075a9bdd5b70093f50b10ae051dfe5e6baf37"}, - {file = "aiohttp-3.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:54287bcb74d21715ac8382e9de146d9442b5f133d9babb7e5d9e453faadd005e"}, - {file = "aiohttp-3.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bb3d05569aa83011fcb346b5266e00b04180105fcacc63743fc2e4a1862a891"}, - {file = "aiohttp-3.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c8534e7d69bb8e8d134fe2be9890d1b863518582f30c9874ed7ed12e48abe3c4"}, - {file = "aiohttp-3.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4bd9d5b989d57b41e4ff56ab250c5ddf259f32db17159cce630fd543376bd96b"}, - {file = "aiohttp-3.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa6904088e6642609981f919ba775838ebf7df7fe64998b1a954fb411ffb4663"}, - {file = "aiohttp-3.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bda42eb410be91b349fb4ee3a23a30ee301c391e503996a638d05659d76ea4c2"}, - {file = "aiohttp-3.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:193cc1ccd69d819562cc7f345c815a6fc51d223b2ef22f23c1a0f67a88de9a72"}, - {file = "aiohttp-3.9.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b9f1cb839b621f84a5b006848e336cf1496688059d2408e617af33e3470ba204"}, - {file = "aiohttp-3.9.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:d22a0931848b8c7a023c695fa2057c6aaac19085f257d48baa24455e67df97ec"}, - {file = "aiohttp-3.9.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4112d8ba61fbd0abd5d43a9cb312214565b446d926e282a6d7da3f5a5aa71d36"}, - {file = "aiohttp-3.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c4ad4241b52bb2eb7a4d2bde060d31c2b255b8c6597dd8deac2f039168d14fd7"}, - {file = "aiohttp-3.9.2-cp311-cp311-win32.whl", hash = "sha256:ee2661a3f5b529f4fc8a8ffee9f736ae054adfb353a0d2f78218be90617194b3"}, - {file = "aiohttp-3.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:4deae2c165a5db1ed97df2868ef31ca3cc999988812e82386d22937d9d6fed52"}, - {file = "aiohttp-3.9.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:6f4cdba12539215aaecf3c310ce9d067b0081a0795dd8a8805fdb67a65c0572a"}, - {file = "aiohttp-3.9.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:84e843b33d5460a5c501c05539809ff3aee07436296ff9fbc4d327e32aa3a326"}, - {file = "aiohttp-3.9.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8008d0f451d66140a5aa1c17e3eedc9d56e14207568cd42072c9d6b92bf19b52"}, - {file = "aiohttp-3.9.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:61c47ab8ef629793c086378b1df93d18438612d3ed60dca76c3422f4fbafa792"}, - {file = "aiohttp-3.9.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc71f748e12284312f140eaa6599a520389273174b42c345d13c7e07792f4f57"}, - {file = "aiohttp-3.9.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a1c3a4d0ab2f75f22ec80bca62385db2e8810ee12efa8c9e92efea45c1849133"}, - {file = "aiohttp-3.9.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a87aa0b13bbee025faa59fa58861303c2b064b9855d4c0e45ec70182bbeba1b"}, - {file = "aiohttp-3.9.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2cc0d04688b9f4a7854c56c18aa7af9e5b0a87a28f934e2e596ba7e14783192"}, - {file = "aiohttp-3.9.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:1956e3ac376b1711c1533266dec4efd485f821d84c13ce1217d53e42c9e65f08"}, - {file = "aiohttp-3.9.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:114da29f39eccd71b93a0fcacff178749a5c3559009b4a4498c2c173a6d74dff"}, - {file = "aiohttp-3.9.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:3f17999ae3927d8a9a823a1283b201344a0627272f92d4f3e3a4efe276972fe8"}, - {file = "aiohttp-3.9.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:f31df6a32217a34ae2f813b152a6f348154f948c83213b690e59d9e84020925c"}, - {file = "aiohttp-3.9.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:7a75307ffe31329928a8d47eae0692192327c599113d41b278d4c12b54e1bd11"}, - {file = "aiohttp-3.9.2-cp312-cp312-win32.whl", hash = "sha256:972b63d589ff8f305463593050a31b5ce91638918da38139b9d8deaba9e0fed7"}, - {file = "aiohttp-3.9.2-cp312-cp312-win_amd64.whl", hash = "sha256:200dc0246f0cb5405c80d18ac905c8350179c063ea1587580e3335bfc243ba6a"}, - {file = "aiohttp-3.9.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:158564d0d1020e0d3fe919a81d97aadad35171e13e7b425b244ad4337fc6793a"}, - {file = "aiohttp-3.9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:da1346cd0ccb395f0ed16b113ebb626fa43b7b07fd7344fce33e7a4f04a8897a"}, - {file = "aiohttp-3.9.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:eaa9256de26ea0334ffa25f1913ae15a51e35c529a1ed9af8e6286dd44312554"}, - {file = "aiohttp-3.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1543e7fb00214fb4ccead42e6a7d86f3bb7c34751ec7c605cca7388e525fd0b4"}, - {file = "aiohttp-3.9.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:186e94570433a004e05f31f632726ae0f2c9dee4762a9ce915769ce9c0a23d89"}, - {file = "aiohttp-3.9.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d52d20832ac1560f4510d68e7ba8befbc801a2b77df12bd0cd2bcf3b049e52a4"}, - {file = "aiohttp-3.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c45e4e815ac6af3b72ca2bde9b608d2571737bb1e2d42299fc1ffdf60f6f9a1"}, - {file = "aiohttp-3.9.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa906b9bdfd4a7972dd0628dbbd6413d2062df5b431194486a78f0d2ae87bd55"}, - {file = "aiohttp-3.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:68bbee9e17d66f17bb0010aa15a22c6eb28583edcc8b3212e2b8e3f77f3ebe2a"}, - {file = "aiohttp-3.9.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4c189b64bd6d9a403a1a3f86a3ab3acbc3dc41a68f73a268a4f683f89a4dec1f"}, - {file = "aiohttp-3.9.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:8a7876f794523123bca6d44bfecd89c9fec9ec897a25f3dd202ee7fc5c6525b7"}, - {file = "aiohttp-3.9.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:d23fba734e3dd7b1d679b9473129cd52e4ec0e65a4512b488981a56420e708db"}, - {file = "aiohttp-3.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b141753be581fab842a25cb319f79536d19c2a51995d7d8b29ee290169868eab"}, - {file = "aiohttp-3.9.2-cp38-cp38-win32.whl", hash = "sha256:103daf41ff3b53ba6fa09ad410793e2e76c9d0269151812e5aba4b9dd674a7e8"}, - {file = "aiohttp-3.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:328918a6c2835861ff7afa8c6d2c70c35fdaf996205d5932351bdd952f33fa2f"}, - {file = "aiohttp-3.9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5264d7327c9464786f74e4ec9342afbbb6ee70dfbb2ec9e3dfce7a54c8043aa3"}, - {file = "aiohttp-3.9.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:07205ae0015e05c78b3288c1517afa000823a678a41594b3fdc870878d645305"}, - {file = "aiohttp-3.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ae0a1e638cffc3ec4d4784b8b4fd1cf28968febc4bd2718ffa25b99b96a741bd"}, - {file = "aiohttp-3.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d43302a30ba1166325974858e6ef31727a23bdd12db40e725bec0f759abce505"}, - {file = "aiohttp-3.9.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:16a967685907003765855999af11a79b24e70b34dc710f77a38d21cd9fc4f5fe"}, - {file = "aiohttp-3.9.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6fa3ee92cd441d5c2d07ca88d7a9cef50f7ec975f0117cd0c62018022a184308"}, - {file = "aiohttp-3.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b500c5ad9c07639d48615a770f49618130e61be36608fc9bc2d9bae31732b8f"}, - {file = "aiohttp-3.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c07327b368745b1ce2393ae9e1aafed7073d9199e1dcba14e035cc646c7941bf"}, - {file = "aiohttp-3.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:cc7d6502c23a0ec109687bf31909b3fb7b196faf198f8cff68c81b49eb316ea9"}, - {file = "aiohttp-3.9.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:07be2be7071723c3509ab5c08108d3a74f2181d4964e869f2504aaab68f8d3e8"}, - {file = "aiohttp-3.9.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:122468f6fee5fcbe67cb07014a08c195b3d4c41ff71e7b5160a7bcc41d585a5f"}, - {file = "aiohttp-3.9.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:00a9abcea793c81e7f8778ca195a1714a64f6d7436c4c0bb168ad2a212627000"}, - {file = "aiohttp-3.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7a9825fdd64ecac5c670234d80bb52bdcaa4139d1f839165f548208b3779c6c6"}, - {file = "aiohttp-3.9.2-cp39-cp39-win32.whl", hash = "sha256:5422cd9a4a00f24c7244e1b15aa9b87935c85fb6a00c8ac9b2527b38627a9211"}, - {file = "aiohttp-3.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:7d579dcd5d82a86a46f725458418458fa43686f6a7b252f2966d359033ffc8ab"}, - {file = "aiohttp-3.9.2.tar.gz", hash = "sha256:b0ad0a5e86ce73f5368a164c10ada10504bf91869c05ab75d982c6048217fbf7"}, + {file = "aiohttp-3.9.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:76d32588ef7e4a3f3adff1956a0ba96faabbdee58f2407c122dd45aa6e34f372"}, + {file = "aiohttp-3.9.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:56181093c10dbc6ceb8a29dfeea1e815e1dfdc020169203d87fd8d37616f73f9"}, + {file = "aiohttp-3.9.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c7a5b676d3c65e88b3aca41816bf72831898fcd73f0cbb2680e9d88e819d1e4d"}, + {file = "aiohttp-3.9.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1df528a85fb404899d4207a8d9934cfd6be626e30e5d3a5544a83dbae6d8a7e"}, + {file = "aiohttp-3.9.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f595db1bceabd71c82e92df212dd9525a8a2c6947d39e3c994c4f27d2fe15b11"}, + {file = "aiohttp-3.9.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c0b09d76e5a4caac3d27752027fbd43dc987b95f3748fad2b924a03fe8632ad"}, + {file = "aiohttp-3.9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:689eb4356649ec9535b3686200b231876fb4cab4aca54e3bece71d37f50c1d13"}, + {file = "aiohttp-3.9.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3666cf4182efdb44d73602379a66f5fdfd5da0db5e4520f0ac0dcca644a3497"}, + {file = "aiohttp-3.9.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b65b0f8747b013570eea2f75726046fa54fa8e0c5db60f3b98dd5d161052004a"}, + {file = "aiohttp-3.9.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a1885d2470955f70dfdd33a02e1749613c5a9c5ab855f6db38e0b9389453dce7"}, + {file = "aiohttp-3.9.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:0593822dcdb9483d41f12041ff7c90d4d1033ec0e880bcfaf102919b715f47f1"}, + {file = "aiohttp-3.9.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:47f6eb74e1ecb5e19a78f4a4228aa24df7fbab3b62d4a625d3f41194a08bd54f"}, + {file = "aiohttp-3.9.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c8b04a3dbd54de6ccb7604242fe3ad67f2f3ca558f2d33fe19d4b08d90701a89"}, + {file = "aiohttp-3.9.4-cp310-cp310-win32.whl", hash = "sha256:8a78dfb198a328bfb38e4308ca8167028920fb747ddcf086ce706fbdd23b2926"}, + {file = "aiohttp-3.9.4-cp310-cp310-win_amd64.whl", hash = "sha256:e78da6b55275987cbc89141a1d8e75f5070e577c482dd48bd9123a76a96f0bbb"}, + {file = "aiohttp-3.9.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c111b3c69060d2bafc446917534150fd049e7aedd6cbf21ba526a5a97b4402a5"}, + {file = "aiohttp-3.9.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:efbdd51872cf170093998c87ccdf3cb5993add3559341a8e5708bcb311934c94"}, + {file = "aiohttp-3.9.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7bfdb41dc6e85d8535b00d73947548a748e9534e8e4fddd2638109ff3fb081df"}, + {file = "aiohttp-3.9.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bd9d334412961125e9f68d5b73c1d0ab9ea3f74a58a475e6b119f5293eee7ba"}, + {file = "aiohttp-3.9.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:35d78076736f4a668d57ade00c65d30a8ce28719d8a42471b2a06ccd1a2e3063"}, + {file = "aiohttp-3.9.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:824dff4f9f4d0f59d0fa3577932ee9a20e09edec8a2f813e1d6b9f89ced8293f"}, + {file = "aiohttp-3.9.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:52b8b4e06fc15519019e128abedaeb56412b106ab88b3c452188ca47a25c4093"}, + {file = "aiohttp-3.9.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eae569fb1e7559d4f3919965617bb39f9e753967fae55ce13454bec2d1c54f09"}, + {file = "aiohttp-3.9.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:69b97aa5792428f321f72aeb2f118e56893371f27e0b7d05750bcad06fc42ca1"}, + {file = "aiohttp-3.9.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4d79aad0ad4b980663316f26d9a492e8fab2af77c69c0f33780a56843ad2f89e"}, + {file = "aiohttp-3.9.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:d6577140cd7db19e430661e4b2653680194ea8c22c994bc65b7a19d8ec834403"}, + {file = "aiohttp-3.9.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:9860d455847cd98eb67897f5957b7cd69fbcb436dd3f06099230f16a66e66f79"}, + {file = "aiohttp-3.9.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:69ff36d3f8f5652994e08bd22f093e11cfd0444cea310f92e01b45a4e46b624e"}, + {file = "aiohttp-3.9.4-cp311-cp311-win32.whl", hash = "sha256:e27d3b5ed2c2013bce66ad67ee57cbf614288bda8cdf426c8d8fe548316f1b5f"}, + {file = "aiohttp-3.9.4-cp311-cp311-win_amd64.whl", hash = "sha256:d6a67e26daa686a6fbdb600a9af8619c80a332556245fa8e86c747d226ab1a1e"}, + {file = "aiohttp-3.9.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:c5ff8ff44825736a4065d8544b43b43ee4c6dd1530f3a08e6c0578a813b0aa35"}, + {file = "aiohttp-3.9.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d12a244627eba4e9dc52cbf924edef905ddd6cafc6513849b4876076a6f38b0e"}, + {file = "aiohttp-3.9.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:dcad56c8d8348e7e468899d2fb3b309b9bc59d94e6db08710555f7436156097f"}, + {file = "aiohttp-3.9.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f7e69a7fd4b5ce419238388e55abd220336bd32212c673ceabc57ccf3d05b55"}, + {file = "aiohttp-3.9.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4870cb049f10d7680c239b55428916d84158798eb8f353e74fa2c98980dcc0b"}, + {file = "aiohttp-3.9.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b2feaf1b7031ede1bc0880cec4b0776fd347259a723d625357bb4b82f62687b"}, + {file = "aiohttp-3.9.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:939393e8c3f0a5bcd33ef7ace67680c318dc2ae406f15e381c0054dd658397de"}, + {file = "aiohttp-3.9.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d2334e387b2adcc944680bebcf412743f2caf4eeebd550f67249c1c3696be04"}, + {file = "aiohttp-3.9.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:e0198ea897680e480845ec0ffc5a14e8b694e25b3f104f63676d55bf76a82f1a"}, + {file = "aiohttp-3.9.4-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:e40d2cd22914d67c84824045861a5bb0fb46586b15dfe4f046c7495bf08306b2"}, + {file = "aiohttp-3.9.4-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:aba80e77c227f4234aa34a5ff2b6ff30c5d6a827a91d22ff6b999de9175d71bd"}, + {file = "aiohttp-3.9.4-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:fb68dc73bc8ac322d2e392a59a9e396c4f35cb6fdbdd749e139d1d6c985f2527"}, + {file = "aiohttp-3.9.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f3460a92638dce7e47062cf088d6e7663adb135e936cb117be88d5e6c48c9d53"}, + {file = "aiohttp-3.9.4-cp312-cp312-win32.whl", hash = "sha256:32dc814ddbb254f6170bca198fe307920f6c1308a5492f049f7f63554b88ef36"}, + {file = "aiohttp-3.9.4-cp312-cp312-win_amd64.whl", hash = "sha256:63f41a909d182d2b78fe3abef557fcc14da50c7852f70ae3be60e83ff64edba5"}, + {file = "aiohttp-3.9.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c3770365675f6be220032f6609a8fbad994d6dcf3ef7dbcf295c7ee70884c9af"}, + {file = "aiohttp-3.9.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:305edae1dea368ce09bcb858cf5a63a064f3bff4767dec6fa60a0cc0e805a1d3"}, + {file = "aiohttp-3.9.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6f121900131d116e4a93b55ab0d12ad72573f967b100e49086e496a9b24523ea"}, + {file = "aiohttp-3.9.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b71e614c1ae35c3d62a293b19eface83d5e4d194e3eb2fabb10059d33e6e8cbf"}, + {file = "aiohttp-3.9.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:419f009fa4cfde4d16a7fc070d64f36d70a8d35a90d71aa27670bba2be4fd039"}, + {file = "aiohttp-3.9.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7b39476ee69cfe64061fd77a73bf692c40021f8547cda617a3466530ef63f947"}, + {file = "aiohttp-3.9.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b33f34c9c7decdb2ab99c74be6443942b730b56d9c5ee48fb7df2c86492f293c"}, + {file = "aiohttp-3.9.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c78700130ce2dcebb1a8103202ae795be2fa8c9351d0dd22338fe3dac74847d9"}, + {file = "aiohttp-3.9.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:268ba22d917655d1259af2d5659072b7dc11b4e1dc2cb9662fdd867d75afc6a4"}, + {file = "aiohttp-3.9.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:17e7c051f53a0d2ebf33013a9cbf020bb4e098c4bc5bce6f7b0c962108d97eab"}, + {file = "aiohttp-3.9.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:7be99f4abb008cb38e144f85f515598f4c2c8932bf11b65add0ff59c9c876d99"}, + {file = "aiohttp-3.9.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:d58a54d6ff08d2547656356eea8572b224e6f9bbc0cf55fa9966bcaac4ddfb10"}, + {file = "aiohttp-3.9.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7673a76772bda15d0d10d1aa881b7911d0580c980dbd16e59d7ba1422b2d83cd"}, + {file = "aiohttp-3.9.4-cp38-cp38-win32.whl", hash = "sha256:e4370dda04dc8951012f30e1ce7956a0a226ac0714a7b6c389fb2f43f22a250e"}, + {file = "aiohttp-3.9.4-cp38-cp38-win_amd64.whl", hash = "sha256:eb30c4510a691bb87081192a394fb661860e75ca3896c01c6d186febe7c88530"}, + {file = "aiohttp-3.9.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:84e90494db7df3be5e056f91412f9fa9e611fbe8ce4aaef70647297f5943b276"}, + {file = "aiohttp-3.9.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7d4845f8501ab28ebfdbeab980a50a273b415cf69e96e4e674d43d86a464df9d"}, + {file = "aiohttp-3.9.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:69046cd9a2a17245c4ce3c1f1a4ff8c70c7701ef222fce3d1d8435f09042bba1"}, + {file = "aiohttp-3.9.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b73a06bafc8dcc508420db43b4dd5850e41e69de99009d0351c4f3007960019"}, + {file = "aiohttp-3.9.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:418bb0038dfafeac923823c2e63226179976c76f981a2aaad0ad5d51f2229bca"}, + {file = "aiohttp-3.9.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:71a8f241456b6c2668374d5d28398f8e8cdae4cce568aaea54e0f39359cd928d"}, + {file = "aiohttp-3.9.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:935c369bf8acc2dc26f6eeb5222768aa7c62917c3554f7215f2ead7386b33748"}, + {file = "aiohttp-3.9.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:74e4e48c8752d14ecfb36d2ebb3d76d614320570e14de0a3aa7a726ff150a03c"}, + {file = "aiohttp-3.9.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:916b0417aeddf2c8c61291238ce25286f391a6acb6f28005dd9ce282bd6311b6"}, + {file = "aiohttp-3.9.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9b6787b6d0b3518b2ee4cbeadd24a507756ee703adbac1ab6dc7c4434b8c572a"}, + {file = "aiohttp-3.9.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:221204dbda5ef350e8db6287937621cf75e85778b296c9c52260b522231940ed"}, + {file = "aiohttp-3.9.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:10afd99b8251022ddf81eaed1d90f5a988e349ee7d779eb429fb07b670751e8c"}, + {file = "aiohttp-3.9.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2506d9f7a9b91033201be9ffe7d89c6a54150b0578803cce5cb84a943d075bc3"}, + {file = "aiohttp-3.9.4-cp39-cp39-win32.whl", hash = "sha256:e571fdd9efd65e86c6af2f332e0e95dad259bfe6beb5d15b3c3eca3a6eb5d87b"}, + {file = "aiohttp-3.9.4-cp39-cp39-win_amd64.whl", hash = "sha256:7d29dd5319d20aa3b7749719ac9685fbd926f71ac8c77b2477272725f882072d"}, + {file = "aiohttp-3.9.4.tar.gz", hash = "sha256:6ff71ede6d9a5a58cfb7b6fffc83ab5d4a63138276c771ac91ceaaddf5459644"}, ] [package.dependencies] @@ -285,29 +285,33 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte [[package]] name = "black" -version = "23.10.1" +version = "24.3.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" files = [ - {file = "black-23.10.1-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:ec3f8e6234c4e46ff9e16d9ae96f4ef69fa328bb4ad08198c8cee45bb1f08c69"}, - {file = "black-23.10.1-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:1b917a2aa020ca600483a7b340c165970b26e9029067f019e3755b56e8dd5916"}, - {file = "black-23.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c74de4c77b849e6359c6f01987e94873c707098322b91490d24296f66d067dc"}, - {file = "black-23.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:7b4d10b0f016616a0d93d24a448100adf1699712fb7a4efd0e2c32bbb219b173"}, - {file = "black-23.10.1-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:b15b75fc53a2fbcac8a87d3e20f69874d161beef13954747e053bca7a1ce53a0"}, - {file = "black-23.10.1-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:e293e4c2f4a992b980032bbd62df07c1bcff82d6964d6c9496f2cd726e246ace"}, - {file = "black-23.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d56124b7a61d092cb52cce34182a5280e160e6aff3137172a68c2c2c4b76bcb"}, - {file = "black-23.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:3f157a8945a7b2d424da3335f7ace89c14a3b0625e6593d21139c2d8214d55ce"}, - {file = "black-23.10.1-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:cfcce6f0a384d0da692119f2d72d79ed07c7159879d0bb1bb32d2e443382bf3a"}, - {file = "black-23.10.1-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:33d40f5b06be80c1bbce17b173cda17994fbad096ce60eb22054da021bf933d1"}, - {file = "black-23.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:840015166dbdfbc47992871325799fd2dc0dcf9395e401ada6d88fe11498abad"}, - {file = "black-23.10.1-cp38-cp38-win_amd64.whl", hash = "sha256:037e9b4664cafda5f025a1728c50a9e9aedb99a759c89f760bd83730e76ba884"}, - {file = "black-23.10.1-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:7cb5936e686e782fddb1c73f8aa6f459e1ad38a6a7b0e54b403f1f05a1507ee9"}, - {file = "black-23.10.1-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:7670242e90dc129c539e9ca17665e39a146a761e681805c54fbd86015c7c84f7"}, - {file = "black-23.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ed45ac9a613fb52dad3b61c8dea2ec9510bf3108d4db88422bacc7d1ba1243d"}, - {file = "black-23.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:6d23d7822140e3fef190734216cefb262521789367fbdc0b3f22af6744058982"}, - {file = "black-23.10.1-py3-none-any.whl", hash = "sha256:d431e6739f727bb2e0495df64a6c7a5310758e87505f5f8cde9ff6c0f2d7e4fe"}, - {file = "black-23.10.1.tar.gz", hash = "sha256:1f8ce316753428ff68749c65a5f7844631aa18c8679dfd3ca9dc1a289979c258"}, + {file = "black-24.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7d5e026f8da0322b5662fa7a8e752b3fa2dac1c1cbc213c3d7ff9bdd0ab12395"}, + {file = "black-24.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9f50ea1132e2189d8dff0115ab75b65590a3e97de1e143795adb4ce317934995"}, + {file = "black-24.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2af80566f43c85f5797365077fb64a393861a3730bd110971ab7a0c94e873e7"}, + {file = "black-24.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:4be5bb28e090456adfc1255e03967fb67ca846a03be7aadf6249096100ee32d0"}, + {file = "black-24.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4f1373a7808a8f135b774039f61d59e4be7eb56b2513d3d2f02a8b9365b8a8a9"}, + {file = "black-24.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:aadf7a02d947936ee418777e0247ea114f78aff0d0959461057cae8a04f20597"}, + {file = "black-24.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c02e4ea2ae09d16314d30912a58ada9a5c4fdfedf9512d23326128ac08ac3d"}, + {file = "black-24.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:bf21b7b230718a5f08bd32d5e4f1db7fc8788345c8aea1d155fc17852b3410f5"}, + {file = "black-24.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:2818cf72dfd5d289e48f37ccfa08b460bf469e67fb7c4abb07edc2e9f16fb63f"}, + {file = "black-24.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4acf672def7eb1725f41f38bf6bf425c8237248bb0804faa3965c036f7672d11"}, + {file = "black-24.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c7ed6668cbbfcd231fa0dc1b137d3e40c04c7f786e626b405c62bcd5db5857e4"}, + {file = "black-24.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:56f52cfbd3dabe2798d76dbdd299faa046a901041faf2cf33288bc4e6dae57b5"}, + {file = "black-24.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:79dcf34b33e38ed1b17434693763301d7ccbd1c5860674a8f871bd15139e7837"}, + {file = "black-24.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e19cb1c6365fd6dc38a6eae2dcb691d7d83935c10215aef8e6c38edee3f77abd"}, + {file = "black-24.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65b76c275e4c1c5ce6e9870911384bff5ca31ab63d19c76811cb1fb162678213"}, + {file = "black-24.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:b5991d523eee14756f3c8d5df5231550ae8993e2286b8014e2fdea7156ed0959"}, + {file = "black-24.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c45f8dff244b3c431b36e3224b6be4a127c6aca780853574c00faf99258041eb"}, + {file = "black-24.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6905238a754ceb7788a73f02b45637d820b2f5478b20fec82ea865e4f5d4d9f7"}, + {file = "black-24.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7de8d330763c66663661a1ffd432274a2f92f07feeddd89ffd085b5744f85e7"}, + {file = "black-24.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:7bb041dca0d784697af4646d3b62ba4a6b028276ae878e53f6b4f74ddd6db99f"}, + {file = "black-24.3.0-py3-none-any.whl", hash = "sha256:41622020d7120e01d377f74249e677039d20e6344ff5851de8a10f11f513bf93"}, + {file = "black-24.3.0.tar.gz", hash = "sha256:a0c9c4a0771afc6919578cec71ce82a3e31e054904e7197deacbc9382671c41f"}, ] [package.dependencies] @@ -321,7 +325,7 @@ typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] +d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] @@ -641,43 +645,43 @@ toml = ["tomli"] [[package]] name = "cryptography" -version = "42.0.0" +version = "42.0.4" 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.0-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:c640b0ef54138fde761ec99a6c7dc4ce05e80420262c20fa239e694ca371d434"}, - {file = "cryptography-42.0.0-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:678cfa0d1e72ef41d48993a7be75a76b0725d29b820ff3cfd606a5b2b33fda01"}, - {file = "cryptography-42.0.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:146e971e92a6dd042214b537a726c9750496128453146ab0ee8971a0299dc9bd"}, - {file = "cryptography-42.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87086eae86a700307b544625e3ba11cc600c3c0ef8ab97b0fda0705d6db3d4e3"}, - {file = "cryptography-42.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:0a68bfcf57a6887818307600c3c0ebc3f62fbb6ccad2240aa21887cda1f8df1b"}, - {file = "cryptography-42.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:5a217bca51f3b91971400890905a9323ad805838ca3fa1e202a01844f485ee87"}, - {file = "cryptography-42.0.0-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:ca20550bb590db16223eb9ccc5852335b48b8f597e2f6f0878bbfd9e7314eb17"}, - {file = "cryptography-42.0.0-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:33588310b5c886dfb87dba5f013b8d27df7ffd31dc753775342a1e5ab139e59d"}, - {file = "cryptography-42.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9515ea7f596c8092fdc9902627e51b23a75daa2c7815ed5aa8cf4f07469212ec"}, - {file = "cryptography-42.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:35cf6ed4c38f054478a9df14f03c1169bb14bd98f0b1705751079b25e1cb58bc"}, - {file = "cryptography-42.0.0-cp37-abi3-win32.whl", hash = "sha256:8814722cffcfd1fbd91edd9f3451b88a8f26a5fd41b28c1c9193949d1c689dc4"}, - {file = "cryptography-42.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:a2a8d873667e4fd2f34aedab02ba500b824692c6542e017075a2efc38f60a4c0"}, - {file = "cryptography-42.0.0-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:8fedec73d590fd30c4e3f0d0f4bc961aeca8390c72f3eaa1a0874d180e868ddf"}, - {file = "cryptography-42.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be41b0c7366e5549265adf2145135dca107718fa44b6e418dc7499cfff6b4689"}, - {file = "cryptography-42.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ca482ea80626048975360c8e62be3ceb0f11803180b73163acd24bf014133a0"}, - {file = "cryptography-42.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:c58115384bdcfe9c7f644c72f10f6f42bed7cf59f7b52fe1bf7ae0a622b3a139"}, - {file = "cryptography-42.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:56ce0c106d5c3fec1038c3cca3d55ac320a5be1b44bf15116732d0bc716979a2"}, - {file = "cryptography-42.0.0-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:324721d93b998cb7367f1e6897370644751e5580ff9b370c0a50dc60a2003513"}, - {file = "cryptography-42.0.0-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:d97aae66b7de41cdf5b12087b5509e4e9805ed6f562406dfcf60e8481a9a28f8"}, - {file = "cryptography-42.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:85f759ed59ffd1d0baad296e72780aa62ff8a71f94dc1ab340386a1207d0ea81"}, - {file = "cryptography-42.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:206aaf42e031b93f86ad60f9f5d9da1b09164f25488238ac1dc488334eb5e221"}, - {file = "cryptography-42.0.0-cp39-abi3-win32.whl", hash = "sha256:74f18a4c8ca04134d2052a140322002fef535c99cdbc2a6afc18a8024d5c9d5b"}, - {file = "cryptography-42.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:14e4b909373bc5bf1095311fa0f7fcabf2d1a160ca13f1e9e467be1ac4cbdf94"}, - {file = "cryptography-42.0.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3005166a39b70c8b94455fdbe78d87a444da31ff70de3331cdec2c568cf25b7e"}, - {file = "cryptography-42.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:be14b31eb3a293fc6e6aa2807c8a3224c71426f7c4e3639ccf1a2f3ffd6df8c3"}, - {file = "cryptography-42.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:bd7cf7a8d9f34cc67220f1195884151426ce616fdc8285df9054bfa10135925f"}, - {file = "cryptography-42.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:c310767268d88803b653fffe6d6f2f17bb9d49ffceb8d70aed50ad45ea49ab08"}, - {file = "cryptography-42.0.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:bdce70e562c69bb089523e75ef1d9625b7417c6297a76ac27b1b8b1eb51b7d0f"}, - {file = "cryptography-42.0.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:e9326ca78111e4c645f7e49cbce4ed2f3f85e17b61a563328c85a5208cf34440"}, - {file = "cryptography-42.0.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:69fd009a325cad6fbfd5b04c711a4da563c6c4854fc4c9544bff3088387c77c0"}, - {file = "cryptography-42.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:988b738f56c665366b1e4bfd9045c3efae89ee366ca3839cd5af53eaa1401bce"}, - {file = "cryptography-42.0.0.tar.gz", hash = "sha256:6cf9b76d6e93c62114bd19485e5cb003115c134cf9ce91f8ac924c44f8c8c3f4"}, + {file = "cryptography-42.0.4-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:ffc73996c4fca3d2b6c1c8c12bfd3ad00def8621da24f547626bf06441400449"}, + {file = "cryptography-42.0.4-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:db4b65b02f59035037fde0998974d84244a64c3265bdef32a827ab9b63d61b18"}, + {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad9c385ba8ee025bb0d856714f71d7840020fe176ae0229de618f14dae7a6e2"}, + {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69b22ab6506a3fe483d67d1ed878e1602bdd5912a134e6202c1ec672233241c1"}, + {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:e09469a2cec88fb7b078e16d4adec594414397e8879a4341c6ace96013463d5b"}, + {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3e970a2119507d0b104f0a8e281521ad28fc26f2820687b3436b8c9a5fcf20d1"}, + {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:e53dc41cda40b248ebc40b83b31516487f7db95ab8ceac1f042626bc43a2f992"}, + {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:c3a5cbc620e1e17009f30dd34cb0d85c987afd21c41a74352d1719be33380885"}, + {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6bfadd884e7280df24d26f2186e4e07556a05d37393b0f220a840b083dc6a824"}, + {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:01911714117642a3f1792c7f376db572aadadbafcd8d75bb527166009c9f1d1b"}, + {file = "cryptography-42.0.4-cp37-abi3-win32.whl", hash = "sha256:fb0cef872d8193e487fc6bdb08559c3aa41b659a7d9be48b2e10747f47863925"}, + {file = "cryptography-42.0.4-cp37-abi3-win_amd64.whl", hash = "sha256:c1f25b252d2c87088abc8bbc4f1ecbf7c919e05508a7e8628e6875c40bc70923"}, + {file = "cryptography-42.0.4-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:15a1fb843c48b4a604663fa30af60818cd28f895572386e5f9b8a665874c26e7"}, + {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1327f280c824ff7885bdeef8578f74690e9079267c1c8bd7dc5cc5aa065ae52"}, + {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ffb03d419edcab93b4b19c22ee80c007fb2d708429cecebf1dd3258956a563a"}, + {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:1df6fcbf60560d2113b5ed90f072dc0b108d64750d4cbd46a21ec882c7aefce9"}, + {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:44a64043f743485925d3bcac548d05df0f9bb445c5fcca6681889c7c3ab12764"}, + {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:3c6048f217533d89f2f8f4f0fe3044bf0b2090453b7b73d0b77db47b80af8dff"}, + {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:6d0fbe73728c44ca3a241eff9aefe6496ab2656d6e7a4ea2459865f2e8613257"}, + {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:887623fe0d70f48ab3f5e4dbf234986b1329a64c066d719432d0698522749929"}, + {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ce8613beaffc7c14f091497346ef117c1798c202b01153a8cc7b8e2ebaaf41c0"}, + {file = "cryptography-42.0.4-cp39-abi3-win32.whl", hash = "sha256:810bcf151caefc03e51a3d61e53335cd5c7316c0a105cc695f0959f2c638b129"}, + {file = "cryptography-42.0.4-cp39-abi3-win_amd64.whl", hash = "sha256:a0298bdc6e98ca21382afe914c642620370ce0470a01e1bef6dd9b5354c36854"}, + {file = "cryptography-42.0.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5f8907fcf57392cd917892ae83708761c6ff3c37a8e835d7246ff0ad251d9298"}, + {file = "cryptography-42.0.4-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:12d341bd42cdb7d4937b0cabbdf2a94f949413ac4504904d0cdbdce4a22cbf88"}, + {file = "cryptography-42.0.4-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1cdcdbd117681c88d717437ada72bdd5be9de117f96e3f4d50dab3f59fd9ab20"}, + {file = "cryptography-42.0.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0e89f7b84f421c56e7ff69f11c441ebda73b8a8e6488d322ef71746224c20fce"}, + {file = "cryptography-42.0.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f1e85a178384bf19e36779d91ff35c7617c885da487d689b05c1366f9933ad74"}, + {file = "cryptography-42.0.4-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:d2a27aca5597c8a71abbe10209184e1a8e91c1fd470b5070a2ea60cafec35bcd"}, + {file = "cryptography-42.0.4-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:4e36685cb634af55e0677d435d425043967ac2f3790ec652b2b88ad03b85c27b"}, + {file = "cryptography-42.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:f47be41843200f7faec0683ad751e5ef11b9a56a220d57f300376cd8aba81660"}, + {file = "cryptography-42.0.4.tar.gz", hash = "sha256:831a4b37accef30cccd34fcb916a5d7b5be3cbbe27268a02832c3e450aea39cb"}, ] [package.dependencies] @@ -836,13 +840,13 @@ files = [ [[package]] name = "idna" -version = "3.4" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] diff --git a/tests/integration/netbox-deploy.py b/tests/integration/netbox-deploy.py index 90cff633c..de5e080e4 100755 --- a/tests/integration/netbox-deploy.py +++ b/tests/integration/netbox-deploy.py @@ -466,6 +466,15 @@ def make_netbox_calls(endpoint, payload): test101_vm = nb.virtualization.virtual_machines.get(name="test101-vm") test_spaces_vm = nb.virtualization.virtual_machines.get(name="Test VM With Spaces") +# Create Virtaul Disks +virtual_disks = [ + {"name": "disk1", "size": 60, "virtual_machine": test100_vm.id}, + {"name": "disk2", "size": 110, "virtual_machine": test100_vm.id}, +] +created_virtual_disks = make_netbox_calls( + nb.virtualization.virtual_disks, virtual_disks +) + ## Create Virtual Machine Interfaces virtual_machines_intfs = [ # Create test100-vm intfs diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory-bearer-token.json b/tests/integration/targets/inventory-v3.7/files/test-inventory-bearer-token.json index 360a7ac33..f168db52d 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory-bearer-token.json +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory-bearer-token.json @@ -44,27 +44,28 @@ "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" }, - "display": "Ethernet1/1", + "display": "Ethernet2/1", "duplex": null, "enabled": true, - "id": 1, + "id": 2, "ip_addresses": [ { - "address": "172.16.180.11/24", + "address": "172.16.180.12/24", "comments": "", "custom_fields": {}, "description": "", - "display": "172.16.180.11/24", - "dns_name": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", "family": { "label": "IPv4", "value": 4 }, - "id": 3, + "id": 4, "nat_inside": null, "nat_outside": [], "role": null, @@ -74,6 +75,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", "vrf": null } ], @@ -88,7 +90,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet1/1", + "name": "Ethernet2/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -105,6 +107,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -124,27 +127,28 @@ "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, - "display": "Ethernet2/1", + "display": "Ethernet1/1", "duplex": null, "enabled": true, - "id": 2, + "id": 1, "ip_addresses": [ { - "address": "172.16.180.12/24", + "address": "172.16.180.11/24", "comments": "", "custom_fields": {}, "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", + "display": "172.16.180.11/24", + "dns_name": "", "family": { "label": "IPv4", "value": 4 }, - "id": 4, + "id": 3, "nat_inside": null, "nat_outside": [], "role": null, @@ -154,6 +158,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", "vrf": null } ], @@ -168,7 +173,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet2/1", + "name": "Ethernet1/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -185,6 +190,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -206,7 +212,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "wlink1", "duplex": null, @@ -241,6 +248,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -269,7 +277,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "telnet (TCP/23)", "id": 3, @@ -283,6 +292,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", "virtual_machine": null } ], @@ -319,10 +329,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/11/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" }, "vrf": null }, @@ -345,10 +357,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/12/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" }, "vrf": null } @@ -374,10 +388,12 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" } } ], @@ -440,7 +456,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet1", "duplex": null, @@ -468,6 +485,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", "vrf": null } ], @@ -499,6 +517,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -520,7 +539,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet2", "duplex": null, @@ -548,6 +568,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", "vrf": null } ], @@ -579,6 +600,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -600,7 +622,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "wlink1", "duplex": null, @@ -635,6 +658,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -667,7 +691,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "ssh (TCP/22)", "id": 1, @@ -681,6 +706,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", "virtual_machine": null }, { @@ -690,7 +716,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "http (TCP/80)", "id": 2, @@ -699,13 +726,15 @@ "address": "172.16.180.1/24", "display": "172.16.180.1/24", "family": 4, - "id": 1 + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" }, { "address": "2001::1:1/64", "display": "2001::1:1/64", "family": 6, - "id": 2 + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" } ], "name": "http", @@ -717,6 +746,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", "virtual_machine": null } ], @@ -734,6 +764,7 @@ "cluster_type": "test-cluster-type", "config_context": {}, "custom_fields": {}, + "disk": 170, "interfaces": [ { "bridge": null, @@ -754,10 +785,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -780,10 +813,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -806,10 +841,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -832,10 +869,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -858,10 +897,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null } @@ -907,10 +948,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -933,10 +976,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -959,10 +1004,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -985,10 +1032,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -1011,10 +1060,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null } diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory-jinja2-filter.json b/tests/integration/targets/inventory-v3.7/files/test-inventory-jinja2-filter.json index 6d7249836..0f46b442f 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory-jinja2-filter.json +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory-jinja2-filter.json @@ -21,27 +21,28 @@ "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" }, - "display": "Ethernet1/1", + "display": "Ethernet2/1", "duplex": null, "enabled": true, - "id": 1, + "id": 2, "ip_addresses": [ { - "address": "172.16.180.11/24", + "address": "172.16.180.12/24", "comments": "", "custom_fields": {}, "description": "", - "display": "172.16.180.11/24", - "dns_name": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", "family": { "label": "IPv4", "value": 4 }, - "id": 3, + "id": 4, "nat_inside": null, "nat_outside": [], "role": null, @@ -51,6 +52,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", "vrf": null } ], @@ -65,7 +67,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet1/1", + "name": "Ethernet2/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -82,6 +84,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -101,27 +104,28 @@ "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, - "display": "Ethernet2/1", + "display": "Ethernet1/1", "duplex": null, "enabled": true, - "id": 2, + "id": 1, "ip_addresses": [ { - "address": "172.16.180.12/24", + "address": "172.16.180.11/24", "comments": "", "custom_fields": {}, "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", + "display": "172.16.180.11/24", + "dns_name": "", "family": { "label": "IPv4", "value": 4 }, - "id": 4, + "id": 3, "nat_inside": null, "nat_outside": [], "role": null, @@ -131,6 +135,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", "vrf": null } ], @@ -145,7 +150,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet2/1", + "name": "Ethernet1/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -162,6 +167,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -183,7 +189,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "wlink1", "duplex": null, @@ -218,6 +225,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -246,7 +254,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "telnet (TCP/23)", "id": 3, @@ -260,6 +269,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", "virtual_machine": null } ], @@ -323,7 +333,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet1", "duplex": null, @@ -351,6 +362,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", "vrf": null } ], @@ -382,6 +394,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -403,7 +416,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet2", "duplex": null, @@ -431,6 +445,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", "vrf": null } ], @@ -462,6 +477,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -483,7 +499,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "wlink1", "duplex": null, @@ -518,6 +535,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -550,7 +568,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "ssh (TCP/22)", "id": 1, @@ -564,6 +583,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", "virtual_machine": null }, { @@ -573,7 +593,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "http (TCP/80)", "id": 2, @@ -582,13 +603,15 @@ "address": "172.16.180.1/24", "display": "172.16.180.1/24", "family": 4, - "id": 1 + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" }, { "address": "2001::1:1/64", "display": "2001::1:1/64", "family": 6, - "id": 2 + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" } ], "name": "http", @@ -600,6 +623,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", "virtual_machine": null } ], @@ -617,6 +641,7 @@ "cluster_type": "test-cluster-type", "config_context": {}, "custom_fields": {}, + "disk": 170, "interfaces": [ { "bridge": null, @@ -637,10 +662,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -663,10 +690,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -689,10 +718,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -715,10 +746,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -741,10 +774,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null } @@ -790,10 +825,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -816,10 +853,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -842,10 +881,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -868,10 +909,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -894,10 +937,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null } diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory-jinja2.json b/tests/integration/targets/inventory-v3.7/files/test-inventory-jinja2.json index 119e5633d..d104c5cea 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory-jinja2.json +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory-jinja2.json @@ -145,6 +145,7 @@ "cluster_group": "test-cluster-group", "cluster_type": "test-cluster-type", "custom_fields": {}, + "disk": 170, "is_virtual": true, "locations": [], "regions": [ diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory-legacy.json b/tests/integration/targets/inventory-v3.7/files/test-inventory-legacy.json index 6df5dbf2b..46526ced7 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory-legacy.json +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory-legacy.json @@ -69,7 +69,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "telnet (TCP/23)", "id": 3, @@ -83,6 +84,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", "virtual_machine": null } ], @@ -124,10 +126,12 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" } } ], @@ -213,7 +217,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "ssh (TCP/22)", "id": 1, @@ -227,6 +232,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", "virtual_machine": null }, { @@ -236,7 +242,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "http (TCP/80)", "id": 2, @@ -245,13 +252,15 @@ "address": "172.16.180.1/24", "display": "172.16.180.1/24", "family": 4, - "id": 1 + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" }, { "address": "2001::1:1/64", "display": "2001::1:1/64", "family": 6, - "id": 2 + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" } ], "name": "http", @@ -263,6 +272,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", "virtual_machine": null } ], @@ -281,6 +291,7 @@ "cluster_group": "test-cluster-group", "cluster_type": "test-cluster-type", "custom_fields": {}, + "disk": 170, "is_virtual": true, "local_context_data": [ null diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory-noracks.json b/tests/integration/targets/inventory-v3.7/files/test-inventory-noracks.json index b61454e00..afd963a7b 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory-noracks.json +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory-noracks.json @@ -61,27 +61,28 @@ "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" }, - "display": "Ethernet1/1", + "display": "Ethernet2/1", "duplex": null, "enabled": true, - "id": 1, + "id": 2, "ip_addresses": [ { - "address": "172.16.180.11/24", + "address": "172.16.180.12/24", "comments": "", "custom_fields": {}, "description": "", - "display": "172.16.180.11/24", - "dns_name": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", "family": { "label": "IPv4", "value": 4 }, - "id": 3, + "id": 4, "nat_inside": null, "nat_outside": [], "role": null, @@ -91,6 +92,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", "vrf": null } ], @@ -105,7 +107,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet1/1", + "name": "Ethernet2/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -122,6 +124,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -141,27 +144,28 @@ "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, - "display": "Ethernet2/1", + "display": "Ethernet1/1", "duplex": null, "enabled": true, - "id": 2, + "id": 1, "ip_addresses": [ { - "address": "172.16.180.12/24", + "address": "172.16.180.11/24", "comments": "", "custom_fields": {}, "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", + "display": "172.16.180.11/24", + "dns_name": "", "family": { "label": "IPv4", "value": 4 }, - "id": 4, + "id": 3, "nat_inside": null, "nat_outside": [], "role": null, @@ -171,6 +175,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", "vrf": null } ], @@ -185,7 +190,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet2/1", + "name": "Ethernet1/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -202,6 +207,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -223,7 +229,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "wlink1", "duplex": null, @@ -258,6 +265,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -286,7 +294,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "telnet (TCP/23)", "id": 3, @@ -300,6 +309,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", "virtual_machine": null } ], @@ -340,10 +350,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/11/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" }, "vrf": null }, @@ -366,10 +378,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/12/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" }, "vrf": null } @@ -397,10 +411,12 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" } } ], @@ -478,7 +494,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet1", "duplex": null, @@ -506,6 +523,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", "vrf": null } ], @@ -537,6 +555,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -558,7 +577,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet2", "duplex": null, @@ -586,6 +606,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", "vrf": null } ], @@ -617,6 +638,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -638,7 +660,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "wlink1", "duplex": null, @@ -673,6 +696,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -704,7 +728,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "ssh (TCP/22)", "id": 1, @@ -718,6 +743,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", "virtual_machine": null }, { @@ -727,7 +753,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "http (TCP/80)", "id": 2, @@ -736,13 +763,15 @@ "address": "172.16.180.1/24", "display": "172.16.180.1/24", "family": 4, - "id": 1 + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" }, { "address": "2001::1:1/64", "display": "2001::1:1/64", "family": 6, - "id": 2 + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" } ], "name": "http", @@ -754,6 +783,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", "virtual_machine": null } ], @@ -775,6 +805,7 @@ {} ], "custom_fields": {}, + "disk": 170, "interfaces": [ { "bridge": null, @@ -795,10 +826,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -821,10 +854,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -847,10 +882,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -873,10 +910,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -899,10 +938,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null } @@ -954,10 +995,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -980,10 +1023,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -1006,10 +1051,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -1032,10 +1079,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -1058,10 +1107,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null } diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory-options-flatten.json b/tests/integration/targets/inventory-v3.7/files/test-inventory-options-flatten.json index 8e019bd84..047a60cf4 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory-options-flatten.json +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory-options-flatten.json @@ -64,27 +64,28 @@ "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" }, - "display": "Ethernet1/1", + "display": "Ethernet2/1", "duplex": null, "enabled": true, - "id": 1, + "id": 2, "ip_addresses": [ { - "address": "172.16.180.11/24", + "address": "172.16.180.12/24", "comments": "", "custom_fields": {}, "description": "", - "display": "172.16.180.11/24", - "dns_name": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", "family": { "label": "IPv4", "value": 4 }, - "id": 3, + "id": 4, "nat_inside": null, "nat_outside": [], "role": null, @@ -94,6 +95,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", "vrf": null } ], @@ -108,7 +110,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet1/1", + "name": "Ethernet2/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -125,6 +127,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -144,27 +147,28 @@ "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, - "display": "Ethernet2/1", + "display": "Ethernet1/1", "duplex": null, "enabled": true, - "id": 2, + "id": 1, "ip_addresses": [ { - "address": "172.16.180.12/24", + "address": "172.16.180.11/24", "comments": "", "custom_fields": {}, "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", + "display": "172.16.180.11/24", + "dns_name": "", "family": { "label": "IPv4", "value": 4 }, - "id": 4, + "id": 3, "nat_inside": null, "nat_outside": [], "role": null, @@ -174,6 +178,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", "vrf": null } ], @@ -188,7 +193,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet2/1", + "name": "Ethernet1/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -205,6 +210,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -226,7 +232,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "wlink1", "duplex": null, @@ -261,6 +268,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -289,7 +297,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "telnet (TCP/23)", "id": 3, @@ -303,6 +312,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", "virtual_machine": null } ], @@ -337,10 +347,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/11/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" }, "vrf": null }, @@ -363,10 +375,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/12/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" }, "vrf": null } @@ -392,10 +406,12 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" } } ], @@ -450,7 +466,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet1", "duplex": null, @@ -478,6 +495,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", "vrf": null } ], @@ -509,6 +527,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -530,7 +549,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet2", "duplex": null, @@ -558,6 +578,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", "vrf": null } ], @@ -589,6 +610,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -610,7 +632,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "wlink1", "duplex": null, @@ -645,6 +668,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -675,7 +699,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "ssh (TCP/22)", "id": 1, @@ -689,6 +714,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", "virtual_machine": null }, { @@ -698,7 +724,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "http (TCP/80)", "id": 2, @@ -707,13 +734,15 @@ "address": "172.16.180.1/24", "display": "172.16.180.1/24", "family": 4, - "id": 1 + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" }, { "address": "2001::1:1/64", "display": "2001::1:1/64", "family": 6, - "id": 2 + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" } ], "name": "http", @@ -725,6 +754,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", "virtual_machine": null } ], @@ -740,6 +770,7 @@ "cluster": "Test Cluster", "cluster_group": "test-cluster-group", "cluster_type": "test-cluster-type", + "disk": 170, "interfaces": [ { "bridge": null, @@ -760,10 +791,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -786,10 +819,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -812,10 +847,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -838,10 +875,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -864,10 +903,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null } @@ -911,10 +952,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -937,10 +980,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -963,10 +1008,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -989,10 +1036,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -1015,10 +1064,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null } diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory-options.json b/tests/integration/targets/inventory-v3.7/files/test-inventory-options.json index 119e5633d..d104c5cea 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory-options.json +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory-options.json @@ -145,6 +145,7 @@ "cluster_group": "test-cluster-group", "cluster_type": "test-cluster-type", "custom_fields": {}, + "disk": 170, "is_virtual": true, "locations": [], "regions": [ diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory-plurals-flatten.json b/tests/integration/targets/inventory-v3.7/files/test-inventory-plurals-flatten.json index bf84ee743..12e096f53 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory-plurals-flatten.json +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory-plurals-flatten.json @@ -189,6 +189,7 @@ "cluster": "Test Cluster", "cluster_group": "test-cluster-group", "cluster_type": "test-cluster-type", + "disk": 170, "is_virtual": true, "local_context_data": [ null diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory-plurals.json b/tests/integration/targets/inventory-v3.7/files/test-inventory-plurals.json index 22f9d4e5f..50b8cbbdf 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory-plurals.json +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory-plurals.json @@ -66,27 +66,28 @@ "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" }, - "display": "Ethernet1/1", + "display": "Ethernet2/1", "duplex": null, "enabled": true, - "id": 1, + "id": 2, "ip_addresses": [ { - "address": "172.16.180.11/24", + "address": "172.16.180.12/24", "comments": "", "custom_fields": {}, "description": "", - "display": "172.16.180.11/24", - "dns_name": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", "family": { "label": "IPv4", "value": 4 }, - "id": 3, + "id": 4, "nat_inside": null, "nat_outside": [], "role": null, @@ -96,6 +97,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", "vrf": null } ], @@ -110,7 +112,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet1/1", + "name": "Ethernet2/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -127,6 +129,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -146,27 +149,28 @@ "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, - "display": "Ethernet2/1", + "display": "Ethernet1/1", "duplex": null, "enabled": true, - "id": 2, + "id": 1, "ip_addresses": [ { - "address": "172.16.180.12/24", + "address": "172.16.180.11/24", "comments": "", "custom_fields": {}, "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", + "display": "172.16.180.11/24", + "dns_name": "", "family": { "label": "IPv4", "value": 4 }, - "id": 4, + "id": 3, "nat_inside": null, "nat_outside": [], "role": null, @@ -176,6 +180,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", "vrf": null } ], @@ -190,7 +195,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet2/1", + "name": "Ethernet1/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -207,6 +212,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -228,7 +234,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "wlink1", "duplex": null, @@ -263,6 +270,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -295,7 +303,8 @@ "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "telnet (TCP/23)", "id": 3, @@ -309,6 +318,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", "virtual_machine": null } ], @@ -349,10 +359,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/11/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" }, "vrf": null }, @@ -375,10 +387,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/12/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" }, "vrf": null } @@ -407,10 +421,12 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" } } ], @@ -495,7 +511,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet1", "duplex": null, @@ -523,6 +540,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", "vrf": null } ], @@ -554,6 +572,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -575,7 +594,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet2", "duplex": null, @@ -603,6 +623,7 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", "vrf": null } ], @@ -634,6 +655,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -655,7 +677,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "wlink1", "duplex": null, @@ -690,6 +713,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -725,7 +749,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "ssh (TCP/22)", "id": 1, @@ -739,6 +764,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", "virtual_machine": null }, { @@ -748,7 +774,8 @@ "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "http (TCP/80)", "id": 2, @@ -757,13 +784,15 @@ "address": "172.16.180.1/24", "display": "172.16.180.1/24", "family": 4, - "id": 1 + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" }, { "address": "2001::1:1/64", "display": "2001::1:1/64", "family": 6, - "id": 2 + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" } ], "name": "http", @@ -775,6 +804,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", "virtual_machine": null } ], @@ -796,6 +826,7 @@ {} ], "custom_fields": {}, + "disk": 170, "interfaces": [ { "bridge": null, @@ -816,10 +847,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -842,10 +875,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -868,10 +903,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -894,10 +931,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -920,10 +959,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null } @@ -976,10 +1017,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -1002,10 +1045,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -1028,10 +1073,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -1054,10 +1101,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -1080,10 +1129,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null } diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory.json b/tests/integration/targets/inventory-v3.7/files/test-inventory.json index 360a7ac33..28ef4ac7e 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory.json +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory.json @@ -22,7 +22,8 @@ "label": "Active", "value": "active" }, - "tags": [] + "tags": [], + "virtual_disks": [] }, "Test Nexus One": { "ansible_host": "172.16.180.12", @@ -41,30 +42,34 @@ "connected_endpoints_type": null, "count_fhrp_groups": 0, "count_ipaddresses": 1, + "created": "2024-04-10T12:55:46.117264Z", "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" }, - "display": "Ethernet1/1", + "display": "Ethernet2/1", "duplex": null, "enabled": true, - "id": 1, + "id": 2, "ip_addresses": [ { - "address": "172.16.180.11/24", + "address": "172.16.180.12/24", "comments": "", + "created": "2024-04-10T12:55:47.352870Z", "custom_fields": {}, "description": "", - "display": "172.16.180.11/24", - "dns_name": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", "family": { "label": "IPv4", "value": 4 }, - "id": 3, + "id": 4, + "last_updated": "2024-04-10T12:55:47.352897Z", "nat_inside": null, "nat_outside": [], "role": null, @@ -74,12 +79,14 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", "vrf": null } ], "l2vpn_termination": null, "label": "", "lag": null, + "last_updated": "2024-04-10T12:55:46.117288Z", "link_peers": [], "link_peers_type": null, "mac_address": null, @@ -88,7 +95,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet1/1", + "name": "Ethernet2/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -105,6 +112,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -121,30 +129,34 @@ "connected_endpoints_type": null, "count_fhrp_groups": 0, "count_ipaddresses": 1, + "created": "2024-04-10T12:55:46.039597Z", "custom_fields": {}, "description": "", "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, - "display": "Ethernet2/1", + "display": "Ethernet1/1", "duplex": null, "enabled": true, - "id": 2, + "id": 1, "ip_addresses": [ { - "address": "172.16.180.12/24", + "address": "172.16.180.11/24", "comments": "", + "created": "2024-04-10T12:55:47.320197Z", "custom_fields": {}, "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", + "display": "172.16.180.11/24", + "dns_name": "", "family": { "label": "IPv4", "value": 4 }, - "id": 4, + "id": 3, + "last_updated": "2024-04-10T12:55:47.320220Z", "nat_inside": null, "nat_outside": [], "role": null, @@ -154,12 +166,14 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", "vrf": null } ], "l2vpn_termination": null, "label": "", "lag": null, + "last_updated": "2024-04-10T12:55:46.039623Z", "link_peers": [], "link_peers_type": null, "mac_address": null, @@ -168,7 +182,7 @@ "mode": null, "module": null, "mtu": null, - "name": "Ethernet2/1", + "name": "Ethernet1/1", "parent": null, "poe_mode": null, "poe_type": null, @@ -185,6 +199,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -201,12 +216,14 @@ "connected_endpoints_type": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:46.563561Z", "custom_fields": {}, "description": "", "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "wlink1", "duplex": null, @@ -216,6 +233,7 @@ "l2vpn_termination": null, "label": "", "lag": null, + "last_updated": "2024-04-10T12:55:46.563586Z", "link_peers": [], "link_peers_type": null, "mac_address": null, @@ -241,6 +259,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -264,16 +283,19 @@ "services": [ { "comments": "", + "created": "2024-04-10T12:55:50.975124Z", "custom_fields": {}, "description": "", "device": { "display": "Test Nexus One", "id": 4, - "name": "Test Nexus One" + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" }, "display": "telnet (TCP/23)", "id": 3, "ipaddresses": [], + "last_updated": "2024-04-10T12:55:50.975148Z", "name": "telnet", "ports": [ 23 @@ -283,6 +305,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", "virtual_machine": null } ], @@ -292,7 +315,8 @@ "label": "Active", "value": "active" }, - "tags": [] + "tags": [], + "virtual_disks": [] }, "Test VM With Spaces": { "cluster": "Test Cluster 2", @@ -304,6 +328,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.463620Z", "custom_fields": {}, "description": "", "display": "Eth0", @@ -311,6 +336,7 @@ "id": 11, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.463653Z", "mac_address": null, "mode": null, "mtu": null, @@ -319,10 +345,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/11/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" }, "vrf": null }, @@ -330,6 +358,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.509215Z", "custom_fields": {}, "description": "", "display": "Eth1", @@ -337,6 +366,7 @@ "id": 12, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.509242Z", "mac_address": null, "mode": null, "mtu": null, @@ -345,10 +375,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/12/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" }, "vrf": null } @@ -359,12 +391,14 @@ "services": [ { "comments": "", + "created": "2024-04-10T12:55:51.008597Z", "custom_fields": {}, "description": "", "device": null, "display": "ssh (TCP/22)", "id": 4, "ipaddresses": [], + "last_updated": "2024-04-10T12:55:51.008622Z", "name": "ssh", "ports": [ 22 @@ -374,10 +408,12 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", "virtual_machine": { "display": "Test VM With Spaces", "id": 6, - "name": "Test VM With Spaces" + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" } } ], @@ -386,7 +422,8 @@ "label": "Active", "value": "active" }, - "tags": [] + "tags": [], + "virtual_disks": [] }, "TestDeviceR1": { "config_context": {}, @@ -413,7 +450,8 @@ "label": "Active", "value": "active" }, - "tags": [] + "tags": [], + "virtual_disks": [] }, "test100": { "asset_tag": "123456789", @@ -435,12 +473,14 @@ "connected_endpoints_type": null, "count_fhrp_groups": 0, "count_ipaddresses": 1, + "created": "2024-04-10T12:55:46.277746Z", "custom_fields": {}, "description": "", "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet1", "duplex": null, @@ -450,6 +490,7 @@ { "address": "172.16.180.1/24", "comments": "", + "created": "2024-04-10T12:55:47.245995Z", "custom_fields": {}, "description": "", "display": "172.16.180.1/24", @@ -459,6 +500,7 @@ "value": 4 }, "id": 1, + "last_updated": "2024-04-10T12:55:47.246027Z", "nat_inside": null, "nat_outside": [], "role": null, @@ -468,12 +510,14 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", "vrf": null } ], "l2vpn_termination": null, "label": "", "lag": null, + "last_updated": "2024-04-10T12:55:46.277783Z", "link_peers": [], "link_peers_type": null, "mac_address": null, @@ -499,6 +543,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -515,12 +560,14 @@ "connected_endpoints_type": null, "count_fhrp_groups": 0, "count_ipaddresses": 1, + "created": "2024-04-10T12:55:46.342494Z", "custom_fields": {}, "description": "", "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "GigabitEthernet2", "duplex": null, @@ -530,6 +577,7 @@ { "address": "2001::1:1/64", "comments": "", + "created": "2024-04-10T12:55:47.283463Z", "custom_fields": {}, "description": "", "display": "2001::1:1/64", @@ -539,6 +587,7 @@ "value": 6 }, "id": 2, + "last_updated": "2024-04-10T12:55:47.283489Z", "nat_inside": null, "nat_outside": [], "role": null, @@ -548,12 +597,14 @@ }, "tags": [], "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", "vrf": null } ], "l2vpn_termination": null, "label": "", "lag": null, + "last_updated": "2024-04-10T12:55:46.342519Z", "link_peers": [], "link_peers_type": null, "mac_address": null, @@ -579,6 +630,7 @@ "value": "1000base-t" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -595,12 +647,14 @@ "connected_endpoints_type": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:46.501948Z", "custom_fields": {}, "description": "", "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "wlink1", "duplex": null, @@ -610,6 +664,7 @@ "l2vpn_termination": null, "label": "", "lag": null, + "last_updated": "2024-04-10T12:55:46.501983Z", "link_peers": [], "link_peers_type": null, "mac_address": null, @@ -635,6 +690,7 @@ "value": "ieee802.11a" }, "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", "vdcs": [], "vrf": null, "wireless_lans": [], @@ -662,16 +718,19 @@ "services": [ { "comments": "", + "created": "2024-04-10T12:55:50.860141Z", "custom_fields": {}, "description": "", "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "ssh (TCP/22)", "id": 1, "ipaddresses": [], + "last_updated": "2024-04-10T12:55:50.860164Z", "name": "ssh", "ports": [ 22 @@ -681,16 +740,19 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", "virtual_machine": null }, { "comments": "", + "created": "2024-04-10T12:55:50.898501Z", "custom_fields": {}, "description": "", "device": { "display": "test100 (123456789)", "id": 1, - "name": "test100" + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" }, "display": "http (TCP/80)", "id": 2, @@ -699,15 +761,18 @@ "address": "172.16.180.1/24", "display": "172.16.180.1/24", "family": 4, - "id": 1 + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" }, { "address": "2001::1:1/64", "display": "2001::1:1/64", "family": 6, - "id": 2 + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" } ], + "last_updated": "2024-04-10T12:55:50.898528Z", "name": "http", "ports": [ 80 @@ -717,6 +782,7 @@ "value": "tcp" }, "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", "virtual_machine": null } ], @@ -726,7 +792,45 @@ "label": "Active", "value": "active" }, - "tags": [] + "tags": [], + "virtual_disks": [ + { + "created": "2024-04-10T12:55:49.675995Z", + "custom_fields": {}, + "description": "", + "display": "disk1", + "id": 1, + "last_updated": "2024-04-10T12:55:49.676030Z", + "name": "disk1", + "size": 60, + "tags": [], + "url": "http://localhost:32768/api/virtualization/virtual-disks/1/", + "virtual_machine": { + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + } + }, + { + "created": "2024-04-10T12:55:49.707065Z", + "custom_fields": {}, + "description": "", + "display": "disk2", + "id": 2, + "last_updated": "2024-04-10T12:55:49.707112Z", + "name": "disk2", + "size": 110, + "tags": [], + "url": "http://localhost:32768/api/virtualization/virtual-disks/2/", + "virtual_machine": { + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + } + } + ] }, "test100-vm": { "cluster": "Test Cluster", @@ -734,11 +838,13 @@ "cluster_type": "test-cluster-type", "config_context": {}, "custom_fields": {}, + "disk": 170, "interfaces": [ { "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:49.971454Z", "custom_fields": {}, "description": "", "display": "Eth0", @@ -746,6 +852,7 @@ "id": 1, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:49.971497Z", "mac_address": null, "mode": null, "mtu": null, @@ -754,10 +861,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -765,6 +874,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.036225Z", "custom_fields": {}, "description": "", "display": "Eth1", @@ -772,6 +882,7 @@ "id": 2, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.036270Z", "mac_address": null, "mode": null, "mtu": null, @@ -780,10 +891,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -791,6 +904,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.084595Z", "custom_fields": {}, "description": "", "display": "Eth2", @@ -798,6 +912,7 @@ "id": 3, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.084623Z", "mac_address": null, "mode": null, "mtu": null, @@ -806,10 +921,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -817,6 +934,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.131287Z", "custom_fields": {}, "description": "", "display": "Eth3", @@ -824,6 +942,7 @@ "id": 4, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.131330Z", "mac_address": null, "mode": null, "mtu": null, @@ -832,10 +951,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null }, @@ -843,6 +964,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.177550Z", "custom_fields": {}, "description": "", "display": "Eth4", @@ -850,6 +972,7 @@ "id": 5, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.177580Z", "mac_address": null, "mode": null, "mtu": null, @@ -858,10 +981,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", "virtual_machine": { "display": "test100-vm", "id": 1, - "name": "test100-vm" + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" }, "vrf": null } @@ -879,7 +1004,45 @@ "label": "Active", "value": "active" }, - "tags": [] + "tags": [], + "virtual_disks": [ + { + "created": "2024-04-10T12:55:49.675995Z", + "custom_fields": {}, + "description": "", + "display": "disk1", + "id": 1, + "last_updated": "2024-04-10T12:55:49.676030Z", + "name": "disk1", + "size": 60, + "tags": [], + "url": "http://localhost:32768/api/virtualization/virtual-disks/1/", + "virtual_machine": { + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + } + }, + { + "created": "2024-04-10T12:55:49.707065Z", + "custom_fields": {}, + "description": "", + "display": "disk2", + "id": 2, + "last_updated": "2024-04-10T12:55:49.707112Z", + "name": "disk2", + "size": 110, + "tags": [], + "url": "http://localhost:32768/api/virtualization/virtual-disks/2/", + "virtual_machine": { + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + } + } + ] }, "test101-vm": { "cluster": "Test Cluster", @@ -892,6 +1055,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.222402Z", "custom_fields": {}, "description": "", "display": "Eth0", @@ -899,6 +1063,7 @@ "id": 6, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.222435Z", "mac_address": null, "mode": null, "mtu": null, @@ -907,10 +1072,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -918,6 +1085,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.268954Z", "custom_fields": {}, "description": "", "display": "Eth1", @@ -925,6 +1093,7 @@ "id": 7, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.268981Z", "mac_address": null, "mode": null, "mtu": null, @@ -933,10 +1102,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -944,6 +1115,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.329979Z", "custom_fields": {}, "description": "", "display": "Eth2", @@ -951,6 +1123,7 @@ "id": 8, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.330023Z", "mac_address": null, "mode": null, "mtu": null, @@ -959,10 +1132,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -970,6 +1145,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.378705Z", "custom_fields": {}, "description": "", "display": "Eth3", @@ -977,6 +1153,7 @@ "id": 9, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.378744Z", "mac_address": null, "mode": null, "mtu": null, @@ -985,10 +1162,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null }, @@ -996,6 +1175,7 @@ "bridge": null, "count_fhrp_groups": 0, "count_ipaddresses": 0, + "created": "2024-04-10T12:55:50.419981Z", "custom_fields": {}, "description": "", "display": "Eth4", @@ -1003,6 +1183,7 @@ "id": 10, "ip_addresses": [], "l2vpn_termination": null, + "last_updated": "2024-04-10T12:55:50.420007Z", "mac_address": null, "mode": null, "mtu": null, @@ -1011,10 +1192,12 @@ "tagged_vlans": [], "tags": [], "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", "virtual_machine": { "display": "test101-vm", "id": 2, - "name": "test101-vm" + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" }, "vrf": null } @@ -1032,7 +1215,8 @@ "label": "Active", "value": "active" }, - "tags": [] + "tags": [], + "virtual_disks": [] }, "test102-vm": { "cluster": "Test Cluster", @@ -1054,7 +1238,8 @@ "label": "Active", "value": "active" }, - "tags": [] + "tags": [], + "virtual_disks": [] }, "test103-vm": { "cluster": "Test Cluster", @@ -1076,7 +1261,8 @@ "label": "Active", "value": "active" }, - "tags": [] + "tags": [], + "virtual_disks": [] }, "test104-vm": { "cluster": "Test Cluster 2", @@ -1093,7 +1279,8 @@ "label": "Active", "value": "active" }, - "tags": [] + "tags": [], + "virtual_disks": [] } } }, diff --git a/tests/integration/targets/inventory-v3.7/files/test-inventory.yml b/tests/integration/targets/inventory-v3.7/files/test-inventory.yml index c88c96593..8ddaac090 100644 --- a/tests/integration/targets/inventory-v3.7/files/test-inventory.yml +++ b/tests/integration/targets/inventory-v3.7/files/test-inventory.yml @@ -7,6 +7,7 @@ validate_certs: False config_context: True plurals: False interfaces: True +virtual_disks: True services: True group_by: diff --git a/tests/integration/targets/v3.5/tasks/netbox_device.yml b/tests/integration/targets/v3.5/tasks/netbox_device.yml index badf1c9f1..5a791b242 100644 --- a/tests/integration/targets/v3.5/tasks/netbox_device.yml +++ b/tests/integration/targets/v3.5/tasks/netbox_device.yml @@ -129,7 +129,7 @@ device_role: "Core Switch" site: "Test Site2" rack: "Test Rack Site 2" - position: 35 + position: 35.5 face: "Front" tags: - "schnozzberry" diff --git a/tests/integration/targets/v3.5/tasks/netbox_device_type.yml b/tests/integration/targets/v3.5/tasks/netbox_device_type.yml index 098c75d27..5587119f3 100644 --- a/tests/integration/targets/v3.5/tasks/netbox_device_type.yml +++ b/tests/integration/targets/v3.5/tasks/netbox_device_type.yml @@ -55,7 +55,7 @@ model: ws-test-3750 manufacturer: Test Manufacturer part_number: ws-3750g-v2 - u_height: 1 + u_height: 1.5 is_full_depth: false subdevice_role: parent state: present diff --git a/tests/integration/targets/v3.5/tasks/netbox_module.yml b/tests/integration/targets/v3.5/tasks/netbox_module.yml new file mode 100644 index 000000000..e8f090d8c --- /dev/null +++ b/tests/integration/targets/v3.5/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" + 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" + 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" + 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" + 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`" + 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/v3.5/tasks/netbox_module_bay.yml b/tests/integration/targets/v3.5/tasks/netbox_module_bay.yml new file mode 100644 index 000000000..44bb76269 --- /dev/null +++ b/tests/integration/targets/v3.5/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" + 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" + 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" + 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" + 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`" + 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/v3.6/tasks/main.yml b/tests/integration/targets/v3.6/tasks/main.yml index 1b232374e..5329b4917 100644 --- a/tests/integration/targets/v3.6/tasks/main.yml +++ b/tests/integration/targets/v3.6/tasks/main.yml @@ -310,3 +310,8 @@ include_tasks: "netbox_config_template.yml" tags: - netbox_config_template + +- name: "NETBOX_CUSTOM_FIELD_CHOICE_SET" + include_tasks: "netbox_custom_field_choice_set.yml" + tags: + - netbox_custom_field_choice_set diff --git a/tests/integration/targets/v3.6/tasks/netbox_custom_field_choice_set.yml b/tests/integration/targets/v3.6/tasks/netbox_custom_field_choice_set.yml new file mode 100644 index 000000000..f76743271 --- /dev/null +++ b/tests/integration/targets/v3.6/tasks/netbox_custom_field_choice_set.yml @@ -0,0 +1,106 @@ +--- +## +## +### NETBOX_CUSTOM_FIELD_CHOICE_SET +## +## +- name: "CUSTOM_FIELD_CHOICE_SET 1: Base Choice set creation" + netbox.netbox.netbox_custom_field_choice_set: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "A_ChoiceSet" + description: "Added a description" + base_choices: "IATA" + state: present + register: test_one + +- name: "CUSTOM_FIELD_CHOICE_SET 1: ASSERT - Base Choice set creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['choice_set']['name'] == "A_ChoiceSet" + - test_one['choice_set']['description'] == "Added a description" + - test_one['choice_set']['display'] == "A_ChoiceSet" + - test_one['choice_set']['order_alphabetically'] == false + - test_one['choice_set']['extra_choices'] == [] + - test_one['msg'] == "choice_set A_ChoiceSet created" + +- name: "CUSTOM_FIELD_CHOICE_SET 2: Create duplicate" + netbox.netbox.netbox_custom_field_choice_set: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "A_ChoiceSet" + description: "Added a description" + base_choices: "IATA" + state: present + register: test_two + +- name: "CUSTOM_FIELD_CHOICE_SET 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['choice_set']['name'] == "A_ChoiceSet" + - test_two['msg'] == "choice_set A_ChoiceSet already exists" + +- name: "CUSTOM_FIELD_CHOICE_SET 3: Update data and change base_choice" + netbox.netbox.netbox_custom_field_choice_set: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "A_ChoiceSet" + description: "Added a description" + base_choices: "ISO_3166" + state: present + register: test_three + +- name: "CUSTOM_FIELD_CHOICE_SET 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['base_choices'] == "ISO_3166" + - test_three['choice_set']['name'] == "A_ChoiceSet" + - test_three['msg'] == "choice_set A_ChoiceSet updated" + +- name: "CUSTOM_FIELD_CHOICE_SET 4: Update extra choice and order alphabetically" + netbox.netbox.netbox_custom_field_choice_set: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "A_ChoiceSet" + description: "Added a description" + order_alphabetically: true + extra_choices: + - ['test', 'label'] + - ['test2', 'label2'] + state: present + register: test_four + +- name: "CUSTOM_FIELD_CHOICE_SET 4: ASSERT - Change extra choice and order alphabetically" + assert: + that: + - test_four is changed + - test_four['diff']['after']['extra_choices'] == [["test","label"],["test2","label2"]] + - test_four['diff']['after']['order_alphabetically'] == true + - test_four['choice_set']['name'] == "A_ChoiceSet" + - test_four['msg'] == "choice_set A_ChoiceSet updated" + +- name: "CUSTOM_FIELD_CHOICE_SET 5: Delete" + netbox.netbox.netbox_custom_field_choice_set: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "A_ChoiceSet" + state: absent + register: test_five + +- name: "CUSTOM_FIELD_CHOICE_SET 5: ASSERT - Deleted" + assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['choice_set']['name'] == "A_ChoiceSet" + - test_five['msg'] == "choice_set A_ChoiceSet deleted" diff --git a/tests/integration/targets/v3.6/tasks/netbox_device.yml b/tests/integration/targets/v3.6/tasks/netbox_device.yml index badf1c9f1..5a791b242 100644 --- a/tests/integration/targets/v3.6/tasks/netbox_device.yml +++ b/tests/integration/targets/v3.6/tasks/netbox_device.yml @@ -129,7 +129,7 @@ device_role: "Core Switch" site: "Test Site2" rack: "Test Rack Site 2" - position: 35 + position: 35.5 face: "Front" tags: - "schnozzberry" diff --git a/tests/integration/targets/v3.6/tasks/netbox_device_type.yml b/tests/integration/targets/v3.6/tasks/netbox_device_type.yml index 098c75d27..5587119f3 100644 --- a/tests/integration/targets/v3.6/tasks/netbox_device_type.yml +++ b/tests/integration/targets/v3.6/tasks/netbox_device_type.yml @@ -55,7 +55,7 @@ model: ws-test-3750 manufacturer: Test Manufacturer part_number: ws-3750g-v2 - u_height: 1 + u_height: 1.5 is_full_depth: false subdevice_role: parent state: present diff --git a/tests/integration/targets/v3.6/tasks/netbox_module.yml b/tests/integration/targets/v3.6/tasks/netbox_module.yml new file mode 100644 index 000000000..e8f090d8c --- /dev/null +++ b/tests/integration/targets/v3.6/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" + 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" + 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" + 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" + 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`" + 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/v3.6/tasks/netbox_module_bay.yml b/tests/integration/targets/v3.6/tasks/netbox_module_bay.yml new file mode 100644 index 000000000..44bb76269 --- /dev/null +++ b/tests/integration/targets/v3.6/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" + 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" + 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" + 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" + 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`" + 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/v3.7/tasks/netbox_device.yml b/tests/integration/targets/v3.7/tasks/netbox_device.yml index badf1c9f1..5a791b242 100644 --- a/tests/integration/targets/v3.7/tasks/netbox_device.yml +++ b/tests/integration/targets/v3.7/tasks/netbox_device.yml @@ -129,7 +129,7 @@ device_role: "Core Switch" site: "Test Site2" rack: "Test Rack Site 2" - position: 35 + position: 35.5 face: "Front" tags: - "schnozzberry" diff --git a/tests/integration/targets/v3.7/tasks/netbox_device_type.yml b/tests/integration/targets/v3.7/tasks/netbox_device_type.yml index 098c75d27..5587119f3 100644 --- a/tests/integration/targets/v3.7/tasks/netbox_device_type.yml +++ b/tests/integration/targets/v3.7/tasks/netbox_device_type.yml @@ -55,7 +55,7 @@ model: ws-test-3750 manufacturer: Test Manufacturer part_number: ws-3750g-v2 - u_height: 1 + u_height: 1.5 is_full_depth: false subdevice_role: parent state: present diff --git a/tests/integration/targets/v3.7/tasks/netbox_module.yml b/tests/integration/targets/v3.7/tasks/netbox_module.yml new file mode 100644 index 000000000..e8f090d8c --- /dev/null +++ b/tests/integration/targets/v3.7/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" + 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" + 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" + 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" + 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`" + 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/v3.7/tasks/netbox_module_bay.yml b/tests/integration/targets/v3.7/tasks/netbox_module_bay.yml new file mode 100644 index 000000000..44bb76269 --- /dev/null +++ b/tests/integration/targets/v3.7/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" + 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" + 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" + 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" + 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`" + assert: + that: + - not test_five['changed'] + - test_five['module_bay'] == None + - test_five['msg'] == "module_bay Network Module already absent" diff --git a/tests/unit/inventory/test_data/data.json b/tests/unit/inventory/test_data/data.json new file mode 100644 index 000000000..41726270e --- /dev/null +++ b/tests/unit/inventory/test_data/data.json @@ -0,0 +1,12 @@ +[ + { + "name": "disk1", + "vm_name": "test100-vm", + "size_gb": 100 + }, + { + "name": "disk2", + "vm_name": "test100-vm", + "size_gb": 200 + } +] diff --git a/tests/unit/inventory/test_data/extract_custom_fields/data.json b/tests/unit/inventory/test_data/extract_custom_fields/data.json new file mode 100644 index 000000000..cb63c576e --- /dev/null +++ b/tests/unit/inventory/test_data/extract_custom_fields/data.json @@ -0,0 +1,21 @@ +[ + { + "custom_fields": { + "a_text_value": "value1", + "a_bool_value": false + }, + "expected": { + "a_text_value": "value1", + "a_bool_value": false + } + }, + { + "custom_fields": { + "an_unset_value": null, + "a_set_value": false + }, + "expected": { + "a_set_value": false + } + } +] diff --git a/tests/unit/inventory/test_data/group_extractors/data.json b/tests/unit/inventory/test_data/group_extractors/data.json index a0a39ffe1..870814dc8 100644 --- a/tests/unit/inventory/test_data/group_extractors/data.json +++ b/tests/unit/inventory/test_data/group_extractors/data.json @@ -1,7 +1,9 @@ [ { "plurals": false, + "virtual_disks": false, "interfaces": false, + "virtual_disks": false, "services": false, "dns_name": false, "ansible_host_dns_name": false, @@ -36,6 +38,7 @@ "device_types", "manufacturers", "services", + "virtual_disks", "interfaces", "dns_name", "ansible_host_dns_name" @@ -43,7 +46,9 @@ }, { "plurals": true, + "virtual_disks": true, "interfaces": true, + "virtual_disks": true, "services": true, "dns_name": true, "ansible_host_dns_name": true, @@ -68,6 +73,7 @@ "device_types", "manufacturers", "services", + "virtual_disks", "interfaces", "dns_name" ], @@ -84,7 +90,9 @@ }, { "plurals": true, + "virtual_disks": true, "interfaces": true, + "virtual_disks": true, "services": true, "dns_name": false, "ansible_host_dns_name": true, @@ -109,6 +117,7 @@ "device_types", "manufacturers", "services", + "virtual_disks", "interfaces", "dns_name" ], diff --git a/tests/unit/inventory/test_nb_inventory.py b/tests/unit/inventory/test_nb_inventory.py index 9adfc3e3e..4b502a8a0 100644 --- a/tests/unit/inventory/test_nb_inventory.py +++ b/tests/unit/inventory/test_nb_inventory.py @@ -78,6 +78,7 @@ def allowed_vm_query_parameters_fixture(): # Subset of parameters - real list is fetched dynamically from NetBox openapi endpoint return [ "id", + "virtual_disks", "interfaces", "disk", "mac_address", @@ -148,13 +149,14 @@ def does_not_raise(): @pytest.mark.parametrize( - "plurals, services, interfaces, dns_name, ansible_host_dns_name, racks, expected, not_expected", + "plurals, services, virtual_disks, interfaces, dns_name, ansible_host_dns_name, racks, expected, not_expected", load_relative_test_data("group_extractors"), ) def test_group_extractors( inventory_fixture, plurals, services, + virtual_disks, interfaces, dns_name, ansible_host_dns_name, @@ -164,6 +166,7 @@ def test_group_extractors( ): inventory_fixture.plurals = plurals inventory_fixture.services = services + inventory_fixture.virtual_disks = virtual_disks inventory_fixture.interfaces = interfaces inventory_fixture.dns_name = dns_name inventory_fixture.ansible_host_dns_name = ansible_host_dns_name @@ -246,3 +249,14 @@ def test_new_token(inventory_fixture, templar_fixture): assert "Authorization" in inventory_fixture.headers assert inventory_fixture.headers["Authorization"] == "Foo bar" + + +@pytest.mark.parametrize( + "custom_fields, expected", load_relative_test_data("extract_custom_fields") +) +def test_extract_custom_fields(inventory_fixture, custom_fields, expected): + extracted_custom_fields = inventory_fixture.extract_custom_fields( + {"custom_fields": custom_fields} + ) + + assert extracted_custom_fields == expected diff --git a/tests/unit/module_utils/test_netbox_base_class.py b/tests/unit/module_utils/test_netbox_base_class.py index 40330da12..40bbadaa7 100644 --- a/tests/unit/module_utils/test_netbox_base_class.py +++ b/tests/unit/module_utils/test_netbox_base_class.py @@ -300,7 +300,7 @@ def test_create_netbox_object_check_mode_false( serialized_obj, diff = mock_netbox_module._create_netbox_object( endpoint_mock, normalized_data ) - assert endpoint_mock.create.called_once_with(normalized_data) + endpoint_mock.create.assert_called_with(normalized_data) assert serialized_obj.serialize() == return_value assert diff == on_creation_diff @@ -312,7 +312,7 @@ def test_create_netbox_object_check_mode_true( serialized_obj, diff = mock_netbox_module._create_netbox_object( endpoint_mock, normalized_data ) - assert endpoint_mock.create.not_called() + endpoint_mock.create.assert_not_called() assert serialized_obj == normalized_data assert diff == on_creation_diff @@ -322,7 +322,7 @@ def test_delete_netbox_object_check_mode_false( ): mock_netbox_module.nb_object = nb_obj_mock diff = mock_netbox_module._delete_netbox_object() - assert nb_obj_mock.delete.called_once() + nb_obj_mock.delete.assert_called_once() assert diff == on_deletion_diff @@ -332,7 +332,7 @@ def test_delete_netbox_object_check_mode_true( mock_netbox_module.check_mode = True mock_netbox_module.nb_object = nb_obj_mock diff = mock_netbox_module._delete_netbox_object() - assert nb_obj_mock.delete.not_called() + nb_obj_mock.delete.assert_not_called() assert diff == on_deletion_diff @@ -340,7 +340,7 @@ def test_update_netbox_object_no_changes(mock_netbox_module, nb_obj_mock): mock_netbox_module.nb_object = nb_obj_mock unchanged_data = nb_obj_mock.serialize() serialized_object, diff = mock_netbox_module._update_netbox_object(unchanged_data) - assert nb_obj_mock.update.not_called() + nb_obj_mock.update.assert_not_called() assert serialized_object == unchanged_data assert diff is None @@ -352,7 +352,7 @@ def test_update_netbox_object_with_changes_check_mode_false( serialized_obj, diff = mock_netbox_module._update_netbox_object( changed_serialized_obj ) - assert nb_obj_mock.update.called_once_with(changed_serialized_obj) + nb_obj_mock.update.assert_called_once_with(changed_serialized_obj) assert serialized_obj == nb_obj_mock.serialize() assert diff == on_update_diff @@ -368,7 +368,7 @@ def test_update_netbox_object_with_changes_check_mode_true( serialized_obj, diff = mock_netbox_module._update_netbox_object( changed_serialized_obj ) - assert nb_obj_mock.update.not_called() + nb_obj_mock.update.assert_not_called() assert serialized_obj == updated_serialized_obj assert diff == on_update_diff