From b6b51e7b4d1502dc0e5b7393fae4208cd76ff89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20R=C3=B8dvand?= Date: Thu, 16 May 2024 08:24:07 +0200 Subject: [PATCH] Update CI for NetBox 4.0 (#1230) * Add CI for NetBox 4.0 * Update inventories for NetBox 4.0 --- .github/workflows/main.yml | 12 +- poetry.lock | 1487 ++++++++-------- pyproject.toml | 5 +- tests/integration/netbox-deploy.py | 5 +- .../targets/inventory-v4.0/.gitignore | 1 + .../targets/inventory-v4.0/aliases | 1 + .../inventory-v4.0/compare_inventory_json.py | 152 ++ .../files/test-inventory-bearer-token.json | 1417 ++++++++++++++++ .../files/test-inventory-bearer-token.yml | 32 + .../files/test-inventory-jinja2-filter.json | 1233 ++++++++++++++ .../files/test-inventory-jinja2-filter.yml | 33 + .../files/test-inventory-jinja2.json | 384 +++++ .../files/test-inventory-jinja2.yml | 62 + .../files/test-inventory-legacy.json | 449 +++++ .../files/test-inventory-legacy.yml | 10 + .../files/test-inventory-noracks.json | 1447 ++++++++++++++++ .../files/test-inventory-noracks.yml | 28 + .../files/test-inventory-options-flatten.json | 1372 +++++++++++++++ .../files/test-inventory-options-flatten.yml | 41 + .../files/test-inventory-options.json | 384 +++++ .../files/test-inventory-options.yml | 62 + .../files/test-inventory-plurals-flatten.json | 440 +++++ .../files/test-inventory-plurals-flatten.yml | 33 + .../files/test-inventory-plurals.json | 1491 ++++++++++++++++ .../files/test-inventory-plurals.yml | 38 + .../inventory-v4.0/files/test-inventory.json | 1505 +++++++++++++++++ .../inventory-v4.0/files/test-inventory.yml | 31 + .../targets/inventory-v4.0/runme.sh | 72 + .../inventory-v4.0/runme_config.template | 6 + .../targets/regression-v4.0/tasks/main.yml | 283 ++++ tests/integration/targets/v4.0/tasks/main.yml | 330 ++++ .../targets/v4.0/tasks/netbox_aggregate.yml | 115 ++ .../targets/v4.0/tasks/netbox_asn.yml | 88 + .../targets/v4.0/tasks/netbox_cable.yml | 193 +++ .../targets/v4.0/tasks/netbox_circuit.yml | 109 ++ .../v4.0/tasks/netbox_circuit_termination.yml | 129 ++ .../v4.0/tasks/netbox_circuit_type.yml | 96 ++ .../targets/v4.0/tasks/netbox_cluster.yml | 98 ++ .../v4.0/tasks/netbox_cluster_group.yml | 96 ++ .../v4.0/tasks/netbox_cluster_type.yml | 96 ++ .../v4.0/tasks/netbox_config_context.yml | 107 ++ .../v4.0/tasks/netbox_config_template.yml | 82 + .../v4.0/tasks/netbox_console_port.yml | 108 ++ .../tasks/netbox_console_port_template.yml | 105 ++ .../v4.0/tasks/netbox_console_server_port.yml | 108 ++ .../netbox_console_server_port_template.yml | 105 ++ .../targets/v4.0/tasks/netbox_contact.yml | 100 ++ .../v4.0/tasks/netbox_contact_role.yml | 94 + .../v4.0/tasks/netbox_custom_field.yml | 129 ++ .../targets/v4.0/tasks/netbox_custom_link.yml | 113 ++ .../targets/v4.0/tasks/netbox_device.yml | 243 +++ .../targets/v4.0/tasks/netbox_device_bay.yml | 87 + .../v4.0/tasks/netbox_device_bay_template.yml | 81 + .../v4.0/tasks/netbox_device_interface.yml | 312 ++++ .../netbox_device_interface_template.yml | 109 ++ .../targets/v4.0/tasks/netbox_device_role.yml | 101 ++ .../targets/v4.0/tasks/netbox_device_type.yml | 132 ++ .../v4.0/tasks/netbox_export_template.yml | 118 ++ .../targets/v4.0/tasks/netbox_fhrp_group.yml | 91 + .../tasks/netbox_fhrp_group_assignment.yml | 92 + .../targets/v4.0/tasks/netbox_front_port.yml | 150 ++ .../v4.0/tasks/netbox_front_port_template.yml | 147 ++ .../v4.0/tasks/netbox_inventory_item.yml | 203 +++ .../v4.0/tasks/netbox_inventory_item_role.yml | 98 ++ .../targets/v4.0/tasks/netbox_ip_address.yml | 352 ++++ .../targets/v4.0/tasks/netbox_ipam_role.yml | 94 + .../v4.0/tasks/netbox_journal_entry.yml | 26 + .../targets/v4.0/tasks/netbox_l2vpn.yml | 99 ++ .../v4.0/tasks/netbox_l2vpn_termination.yml | 94 + .../targets/v4.0/tasks/netbox_location.yml | 85 + .../targets/v4.0/tasks/netbox_lookup.yml | 83 + .../v4.0/tasks/netbox_manufacturer.yml | 91 + .../targets/v4.0/tasks/netbox_module.yml | 107 ++ .../targets/v4.0/tasks/netbox_module_bay.yml | 105 ++ .../targets/v4.0/tasks/netbox_module_type.yml | 97 ++ .../targets/v4.0/tasks/netbox_platform.yml | 92 + .../targets/v4.0/tasks/netbox_power_feed.yml | 127 ++ .../v4.0/tasks/netbox_power_outlet.yml | 114 ++ .../tasks/netbox_power_outlet_template.yml | 111 ++ .../targets/v4.0/tasks/netbox_power_panel.yml | 105 ++ .../targets/v4.0/tasks/netbox_power_port.yml | 125 ++ .../v4.0/tasks/netbox_power_port_template.yml | 212 +++ .../targets/v4.0/tasks/netbox_prefix.yml | 245 +++ .../targets/v4.0/tasks/netbox_provider.yml | 79 + .../v4.0/tasks/netbox_provider_network.yml | 83 + .../targets/v4.0/tasks/netbox_rack.yml | 226 +++ .../targets/v4.0/tasks/netbox_rack_group.yml | 62 + .../targets/v4.0/tasks/netbox_rack_role.yml | 81 + .../targets/v4.0/tasks/netbox_rear_port.yml | 139 ++ .../v4.0/tasks/netbox_rear_port_template.yml | 136 ++ .../targets/v4.0/tasks/netbox_region.yml | 79 + .../targets/v4.0/tasks/netbox_rir.yml | 79 + .../v4.0/tasks/netbox_route_target.yml | 204 +++ .../targets/v4.0/tasks/netbox_service.yml | 196 +++ .../v4.0/tasks/netbox_service_template.yml | 115 ++ .../targets/v4.0/tasks/netbox_site.yml | 165 ++ .../targets/v4.0/tasks/netbox_site_group.yml | 81 + .../targets/v4.0/tasks/netbox_tag.yml | 110 ++ .../targets/v4.0/tasks/netbox_tenant.yml | 106 ++ .../v4.0/tasks/netbox_tenant_group.yml | 129 ++ .../v4.0/tasks/netbox_virtual_chassis.yml | 131 ++ .../v4.0/tasks/netbox_virtual_disk.yml | 87 + .../v4.0/tasks/netbox_virtual_machine.yml | 128 ++ .../targets/v4.0/tasks/netbox_vlan.yml | 193 +++ .../targets/v4.0/tasks/netbox_vlan_group.yml | 314 ++++ .../v4.0/tasks/netbox_vm_interface.yml | 159 ++ .../targets/v4.0/tasks/netbox_vrf.yml | 137 ++ .../targets/v4.0/tasks/netbox_webhook.yml | 121 ++ .../v4.0/tasks/netbox_wireless_lan.yml | 103 ++ .../v4.0/tasks/netbox_wireless_lan_group.yml | 97 ++ .../v4.0/tasks/netbox_wireless_link.yml | 130 ++ .../v4.0/docker-compose.override.yml | 25 + 112 files changed, 22243 insertions(+), 697 deletions(-) create mode 100644 tests/integration/targets/inventory-v4.0/.gitignore create mode 100644 tests/integration/targets/inventory-v4.0/aliases create mode 100755 tests/integration/targets/inventory-v4.0/compare_inventory_json.py create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-bearer-token.json create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-bearer-token.yml create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2-filter.json create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2-filter.yml create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2.json create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2.yml create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-legacy.json create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-legacy.yml create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-noracks.json create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-noracks.yml create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-options-flatten.json create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-options-flatten.yml create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-options.json create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-options.yml create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-plurals-flatten.json create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-plurals-flatten.yml create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-plurals.json create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory-plurals.yml create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory.json create mode 100644 tests/integration/targets/inventory-v4.0/files/test-inventory.yml create mode 100755 tests/integration/targets/inventory-v4.0/runme.sh create mode 100644 tests/integration/targets/inventory-v4.0/runme_config.template create mode 100644 tests/integration/targets/regression-v4.0/tasks/main.yml create mode 100644 tests/integration/targets/v4.0/tasks/main.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_aggregate.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_asn.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_cable.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_circuit.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_circuit_termination.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_circuit_type.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_cluster.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_cluster_group.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_cluster_type.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_config_context.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_config_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_console_port.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_console_port_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_console_server_port.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_console_server_port_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_contact.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_contact_role.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_custom_field.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_custom_link.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_device.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_device_bay.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_device_bay_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_device_interface.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_device_interface_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_device_role.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_device_type.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_export_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_fhrp_group.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_fhrp_group_assignment.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_front_port.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_front_port_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_inventory_item.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_inventory_item_role.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_ip_address.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_ipam_role.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_journal_entry.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_l2vpn.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_l2vpn_termination.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_location.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_lookup.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_manufacturer.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_module.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_module_bay.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_module_type.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_platform.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_power_feed.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_power_outlet.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_power_outlet_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_power_panel.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_power_port.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_power_port_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_prefix.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_provider.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_provider_network.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_rack.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_rack_group.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_rack_role.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_rear_port.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_rear_port_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_region.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_rir.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_route_target.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_service.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_service_template.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_site.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_site_group.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_tag.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_tenant.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_tenant_group.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_virtual_chassis.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_virtual_disk.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_virtual_machine.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_vlan.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_vlan_group.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_vm_interface.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_vrf.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_webhook.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_wireless_lan.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_wireless_lan_group.yml create mode 100644 tests/integration/targets/v4.0/tasks/netbox_wireless_link.yml create mode 100644 tests/netbox-docker/v4.0/docker-compose.override.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03a827362..5fe8a3e97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,12 +25,12 @@ jobs: # uses: chartboost/ruff-action@v1 unit_testing: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: linting strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11"] steps: @@ -71,19 +71,17 @@ jobs: runs-on: ubuntu-latest needs: unit_testing env: - python-version: "3.9" + python-version: "3.10" strategy: fail-fast: false matrix: include: - - VERSION: "v3.5" - NETBOX_DOCKER_VERSION: 2.6.1 - VERSION: "v3.6" NETBOX_DOCKER_VERSION: 2.7.0 - VERSION: "v3.7" NETBOX_DOCKER_VERSION: 2.7.0 - # If we want to integration test wiht all supported Python: - #python-version: ["3.9", "3.10", "3.11"] + - VERSION: "v4.0" + NETBOX_DOCKER_VERSION: 2.9.1 steps: diff --git a/poetry.lock b/poetry.lock index e1a9ff24f..b0673eaee 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "aiofiles" @@ -13,87 +13,87 @@ files = [ [[package]] name = "aiohttp" -version = "3.9.4" +version = "3.9.5" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.8" files = [ - {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"}, + {file = "aiohttp-3.9.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fcde4c397f673fdec23e6b05ebf8d4751314fa7c24f93334bf1f1364c1c69ac7"}, + {file = "aiohttp-3.9.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5d6b3f1fabe465e819aed2c421a6743d8debbde79b6a8600739300630a01bf2c"}, + {file = "aiohttp-3.9.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6ae79c1bc12c34082d92bf9422764f799aee4746fd7a392db46b7fd357d4a17a"}, + {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d3ebb9e1316ec74277d19c5f482f98cc65a73ccd5430540d6d11682cd857430"}, + {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84dabd95154f43a2ea80deffec9cb44d2e301e38a0c9d331cc4aa0166fe28ae3"}, + {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c8a02fbeca6f63cb1f0475c799679057fc9268b77075ab7cf3f1c600e81dd46b"}, + {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c26959ca7b75ff768e2776d8055bf9582a6267e24556bb7f7bd29e677932be72"}, + {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:714d4e5231fed4ba2762ed489b4aec07b2b9953cf4ee31e9871caac895a839c0"}, + {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7a6a8354f1b62e15d48e04350f13e726fa08b62c3d7b8401c0a1314f02e3558"}, + {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c413016880e03e69d166efb5a1a95d40f83d5a3a648d16486592c49ffb76d0db"}, + {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ff84aeb864e0fac81f676be9f4685f0527b660f1efdc40dcede3c251ef1e867f"}, + {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ad7f2919d7dac062f24d6f5fe95d401597fbb015a25771f85e692d043c9d7832"}, + {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:702e2c7c187c1a498a4e2b03155d52658fdd6fda882d3d7fbb891a5cf108bb10"}, + {file = "aiohttp-3.9.5-cp310-cp310-win32.whl", hash = "sha256:67c3119f5ddc7261d47163ed86d760ddf0e625cd6246b4ed852e82159617b5fb"}, + {file = "aiohttp-3.9.5-cp310-cp310-win_amd64.whl", hash = "sha256:471f0ef53ccedec9995287f02caf0c068732f026455f07db3f01a46e49d76bbb"}, + {file = "aiohttp-3.9.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e0ae53e33ee7476dd3d1132f932eeb39bf6125083820049d06edcdca4381f342"}, + {file = "aiohttp-3.9.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c088c4d70d21f8ca5c0b8b5403fe84a7bc8e024161febdd4ef04575ef35d474d"}, + {file = "aiohttp-3.9.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:639d0042b7670222f33b0028de6b4e2fad6451462ce7df2af8aee37dcac55424"}, + {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f26383adb94da5e7fb388d441bf09c61e5e35f455a3217bfd790c6b6bc64b2ee"}, + {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:66331d00fb28dc90aa606d9a54304af76b335ae204d1836f65797d6fe27f1ca2"}, + {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4ff550491f5492ab5ed3533e76b8567f4b37bd2995e780a1f46bca2024223233"}, + {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f22eb3a6c1080d862befa0a89c380b4dafce29dc6cd56083f630073d102eb595"}, + {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a81b1143d42b66ffc40a441379387076243ef7b51019204fd3ec36b9f69e77d6"}, + {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f64fd07515dad67f24b6ea4a66ae2876c01031de91c93075b8093f07c0a2d93d"}, + {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:93e22add827447d2e26d67c9ac0161756007f152fdc5210277d00a85f6c92323"}, + {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:55b39c8684a46e56ef8c8d24faf02de4a2b2ac60d26cee93bc595651ff545de9"}, + {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4715a9b778f4293b9f8ae7a0a7cef9829f02ff8d6277a39d7f40565c737d3771"}, + {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:afc52b8d969eff14e069a710057d15ab9ac17cd4b6753042c407dcea0e40bf75"}, + {file = "aiohttp-3.9.5-cp311-cp311-win32.whl", hash = "sha256:b3df71da99c98534be076196791adca8819761f0bf6e08e07fd7da25127150d6"}, + {file = "aiohttp-3.9.5-cp311-cp311-win_amd64.whl", hash = "sha256:88e311d98cc0bf45b62fc46c66753a83445f5ab20038bcc1b8a1cc05666f428a"}, + {file = "aiohttp-3.9.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:c7a4b7a6cf5b6eb11e109a9755fd4fda7d57395f8c575e166d363b9fc3ec4678"}, + {file = "aiohttp-3.9.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:0a158704edf0abcac8ac371fbb54044f3270bdbc93e254a82b6c82be1ef08f3c"}, + {file = "aiohttp-3.9.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d153f652a687a8e95ad367a86a61e8d53d528b0530ef382ec5aaf533140ed00f"}, + {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82a6a97d9771cb48ae16979c3a3a9a18b600a8505b1115cfe354dfb2054468b4"}, + {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:60cdbd56f4cad9f69c35eaac0fbbdf1f77b0ff9456cebd4902f3dd1cf096464c"}, + {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8676e8fd73141ded15ea586de0b7cda1542960a7b9ad89b2b06428e97125d4fa"}, + {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da00da442a0e31f1c69d26d224e1efd3a1ca5bcbf210978a2ca7426dfcae9f58"}, + {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18f634d540dd099c262e9f887c8bbacc959847cfe5da7a0e2e1cf3f14dbf2daf"}, + {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:320e8618eda64e19d11bdb3bd04ccc0a816c17eaecb7e4945d01deee2a22f95f"}, + {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:2faa61a904b83142747fc6a6d7ad8fccff898c849123030f8e75d5d967fd4a81"}, + {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:8c64a6dc3fe5db7b1b4d2b5cb84c4f677768bdc340611eca673afb7cf416ef5a"}, + {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:393c7aba2b55559ef7ab791c94b44f7482a07bf7640d17b341b79081f5e5cd1a"}, + {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c671dc117c2c21a1ca10c116cfcd6e3e44da7fcde37bf83b2be485ab377b25da"}, + {file = "aiohttp-3.9.5-cp312-cp312-win32.whl", hash = "sha256:5a7ee16aab26e76add4afc45e8f8206c95d1d75540f1039b84a03c3b3800dd59"}, + {file = "aiohttp-3.9.5-cp312-cp312-win_amd64.whl", hash = "sha256:5ca51eadbd67045396bc92a4345d1790b7301c14d1848feaac1d6a6c9289e888"}, + {file = "aiohttp-3.9.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:694d828b5c41255e54bc2dddb51a9f5150b4eefa9886e38b52605a05d96566e8"}, + {file = "aiohttp-3.9.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0605cc2c0088fcaae79f01c913a38611ad09ba68ff482402d3410bf59039bfb8"}, + {file = "aiohttp-3.9.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4558e5012ee03d2638c681e156461d37b7a113fe13970d438d95d10173d25f78"}, + {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dbc053ac75ccc63dc3a3cc547b98c7258ec35a215a92bd9f983e0aac95d3d5b"}, + {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4109adee842b90671f1b689901b948f347325045c15f46b39797ae1bf17019de"}, + {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6ea1a5b409a85477fd8e5ee6ad8f0e40bf2844c270955e09360418cfd09abac"}, + {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3c2890ca8c59ee683fd09adf32321a40fe1cf164e3387799efb2acebf090c11"}, + {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3916c8692dbd9d55c523374a3b8213e628424d19116ac4308e434dbf6d95bbdd"}, + {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8d1964eb7617907c792ca00b341b5ec3e01ae8c280825deadbbd678447b127e1"}, + {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:d5ab8e1f6bee051a4bf6195e38a5c13e5e161cb7bad83d8854524798bd9fcd6e"}, + {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:52c27110f3862a1afbcb2af4281fc9fdc40327fa286c4625dfee247c3ba90156"}, + {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:7f64cbd44443e80094309875d4f9c71d0401e966d191c3d469cde4642bc2e031"}, + {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8b4f72fbb66279624bfe83fd5eb6aea0022dad8eec62b71e7bf63ee1caadeafe"}, + {file = "aiohttp-3.9.5-cp38-cp38-win32.whl", hash = "sha256:6380c039ec52866c06d69b5c7aad5478b24ed11696f0e72f6b807cfb261453da"}, + {file = "aiohttp-3.9.5-cp38-cp38-win_amd64.whl", hash = "sha256:da22dab31d7180f8c3ac7c7635f3bcd53808f374f6aa333fe0b0b9e14b01f91a"}, + {file = "aiohttp-3.9.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1732102949ff6087589408d76cd6dea656b93c896b011ecafff418c9661dc4ed"}, + {file = "aiohttp-3.9.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c6021d296318cb6f9414b48e6a439a7f5d1f665464da507e8ff640848ee2a58a"}, + {file = "aiohttp-3.9.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:239f975589a944eeb1bad26b8b140a59a3a320067fb3cd10b75c3092405a1372"}, + {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b7b30258348082826d274504fbc7c849959f1989d86c29bc355107accec6cfb"}, + {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cd2adf5c87ff6d8b277814a28a535b59e20bfea40a101db6b3bdca7e9926bc24"}, + {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9a3d838441bebcf5cf442700e3963f58b5c33f015341f9ea86dcd7d503c07e2"}, + {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e3a1ae66e3d0c17cf65c08968a5ee3180c5a95920ec2731f53343fac9bad106"}, + {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9c69e77370cce2d6df5d12b4e12bdcca60c47ba13d1cbbc8645dd005a20b738b"}, + {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0cbf56238f4bbf49dab8c2dc2e6b1b68502b1e88d335bea59b3f5b9f4c001475"}, + {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d1469f228cd9ffddd396d9948b8c9cd8022b6d1bf1e40c6f25b0fb90b4f893ed"}, + {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:45731330e754f5811c314901cebdf19dd776a44b31927fa4b4dbecab9e457b0c"}, + {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:3fcb4046d2904378e3aeea1df51f697b0467f2aac55d232c87ba162709478c46"}, + {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8cf142aa6c1a751fcb364158fd710b8a9be874b81889c2bd13aa8893197455e2"}, + {file = "aiohttp-3.9.5-cp39-cp39-win32.whl", hash = "sha256:7b179eea70833c8dee51ec42f3b4097bd6370892fa93f510f76762105568cf09"}, + {file = "aiohttp-3.9.5-cp39-cp39-win_amd64.whl", hash = "sha256:38d80498e2e169bc61418ff36170e0aad0cd268da8b38a17c4cf29d254a8b3f1"}, + {file = "aiohttp-3.9.5.tar.gz", hash = "sha256:edea7d15772ceeb29db4aff55e482d4bcfb6ae160ce144f2682de02f6d693551"}, ] [package.dependencies] @@ -121,6 +121,17 @@ files = [ [package.dependencies] frozenlist = ">=1.1.0" +[[package]] +name = "annotated-types" +version = "0.6.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.8" +files = [ + {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, + {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, +] + [[package]] name = "ansible-core" version = "2.15.9" @@ -134,7 +145,6 @@ files = [ [package.dependencies] cryptography = "*" -importlib-resources = {version = ">=5.0,<5.1", markers = "python_version < \"3.10\""} jinja2 = ">=3.0.0" packaging = "*" PyYAML = ">=5.1" @@ -142,44 +152,48 @@ resolvelib = ">=0.5.3,<1.1.0" [[package]] name = "antsibull" -version = "0.58.0" +version = "0.62.0" description = "Tools for building the Ansible Distribution" optional = false python-versions = ">=3.9" files = [ - {file = "antsibull-0.58.0-py3-none-any.whl", hash = "sha256:f84c812243c67328b77835e0a22fde1a784edf2e28c5beabee95a51c39160ca3"}, - {file = "antsibull-0.58.0.tar.gz", hash = "sha256:a9c46144dc811cd6ca066bbeab4fea15b226fbed81dad370ef46ae62cc38cdfb"}, + {file = "antsibull-0.62.0-py3-none-any.whl", hash = "sha256:23f5ccdbc2fb15bc5a60b129b5a9026ae2f3578f50673cd2ea32e80a1c20b891"}, + {file = "antsibull-0.62.0.tar.gz", hash = "sha256:c1f7b34d5f5266b97c88a73d7c2b14afb21666eefb0d21705c7b0e97b4c06382"}, ] [package.dependencies] aiofiles = "*" aiohttp = ">=3.0.0" -antsibull-changelog = ">=0.14.0" -antsibull-core = ">=2.0.0,<3.0.0" +antsibull-changelog = ">=0.24.0" +antsibull-core = ">=2.0.0,<4.0.0" asyncio-pool = "*" build = "*" jinja2 = "*" packaging = ">=20.0" +pydantic = "<3" semantic-version = "*" twiggy = "*" +typing-extensions = "*" [package.extras] +all = ["pyperclip"] +clipboard = ["pyperclip"] codeqa = ["flake8 (>=3.8.0)", "pylint", "reuse"] coverage = ["coverage[toml]"] -dev = ["antsibull[codeqa]", "antsibull[coverage]", "antsibull[test]", "antsibull[typing]", "nox"] -formatters = ["black", "isort"] +dev = ["asynctest", "coverage[toml]", "cryptography", "flake8 (>=3.8.0)", "mypy", "nox", "pylint", "pyperclip", "pyre-check (>=0.9.15)", "pytest", "pytest-asyncio (>=0.12)", "pytest-cov", "pytest-error-for-skips", "reuse", "types-aiofiles", "types-docutils", "types-pyyaml", "types-setuptools"] +formatters = ["black (>=24)", "isort"] test = ["asynctest", "cryptography", "pytest", "pytest-asyncio (>=0.12)", "pytest-cov", "pytest-error-for-skips"] typing = ["mypy", "pyre-check (>=0.9.15)", "types-aiofiles", "types-docutils", "types-pyyaml", "types-setuptools"] [[package]] name = "antsibull-changelog" -version = "0.23.0" -description = "Changelog tool for Ansible-base and Ansible collections" +version = "0.26.0" +description = "Changelog tool for Ansible-core and Ansible collections" optional = false python-versions = ">=3.9.0" files = [ - {file = "antsibull_changelog-0.23.0-py3-none-any.whl", hash = "sha256:e9c3425fe6ef8e495aec19705be4af826612f921bdc8dd6dc54d15f70532065f"}, - {file = "antsibull_changelog-0.23.0.tar.gz", hash = "sha256:521985407e1aa2aef1dbfb2b87275cd6f03ea9a96c0c704e9f9cb04141f90e0b"}, + {file = "antsibull_changelog-0.26.0-py3-none-any.whl", hash = "sha256:0a6aa5327790e89a686872fd452a9c31be288a3cb2deb9cc23eb3fc5ea7f0a19"}, + {file = "antsibull_changelog-0.26.0.tar.gz", hash = "sha256:8060c438d9fb5a1025a1e98d4de0ce8d897be6e0c21014216151b93f4e4891ff"}, ] [package.dependencies] @@ -193,20 +207,20 @@ semantic-version = "*" codeqa = ["flake8 (>=3.8.0)", "pylint", "reuse"] coverage = ["coverage[toml]"] dev = ["antsibull-changelog[codeqa]", "antsibull-changelog[coverage]", "antsibull-changelog[formatters]", "antsibull-changelog[test]", "antsibull-changelog[typing]", "nox"] -formatters = ["black", "isort"] +formatters = ["black (>=24)", "isort"] test = ["pytest", "pytest-cov", "pytest-error-for-skips"] toml = ["tomli"] typing = ["mypy", "pyre-check (>=0.9.17)", "types-docutils", "types-pyyaml", "types-toml"] [[package]] name = "antsibull-core" -version = "2.1.0" +version = "3.0.1" description = "Tools for building the Ansible Distribution" optional = false python-versions = ">=3.9" files = [ - {file = "antsibull_core-2.1.0-py3-none-any.whl", hash = "sha256:acf403ee1e02b303a701c913869bd0be2e2bd4d9212ed380ad05bd5cbddea730"}, - {file = "antsibull_core-2.1.0.tar.gz", hash = "sha256:c16c601802d35419120a7da33f4d562768a5ac3fa9c5ed4ee7d7b68c71d8aeee"}, + {file = "antsibull_core-3.0.1-py3-none-any.whl", hash = "sha256:653f44b010c85b6bcd37aacde64b35e56adec8f62119d2764aa56add7299c2f8"}, + {file = "antsibull_core-3.0.1.tar.gz", hash = "sha256:d7fddfb539757849725f8ae88ff049cef360c088a67251de0d1d8cb041243a9c"}, ] [package.dependencies] @@ -215,29 +229,28 @@ aiohttp = ">=3.0.0" build = "*" packaging = ">=20.0" perky = "*" -pydantic = ">=1.0.0,<2.0.0" +pydantic = ">=2.0,<3.0" pyyaml = "*" semantic-version = "*" -sh = ">=1.0.0,<2.0.0" twiggy = ">=0.5.0" [package.extras] codeqa = ["antsibull-changelog", "flake8 (>=6.0.0)", "pylint (>=2.15.7)", "reuse"] coverage = ["coverage[toml]"] -dev = ["antsibull-core[codeqa]", "antsibull-core[coverage]", "antsibull-core[formatters]", "antsibull-core[test]", "antsibull-core[typing]", "nox"] -formatters = ["black", "isort"] +dev = ["antsibull-changelog", "asynctest", "black (>=24)", "coverage[toml]", "cryptography", "flake8 (>=6.0.0)", "isort", "mypy", "nox", "pylint (>=2.15.7)", "pyre-check (>=0.9.17)", "pytest", "pytest-asyncio (>=0.20)", "pytest-cov", "pytest-error-for-skips", "reuse", "types-aiofiles", "types-pyyaml", "typing-extensions"] +formatters = ["black (>=24)", "isort"] test = ["asynctest", "cryptography", "pytest", "pytest-asyncio (>=0.20)", "pytest-cov", "pytest-error-for-skips"] -typing = ["mypy", "pyre-check (>=0.9.17)", "types-aiofiles", "types-pyyaml"] +typing = ["mypy", "pyre-check (>=0.9.17)", "types-aiofiles", "types-pyyaml", "typing-extensions"] [[package]] name = "astroid" -version = "3.0.1" +version = "3.1.0" description = "An abstract syntax tree for Python with inference support." optional = false python-versions = ">=3.8.0" files = [ - {file = "astroid-3.0.1-py3-none-any.whl", hash = "sha256:7d5895c9825e18079c5aeac0572bc2e4c83205c95d416e0b4fee8bc361d2d9ca"}, - {file = "astroid-3.0.1.tar.gz", hash = "sha256:86b0bb7d7da0be1a7c4aedb7974e391b32d4ed89e33de6ed6902b4b15c97577e"}, + {file = "astroid-3.1.0-py3-none-any.whl", hash = "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819"}, + {file = "astroid-3.1.0.tar.gz", hash = "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4"}, ] [package.dependencies] @@ -267,51 +280,52 @@ files = [ [[package]] name = "attrs" -version = "23.1.0" +version = "23.2.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.7" files = [ - {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, - {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, + {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, + {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, ] [package.extras] cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[docs,tests]", "pre-commit"] +dev = ["attrs[tests]", "pre-commit"] docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"] +tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] [[package]] name = "black" -version = "24.3.0" +version = "24.4.2" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" files = [ - {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"}, + {file = "black-24.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd1b5a14e417189db4c7b64a6540f31730713d173f0b63e55fabd52d61d8fdce"}, + {file = "black-24.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e537d281831ad0e71007dcdcbe50a71470b978c453fa41ce77186bbe0ed6021"}, + {file = "black-24.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eaea3008c281f1038edb473c1aa8ed8143a5535ff18f978a318f10302b254063"}, + {file = "black-24.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:7768a0dbf16a39aa5e9a3ded568bb545c8c2727396d063bbaf847df05b08cd96"}, + {file = "black-24.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474"}, + {file = "black-24.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bdde6f877a18f24844e381d45e9947a49e97933573ac9d4345399be37621e26c"}, + {file = "black-24.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb"}, + {file = "black-24.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:7e122b1c4fb252fd85df3ca93578732b4749d9be076593076ef4d07a0233c3e1"}, + {file = "black-24.4.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:accf49e151c8ed2c0cdc528691838afd217c50412534e876a19270fea1e28e2d"}, + {file = "black-24.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:88c57dc656038f1ab9f92b3eb5335ee9b021412feaa46330d5eba4e51fe49b04"}, + {file = "black-24.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be8bef99eb46d5021bf053114442914baeb3649a89dc5f3a555c88737e5e98fc"}, + {file = "black-24.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:415e686e87dbbe6f4cd5ef0fbf764af7b89f9057b97c908742b6008cc554b9c0"}, + {file = "black-24.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bf10f7310db693bb62692609b397e8d67257c55f949abde4c67f9cc574492cc7"}, + {file = "black-24.4.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:98e123f1d5cfd42f886624d84464f7756f60ff6eab89ae845210631714f6db94"}, + {file = "black-24.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48a85f2cb5e6799a9ef05347b476cce6c182d6c71ee36925a6c194d074336ef8"}, + {file = "black-24.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:b1530ae42e9d6d5b670a34db49a94115a64596bc77710b1d05e9801e62ca0a7c"}, + {file = "black-24.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:37aae07b029fa0174d39daf02748b379399b909652a806e5708199bd93899da1"}, + {file = "black-24.4.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:da33a1a5e49c4122ccdfd56cd021ff1ebc4a1ec4e2d01594fef9b6f267a9e741"}, + {file = "black-24.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef703f83fc32e131e9bcc0a5094cfe85599e7109f896fe8bc96cc402f3eb4b6e"}, + {file = "black-24.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:b9176b9832e84308818a99a561e90aa479e73c523b3f77afd07913380ae2eab7"}, + {file = "black-24.4.2-py3-none-any.whl", hash = "sha256:d36ed1124bb81b32f8614555b34cc4259c3fbc7eec17870e8ff8ded335b58d8c"}, + {file = "black-24.4.2.tar.gz", hash = "sha256:c872b53057f000085da66a19c55d68f6f8ddcac2642392ad3a355878406fbd4d"}, ] [package.dependencies] @@ -331,37 +345,38 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "build" -version = "1.0.3" +version = "1.2.1" description = "A simple, correct Python build frontend" optional = false -python-versions = ">= 3.7" +python-versions = ">=3.8" files = [ - {file = "build-1.0.3-py3-none-any.whl", hash = "sha256:589bf99a67df7c9cf07ec0ac0e5e2ea5d4b37ac63301c4986d1acb126aa83f8f"}, - {file = "build-1.0.3.tar.gz", hash = "sha256:538aab1b64f9828977f84bc63ae570b060a8ed1be419e7870b8b4fc5e6ea553b"}, + {file = "build-1.2.1-py3-none-any.whl", hash = "sha256:75e10f767a433d9a86e50d83f418e83efc18ede923ee5ff7df93b6cb0306c5d4"}, + {file = "build-1.2.1.tar.gz", hash = "sha256:526263f4870c26f26c433545579475377b2b7588b6f1eac76a001e873ae3e19d"}, ] [package.dependencies] colorama = {version = "*", markers = "os_name == \"nt\""} -importlib-metadata = {version = ">=4.6", markers = "python_version < \"3.10\""} -packaging = ">=19.0" +importlib-metadata = {version = ">=4.6", markers = "python_full_version < \"3.10.2\""} +packaging = ">=19.1" pyproject_hooks = "*" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} [package.extras] docs = ["furo (>=2023.08.17)", "sphinx (>=7.0,<8.0)", "sphinx-argparse-cli (>=1.5)", "sphinx-autodoc-typehints (>=1.10)", "sphinx-issues (>=3.0.0)"] -test = ["filelock (>=3)", "pytest (>=6.2.4)", "pytest-cov (>=2.12)", "pytest-mock (>=2)", "pytest-rerunfailures (>=9.1)", "pytest-xdist (>=1.34)", "setuptools (>=42.0.0)", "setuptools (>=56.0.0)", "setuptools (>=56.0.0)", "setuptools (>=67.8.0)", "wheel (>=0.36.0)"] -typing = ["importlib-metadata (>=5.1)", "mypy (>=1.5.0,<1.6.0)", "tomli", "typing-extensions (>=3.7.4.3)"] +test = ["build[uv,virtualenv]", "filelock (>=3)", "pytest (>=6.2.4)", "pytest-cov (>=2.12)", "pytest-mock (>=2)", "pytest-rerunfailures (>=9.1)", "pytest-xdist (>=1.34)", "setuptools (>=42.0.0)", "setuptools (>=56.0.0)", "setuptools (>=56.0.0)", "setuptools (>=67.8.0)", "wheel (>=0.36.0)"] +typing = ["build[uv]", "importlib-metadata (>=5.1)", "mypy (>=1.9.0,<1.10.0)", "tomli", "typing-extensions (>=3.7.4.3)"] +uv = ["uv (>=0.1.18)"] virtualenv = ["virtualenv (>=20.0.35)"] [[package]] name = "certifi" -version = "2023.7.22" +version = "2024.2.2" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, - {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, + {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, + {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, ] [[package]] @@ -567,20 +582,6 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -[[package]] -name = "commonmark" -version = "0.9.1" -description = "Python parser for the CommonMark Markdown spec" -optional = false -python-versions = "*" -files = [ - {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, - {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, -] - -[package.extras] -test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] - [[package]] name = "coverage" version = "6.5.0" @@ -645,43 +646,43 @@ toml = ["tomli"] [[package]] name = "cryptography" -version = "42.0.4" +version = "42.0.7" 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.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"}, + {file = "cryptography-42.0.7-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:a987f840718078212fdf4504d0fd4c6effe34a7e4740378e59d47696e8dfb477"}, + {file = "cryptography-42.0.7-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:bd13b5e9b543532453de08bcdc3cc7cebec6f9883e886fd20a92f26940fd3e7a"}, + {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a79165431551042cc9d1d90e6145d5d0d3ab0f2d66326c201d9b0e7f5bf43604"}, + {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a47787a5e3649008a1102d3df55424e86606c9bae6fb77ac59afe06d234605f8"}, + {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:02c0eee2d7133bdbbc5e24441258d5d2244beb31da5ed19fbb80315f4bbbff55"}, + {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:5e44507bf8d14b36b8389b226665d597bc0f18ea035d75b4e53c7b1ea84583cc"}, + {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:7f8b25fa616d8b846aef64b15c606bb0828dbc35faf90566eb139aa9cff67af2"}, + {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:93a3209f6bb2b33e725ed08ee0991b92976dfdcf4e8b38646540674fc7508e13"}, + {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:e6b8f1881dac458c34778d0a424ae5769de30544fc678eac51c1c8bb2183e9da"}, + {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3de9a45d3b2b7d8088c3fbf1ed4395dfeff79d07842217b38df14ef09ce1d8d7"}, + {file = "cryptography-42.0.7-cp37-abi3-win32.whl", hash = "sha256:789caea816c6704f63f6241a519bfa347f72fbd67ba28d04636b7c6b7da94b0b"}, + {file = "cryptography-42.0.7-cp37-abi3-win_amd64.whl", hash = "sha256:8cb8ce7c3347fcf9446f201dc30e2d5a3c898d009126010cbd1f443f28b52678"}, + {file = "cryptography-42.0.7-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:a3a5ac8b56fe37f3125e5b72b61dcde43283e5370827f5233893d461b7360cd4"}, + {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:779245e13b9a6638df14641d029add5dc17edbef6ec915688f3acb9e720a5858"}, + {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d563795db98b4cd57742a78a288cdbdc9daedac29f2239793071fe114f13785"}, + {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:31adb7d06fe4383226c3e963471f6837742889b3c4caa55aac20ad951bc8ffda"}, + {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:efd0bf5205240182e0f13bcaea41be4fdf5c22c5129fc7ced4a0282ac86998c9"}, + {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:a9bc127cdc4ecf87a5ea22a2556cab6c7eda2923f84e4f3cc588e8470ce4e42e"}, + {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:3577d029bc3f4827dd5bf8bf7710cac13527b470bbf1820a3f394adb38ed7d5f"}, + {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2e47577f9b18723fa294b0ea9a17d5e53a227867a0a4904a1a076d1646d45ca1"}, + {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:1a58839984d9cb34c855197043eaae2c187d930ca6d644612843b4fe8513c886"}, + {file = "cryptography-42.0.7-cp39-abi3-win32.whl", hash = "sha256:e6b79d0adb01aae87e8a44c2b64bc3f3fe59515280e00fb6d57a7267a2583cda"}, + {file = "cryptography-42.0.7-cp39-abi3-win_amd64.whl", hash = "sha256:16268d46086bb8ad5bf0a2b5544d8a9ed87a0e33f5e77dd3c3301e63d941a83b"}, + {file = "cryptography-42.0.7-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2954fccea107026512b15afb4aa664a5640cd0af630e2ee3962f2602693f0c82"}, + {file = "cryptography-42.0.7-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:362e7197754c231797ec45ee081f3088a27a47c6c01eff2ac83f60f85a50fe60"}, + {file = "cryptography-42.0.7-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:4f698edacf9c9e0371112792558d2f705b5645076cc0aaae02f816a0171770fd"}, + {file = "cryptography-42.0.7-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5482e789294854c28237bba77c4c83be698be740e31a3ae5e879ee5444166582"}, + {file = "cryptography-42.0.7-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e9b2a6309f14c0497f348d08a065d52f3020656f675819fc405fb63bbcd26562"}, + {file = "cryptography-42.0.7-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:d8e3098721b84392ee45af2dd554c947c32cc52f862b6a3ae982dbb90f577f14"}, + {file = "cryptography-42.0.7-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c65f96dad14f8528a447414125e1fc8feb2ad5a272b8f68477abbcc1ea7d94b9"}, + {file = "cryptography-42.0.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:36017400817987670037fbb0324d71489b6ead6231c9604f8fc1f7d008087c68"}, + {file = "cryptography-42.0.7.tar.gz", hash = "sha256:ecbfbc00bf55888edda9868a4cf927205de8499e7fabe6c050322298382953f2"}, ] [package.dependencies] @@ -699,56 +700,57 @@ test-randomorder = ["pytest-randomly"] [[package]] name = "deepdiff" -version = "6.6.1" +version = "7.0.1" description = "Deep Difference and Search of any Python object/data. Recreate objects by adding adding deltas to each other." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "deepdiff-6.6.1-py3-none-any.whl", hash = "sha256:891b3cb12837e5d376ac0b58f4c8a2764e3a8bbceabb7108ff82235f1f2c4460"}, - {file = "deepdiff-6.6.1.tar.gz", hash = "sha256:75c75b1511f0e48edef2b70d785a9c32b2631666b465fa8c32270a77a7b950b5"}, + {file = "deepdiff-7.0.1-py3-none-any.whl", hash = "sha256:447760081918216aa4fd4ca78a4b6a848b81307b2ea94c810255334b759e1dc3"}, + {file = "deepdiff-7.0.1.tar.gz", hash = "sha256:260c16f052d4badbf60351b4f77e8390bee03a0b516246f6839bc813fb429ddf"}, ] [package.dependencies] -ordered-set = ">=4.0.2,<4.2.0" +ordered-set = ">=4.1.0,<4.2.0" [package.extras] -cli = ["click (==8.1.3)", "pyyaml (==6.0.1)"] +cli = ["click (==8.1.7)", "pyyaml (==6.0.1)"] optimize = ["orjson"] [[package]] name = "dill" -version = "0.3.7" +version = "0.3.8" description = "serialize all of Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "dill-0.3.7-py3-none-any.whl", hash = "sha256:76b122c08ef4ce2eedcd4d1abd8e641114bfc6c2867f49f3c41facf65bf19f5e"}, - {file = "dill-0.3.7.tar.gz", hash = "sha256:cc1c8b182eb3013e24bd475ff2e9295af86c1a38eb1aff128dac8962a9ce3c03"}, + {file = "dill-0.3.8-py3-none-any.whl", hash = "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7"}, + {file = "dill-0.3.8.tar.gz", hash = "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca"}, ] [package.extras] graph = ["objgraph (>=1.7.2)"] +profile = ["gprof2dot (>=2022.7.29)"] [[package]] name = "docutils" -version = "0.19" +version = "0.21.2" description = "Docutils -- Python Documentation Utilities" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, - {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, + {file = "docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2"}, + {file = "docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f"}, ] [[package]] name = "exceptiongroup" -version = "1.1.3" +version = "1.2.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, - {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, ] [package.extras] @@ -756,13 +758,13 @@ test = ["pytest (>=6)"] [[package]] name = "execnet" -version = "2.0.2" +version = "2.1.1" description = "execnet: rapid multi-Python deployment" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "execnet-2.0.2-py3-none-any.whl", hash = "sha256:88256416ae766bc9e8895c76a87928c0012183da3cc4fc18016e6f050e025f41"}, - {file = "execnet-2.0.2.tar.gz", hash = "sha256:cc59bc4423742fd71ad227122eb0dd44db51efb3dc4095b45ac9a08c770096af"}, + {file = "execnet-2.1.1-py3-none-any.whl", hash = "sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc"}, + {file = "execnet-2.1.1.tar.gz", hash = "sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3"}, ] [package.extras] @@ -770,72 +772,88 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] [[package]] name = "frozenlist" -version = "1.4.0" +version = "1.4.1" description = "A list-like structure which implements collections.abc.MutableSequence" optional = false python-versions = ">=3.8" files = [ - {file = "frozenlist-1.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:764226ceef3125e53ea2cb275000e309c0aa5464d43bd72abd661e27fffc26ab"}, - {file = "frozenlist-1.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d6484756b12f40003c6128bfcc3fa9f0d49a687e171186c2d85ec82e3758c559"}, - {file = "frozenlist-1.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9ac08e601308e41eb533f232dbf6b7e4cea762f9f84f6357136eed926c15d12c"}, - {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d081f13b095d74b67d550de04df1c756831f3b83dc9881c38985834387487f1b"}, - {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:71932b597f9895f011f47f17d6428252fc728ba2ae6024e13c3398a087c2cdea"}, - {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:981b9ab5a0a3178ff413bca62526bb784249421c24ad7381e39d67981be2c326"}, - {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e41f3de4df3e80de75845d3e743b3f1c4c8613c3997a912dbf0229fc61a8b963"}, - {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6918d49b1f90821e93069682c06ffde41829c346c66b721e65a5c62b4bab0300"}, - {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0e5c8764c7829343d919cc2dfc587a8db01c4f70a4ebbc49abde5d4b158b007b"}, - {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8d0edd6b1c7fb94922bf569c9b092ee187a83f03fb1a63076e7774b60f9481a8"}, - {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e29cda763f752553fa14c68fb2195150bfab22b352572cb36c43c47bedba70eb"}, - {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:0c7c1b47859ee2cac3846fde1c1dc0f15da6cec5a0e5c72d101e0f83dcb67ff9"}, - {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:901289d524fdd571be1c7be054f48b1f88ce8dddcbdf1ec698b27d4b8b9e5d62"}, - {file = "frozenlist-1.4.0-cp310-cp310-win32.whl", hash = "sha256:1a0848b52815006ea6596c395f87449f693dc419061cc21e970f139d466dc0a0"}, - {file = "frozenlist-1.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:b206646d176a007466358aa21d85cd8600a415c67c9bd15403336c331a10d956"}, - {file = "frozenlist-1.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:de343e75f40e972bae1ef6090267f8260c1446a1695e77096db6cfa25e759a95"}, - {file = "frozenlist-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ad2a9eb6d9839ae241701d0918f54c51365a51407fd80f6b8289e2dfca977cc3"}, - {file = "frozenlist-1.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bd7bd3b3830247580de99c99ea2a01416dfc3c34471ca1298bccabf86d0ff4dc"}, - {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bdf1847068c362f16b353163391210269e4f0569a3c166bc6a9f74ccbfc7e839"}, - {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38461d02d66de17455072c9ba981d35f1d2a73024bee7790ac2f9e361ef1cd0c"}, - {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5a32087d720c608f42caed0ef36d2b3ea61a9d09ee59a5142d6070da9041b8f"}, - {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dd65632acaf0d47608190a71bfe46b209719bf2beb59507db08ccdbe712f969b"}, - {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261b9f5d17cac914531331ff1b1d452125bf5daa05faf73b71d935485b0c510b"}, - {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b89ac9768b82205936771f8d2eb3ce88503b1556324c9f903e7156669f521472"}, - {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:008eb8b31b3ea6896da16c38c1b136cb9fec9e249e77f6211d479db79a4eaf01"}, - {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:e74b0506fa5aa5598ac6a975a12aa8928cbb58e1f5ac8360792ef15de1aa848f"}, - {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:490132667476f6781b4c9458298b0c1cddf237488abd228b0b3650e5ecba7467"}, - {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:76d4711f6f6d08551a7e9ef28c722f4a50dd0fc204c56b4bcd95c6cc05ce6fbb"}, - {file = "frozenlist-1.4.0-cp311-cp311-win32.whl", hash = "sha256:a02eb8ab2b8f200179b5f62b59757685ae9987996ae549ccf30f983f40602431"}, - {file = "frozenlist-1.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:515e1abc578dd3b275d6a5114030b1330ba044ffba03f94091842852f806f1c1"}, - {file = "frozenlist-1.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:f0ed05f5079c708fe74bf9027e95125334b6978bf07fd5ab923e9e55e5fbb9d3"}, - {file = "frozenlist-1.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ca265542ca427bf97aed183c1676e2a9c66942e822b14dc6e5f42e038f92a503"}, - {file = "frozenlist-1.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:491e014f5c43656da08958808588cc6c016847b4360e327a62cb308c791bd2d9"}, - {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:17ae5cd0f333f94f2e03aaf140bb762c64783935cc764ff9c82dff626089bebf"}, - {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e78fb68cf9c1a6aa4a9a12e960a5c9dfbdb89b3695197aa7064705662515de2"}, - {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5655a942f5f5d2c9ed93d72148226d75369b4f6952680211972a33e59b1dfdc"}, - {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c11b0746f5d946fecf750428a95f3e9ebe792c1ee3b1e96eeba145dc631a9672"}, - {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e66d2a64d44d50d2543405fb183a21f76b3b5fd16f130f5c99187c3fb4e64919"}, - {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:88f7bc0fcca81f985f78dd0fa68d2c75abf8272b1f5c323ea4a01a4d7a614efc"}, - {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5833593c25ac59ede40ed4de6d67eb42928cca97f26feea219f21d0ed0959b79"}, - {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:fec520865f42e5c7f050c2a79038897b1c7d1595e907a9e08e3353293ffc948e"}, - {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:b826d97e4276750beca7c8f0f1a4938892697a6bcd8ec8217b3312dad6982781"}, - {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ceb6ec0a10c65540421e20ebd29083c50e6d1143278746a4ef6bcf6153171eb8"}, - {file = "frozenlist-1.4.0-cp38-cp38-win32.whl", hash = "sha256:2b8bcf994563466db019fab287ff390fffbfdb4f905fc77bc1c1d604b1c689cc"}, - {file = "frozenlist-1.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:a6c8097e01886188e5be3e6b14e94ab365f384736aa1fca6a0b9e35bd4a30bc7"}, - {file = "frozenlist-1.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6c38721585f285203e4b4132a352eb3daa19121a035f3182e08e437cface44bf"}, - {file = "frozenlist-1.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a0c6da9aee33ff0b1a451e867da0c1f47408112b3391dd43133838339e410963"}, - {file = "frozenlist-1.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:93ea75c050c5bb3d98016b4ba2497851eadf0ac154d88a67d7a6816206f6fa7f"}, - {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f61e2dc5ad442c52b4887f1fdc112f97caeff4d9e6ebe78879364ac59f1663e1"}, - {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa384489fefeb62321b238e64c07ef48398fe80f9e1e6afeff22e140e0850eef"}, - {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:10ff5faaa22786315ef57097a279b833ecab1a0bfb07d604c9cbb1c4cdc2ed87"}, - {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:007df07a6e3eb3e33e9a1fe6a9db7af152bbd8a185f9aaa6ece10a3529e3e1c6"}, - {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f4f399d28478d1f604c2ff9119907af9726aed73680e5ed1ca634d377abb087"}, - {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c5374b80521d3d3f2ec5572e05adc94601985cc526fb276d0c8574a6d749f1b3"}, - {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:ce31ae3e19f3c902de379cf1323d90c649425b86de7bbdf82871b8a2a0615f3d"}, - {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7211ef110a9194b6042449431e08c4d80c0481e5891e58d429df5899690511c2"}, - {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:556de4430ce324c836789fa4560ca62d1591d2538b8ceb0b4f68fb7b2384a27a"}, - {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7645a8e814a3ee34a89c4a372011dcd817964ce8cb273c8ed6119d706e9613e3"}, - {file = "frozenlist-1.4.0-cp39-cp39-win32.whl", hash = "sha256:19488c57c12d4e8095a922f328df3f179c820c212940a498623ed39160bc3c2f"}, - {file = "frozenlist-1.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:6221d84d463fb110bdd7619b69cb43878a11d51cbb9394ae3105d082d5199167"}, - {file = "frozenlist-1.4.0.tar.gz", hash = "sha256:09163bdf0b2907454042edb19f887c6d33806adc71fbd54afc14908bfdc22251"}, + {file = "frozenlist-1.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f9aa1878d1083b276b0196f2dfbe00c9b7e752475ed3b682025ff20c1c1f51ac"}, + {file = "frozenlist-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:29acab3f66f0f24674b7dc4736477bcd4bc3ad4b896f5f45379a67bce8b96868"}, + {file = "frozenlist-1.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:74fb4bee6880b529a0c6560885fce4dc95936920f9f20f53d99a213f7bf66776"}, + {file = "frozenlist-1.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:590344787a90ae57d62511dd7c736ed56b428f04cd8c161fcc5e7232c130c69a"}, + {file = "frozenlist-1.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:068b63f23b17df8569b7fdca5517edef76171cf3897eb68beb01341131fbd2ad"}, + {file = "frozenlist-1.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c849d495bf5154cd8da18a9eb15db127d4dba2968d88831aff6f0331ea9bd4c"}, + {file = "frozenlist-1.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9750cc7fe1ae3b1611bb8cfc3f9ec11d532244235d75901fb6b8e42ce9229dfe"}, + {file = "frozenlist-1.4.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9b2de4cf0cdd5bd2dee4c4f63a653c61d2408055ab77b151c1957f221cabf2a"}, + {file = "frozenlist-1.4.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0633c8d5337cb5c77acbccc6357ac49a1770b8c487e5b3505c57b949b4b82e98"}, + {file = "frozenlist-1.4.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:27657df69e8801be6c3638054e202a135c7f299267f1a55ed3a598934f6c0d75"}, + {file = "frozenlist-1.4.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:f9a3ea26252bd92f570600098783d1371354d89d5f6b7dfd87359d669f2109b5"}, + {file = "frozenlist-1.4.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:4f57dab5fe3407b6c0c1cc907ac98e8a189f9e418f3b6e54d65a718aaafe3950"}, + {file = "frozenlist-1.4.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e02a0e11cf6597299b9f3bbd3f93d79217cb90cfd1411aec33848b13f5c656cc"}, + {file = "frozenlist-1.4.1-cp310-cp310-win32.whl", hash = "sha256:a828c57f00f729620a442881cc60e57cfcec6842ba38e1b19fd3e47ac0ff8dc1"}, + {file = "frozenlist-1.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:f56e2333dda1fe0f909e7cc59f021eba0d2307bc6f012a1ccf2beca6ba362439"}, + {file = "frozenlist-1.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a0cb6f11204443f27a1628b0e460f37fb30f624be6051d490fa7d7e26d4af3d0"}, + {file = "frozenlist-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b46c8ae3a8f1f41a0d2ef350c0b6e65822d80772fe46b653ab6b6274f61d4a49"}, + {file = "frozenlist-1.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fde5bd59ab5357e3853313127f4d3565fc7dad314a74d7b5d43c22c6a5ed2ced"}, + {file = "frozenlist-1.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:722e1124aec435320ae01ee3ac7bec11a5d47f25d0ed6328f2273d287bc3abb0"}, + {file = "frozenlist-1.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2471c201b70d58a0f0c1f91261542a03d9a5e088ed3dc6c160d614c01649c106"}, + {file = "frozenlist-1.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c757a9dd70d72b076d6f68efdbb9bc943665ae954dad2801b874c8c69e185068"}, + {file = "frozenlist-1.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f146e0911cb2f1da549fc58fc7bcd2b836a44b79ef871980d605ec392ff6b0d2"}, + {file = "frozenlist-1.4.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f9c515e7914626b2a2e1e311794b4c35720a0be87af52b79ff8e1429fc25f19"}, + {file = "frozenlist-1.4.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c302220494f5c1ebeb0912ea782bcd5e2f8308037b3c7553fad0e48ebad6ad82"}, + {file = "frozenlist-1.4.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:442acde1e068288a4ba7acfe05f5f343e19fac87bfc96d89eb886b0363e977ec"}, + {file = "frozenlist-1.4.1-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:1b280e6507ea8a4fa0c0a7150b4e526a8d113989e28eaaef946cc77ffd7efc0a"}, + {file = "frozenlist-1.4.1-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:fe1a06da377e3a1062ae5fe0926e12b84eceb8a50b350ddca72dc85015873f74"}, + {file = "frozenlist-1.4.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:db9e724bebd621d9beca794f2a4ff1d26eed5965b004a97f1f1685a173b869c2"}, + {file = "frozenlist-1.4.1-cp311-cp311-win32.whl", hash = "sha256:e774d53b1a477a67838a904131c4b0eef6b3d8a651f8b138b04f748fccfefe17"}, + {file = "frozenlist-1.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:fb3c2db03683b5767dedb5769b8a40ebb47d6f7f45b1b3e3b4b51ec8ad9d9825"}, + {file = "frozenlist-1.4.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:1979bc0aeb89b33b588c51c54ab0161791149f2461ea7c7c946d95d5f93b56ae"}, + {file = "frozenlist-1.4.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:cc7b01b3754ea68a62bd77ce6020afaffb44a590c2289089289363472d13aedb"}, + {file = "frozenlist-1.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c9c92be9fd329ac801cc420e08452b70e7aeab94ea4233a4804f0915c14eba9b"}, + {file = "frozenlist-1.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c3894db91f5a489fc8fa6a9991820f368f0b3cbdb9cd8849547ccfab3392d86"}, + {file = "frozenlist-1.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ba60bb19387e13597fb059f32cd4d59445d7b18b69a745b8f8e5db0346f33480"}, + {file = "frozenlist-1.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8aefbba5f69d42246543407ed2461db31006b0f76c4e32dfd6f42215a2c41d09"}, + {file = "frozenlist-1.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780d3a35680ced9ce682fbcf4cb9c2bad3136eeff760ab33707b71db84664e3a"}, + {file = "frozenlist-1.4.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9acbb16f06fe7f52f441bb6f413ebae6c37baa6ef9edd49cdd567216da8600cd"}, + {file = "frozenlist-1.4.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:23b701e65c7b36e4bf15546a89279bd4d8675faabc287d06bbcfac7d3c33e1e6"}, + {file = "frozenlist-1.4.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3e0153a805a98f5ada7e09826255ba99fb4f7524bb81bf6b47fb702666484ae1"}, + {file = "frozenlist-1.4.1-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:dd9b1baec094d91bf36ec729445f7769d0d0cf6b64d04d86e45baf89e2b9059b"}, + {file = "frozenlist-1.4.1-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:1a4471094e146b6790f61b98616ab8e44f72661879cc63fa1049d13ef711e71e"}, + {file = "frozenlist-1.4.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5667ed53d68d91920defdf4035d1cdaa3c3121dc0b113255124bcfada1cfa1b8"}, + {file = "frozenlist-1.4.1-cp312-cp312-win32.whl", hash = "sha256:beee944ae828747fd7cb216a70f120767fc9f4f00bacae8543c14a6831673f89"}, + {file = "frozenlist-1.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:64536573d0a2cb6e625cf309984e2d873979709f2cf22839bf2d61790b448ad5"}, + {file = "frozenlist-1.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:20b51fa3f588ff2fe658663db52a41a4f7aa6c04f6201449c6c7c476bd255c0d"}, + {file = "frozenlist-1.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:410478a0c562d1a5bcc2f7ea448359fcb050ed48b3c6f6f4f18c313a9bdb1826"}, + {file = "frozenlist-1.4.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c6321c9efe29975232da3bd0af0ad216800a47e93d763ce64f291917a381b8eb"}, + {file = "frozenlist-1.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f6a4533887e189dae092f1cf981f2e3885175f7a0f33c91fb5b7b682b6bab6"}, + {file = "frozenlist-1.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6eb73fa5426ea69ee0e012fb59cdc76a15b1283d6e32e4f8dc4482ec67d1194d"}, + {file = "frozenlist-1.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fbeb989b5cc29e8daf7f976b421c220f1b8c731cbf22b9130d8815418ea45887"}, + {file = "frozenlist-1.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:32453c1de775c889eb4e22f1197fe3bdfe457d16476ea407472b9442e6295f7a"}, + {file = "frozenlist-1.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:693945278a31f2086d9bf3df0fe8254bbeaef1fe71e1351c3bd730aa7d31c41b"}, + {file = "frozenlist-1.4.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:1d0ce09d36d53bbbe566fe296965b23b961764c0bcf3ce2fa45f463745c04701"}, + {file = "frozenlist-1.4.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:3a670dc61eb0d0eb7080890c13de3066790f9049b47b0de04007090807c776b0"}, + {file = "frozenlist-1.4.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:dca69045298ce5c11fd539682cff879cc1e664c245d1c64da929813e54241d11"}, + {file = "frozenlist-1.4.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a06339f38e9ed3a64e4c4e43aec7f59084033647f908e4259d279a52d3757d09"}, + {file = "frozenlist-1.4.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b7f2f9f912dca3934c1baec2e4585a674ef16fe00218d833856408c48d5beee7"}, + {file = "frozenlist-1.4.1-cp38-cp38-win32.whl", hash = "sha256:e7004be74cbb7d9f34553a5ce5fb08be14fb33bc86f332fb71cbe5216362a497"}, + {file = "frozenlist-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:5a7d70357e7cee13f470c7883a063aae5fe209a493c57d86eb7f5a6f910fae09"}, + {file = "frozenlist-1.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:bfa4a17e17ce9abf47a74ae02f32d014c5e9404b6d9ac7f729e01562bbee601e"}, + {file = "frozenlist-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b7e3ed87d4138356775346e6845cccbe66cd9e207f3cd11d2f0b9fd13681359d"}, + {file = "frozenlist-1.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c99169d4ff810155ca50b4da3b075cbde79752443117d89429595c2e8e37fed8"}, + {file = "frozenlist-1.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edb678da49d9f72c9f6c609fbe41a5dfb9a9282f9e6a2253d5a91e0fc382d7c0"}, + {file = "frozenlist-1.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6db4667b187a6742b33afbbaf05a7bc551ffcf1ced0000a571aedbb4aa42fc7b"}, + {file = "frozenlist-1.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55fdc093b5a3cb41d420884cdaf37a1e74c3c37a31f46e66286d9145d2063bd0"}, + {file = "frozenlist-1.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82e8211d69a4f4bc360ea22cd6555f8e61a1bd211d1d5d39d3d228b48c83a897"}, + {file = "frozenlist-1.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89aa2c2eeb20957be2d950b85974b30a01a762f3308cd02bb15e1ad632e22dc7"}, + {file = "frozenlist-1.4.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9d3e0c25a2350080e9319724dede4f31f43a6c9779be48021a7f4ebde8b2d742"}, + {file = "frozenlist-1.4.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7268252af60904bf52c26173cbadc3a071cece75f873705419c8681f24d3edea"}, + {file = "frozenlist-1.4.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:0c250a29735d4f15321007fb02865f0e6b6a41a6b88f1f523ca1596ab5f50bd5"}, + {file = "frozenlist-1.4.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:96ec70beabbd3b10e8bfe52616a13561e58fe84c0101dd031dc78f250d5128b9"}, + {file = "frozenlist-1.4.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:23b2d7679b73fe0e5a4560b672a39f98dfc6f60df63823b0a9970525325b95f6"}, + {file = "frozenlist-1.4.1-cp39-cp39-win32.whl", hash = "sha256:a7496bfe1da7fb1a4e1cc23bb67c58fab69311cc7d32b5a99c2007b4b2a0e932"}, + {file = "frozenlist-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:e6a20a581f9ce92d389a8c7d7c3dd47c81fd5d6e655c8dddf341e14aa48659d0"}, + {file = "frozenlist-1.4.1-py3-none-any.whl", hash = "sha256:04ced3e6a46b4cfffe20f9ae482818e34eba9b5fb0ce4056e4cc9b6e212d09b7"}, + {file = "frozenlist-1.4.1.tar.gz", hash = "sha256:c037a86e8513059a2613aaba4d817bb90b9d9b6b69aace3ce9c877e8c8ed402b"}, ] [[package]] @@ -851,37 +869,37 @@ files = [ [[package]] name = "importlib-metadata" -version = "6.8.0" +version = "7.1.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-6.8.0-py3-none-any.whl", hash = "sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb"}, - {file = "importlib_metadata-6.8.0.tar.gz", hash = "sha256:dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743"}, + {file = "importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570"}, + {file = "importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2"}, ] [package.dependencies] zipp = ">=0.5" [package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] [[package]] name = "importlib-resources" -version = "5.0.7" +version = "6.4.0" description = "Read resources from Python packages" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "importlib_resources-5.0.7-py3-none-any.whl", hash = "sha256:2238159eb743bd85304a16e0536048b3e991c531d1cd51c4a834d1ccf2829057"}, - {file = "importlib_resources-5.0.7.tar.gz", hash = "sha256:4df460394562b4581bb4e4087ad9447bd433148fba44241754ec3152499f1d1b"}, + {file = "importlib_resources-6.4.0-py3-none-any.whl", hash = "sha256:50d10f043df931902d4194ea07ec57960f66a80449ff867bfe782b4c486ba78c"}, + {file = "importlib_resources-6.4.0.tar.gz", hash = "sha256:cdb2b453b8046ca4e3798eb1d84f3cce1446a0e8e7b5ef4efb600f19fc398145"}, ] [package.extras] -docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] -testing = ["pytest (>=3.5,!=3.7.3)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=1.2.3)", "pytest-cov", "pytest-enabler", "pytest-flake8", "pytest-mypy"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["jaraco.test (>=5.4)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)", "zipp (>=3.17)"] [[package]] name = "iniconfig" @@ -896,30 +914,27 @@ files = [ [[package]] name = "isort" -version = "5.12.0" +version = "5.13.2" description = "A Python utility / library to sort Python imports." optional = false python-versions = ">=3.8.0" files = [ - {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, - {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, + {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, + {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, ] [package.extras] -colors = ["colorama (>=0.4.3)"] -pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] -plugins = ["setuptools"] -requirements-deprecated-finder = ["pip-api", "pipreqs"] +colors = ["colorama (>=0.4.6)"] [[package]] name = "jinja2" -version = "3.1.2" +version = "3.1.4" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, + {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, + {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, ] [package.dependencies] @@ -939,73 +954,97 @@ files = [ {file = "jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe"}, ] +[[package]] +name = "markdown-it-py" +version = "3.0.0" +description = "Python port of markdown-it. Markdown parsing, done right!" +optional = false +python-versions = ">=3.8" +files = [ + {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, + {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, +] + +[package.dependencies] +mdurl = ">=0.1,<1.0" + +[package.extras] +benchmarking = ["psutil", "pytest", "pytest-benchmark"] +code-style = ["pre-commit (>=3.0,<4.0)"] +compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "mistletoe (>=1.0,<2.0)", "mistune (>=2.0,<3.0)", "panflute (>=2.3,<3.0)"] +linkify = ["linkify-it-py (>=1,<3)"] +plugins = ["mdit-py-plugins"] +profiling = ["gprof2dot"] +rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] +testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] + [[package]] name = "markupsafe" -version = "2.1.3" +version = "2.1.5" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.7" files = [ - {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, - {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, + {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, ] [[package]] @@ -1019,6 +1058,17 @@ files = [ {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] +[[package]] +name = "mdurl" +version = "0.1.2" +description = "Markdown URL utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, + {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, +] + [[package]] name = "mock" version = "4.0.3" @@ -1037,85 +1087,101 @@ test = ["pytest (<5.4)", "pytest-cov"] [[package]] name = "multidict" -version = "6.0.4" +version = "6.0.5" description = "multidict implementation" optional = false python-versions = ">=3.7" files = [ - {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b1a97283e0c85772d613878028fec909f003993e1007eafa715b24b377cb9b8"}, - {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eeb6dcc05e911516ae3d1f207d4b0520d07f54484c49dfc294d6e7d63b734171"}, - {file = "multidict-6.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d6d635d5209b82a3492508cf5b365f3446afb65ae7ebd755e70e18f287b0adf7"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c048099e4c9e9d615545e2001d3d8a4380bd403e1a0578734e0d31703d1b0c0b"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea20853c6dbbb53ed34cb4d080382169b6f4554d394015f1bef35e881bf83547"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16d232d4e5396c2efbbf4f6d4df89bfa905eb0d4dc5b3549d872ab898451f569"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c63aaa167f6c6b04ef2c85704e93af16c11d20de1d133e39de6a0e84582a93"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:64bdf1086b6043bf519869678f5f2757f473dee970d7abf6da91ec00acb9cb98"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:43644e38f42e3af682690876cff722d301ac585c5b9e1eacc013b7a3f7b696a0"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7582a1d1030e15422262de9f58711774e02fa80df0d1578995c76214f6954988"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ddff9c4e225a63a5afab9dd15590432c22e8057e1a9a13d28ed128ecf047bbdc"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ee2a1ece51b9b9e7752e742cfb661d2a29e7bcdba2d27e66e28a99f1890e4fa0"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a2e4369eb3d47d2034032a26c7a80fcb21a2cb22e1173d761a162f11e562caa5"}, - {file = "multidict-6.0.4-cp310-cp310-win32.whl", hash = "sha256:574b7eae1ab267e5f8285f0fe881f17efe4b98c39a40858247720935b893bba8"}, - {file = "multidict-6.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dcbb0906e38440fa3e325df2359ac6cb043df8e58c965bb45f4e406ecb162cc"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0dfad7a5a1e39c53ed00d2dd0c2e36aed4650936dc18fd9a1826a5ae1cad6f03"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:64da238a09d6039e3bd39bb3aee9c21a5e34f28bfa5aa22518581f910ff94af3"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff959bee35038c4624250473988b24f846cbeb2c6639de3602c073f10410ceba"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01a3a55bd90018c9c080fbb0b9f4891db37d148a0a18722b42f94694f8b6d4c9"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c5cb09abb18c1ea940fb99360ea0396f34d46566f157122c92dfa069d3e0e982"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666daae833559deb2d609afa4490b85830ab0dfca811a98b70a205621a6109fe"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11bdf3f5e1518b24530b8241529d2050014c884cf18b6fc69c0c2b30ca248710"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d18748f2d30f94f498e852c67d61261c643b349b9d2a581131725595c45ec6c"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:458f37be2d9e4c95e2d8866a851663cbc76e865b78395090786f6cd9b3bbf4f4"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b1a2eeedcead3a41694130495593a559a668f382eee0727352b9a41e1c45759a"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7d6ae9d593ef8641544d6263c7fa6408cc90370c8cb2bbb65f8d43e5b0351d9c"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5979b5632c3e3534e42ca6ff856bb24b2e3071b37861c2c727ce220d80eee9ed"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dcfe792765fab89c365123c81046ad4103fcabbc4f56d1c1997e6715e8015461"}, - {file = "multidict-6.0.4-cp311-cp311-win32.whl", hash = "sha256:3601a3cece3819534b11d4efc1eb76047488fddd0c85a3948099d5da4d504636"}, - {file = "multidict-6.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:81a4f0b34bd92df3da93315c6a59034df95866014ac08535fc819f043bfd51f0"}, - {file = "multidict-6.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:67040058f37a2a51ed8ea8f6b0e6ee5bd78ca67f169ce6122f3e2ec80dfe9b78"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:853888594621e6604c978ce2a0444a1e6e70c8d253ab65ba11657659dcc9100f"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:39ff62e7d0f26c248b15e364517a72932a611a9b75f35b45be078d81bdb86603"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af048912e045a2dc732847d33821a9d84ba553f5c5f028adbd364dd4765092ac"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1e8b901e607795ec06c9e42530788c45ac21ef3aaa11dbd0c69de543bfb79a9"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62501642008a8b9871ddfccbf83e4222cf8ac0d5aeedf73da36153ef2ec222d2"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:99b76c052e9f1bc0721f7541e5e8c05db3941eb9ebe7b8553c625ef88d6eefde"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:509eac6cf09c794aa27bcacfd4d62c885cce62bef7b2c3e8b2e49d365b5003fe"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:21a12c4eb6ddc9952c415f24eef97e3e55ba3af61f67c7bc388dcdec1404a067"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:5cad9430ab3e2e4fa4a2ef4450f548768400a2ac635841bc2a56a2052cdbeb87"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ab55edc2e84460694295f401215f4a58597f8f7c9466faec545093045476327d"}, - {file = "multidict-6.0.4-cp37-cp37m-win32.whl", hash = "sha256:5a4dcf02b908c3b8b17a45fb0f15b695bf117a67b76b7ad18b73cf8e92608775"}, - {file = "multidict-6.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6ed5f161328b7df384d71b07317f4d8656434e34591f20552c7bcef27b0ab88e"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5fc1b16f586f049820c5c5b17bb4ee7583092fa0d1c4e28b5239181ff9532e0c"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1502e24330eb681bdaa3eb70d6358e818e8e8f908a22a1851dfd4e15bc2f8161"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b692f419760c0e65d060959df05f2a531945af31fda0c8a3b3195d4efd06de11"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45e1ecb0379bfaab5eef059f50115b54571acfbe422a14f668fc8c27ba410e7e"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddd3915998d93fbcd2566ddf9cf62cdb35c9e093075f862935573d265cf8f65d"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:59d43b61c59d82f2effb39a93c48b845efe23a3852d201ed2d24ba830d0b4cf2"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc8e1d0c705233c5dd0c5e6460fbad7827d5d36f310a0fadfd45cc3029762258"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6aa0418fcc838522256761b3415822626f866758ee0bc6632c9486b179d0b52"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6748717bb10339c4760c1e63da040f5f29f5ed6e59d76daee30305894069a660"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4d1a3d7ef5e96b1c9e92f973e43aa5e5b96c659c9bc3124acbbd81b0b9c8a951"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4372381634485bec7e46718edc71528024fcdc6f835baefe517b34a33c731d60"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:fc35cb4676846ef752816d5be2193a1e8367b4c1397b74a565a9d0389c433a1d"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4b9d9e4e2b37daddb5c23ea33a3417901fa7c7b3dee2d855f63ee67a0b21e5b1"}, - {file = "multidict-6.0.4-cp38-cp38-win32.whl", hash = "sha256:e41b7e2b59679edfa309e8db64fdf22399eec4b0b24694e1b2104fb789207779"}, - {file = "multidict-6.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:d6c254ba6e45d8e72739281ebc46ea5eb5f101234f3ce171f0e9f5cc86991480"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:16ab77bbeb596e14212e7bab8429f24c1579234a3a462105cda4a66904998664"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc779e9e6f7fda81b3f9aa58e3a6091d49ad528b11ed19f6621408806204ad35"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ceef517eca3e03c1cceb22030a3e39cb399ac86bff4e426d4fc6ae49052cc60"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:281af09f488903fde97923c7744bb001a9b23b039a909460d0f14edc7bf59706"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52f2dffc8acaba9a2f27174c41c9e57f60b907bb9f096b36b1a1f3be71c6284d"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b41156839806aecb3641f3208c0dafd3ac7775b9c4c422d82ee2a45c34ba81ca"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e3fc56f88cc98ef8139255cf8cd63eb2c586531e43310ff859d6bb3a6b51f1"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8316a77808c501004802f9beebde51c9f857054a0c871bd6da8280e718444449"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f70b98cd94886b49d91170ef23ec5c0e8ebb6f242d734ed7ed677b24d50c82cf"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bf6774e60d67a9efe02b3616fee22441d86fab4c6d335f9d2051d19d90a40063"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e69924bfcdda39b722ef4d9aa762b2dd38e4632b3641b1d9a57ca9cd18f2f83a"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:6b181d8c23da913d4ff585afd1155a0e1194c0b50c54fcfe286f70cdaf2b7176"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:52509b5be062d9eafc8170e53026fbc54cf3b32759a23d07fd935fb04fc22d95"}, - {file = "multidict-6.0.4-cp39-cp39-win32.whl", hash = "sha256:27c523fbfbdfd19c6867af7346332b62b586eed663887392cff78d614f9ec313"}, - {file = "multidict-6.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:33029f5734336aa0d4c0384525da0387ef89148dc7191aae00ca5fb23d7aafc2"}, - {file = "multidict-6.0.4.tar.gz", hash = "sha256:3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49"}, + {file = "multidict-6.0.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:228b644ae063c10e7f324ab1ab6b548bdf6f8b47f3ec234fef1093bc2735e5f9"}, + {file = "multidict-6.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:896ebdcf62683551312c30e20614305f53125750803b614e9e6ce74a96232604"}, + {file = "multidict-6.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:411bf8515f3be9813d06004cac41ccf7d1cd46dfe233705933dd163b60e37600"}, + {file = "multidict-6.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d147090048129ce3c453f0292e7697d333db95e52616b3793922945804a433c"}, + {file = "multidict-6.0.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:215ed703caf15f578dca76ee6f6b21b7603791ae090fbf1ef9d865571039ade5"}, + {file = "multidict-6.0.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c6390cf87ff6234643428991b7359b5f59cc15155695deb4eda5c777d2b880f"}, + {file = "multidict-6.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21fd81c4ebdb4f214161be351eb5bcf385426bf023041da2fd9e60681f3cebae"}, + {file = "multidict-6.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3cc2ad10255f903656017363cd59436f2111443a76f996584d1077e43ee51182"}, + {file = "multidict-6.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6939c95381e003f54cd4c5516740faba40cf5ad3eeff460c3ad1d3e0ea2549bf"}, + {file = "multidict-6.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:220dd781e3f7af2c2c1053da9fa96d9cf3072ca58f057f4c5adaaa1cab8fc442"}, + {file = "multidict-6.0.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:766c8f7511df26d9f11cd3a8be623e59cca73d44643abab3f8c8c07620524e4a"}, + {file = "multidict-6.0.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:fe5d7785250541f7f5019ab9cba2c71169dc7d74d0f45253f8313f436458a4ef"}, + {file = "multidict-6.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c1c1496e73051918fcd4f58ff2e0f2f3066d1c76a0c6aeffd9b45d53243702cc"}, + {file = "multidict-6.0.5-cp310-cp310-win32.whl", hash = "sha256:7afcdd1fc07befad18ec4523a782cde4e93e0a2bf71239894b8d61ee578c1319"}, + {file = "multidict-6.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:99f60d34c048c5c2fabc766108c103612344c46e35d4ed9ae0673d33c8fb26e8"}, + {file = "multidict-6.0.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f285e862d2f153a70586579c15c44656f888806ed0e5b56b64489afe4a2dbfba"}, + {file = "multidict-6.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:53689bb4e102200a4fafa9de9c7c3c212ab40a7ab2c8e474491914d2305f187e"}, + {file = "multidict-6.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:612d1156111ae11d14afaf3a0669ebf6c170dbb735e510a7438ffe2369a847fd"}, + {file = "multidict-6.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7be7047bd08accdb7487737631d25735c9a04327911de89ff1b26b81745bd4e3"}, + {file = "multidict-6.0.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de170c7b4fe6859beb8926e84f7d7d6c693dfe8e27372ce3b76f01c46e489fcf"}, + {file = "multidict-6.0.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:04bde7a7b3de05732a4eb39c94574db1ec99abb56162d6c520ad26f83267de29"}, + {file = "multidict-6.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85f67aed7bb647f93e7520633d8f51d3cbc6ab96957c71272b286b2f30dc70ed"}, + {file = "multidict-6.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425bf820055005bfc8aa9a0b99ccb52cc2f4070153e34b701acc98d201693733"}, + {file = "multidict-6.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d3eb1ceec286eba8220c26f3b0096cf189aea7057b6e7b7a2e60ed36b373b77f"}, + {file = "multidict-6.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:7901c05ead4b3fb75113fb1dd33eb1253c6d3ee37ce93305acd9d38e0b5f21a4"}, + {file = "multidict-6.0.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:e0e79d91e71b9867c73323a3444724d496c037e578a0e1755ae159ba14f4f3d1"}, + {file = "multidict-6.0.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:29bfeb0dff5cb5fdab2023a7a9947b3b4af63e9c47cae2a10ad58394b517fddc"}, + {file = "multidict-6.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e030047e85cbcedbfc073f71836d62dd5dadfbe7531cae27789ff66bc551bd5e"}, + {file = "multidict-6.0.5-cp311-cp311-win32.whl", hash = "sha256:2f4848aa3baa109e6ab81fe2006c77ed4d3cd1e0ac2c1fbddb7b1277c168788c"}, + {file = "multidict-6.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:2faa5ae9376faba05f630d7e5e6be05be22913782b927b19d12b8145968a85ea"}, + {file = "multidict-6.0.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:51d035609b86722963404f711db441cf7134f1889107fb171a970c9701f92e1e"}, + {file = "multidict-6.0.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:cbebcd5bcaf1eaf302617c114aa67569dd3f090dd0ce8ba9e35e9985b41ac35b"}, + {file = "multidict-6.0.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2ffc42c922dbfddb4a4c3b438eb056828719f07608af27d163191cb3e3aa6cc5"}, + {file = "multidict-6.0.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ceb3b7e6a0135e092de86110c5a74e46bda4bd4fbfeeb3a3bcec79c0f861e450"}, + {file = "multidict-6.0.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:79660376075cfd4b2c80f295528aa6beb2058fd289f4c9252f986751a4cd0496"}, + {file = "multidict-6.0.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e4428b29611e989719874670fd152b6625500ad6c686d464e99f5aaeeaca175a"}, + {file = "multidict-6.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d84a5c3a5f7ce6db1f999fb9438f686bc2e09d38143f2d93d8406ed2dd6b9226"}, + {file = "multidict-6.0.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:76c0de87358b192de7ea9649beb392f107dcad9ad27276324c24c91774ca5271"}, + {file = "multidict-6.0.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:79a6d2ba910adb2cbafc95dad936f8b9386e77c84c35bc0add315b856d7c3abb"}, + {file = "multidict-6.0.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:92d16a3e275e38293623ebf639c471d3e03bb20b8ebb845237e0d3664914caef"}, + {file = "multidict-6.0.5-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:fb616be3538599e797a2017cccca78e354c767165e8858ab5116813146041a24"}, + {file = "multidict-6.0.5-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:14c2976aa9038c2629efa2c148022ed5eb4cb939e15ec7aace7ca932f48f9ba6"}, + {file = "multidict-6.0.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:435a0984199d81ca178b9ae2c26ec3d49692d20ee29bc4c11a2a8d4514c67eda"}, + {file = "multidict-6.0.5-cp312-cp312-win32.whl", hash = "sha256:9fe7b0653ba3d9d65cbe7698cca585bf0f8c83dbbcc710db9c90f478e175f2d5"}, + {file = "multidict-6.0.5-cp312-cp312-win_amd64.whl", hash = "sha256:01265f5e40f5a17f8241d52656ed27192be03bfa8764d88e8220141d1e4b3556"}, + {file = "multidict-6.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:19fe01cea168585ba0f678cad6f58133db2aa14eccaf22f88e4a6dccadfad8b3"}, + {file = "multidict-6.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6bf7a982604375a8d49b6cc1b781c1747f243d91b81035a9b43a2126c04766f5"}, + {file = "multidict-6.0.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:107c0cdefe028703fb5dafe640a409cb146d44a6ae201e55b35a4af8e95457dd"}, + {file = "multidict-6.0.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:403c0911cd5d5791605808b942c88a8155c2592e05332d2bf78f18697a5fa15e"}, + {file = "multidict-6.0.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aeaf541ddbad8311a87dd695ed9642401131ea39ad7bc8cf3ef3967fd093b626"}, + {file = "multidict-6.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e4972624066095e52b569e02b5ca97dbd7a7ddd4294bf4e7247d52635630dd83"}, + {file = "multidict-6.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d946b0a9eb8aaa590df1fe082cee553ceab173e6cb5b03239716338629c50c7a"}, + {file = "multidict-6.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b55358304d7a73d7bdf5de62494aaf70bd33015831ffd98bc498b433dfe5b10c"}, + {file = "multidict-6.0.5-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:a3145cb08d8625b2d3fee1b2d596a8766352979c9bffe5d7833e0503d0f0b5e5"}, + {file = "multidict-6.0.5-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:d65f25da8e248202bd47445cec78e0025c0fe7582b23ec69c3b27a640dd7a8e3"}, + {file = "multidict-6.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c9bf56195c6bbd293340ea82eafd0071cb3d450c703d2c93afb89f93b8386ccc"}, + {file = "multidict-6.0.5-cp37-cp37m-win32.whl", hash = "sha256:69db76c09796b313331bb7048229e3bee7928eb62bab5e071e9f7fcc4879caee"}, + {file = "multidict-6.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:fce28b3c8a81b6b36dfac9feb1de115bab619b3c13905b419ec71d03a3fc1423"}, + {file = "multidict-6.0.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:76f067f5121dcecf0d63a67f29080b26c43c71a98b10c701b0677e4a065fbd54"}, + {file = "multidict-6.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b82cc8ace10ab5bd93235dfaab2021c70637005e1ac787031f4d1da63d493c1d"}, + {file = "multidict-6.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5cb241881eefd96b46f89b1a056187ea8e9ba14ab88ba632e68d7a2ecb7aadf7"}, + {file = "multidict-6.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8e94e6912639a02ce173341ff62cc1201232ab86b8a8fcc05572741a5dc7d93"}, + {file = "multidict-6.0.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:09a892e4a9fb47331da06948690ae38eaa2426de97b4ccbfafbdcbe5c8f37ff8"}, + {file = "multidict-6.0.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55205d03e8a598cfc688c71ca8ea5f66447164efff8869517f175ea632c7cb7b"}, + {file = "multidict-6.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37b15024f864916b4951adb95d3a80c9431299080341ab9544ed148091b53f50"}, + {file = "multidict-6.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2a1dee728b52b33eebff5072817176c172050d44d67befd681609b4746e1c2e"}, + {file = "multidict-6.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:edd08e6f2f1a390bf137080507e44ccc086353c8e98c657e666c017718561b89"}, + {file = "multidict-6.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:60d698e8179a42ec85172d12f50b1668254628425a6bd611aba022257cac1386"}, + {file = "multidict-6.0.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:3d25f19500588cbc47dc19081d78131c32637c25804df8414463ec908631e453"}, + {file = "multidict-6.0.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:4cc0ef8b962ac7a5e62b9e826bd0cd5040e7d401bc45a6835910ed699037a461"}, + {file = "multidict-6.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:eca2e9d0cc5a889850e9bbd68e98314ada174ff6ccd1129500103df7a94a7a44"}, + {file = "multidict-6.0.5-cp38-cp38-win32.whl", hash = "sha256:4a6a4f196f08c58c59e0b8ef8ec441d12aee4125a7d4f4fef000ccb22f8d7241"}, + {file = "multidict-6.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:0275e35209c27a3f7951e1ce7aaf93ce0d163b28948444bec61dd7badc6d3f8c"}, + {file = "multidict-6.0.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e7be68734bd8c9a513f2b0cfd508802d6609da068f40dc57d4e3494cefc92929"}, + {file = "multidict-6.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1d9ea7a7e779d7a3561aade7d596649fbecfa5c08a7674b11b423783217933f9"}, + {file = "multidict-6.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ea1456df2a27c73ce51120fa2f519f1bea2f4a03a917f4a43c8707cf4cbbae1a"}, + {file = "multidict-6.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf590b134eb70629e350691ecca88eac3e3b8b3c86992042fb82e3cb1830d5e1"}, + {file = "multidict-6.0.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5c0631926c4f58e9a5ccce555ad7747d9a9f8b10619621f22f9635f069f6233e"}, + {file = "multidict-6.0.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dce1c6912ab9ff5f179eaf6efe7365c1f425ed690b03341911bf4939ef2f3046"}, + {file = "multidict-6.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0868d64af83169e4d4152ec612637a543f7a336e4a307b119e98042e852ad9c"}, + {file = "multidict-6.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:141b43360bfd3bdd75f15ed811850763555a251e38b2405967f8e25fb43f7d40"}, + {file = "multidict-6.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7df704ca8cf4a073334e0427ae2345323613e4df18cc224f647f251e5e75a527"}, + {file = "multidict-6.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6214c5a5571802c33f80e6c84713b2c79e024995b9c5897f794b43e714daeec9"}, + {file = "multidict-6.0.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:cd6c8fca38178e12c00418de737aef1261576bd1b6e8c6134d3e729a4e858b38"}, + {file = "multidict-6.0.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:e02021f87a5b6932fa6ce916ca004c4d441509d33bbdbeca70d05dff5e9d2479"}, + {file = "multidict-6.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ebd8d160f91a764652d3e51ce0d2956b38efe37c9231cd82cfc0bed2e40b581c"}, + {file = "multidict-6.0.5-cp39-cp39-win32.whl", hash = "sha256:04da1bb8c8dbadf2a18a452639771951c662c5ad03aefe4884775454be322c9b"}, + {file = "multidict-6.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:d6f6d4f185481c9669b9447bf9d9cf3b95a0e9df9d169bbc17e363b7d5487755"}, + {file = "multidict-6.0.5-py3-none-any.whl", hash = "sha256:0d63c74e3d7ab26de115c49bffc92cc77ed23395303d496eae515d4204a625e7"}, + {file = "multidict-6.0.5.tar.gz", hash = "sha256:f7e301075edaf50500f0b341543c41194d8df3ae5caf4702f2095f3ca73dd8da"}, ] [[package]] @@ -1156,13 +1222,13 @@ files = [ [[package]] name = "pathspec" -version = "0.11.2" +version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pathspec-0.11.2-py3-none-any.whl", hash = "sha256:1d6ed233af05e679efb96b1851550ea95bbb64b7c490b0f5aa52996c11e92a20"}, - {file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"}, + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, ] [[package]] @@ -1178,28 +1244,29 @@ files = [ [[package]] name = "platformdirs" -version = "3.11.0" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +version = "4.2.1" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "platformdirs-3.11.0-py3-none-any.whl", hash = "sha256:e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e"}, - {file = "platformdirs-3.11.0.tar.gz", hash = "sha256:cf8ee52a3afdb965072dcc652433e0c7e3e40cf5ea1477cd4b3b1d2eb75495b3"}, + {file = "platformdirs-4.2.1-py3-none-any.whl", hash = "sha256:17d5a1161b3fd67b390023cb2d3b026bbd40abde6fdb052dfbd3a29c3ba22ee1"}, + {file = "platformdirs-4.2.1.tar.gz", hash = "sha256:031cd18d4ec63ec53e82dceaac0417d218a6863f7745dfcc9efe7793b7039bdf"}, ] [package.extras] -docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"] +docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +type = ["mypy (>=1.8)"] [[package]] name = "pluggy" -version = "1.3.0" +version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ - {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"}, - {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"}, + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, ] [package.extras] @@ -1219,106 +1286,163 @@ files = [ [[package]] name = "pycparser" -version = "2.21" +version = "2.22" description = "C parser in Python" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.8" files = [ - {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, - {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, + {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, + {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] [[package]] name = "pydantic" -version = "1.10.13" -description = "Data validation and settings management using python type hints" +version = "2.7.1" +description = "Data validation using Python type hints" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pydantic-1.10.13-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:efff03cc7a4f29d9009d1c96ceb1e7a70a65cfe86e89d34e4a5f2ab1e5693737"}, - {file = "pydantic-1.10.13-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3ecea2b9d80e5333303eeb77e180b90e95eea8f765d08c3d278cd56b00345d01"}, - {file = "pydantic-1.10.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1740068fd8e2ef6eb27a20e5651df000978edce6da6803c2bef0bc74540f9548"}, - {file = "pydantic-1.10.13-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:84bafe2e60b5e78bc64a2941b4c071a4b7404c5c907f5f5a99b0139781e69ed8"}, - {file = "pydantic-1.10.13-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bc0898c12f8e9c97f6cd44c0ed70d55749eaf783716896960b4ecce2edfd2d69"}, - {file = "pydantic-1.10.13-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:654db58ae399fe6434e55325a2c3e959836bd17a6f6a0b6ca8107ea0571d2e17"}, - {file = "pydantic-1.10.13-cp310-cp310-win_amd64.whl", hash = "sha256:75ac15385a3534d887a99c713aa3da88a30fbd6204a5cd0dc4dab3d770b9bd2f"}, - {file = "pydantic-1.10.13-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c553f6a156deb868ba38a23cf0df886c63492e9257f60a79c0fd8e7173537653"}, - {file = "pydantic-1.10.13-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5e08865bc6464df8c7d61439ef4439829e3ab62ab1669cddea8dd00cd74b9ffe"}, - {file = "pydantic-1.10.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e31647d85a2013d926ce60b84f9dd5300d44535a9941fe825dc349ae1f760df9"}, - {file = "pydantic-1.10.13-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:210ce042e8f6f7c01168b2d84d4c9eb2b009fe7bf572c2266e235edf14bacd80"}, - {file = "pydantic-1.10.13-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:8ae5dd6b721459bfa30805f4c25880e0dd78fc5b5879f9f7a692196ddcb5a580"}, - {file = "pydantic-1.10.13-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f8e81fc5fb17dae698f52bdd1c4f18b6ca674d7068242b2aff075f588301bbb0"}, - {file = "pydantic-1.10.13-cp311-cp311-win_amd64.whl", hash = "sha256:61d9dce220447fb74f45e73d7ff3b530e25db30192ad8d425166d43c5deb6df0"}, - {file = "pydantic-1.10.13-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4b03e42ec20286f052490423682016fd80fda830d8e4119f8ab13ec7464c0132"}, - {file = "pydantic-1.10.13-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f59ef915cac80275245824e9d771ee939133be38215555e9dc90c6cb148aaeb5"}, - {file = "pydantic-1.10.13-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a1f9f747851338933942db7af7b6ee8268568ef2ed86c4185c6ef4402e80ba8"}, - {file = "pydantic-1.10.13-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:97cce3ae7341f7620a0ba5ef6cf043975cd9d2b81f3aa5f4ea37928269bc1b87"}, - {file = "pydantic-1.10.13-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:854223752ba81e3abf663d685f105c64150873cc6f5d0c01d3e3220bcff7d36f"}, - {file = "pydantic-1.10.13-cp37-cp37m-win_amd64.whl", hash = "sha256:b97c1fac8c49be29486df85968682b0afa77e1b809aff74b83081cc115e52f33"}, - {file = "pydantic-1.10.13-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c958d053453a1c4b1c2062b05cd42d9d5c8eb67537b8d5a7e3c3032943ecd261"}, - {file = "pydantic-1.10.13-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4c5370a7edaac06daee3af1c8b1192e305bc102abcbf2a92374b5bc793818599"}, - {file = "pydantic-1.10.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d6f6e7305244bddb4414ba7094ce910560c907bdfa3501e9db1a7fd7eaea127"}, - {file = "pydantic-1.10.13-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d3a3c792a58e1622667a2837512099eac62490cdfd63bd407993aaf200a4cf1f"}, - {file = "pydantic-1.10.13-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c636925f38b8db208e09d344c7aa4f29a86bb9947495dd6b6d376ad10334fb78"}, - {file = "pydantic-1.10.13-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:678bcf5591b63cc917100dc50ab6caebe597ac67e8c9ccb75e698f66038ea953"}, - {file = "pydantic-1.10.13-cp38-cp38-win_amd64.whl", hash = "sha256:6cf25c1a65c27923a17b3da28a0bdb99f62ee04230c931d83e888012851f4e7f"}, - {file = "pydantic-1.10.13-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8ef467901d7a41fa0ca6db9ae3ec0021e3f657ce2c208e98cd511f3161c762c6"}, - {file = "pydantic-1.10.13-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:968ac42970f57b8344ee08837b62f6ee6f53c33f603547a55571c954a4225691"}, - {file = "pydantic-1.10.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9849f031cf8a2f0a928fe885e5a04b08006d6d41876b8bbd2fc68a18f9f2e3fd"}, - {file = "pydantic-1.10.13-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:56e3ff861c3b9c6857579de282ce8baabf443f42ffba355bf070770ed63e11e1"}, - {file = "pydantic-1.10.13-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f00790179497767aae6bcdc36355792c79e7bbb20b145ff449700eb076c5f96"}, - {file = "pydantic-1.10.13-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:75b297827b59bc229cac1a23a2f7a4ac0031068e5be0ce385be1462e7e17a35d"}, - {file = "pydantic-1.10.13-cp39-cp39-win_amd64.whl", hash = "sha256:e70ca129d2053fb8b728ee7d1af8e553a928d7e301a311094b8a0501adc8763d"}, - {file = "pydantic-1.10.13-py3-none-any.whl", hash = "sha256:b87326822e71bd5f313e7d3bfdc77ac3247035ac10b0c0618bd99dcf95b1e687"}, - {file = "pydantic-1.10.13.tar.gz", hash = "sha256:32c8b48dcd3b2ac4e78b0ba4af3a2c2eb6048cb75202f0ea7b34feb740efc340"}, + {file = "pydantic-2.7.1-py3-none-any.whl", hash = "sha256:e029badca45266732a9a79898a15ae2e8b14840b1eabbb25844be28f0b33f3d5"}, + {file = "pydantic-2.7.1.tar.gz", hash = "sha256:e9dbb5eada8abe4d9ae5f46b9939aead650cd2b68f249bb3a8139dbe125803cc"}, ] [package.dependencies] -typing-extensions = ">=4.2.0" +annotated-types = ">=0.4.0" +pydantic-core = "2.18.2" +typing-extensions = ">=4.6.1" [package.extras] -dotenv = ["python-dotenv (>=0.10.4)"] -email = ["email-validator (>=1.0.3)"] +email = ["email-validator (>=2.0.0)"] + +[[package]] +name = "pydantic-core" +version = "2.18.2" +description = "Core functionality for Pydantic validation and serialization" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic_core-2.18.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:9e08e867b306f525802df7cd16c44ff5ebbe747ff0ca6cf3fde7f36c05a59a81"}, + {file = "pydantic_core-2.18.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f0a21cbaa69900cbe1a2e7cad2aa74ac3cf21b10c3efb0fa0b80305274c0e8a2"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0680b1f1f11fda801397de52c36ce38ef1c1dc841a0927a94f226dea29c3ae3d"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:95b9d5e72481d3780ba3442eac863eae92ae43a5f3adb5b4d0a1de89d42bb250"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fcf5cd9c4b655ad666ca332b9a081112cd7a58a8b5a6ca7a3104bc950f2038"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b5155ff768083cb1d62f3e143b49a8a3432e6789a3abee8acd005c3c7af1c74"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:553ef617b6836fc7e4df130bb851e32fe357ce36336d897fd6646d6058d980af"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b89ed9eb7d616ef5714e5590e6cf7f23b02d0d539767d33561e3675d6f9e3857"}, + {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:75f7e9488238e920ab6204399ded280dc4c307d034f3924cd7f90a38b1829563"}, + {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ef26c9e94a8c04a1b2924149a9cb081836913818e55681722d7f29af88fe7b38"}, + {file = "pydantic_core-2.18.2-cp310-none-win32.whl", hash = "sha256:182245ff6b0039e82b6bb585ed55a64d7c81c560715d1bad0cbad6dfa07b4027"}, + {file = "pydantic_core-2.18.2-cp310-none-win_amd64.whl", hash = "sha256:e23ec367a948b6d812301afc1b13f8094ab7b2c280af66ef450efc357d2ae543"}, + {file = "pydantic_core-2.18.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:219da3f096d50a157f33645a1cf31c0ad1fe829a92181dd1311022f986e5fbe3"}, + {file = "pydantic_core-2.18.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cc1cfd88a64e012b74e94cd00bbe0f9c6df57049c97f02bb07d39e9c852e19a4"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05b7133a6e6aeb8df37d6f413f7705a37ab4031597f64ab56384c94d98fa0e90"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:224c421235f6102e8737032483f43c1a8cfb1d2f45740c44166219599358c2cd"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b14d82cdb934e99dda6d9d60dc84a24379820176cc4a0d123f88df319ae9c150"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2728b01246a3bba6de144f9e3115b532ee44bd6cf39795194fb75491824a1413"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:470b94480bb5ee929f5acba6995251ada5e059a5ef3e0dfc63cca287283ebfa6"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:997abc4df705d1295a42f95b4eec4950a37ad8ae46d913caeee117b6b198811c"}, + {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:75250dbc5290e3f1a0f4618db35e51a165186f9034eff158f3d490b3fed9f8a0"}, + {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4456f2dca97c425231d7315737d45239b2b51a50dc2b6f0c2bb181fce6207664"}, + {file = "pydantic_core-2.18.2-cp311-none-win32.whl", hash = "sha256:269322dcc3d8bdb69f054681edff86276b2ff972447863cf34c8b860f5188e2e"}, + {file = "pydantic_core-2.18.2-cp311-none-win_amd64.whl", hash = "sha256:800d60565aec896f25bc3cfa56d2277d52d5182af08162f7954f938c06dc4ee3"}, + {file = "pydantic_core-2.18.2-cp311-none-win_arm64.whl", hash = "sha256:1404c69d6a676245199767ba4f633cce5f4ad4181f9d0ccb0577e1f66cf4c46d"}, + {file = "pydantic_core-2.18.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:fb2bd7be70c0fe4dfd32c951bc813d9fe6ebcbfdd15a07527796c8204bd36242"}, + {file = "pydantic_core-2.18.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6132dd3bd52838acddca05a72aafb6eab6536aa145e923bb50f45e78b7251043"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7d904828195733c183d20a54230c0df0eb46ec746ea1a666730787353e87182"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c9bd70772c720142be1020eac55f8143a34ec9f82d75a8e7a07852023e46617f"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2b8ed04b3582771764538f7ee7001b02e1170223cf9b75dff0bc698fadb00cf3"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6dac87ddb34aaec85f873d737e9d06a3555a1cc1a8e0c44b7f8d5daeb89d86f"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ca4ae5a27ad7a4ee5170aebce1574b375de390bc01284f87b18d43a3984df72"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:886eec03591b7cf058467a70a87733b35f44707bd86cf64a615584fd72488b7c"}, + {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ca7b0c1f1c983e064caa85f3792dd2fe3526b3505378874afa84baf662e12241"}, + {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b4356d3538c3649337df4074e81b85f0616b79731fe22dd11b99499b2ebbdf3"}, + {file = "pydantic_core-2.18.2-cp312-none-win32.whl", hash = "sha256:8b172601454f2d7701121bbec3425dd71efcb787a027edf49724c9cefc14c038"}, + {file = "pydantic_core-2.18.2-cp312-none-win_amd64.whl", hash = "sha256:b1bd7e47b1558ea872bd16c8502c414f9e90dcf12f1395129d7bb42a09a95438"}, + {file = "pydantic_core-2.18.2-cp312-none-win_arm64.whl", hash = "sha256:98758d627ff397e752bc339272c14c98199c613f922d4a384ddc07526c86a2ec"}, + {file = "pydantic_core-2.18.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:9fdad8e35f278b2c3eb77cbdc5c0a49dada440657bf738d6905ce106dc1de439"}, + {file = "pydantic_core-2.18.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1d90c3265ae107f91a4f279f4d6f6f1d4907ac76c6868b27dc7fb33688cfb347"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:390193c770399861d8df9670fb0d1874f330c79caaca4642332df7c682bf6b91"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:82d5d4d78e4448683cb467897fe24e2b74bb7b973a541ea1dcfec1d3cbce39fb"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4774f3184d2ef3e14e8693194f661dea5a4d6ca4e3dc8e39786d33a94865cefd"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d4d938ec0adf5167cb335acb25a4ee69a8107e4984f8fbd2e897021d9e4ca21b"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0e8b1be28239fc64a88a8189d1df7fad8be8c1ae47fcc33e43d4be15f99cc70"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:868649da93e5a3d5eacc2b5b3b9235c98ccdbfd443832f31e075f54419e1b96b"}, + {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:78363590ef93d5d226ba21a90a03ea89a20738ee5b7da83d771d283fd8a56761"}, + {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:852e966fbd035a6468fc0a3496589b45e2208ec7ca95c26470a54daed82a0788"}, + {file = "pydantic_core-2.18.2-cp38-none-win32.whl", hash = "sha256:6a46e22a707e7ad4484ac9ee9f290f9d501df45954184e23fc29408dfad61350"}, + {file = "pydantic_core-2.18.2-cp38-none-win_amd64.whl", hash = "sha256:d91cb5ea8b11607cc757675051f61b3d93f15eca3cefb3e6c704a5d6e8440f4e"}, + {file = "pydantic_core-2.18.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:ae0a8a797a5e56c053610fa7be147993fe50960fa43609ff2a9552b0e07013e8"}, + {file = "pydantic_core-2.18.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:042473b6280246b1dbf530559246f6842b56119c2926d1e52b631bdc46075f2a"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a388a77e629b9ec814c1b1e6b3b595fe521d2cdc625fcca26fbc2d44c816804"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25add29b8f3b233ae90ccef2d902d0ae0432eb0d45370fe315d1a5cf231004b"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f459a5ce8434614dfd39bbebf1041952ae01da6bed9855008cb33b875cb024c0"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eff2de745698eb46eeb51193a9f41d67d834d50e424aef27df2fcdee1b153845"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8309f67285bdfe65c372ea3722b7a5642680f3dba538566340a9d36e920b5f0"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f93a8a2e3938ff656a7c1bc57193b1319960ac015b6e87d76c76bf14fe0244b4"}, + {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:22057013c8c1e272eb8d0eebc796701167d8377441ec894a8fed1af64a0bf399"}, + {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cfeecd1ac6cc1fb2692c3d5110781c965aabd4ec5d32799773ca7b1456ac636b"}, + {file = "pydantic_core-2.18.2-cp39-none-win32.whl", hash = "sha256:0d69b4c2f6bb3e130dba60d34c0845ba31b69babdd3f78f7c0c8fae5021a253e"}, + {file = "pydantic_core-2.18.2-cp39-none-win_amd64.whl", hash = "sha256:d9319e499827271b09b4e411905b24a426b8fb69464dfa1696258f53a3334641"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a1874c6dd4113308bd0eb568418e6114b252afe44319ead2b4081e9b9521fe75"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:ccdd111c03bfd3666bd2472b674c6899550e09e9f298954cfc896ab92b5b0e6d"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e18609ceaa6eed63753037fc06ebb16041d17d28199ae5aba0052c51449650a9"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e5c584d357c4e2baf0ff7baf44f4994be121e16a2c88918a5817331fc7599d7"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43f0f463cf89ace478de71a318b1b4f05ebc456a9b9300d027b4b57c1a2064fb"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:e1b395e58b10b73b07b7cf740d728dd4ff9365ac46c18751bf8b3d8cca8f625a"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0098300eebb1c837271d3d1a2cd2911e7c11b396eac9661655ee524a7f10587b"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:36789b70d613fbac0a25bb07ab3d9dba4d2e38af609c020cf4d888d165ee0bf3"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3f9a801e7c8f1ef8718da265bba008fa121243dfe37c1cea17840b0944dfd72c"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:3a6515ebc6e69d85502b4951d89131ca4e036078ea35533bb76327f8424531ce"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20aca1e2298c56ececfd8ed159ae4dde2df0781988c97ef77d5c16ff4bd5b400"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:223ee893d77a310a0391dca6df00f70bbc2f36a71a895cecd9a0e762dc37b349"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2334ce8c673ee93a1d6a65bd90327588387ba073c17e61bf19b4fd97d688d63c"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:cbca948f2d14b09d20268cda7b0367723d79063f26c4ffc523af9042cad95592"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b3ef08e20ec49e02d5c6717a91bb5af9b20f1805583cb0adfe9ba2c6b505b5ae"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c6fdc8627910eed0c01aed6a390a252fe3ea6d472ee70fdde56273f198938374"}, + {file = "pydantic_core-2.18.2.tar.gz", hash = "sha256:2e29d20810dfc3043ee13ac7d9e25105799817683348823f305ab3f349b9386e"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pygments" -version = "2.16.1" +version = "2.18.0" description = "Pygments is a syntax highlighting package written in Python." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Pygments-2.16.1-py3-none-any.whl", hash = "sha256:13fc09fa63bc8d8671a6d247e1eb303c4b343eaee81d861f3404db2935653692"}, - {file = "Pygments-2.16.1.tar.gz", hash = "sha256:1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29"}, + {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, + {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, ] [package.extras] -plugins = ["importlib-metadata"] +windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pylint" -version = "3.0.2" +version = "3.1.1" description = "python code static checker" optional = false python-versions = ">=3.8.0" files = [ - {file = "pylint-3.0.2-py3-none-any.whl", hash = "sha256:60ed5f3a9ff8b61839ff0348b3624ceeb9e6c2a92c514d81c9cc273da3b6bcda"}, - {file = "pylint-3.0.2.tar.gz", hash = "sha256:0d4c286ef6d2f66c8bfb527a7f8a629009e42c99707dec821a03e1b51a4c1496"}, + {file = "pylint-3.1.1-py3-none-any.whl", hash = "sha256:862eddf25dab42704c5f06d3688b8bc19ef4c99ad8a836b6ff260a3b2fbafee1"}, + {file = "pylint-3.1.1.tar.gz", hash = "sha256:c7c2652bf8099c7fb7a63bc6af5c5f8f7b9d7b392fa1d320cb020e222aff28c2"}, ] [package.dependencies] -astroid = ">=3.0.1,<=3.1.0-dev0" +astroid = ">=3.1.0,<=3.2.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ {version = ">=0.2", markers = "python_version < \"3.11\""}, {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, ] -isort = ">=4.2.5,<6" +isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.10.1" -typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] spelling = ["pyenchant (>=3.2,<4.0)"] @@ -1326,13 +1450,13 @@ testutils = ["gitpython (>3)"] [[package]] name = "pynetbox" -version = "7.2.0" +version = "7.3.3" description = "NetBox API client library" optional = false python-versions = "*" files = [ - {file = "pynetbox-7.2.0-py3-none-any.whl", hash = "sha256:73ac66250f8899152180b5e1fca63402d4aef8ed361b291f19d7ba3730f87a6c"}, - {file = "pynetbox-7.2.0.tar.gz", hash = "sha256:3735f4d44e81da4b9af3cc1fdf18e708752ac5d863442100d987886c099df5df"}, + {file = "pynetbox-7.3.3-py3-none-any.whl", hash = "sha256:9bc25f83ff126f12d26976e544a2f0f6c7c898c261e6d47f8a4144ab47686d81"}, + {file = "pynetbox-7.3.3.tar.gz", hash = "sha256:b0bcef4c3a019516d2425ae0ce5509eae7f4f11ad4510c9fe9527d468f22529b"}, ] [package.dependencies] @@ -1341,27 +1465,24 @@ requests = ">=2.20.0,<3.0" [[package]] name = "pyproject-hooks" -version = "1.0.0" +version = "1.1.0" description = "Wrappers to call pyproject.toml-based build backend hooks." optional = false python-versions = ">=3.7" files = [ - {file = "pyproject_hooks-1.0.0-py3-none-any.whl", hash = "sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8"}, - {file = "pyproject_hooks-1.0.0.tar.gz", hash = "sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5"}, + {file = "pyproject_hooks-1.1.0-py3-none-any.whl", hash = "sha256:7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2"}, + {file = "pyproject_hooks-1.1.0.tar.gz", hash = "sha256:4b37730834edbd6bd37f26ece6b44802fb1c1ee2ece0e54ddff8bfc06db86965"}, ] -[package.dependencies] -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} - [[package]] name = "pytest" -version = "7.4.3" +version = "8.2.0" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"}, - {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"}, + {file = "pytest-8.2.0-py3-none-any.whl", hash = "sha256:1733f0620f6cda4095bbf0d9ff8022486e91892245bb9e7d5542c018f612f233"}, + {file = "pytest-8.2.0.tar.gz", hash = "sha256:d507d4482197eac0ba2bae2e9babf0672eb333017bcedaa5fb1a3d42c1174b3f"}, ] [package.dependencies] @@ -1369,11 +1490,11 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +pluggy = ">=1.5,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-forked" @@ -1392,35 +1513,35 @@ pytest = ">=3.10" [[package]] name = "pytest-mock" -version = "3.12.0" +version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-mock-3.12.0.tar.gz", hash = "sha256:31a40f038c22cad32287bb43932054451ff5583ff094bca6f675df2f8bc1a6e9"}, - {file = "pytest_mock-3.12.0-py3-none-any.whl", hash = "sha256:0972719a7263072da3a21c7f4773069bcc7486027d7e8e1f81d98a47e701bc4f"}, + {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, + {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, ] [package.dependencies] -pytest = ">=5.0" +pytest = ">=6.2.5" [package.extras] dev = ["pre-commit", "pytest-asyncio", "tox"] [[package]] name = "pytest-xdist" -version = "3.3.1" +version = "3.6.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pytest-xdist-3.3.1.tar.gz", hash = "sha256:d5ee0520eb1b7bcca50a60a518ab7a7707992812c578198f8b44fdfac78e8c93"}, - {file = "pytest_xdist-3.3.1-py3-none-any.whl", hash = "sha256:ff9daa7793569e6a68544850fd3927cd257cc03a7ef76c95e86915355e82b5f2"}, + {file = "pytest_xdist-3.6.1-py3-none-any.whl", hash = "sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7"}, + {file = "pytest_xdist-3.6.1.tar.gz", hash = "sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d"}, ] [package.dependencies] -execnet = ">=1.1" -pytest = ">=6.2.0" +execnet = ">=2.1" +pytest = ">=7.0.0" [package.extras] psutil = ["psutil (>=3.0)"] @@ -1429,13 +1550,13 @@ testing = ["filelock"] [[package]] name = "pytz" -version = "2023.3.post1" +version = "2024.1" description = "World timezone definitions, modern and historical" optional = false python-versions = "*" files = [ - {file = "pytz-2023.3.post1-py2.py3-none-any.whl", hash = "sha256:ce42d816b81b68506614c11e8937d3aa9e41007ceb50bfdcb0749b921bf646c7"}, - {file = "pytz-2023.3.post1.tar.gz", hash = "sha256:7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b"}, + {file = "pytz-2024.1-py2.py3-none-any.whl", hash = "sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319"}, + {file = "pytz-2024.1.tar.gz", hash = "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812"}, ] [[package]] @@ -1463,7 +1584,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -1521,13 +1641,13 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "resolvelib" -version = "0.8.1" +version = "1.0.1" description = "Resolve abstract dependencies into concrete ones" optional = false python-versions = "*" files = [ - {file = "resolvelib-0.8.1-py2.py3-none-any.whl", hash = "sha256:d9b7907f055c3b3a2cfc56c914ffd940122915826ff5fb5b1de0c99778f4de98"}, - {file = "resolvelib-0.8.1.tar.gz", hash = "sha256:c6ea56732e9fb6fca1b2acc2ccc68a0b6b8c566d8f3e78e0443310ede61dbd37"}, + {file = "resolvelib-1.0.1-py2.py3-none-any.whl", hash = "sha256:d2da45d1a8dfee81bdd591647783e340ef3bcb104b54c383f70d422ef5cc7dbf"}, + {file = "resolvelib-1.0.1.tar.gz", hash = "sha256:04ce76cbd63fded2078ce224785da6ecd42b9564b1390793f64ddecbe997b309"}, ] [package.extras] @@ -1538,64 +1658,68 @@ test = ["commentjson", "packaging", "pytest"] [[package]] name = "rich" -version = "12.6.0" +version = "13.7.1" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false -python-versions = ">=3.6.3,<4.0.0" +python-versions = ">=3.7.0" files = [ - {file = "rich-12.6.0-py3-none-any.whl", hash = "sha256:a4eb26484f2c82589bd9a17c73d32a010b1e29d89f1604cd9bf3a2097b81bb5e"}, - {file = "rich-12.6.0.tar.gz", hash = "sha256:ba3a3775974105c221d31141f2c116f4fd65c5ceb0698657a11e9f295ec93fd0"}, + {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, + {file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"}, ] [package.dependencies] -commonmark = ">=0.9.0,<0.10.0" -pygments = ">=2.6.0,<3.0.0" +markdown-it-py = ">=2.2.0" +pygments = ">=2.13.0,<3.0.0" [package.extras] -jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] +jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "rstcheck" -version = "6.1.2" +version = "6.2.1" description = "Checks syntax of reStructuredText and code blocks nested within it" optional = false -python-versions = ">=3.7,<4.0" +python-versions = ">=3.8" files = [ - {file = "rstcheck-6.1.2-py3-none-any.whl", hash = "sha256:4aaa46e0debc179f849807c453fa384fd2b75167faf5b1274115730805fab529"}, - {file = "rstcheck-6.1.2.tar.gz", hash = "sha256:f9cb07a72ef9a81d1e32187eae29b00a89421ccba1bde0b1652a08ed0923f61b"}, + {file = "rstcheck-6.2.1-py3-none-any.whl", hash = "sha256:b450943707d8ca053f5c6b9f103ee595f4926a064203e5e579172aefb3fe2c12"}, + {file = "rstcheck-6.2.1.tar.gz", hash = "sha256:e4d173950b023eb12c2b9d2348a8c62bef46612bbc7b29e1e57d37320ed0a891"}, ] [package.dependencies] -rstcheck-core = ">=1.0.2,<2.0.0" -typer = {version = ">=0.4.1,<0.8", extras = ["all"]} +rstcheck-core = ">=1.1" +typer = {version = ">=0.4.1", extras = ["all"]} [package.extras] -docs = ["m2r2 (>=0.3.2)", "sphinx", "sphinx-autobuild (==2021.3.14)", "sphinx-click (>=4.0.3,<5.0.0)", "sphinx-rtd-dark-mode (>=1.2.4,<2.0.0)", "sphinx-rtd-theme (<1)", "sphinxcontrib-spelling (>=7.3)"] -sphinx = ["sphinx"] +dev = ["rstcheck[docs,sphinx,testing,toml,type-check]", "tox (>=3.15)"] +docs = ["m2r2 (>=0.3.2)", "sphinx (>=5.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-click (>=4.0.3)", "sphinx-rtd-theme (>=1.2)", "sphinxcontrib-spelling (>=7.3)"] +sphinx = ["sphinx (>=5.0)"] testing = ["coverage-conditional-plugin (>=0.5)", "coverage[toml] (>=6.0)", "pytest (>=7.2)", "pytest-cov (>=3.0)", "pytest-randomly (>=3.0)", "pytest-sugar (>=0.9.5)"] -toml = ["tomli"] +toml = ["tomli (>=2.0)"] +type-check = ["mypy (>=1.0)"] [[package]] name = "rstcheck-core" -version = "1.0.3" +version = "1.2.1" description = "Checks syntax of reStructuredText and code blocks nested within it" optional = false -python-versions = ">=3.7,<4.0" +python-versions = ">=3.8" files = [ - {file = "rstcheck_core-1.0.3-py3-none-any.whl", hash = "sha256:d75d7df8f15b58e8aafe322d6fb6ef1ac8d12bb563089b0696948a00ee7f601a"}, - {file = "rstcheck_core-1.0.3.tar.gz", hash = "sha256:add19c9a1b97d9087f4b463b49c12cd8a9c03689a255e99089c70a2692f16369"}, + {file = "rstcheck-core-1.2.1.tar.gz", hash = "sha256:9b330020d912e2864f23f332c1a0569463ca3b06b8fee7b7bdd201b055f7f831"}, + {file = "rstcheck_core-1.2.1-py3-none-any.whl", hash = "sha256:1c100de418b6c9e14d9cf6558644d0ab103fdc447f891313882d02df3a3c52ba"}, ] [package.dependencies] -docutils = ">=0.7,<0.20" -pydantic = ">=1.2,<2.0" -types-docutils = ">=0.18,<0.20" +docutils = ">=0.7" +pydantic = ">=2" [package.extras] -docs = ["m2r2 (>=0.3.2)", "sphinx (>=4.0,<6.0)", "sphinx-autobuild (==2021.3.14)", "sphinx-autodoc-typehints (>=1.15)", "sphinx-rtd-dark-mode (>=1.2.4,<2.0.0)", "sphinx-rtd-theme (<1)", "sphinxcontrib-apidoc (>=0.3)", "sphinxcontrib-spelling (>=7.3)"] -sphinx = ["sphinx (>=4.0,<6.0)"] -testing = ["coverage-conditional-plugin (>=0.5)", "coverage[toml] (>=6.0)", "pytest (>=6.0)", "pytest-cov (>=3.0)", "pytest-mock (>=3.7)", "pytest-randomly (>=3.0)", "pytest-sugar (>=0.9.5)"] -toml = ["tomli (>=2.0,<3.0)"] +dev = ["rstcheck-core[docs,sphinx,testing,toml,type-check,yaml]", "tox (>=3.15)"] +docs = ["m2r2 (>=0.3.2)", "sphinx (>=5.0,!=7.2.5)", "sphinx-autobuild (>=2021.3.14)", "sphinx-autodoc-typehints (>=1.15)", "sphinx-rtd-theme (>=1.2)", "sphinxcontrib-apidoc (>=0.3)", "sphinxcontrib-spelling (>=7.3)"] +sphinx = ["sphinx (>=5.0)"] +testing = ["coverage-conditional-plugin (>=0.5)", "coverage[toml] (>=6.0)", "pytest (>=7.2)", "pytest-cov (>=3.0)", "pytest-mock (>=3.7)", "pytest-randomly (>=3.0)", "pytest-sugar (>=0.9.5)"] +toml = ["tomli (>=2.0)"] +type-check = ["mypy (>=1.0)", "types-PyYAML (>=6.0.0)", "types-docutils (>=0.18)"] +yaml = ["pyyaml (>=6.0.0)"] [[package]] name = "semantic-version" @@ -1612,16 +1736,6 @@ files = [ dev = ["Django (>=1.11)", "check-manifest", "colorama (<=0.4.1)", "coverage", "flake8", "nose2", "readme-renderer (<25.0)", "tox", "wheel", "zest.releaser[recommended]"] doc = ["Sphinx", "sphinx-rtd-theme"] -[[package]] -name = "sh" -version = "1.14.3" -description = "Python subprocess replacement" -optional = false -python-versions = "*" -files = [ - {file = "sh-1.14.3.tar.gz", hash = "sha256:e4045b6c732d9ce75d571c79f5ac2234edd9ae4f5fa9d59b09705082bdca18c7"}, -] - [[package]] name = "shellingham" version = "1.5.4" @@ -1657,13 +1771,13 @@ files = [ [[package]] name = "tomlkit" -version = "0.12.2" +version = "0.12.5" description = "Style preserving TOML library" optional = false python-versions = ">=3.7" files = [ - {file = "tomlkit-0.12.2-py3-none-any.whl", hash = "sha256:eeea7ac7563faeab0a1ed8fe12c2e5a51c61f933f2502f7e9db0241a65163ad0"}, - {file = "tomlkit-0.12.2.tar.gz", hash = "sha256:df32fab589a81f0d7dc525a4267b6d7a64ee99619cbd1eeb0fae32c1dd426977"}, + {file = "tomlkit-0.12.5-py3-none-any.whl", hash = "sha256:af914f5a9c59ed9d0762c7b64d3b5d5df007448eb9cd2edc8a46b1eafead172f"}, + {file = "tomlkit-0.12.5.tar.gz", hash = "sha256:eef34fba39834d4d6b73c9ba7f3e4d1c417a4e56f89a7e96e090dd0d24b8fb3c"}, ] [[package]] @@ -1682,147 +1796,146 @@ six = "*" [[package]] name = "typer" -version = "0.7.0" +version = "0.12.3" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "typer-0.7.0-py3-none-any.whl", hash = "sha256:b5e704f4e48ec263de1c0b3a2387cd405a13767d2f907f44c1a08cbad96f606d"}, - {file = "typer-0.7.0.tar.gz", hash = "sha256:ff797846578a9f2a201b53442aedeb543319466870fbe1c701eab66dd7681165"}, + {file = "typer-0.12.3-py3-none-any.whl", hash = "sha256:070d7ca53f785acbccba8e7d28b08dcd88f79f1fbda035ade0aecec71ca5c914"}, + {file = "typer-0.12.3.tar.gz", hash = "sha256:49e73131481d804288ef62598d97a1ceef3058905aa536a1134f90891ba35482"}, ] [package.dependencies] -click = ">=7.1.1,<9.0.0" -colorama = {version = ">=0.4.3,<0.5.0", optional = true, markers = "extra == \"all\""} -rich = {version = ">=10.11.0,<13.0.0", optional = true, markers = "extra == \"all\""} -shellingham = {version = ">=1.3.0,<2.0.0", optional = true, markers = "extra == \"all\""} - -[package.extras] -all = ["colorama (>=0.4.3,<0.5.0)", "rich (>=10.11.0,<13.0.0)", "shellingham (>=1.3.0,<2.0.0)"] -dev = ["autoflake (>=1.3.1,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "pre-commit (>=2.17.0,<3.0.0)"] -doc = ["cairosvg (>=2.5.2,<3.0.0)", "mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pillow (>=9.3.0,<10.0.0)"] -test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.910)", "pytest (>=4.4.0,<8.0.0)", "pytest-cov (>=2.10.0,<5.0.0)", "pytest-sugar (>=0.9.4,<0.10.0)", "pytest-xdist (>=1.32.0,<4.0.0)", "rich (>=10.11.0,<13.0.0)", "shellingham (>=1.3.0,<2.0.0)"] - -[[package]] -name = "types-docutils" -version = "0.19.1.9" -description = "Typing stubs for docutils" -optional = false -python-versions = "*" -files = [ - {file = "types-docutils-0.19.1.9.tar.gz", hash = "sha256:1d029567e67c52992fd42aa968778bc10a5e445c8450fc751d672d6f50330a4a"}, - {file = "types_docutils-0.19.1.9-py3-none-any.whl", hash = "sha256:556fb7ee19248aa482caa142a830c940b776b0f8c7577a98abe0977574546a1d"}, -] +click = ">=8.0.0" +rich = ">=10.11.0" +shellingham = ">=1.3.0" +typing-extensions = ">=3.7.4.3" [[package]] name = "typing-extensions" -version = "4.8.0" +version = "4.11.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0"}, - {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"}, + {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, + {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, ] [[package]] name = "urllib3" -version = "2.0.7" +version = "2.2.1" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "urllib3-2.0.7-py3-none-any.whl", hash = "sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e"}, - {file = "urllib3-2.0.7.tar.gz", hash = "sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84"}, + {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, + {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, ] [package.extras] brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] +h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] [[package]] name = "yarl" -version = "1.9.2" +version = "1.9.4" description = "Yet another URL library" optional = false python-versions = ">=3.7" files = [ - {file = "yarl-1.9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8c2ad583743d16ddbdf6bb14b5cd76bf43b0d0006e918809d5d4ddf7bde8dd82"}, - {file = "yarl-1.9.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82aa6264b36c50acfb2424ad5ca537a2060ab6de158a5bd2a72a032cc75b9eb8"}, - {file = "yarl-1.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c0c77533b5ed4bcc38e943178ccae29b9bcf48ffd1063f5821192f23a1bd27b9"}, - {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee4afac41415d52d53a9833ebae7e32b344be72835bbb589018c9e938045a560"}, - {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9bf345c3a4f5ba7f766430f97f9cc1320786f19584acc7086491f45524a551ac"}, - {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a96c19c52ff442a808c105901d0bdfd2e28575b3d5f82e2f5fd67e20dc5f4ea"}, - {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:891c0e3ec5ec881541f6c5113d8df0315ce5440e244a716b95f2525b7b9f3608"}, - {file = "yarl-1.9.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c3a53ba34a636a256d767c086ceb111358876e1fb6b50dfc4d3f4951d40133d5"}, - {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:566185e8ebc0898b11f8026447eacd02e46226716229cea8db37496c8cdd26e0"}, - {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:2b0738fb871812722a0ac2154be1f049c6223b9f6f22eec352996b69775b36d4"}, - {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:32f1d071b3f362c80f1a7d322bfd7b2d11e33d2adf395cc1dd4df36c9c243095"}, - {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:e9fdc7ac0d42bc3ea78818557fab03af6181e076a2944f43c38684b4b6bed8e3"}, - {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:56ff08ab5df8429901ebdc5d15941b59f6253393cb5da07b4170beefcf1b2528"}, - {file = "yarl-1.9.2-cp310-cp310-win32.whl", hash = "sha256:8ea48e0a2f931064469bdabca50c2f578b565fc446f302a79ba6cc0ee7f384d3"}, - {file = "yarl-1.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:50f33040f3836e912ed16d212f6cc1efb3231a8a60526a407aeb66c1c1956dde"}, - {file = "yarl-1.9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:646d663eb2232d7909e6601f1a9107e66f9791f290a1b3dc7057818fe44fc2b6"}, - {file = "yarl-1.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aff634b15beff8902d1f918012fc2a42e0dbae6f469fce134c8a0dc51ca423bb"}, - {file = "yarl-1.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a83503934c6273806aed765035716216cc9ab4e0364f7f066227e1aaea90b8d0"}, - {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b25322201585c69abc7b0e89e72790469f7dad90d26754717f3310bfe30331c2"}, - {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:22a94666751778629f1ec4280b08eb11815783c63f52092a5953faf73be24191"}, - {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ec53a0ea2a80c5cd1ab397925f94bff59222aa3cf9c6da938ce05c9ec20428d"}, - {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:159d81f22d7a43e6eabc36d7194cb53f2f15f498dbbfa8edc8a3239350f59fe7"}, - {file = "yarl-1.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:832b7e711027c114d79dffb92576acd1bd2decc467dec60e1cac96912602d0e6"}, - {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:95d2ecefbcf4e744ea952d073c6922e72ee650ffc79028eb1e320e732898d7e8"}, - {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:d4e2c6d555e77b37288eaf45b8f60f0737c9efa3452c6c44626a5455aeb250b9"}, - {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:783185c75c12a017cc345015ea359cc801c3b29a2966c2655cd12b233bf5a2be"}, - {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:b8cc1863402472f16c600e3e93d542b7e7542a540f95c30afd472e8e549fc3f7"}, - {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:822b30a0f22e588b32d3120f6d41e4ed021806418b4c9f0bc3048b8c8cb3f92a"}, - {file = "yarl-1.9.2-cp311-cp311-win32.whl", hash = "sha256:a60347f234c2212a9f0361955007fcf4033a75bf600a33c88a0a8e91af77c0e8"}, - {file = "yarl-1.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:be6b3fdec5c62f2a67cb3f8c6dbf56bbf3f61c0f046f84645cd1ca73532ea051"}, - {file = "yarl-1.9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:38a3928ae37558bc1b559f67410df446d1fbfa87318b124bf5032c31e3447b74"}, - {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac9bb4c5ce3975aeac288cfcb5061ce60e0d14d92209e780c93954076c7c4367"}, - {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3da8a678ca8b96c8606bbb8bfacd99a12ad5dd288bc6f7979baddd62f71c63ef"}, - {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13414591ff516e04fcdee8dc051c13fd3db13b673c7a4cb1350e6b2ad9639ad3"}, - {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf74d08542c3a9ea97bb8f343d4fcbd4d8f91bba5ec9d5d7f792dbe727f88938"}, - {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e7221580dc1db478464cfeef9b03b95c5852cc22894e418562997df0d074ccc"}, - {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:494053246b119b041960ddcd20fd76224149cfea8ed8777b687358727911dd33"}, - {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:52a25809fcbecfc63ac9ba0c0fb586f90837f5425edfd1ec9f3372b119585e45"}, - {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:e65610c5792870d45d7b68c677681376fcf9cc1c289f23e8e8b39c1485384185"}, - {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:1b1bba902cba32cdec51fca038fd53f8beee88b77efc373968d1ed021024cc04"}, - {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:662e6016409828ee910f5d9602a2729a8a57d74b163c89a837de3fea050c7582"}, - {file = "yarl-1.9.2-cp37-cp37m-win32.whl", hash = "sha256:f364d3480bffd3aa566e886587eaca7c8c04d74f6e8933f3f2c996b7f09bee1b"}, - {file = "yarl-1.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6a5883464143ab3ae9ba68daae8e7c5c95b969462bbe42e2464d60e7e2698368"}, - {file = "yarl-1.9.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5610f80cf43b6202e2c33ba3ec2ee0a2884f8f423c8f4f62906731d876ef4fac"}, - {file = "yarl-1.9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b9a4e67ad7b646cd6f0938c7ebfd60e481b7410f574c560e455e938d2da8e0f4"}, - {file = "yarl-1.9.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:83fcc480d7549ccebe9415d96d9263e2d4226798c37ebd18c930fce43dfb9574"}, - {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fcd436ea16fee7d4207c045b1e340020e58a2597301cfbcfdbe5abd2356c2fb"}, - {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84e0b1599334b1e1478db01b756e55937d4614f8654311eb26012091be109d59"}, - {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3458a24e4ea3fd8930e934c129b676c27452e4ebda80fbe47b56d8c6c7a63a9e"}, - {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:838162460b3a08987546e881a2bfa573960bb559dfa739e7800ceeec92e64417"}, - {file = "yarl-1.9.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4e2d08f07a3d7d3e12549052eb5ad3eab1c349c53ac51c209a0e5991bbada78"}, - {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:de119f56f3c5f0e2fb4dee508531a32b069a5f2c6e827b272d1e0ff5ac040333"}, - {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:149ddea5abf329752ea5051b61bd6c1d979e13fbf122d3a1f9f0c8be6cb6f63c"}, - {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:674ca19cbee4a82c9f54e0d1eee28116e63bc6fd1e96c43031d11cbab8b2afd5"}, - {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:9b3152f2f5677b997ae6c804b73da05a39daa6a9e85a512e0e6823d81cdad7cc"}, - {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5415d5a4b080dc9612b1b63cba008db84e908b95848369aa1da3686ae27b6d2b"}, - {file = "yarl-1.9.2-cp38-cp38-win32.whl", hash = "sha256:f7a3d8146575e08c29ed1cd287068e6d02f1c7bdff8970db96683b9591b86ee7"}, - {file = "yarl-1.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:63c48f6cef34e6319a74c727376e95626f84ea091f92c0250a98e53e62c77c72"}, - {file = "yarl-1.9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:75df5ef94c3fdc393c6b19d80e6ef1ecc9ae2f4263c09cacb178d871c02a5ba9"}, - {file = "yarl-1.9.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c027a6e96ef77d401d8d5a5c8d6bc478e8042f1e448272e8d9752cb0aff8b5c8"}, - {file = "yarl-1.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f3b078dbe227f79be488ffcfc7a9edb3409d018e0952cf13f15fd6512847f3f7"}, - {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59723a029760079b7d991a401386390c4be5bfec1e7dd83e25a6a0881859e716"}, - {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b03917871bf859a81ccb180c9a2e6c1e04d2f6a51d953e6a5cdd70c93d4e5a2a"}, - {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c1012fa63eb6c032f3ce5d2171c267992ae0c00b9e164efe4d73db818465fac3"}, - {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a74dcbfe780e62f4b5a062714576f16c2f3493a0394e555ab141bf0d746bb955"}, - {file = "yarl-1.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8c56986609b057b4839968ba901944af91b8e92f1725d1a2d77cbac6972b9ed1"}, - {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c315df3293cd521033533d242d15eab26583360b58f7ee5d9565f15fee1bef4"}, - {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b7232f8dfbd225d57340e441d8caf8652a6acd06b389ea2d3222b8bc89cbfca6"}, - {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:53338749febd28935d55b41bf0bcc79d634881195a39f6b2f767870b72514caf"}, - {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:066c163aec9d3d073dc9ffe5dd3ad05069bcb03fcaab8d221290ba99f9f69ee3"}, - {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8288d7cd28f8119b07dd49b7230d6b4562f9b61ee9a4ab02221060d21136be80"}, - {file = "yarl-1.9.2-cp39-cp39-win32.whl", hash = "sha256:b124e2a6d223b65ba8768d5706d103280914d61f5cae3afbc50fc3dfcc016623"}, - {file = "yarl-1.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:61016e7d582bc46a5378ffdd02cd0314fb8ba52f40f9cf4d9a5e7dbef88dee18"}, - {file = "yarl-1.9.2.tar.gz", hash = "sha256:04ab9d4b9f587c06d801c2abfe9317b77cdf996c65a90d5e84ecc45010823571"}, + {file = "yarl-1.9.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a8c1df72eb746f4136fe9a2e72b0c9dc1da1cbd23b5372f94b5820ff8ae30e0e"}, + {file = "yarl-1.9.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a3a6ed1d525bfb91b3fc9b690c5a21bb52de28c018530ad85093cc488bee2dd2"}, + {file = "yarl-1.9.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c38c9ddb6103ceae4e4498f9c08fac9b590c5c71b0370f98714768e22ac6fa66"}, + {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d9e09c9d74f4566e905a0b8fa668c58109f7624db96a2171f21747abc7524234"}, + {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8477c1ee4bd47c57d49621a062121c3023609f7a13b8a46953eb6c9716ca392"}, + {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5ff2c858f5f6a42c2a8e751100f237c5e869cbde669a724f2062d4c4ef93551"}, + {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:357495293086c5b6d34ca9616a43d329317feab7917518bc97a08f9e55648455"}, + {file = "yarl-1.9.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54525ae423d7b7a8ee81ba189f131054defdb122cde31ff17477951464c1691c"}, + {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:801e9264d19643548651b9db361ce3287176671fb0117f96b5ac0ee1c3530d53"}, + {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e516dc8baf7b380e6c1c26792610230f37147bb754d6426462ab115a02944385"}, + {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:7d5aaac37d19b2904bb9dfe12cdb08c8443e7ba7d2852894ad448d4b8f442863"}, + {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:54beabb809ffcacbd9d28ac57b0db46e42a6e341a030293fb3185c409e626b8b"}, + {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bac8d525a8dbc2a1507ec731d2867025d11ceadcb4dd421423a5d42c56818541"}, + {file = "yarl-1.9.4-cp310-cp310-win32.whl", hash = "sha256:7855426dfbddac81896b6e533ebefc0af2f132d4a47340cee6d22cac7190022d"}, + {file = "yarl-1.9.4-cp310-cp310-win_amd64.whl", hash = "sha256:848cd2a1df56ddbffeb375535fb62c9d1645dde33ca4d51341378b3f5954429b"}, + {file = "yarl-1.9.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:35a2b9396879ce32754bd457d31a51ff0a9d426fd9e0e3c33394bf4b9036b099"}, + {file = "yarl-1.9.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c7d56b293cc071e82532f70adcbd8b61909eec973ae9d2d1f9b233f3d943f2c"}, + {file = "yarl-1.9.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d8a1c6c0be645c745a081c192e747c5de06e944a0d21245f4cf7c05e457c36e0"}, + {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b3c1ffe10069f655ea2d731808e76e0f452fc6c749bea04781daf18e6039525"}, + {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:549d19c84c55d11687ddbd47eeb348a89df9cb30e1993f1b128f4685cd0ebbf8"}, + {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7409f968456111140c1c95301cadf071bd30a81cbd7ab829169fb9e3d72eae9"}, + {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e23a6d84d9d1738dbc6e38167776107e63307dfc8ad108e580548d1f2c587f42"}, + {file = "yarl-1.9.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d8b889777de69897406c9fb0b76cdf2fd0f31267861ae7501d93003d55f54fbe"}, + {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:03caa9507d3d3c83bca08650678e25364e1843b484f19986a527630ca376ecce"}, + {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4e9035df8d0880b2f1c7f5031f33f69e071dfe72ee9310cfc76f7b605958ceb9"}, + {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:c0ec0ed476f77db9fb29bca17f0a8fcc7bc97ad4c6c1d8959c507decb22e8572"}, + {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:ee04010f26d5102399bd17f8df8bc38dc7ccd7701dc77f4a68c5b8d733406958"}, + {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:49a180c2e0743d5d6e0b4d1a9e5f633c62eca3f8a86ba5dd3c471060e352ca98"}, + {file = "yarl-1.9.4-cp311-cp311-win32.whl", hash = "sha256:81eb57278deb6098a5b62e88ad8281b2ba09f2f1147c4767522353eaa6260b31"}, + {file = "yarl-1.9.4-cp311-cp311-win_amd64.whl", hash = "sha256:d1d2532b340b692880261c15aee4dc94dd22ca5d61b9db9a8a361953d36410b1"}, + {file = "yarl-1.9.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0d2454f0aef65ea81037759be5ca9947539667eecebca092733b2eb43c965a81"}, + {file = "yarl-1.9.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:44d8ffbb9c06e5a7f529f38f53eda23e50d1ed33c6c869e01481d3fafa6b8142"}, + {file = "yarl-1.9.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:aaaea1e536f98754a6e5c56091baa1b6ce2f2700cc4a00b0d49eca8dea471074"}, + {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3777ce5536d17989c91696db1d459574e9a9bd37660ea7ee4d3344579bb6f129"}, + {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fc5fc1eeb029757349ad26bbc5880557389a03fa6ada41703db5e068881e5f2"}, + {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ea65804b5dc88dacd4a40279af0cdadcfe74b3e5b4c897aa0d81cf86927fee78"}, + {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa102d6d280a5455ad6a0f9e6d769989638718e938a6a0a2ff3f4a7ff8c62cc4"}, + {file = "yarl-1.9.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09efe4615ada057ba2d30df871d2f668af661e971dfeedf0c159927d48bbeff0"}, + {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:008d3e808d03ef28542372d01057fd09168419cdc8f848efe2804f894ae03e51"}, + {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:6f5cb257bc2ec58f437da2b37a8cd48f666db96d47b8a3115c29f316313654ff"}, + {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:992f18e0ea248ee03b5a6e8b3b4738850ae7dbb172cc41c966462801cbf62cf7"}, + {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:0e9d124c191d5b881060a9e5060627694c3bdd1fe24c5eecc8d5d7d0eb6faabc"}, + {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3986b6f41ad22988e53d5778f91855dc0399b043fc8946d4f2e68af22ee9ff10"}, + {file = "yarl-1.9.4-cp312-cp312-win32.whl", hash = "sha256:4b21516d181cd77ebd06ce160ef8cc2a5e9ad35fb1c5930882baff5ac865eee7"}, + {file = "yarl-1.9.4-cp312-cp312-win_amd64.whl", hash = "sha256:a9bd00dc3bc395a662900f33f74feb3e757429e545d831eef5bb280252631984"}, + {file = "yarl-1.9.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:63b20738b5aac74e239622d2fe30df4fca4942a86e31bf47a81a0e94c14df94f"}, + {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7d7f7de27b8944f1fee2c26a88b4dabc2409d2fea7a9ed3df79b67277644e17"}, + {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c74018551e31269d56fab81a728f683667e7c28c04e807ba08f8c9e3bba32f14"}, + {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca06675212f94e7a610e85ca36948bb8fc023e458dd6c63ef71abfd482481aa5"}, + {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5aef935237d60a51a62b86249839b51345f47564208c6ee615ed2a40878dccdd"}, + {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b134fd795e2322b7684155b7855cc99409d10b2e408056db2b93b51a52accc7"}, + {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d25039a474c4c72a5ad4b52495056f843a7ff07b632c1b92ea9043a3d9950f6e"}, + {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f7d6b36dd2e029b6bcb8a13cf19664c7b8e19ab3a58e0fefbb5b8461447ed5ec"}, + {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:957b4774373cf6f709359e5c8c4a0af9f6d7875db657adb0feaf8d6cb3c3964c"}, + {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:d7eeb6d22331e2fd42fce928a81c697c9ee2d51400bd1a28803965883e13cead"}, + {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6a962e04b8f91f8c4e5917e518d17958e3bdee71fd1d8b88cdce74dd0ebbf434"}, + {file = "yarl-1.9.4-cp37-cp37m-win32.whl", hash = "sha256:f3bc6af6e2b8f92eced34ef6a96ffb248e863af20ef4fde9448cc8c9b858b749"}, + {file = "yarl-1.9.4-cp37-cp37m-win_amd64.whl", hash = "sha256:ad4d7a90a92e528aadf4965d685c17dacff3df282db1121136c382dc0b6014d2"}, + {file = "yarl-1.9.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ec61d826d80fc293ed46c9dd26995921e3a82146feacd952ef0757236fc137be"}, + {file = "yarl-1.9.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8be9e837ea9113676e5754b43b940b50cce76d9ed7d2461df1af39a8ee674d9f"}, + {file = "yarl-1.9.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bef596fdaa8f26e3d66af846bbe77057237cb6e8efff8cd7cc8dff9a62278bbf"}, + {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d47552b6e52c3319fede1b60b3de120fe83bde9b7bddad11a69fb0af7db32f1"}, + {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84fc30f71689d7fc9168b92788abc977dc8cefa806909565fc2951d02f6b7d57"}, + {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4aa9741085f635934f3a2583e16fcf62ba835719a8b2b28fb2917bb0537c1dfa"}, + {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:206a55215e6d05dbc6c98ce598a59e6fbd0c493e2de4ea6cc2f4934d5a18d130"}, + {file = "yarl-1.9.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07574b007ee20e5c375a8fe4a0789fad26db905f9813be0f9fef5a68080de559"}, + {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5a2e2433eb9344a163aced6a5f6c9222c0786e5a9e9cac2c89f0b28433f56e23"}, + {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6ad6d10ed9b67a382b45f29ea028f92d25bc0bc1daf6c5b801b90b5aa70fb9ec"}, + {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:6fe79f998a4052d79e1c30eeb7d6c1c1056ad33300f682465e1b4e9b5a188b78"}, + {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a825ec844298c791fd28ed14ed1bffc56a98d15b8c58a20e0e08c1f5f2bea1be"}, + {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8619d6915b3b0b34420cf9b2bb6d81ef59d984cb0fde7544e9ece32b4b3043c3"}, + {file = "yarl-1.9.4-cp38-cp38-win32.whl", hash = "sha256:686a0c2f85f83463272ddffd4deb5e591c98aac1897d65e92319f729c320eece"}, + {file = "yarl-1.9.4-cp38-cp38-win_amd64.whl", hash = "sha256:a00862fb23195b6b8322f7d781b0dc1d82cb3bcac346d1e38689370cc1cc398b"}, + {file = "yarl-1.9.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:604f31d97fa493083ea21bd9b92c419012531c4e17ea6da0f65cacdcf5d0bd27"}, + {file = "yarl-1.9.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8a854227cf581330ffa2c4824d96e52ee621dd571078a252c25e3a3b3d94a1b1"}, + {file = "yarl-1.9.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ba6f52cbc7809cd8d74604cce9c14868306ae4aa0282016b641c661f981a6e91"}, + {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a6327976c7c2f4ee6816eff196e25385ccc02cb81427952414a64811037bbc8b"}, + {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8397a3817d7dcdd14bb266283cd1d6fc7264a48c186b986f32e86d86d35fbac5"}, + {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e0381b4ce23ff92f8170080c97678040fc5b08da85e9e292292aba67fdac6c34"}, + {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23d32a2594cb5d565d358a92e151315d1b2268bc10f4610d098f96b147370136"}, + {file = "yarl-1.9.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ddb2a5c08a4eaaba605340fdee8fc08e406c56617566d9643ad8bf6852778fc7"}, + {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:26a1dc6285e03f3cc9e839a2da83bcbf31dcb0d004c72d0730e755b33466c30e"}, + {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:18580f672e44ce1238b82f7fb87d727c4a131f3a9d33a5e0e82b793362bf18b4"}, + {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:29e0f83f37610f173eb7e7b5562dd71467993495e568e708d99e9d1944f561ec"}, + {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:1f23e4fe1e8794f74b6027d7cf19dc25f8b63af1483d91d595d4a07eca1fb26c"}, + {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:db8e58b9d79200c76956cefd14d5c90af54416ff5353c5bfd7cbe58818e26ef0"}, + {file = "yarl-1.9.4-cp39-cp39-win32.whl", hash = "sha256:c7224cab95645c7ab53791022ae77a4509472613e839dab722a72abe5a684575"}, + {file = "yarl-1.9.4-cp39-cp39-win_amd64.whl", hash = "sha256:824d6c50492add5da9374875ce72db7a0733b29c2394890aef23d533106e2b15"}, + {file = "yarl-1.9.4-py3-none-any.whl", hash = "sha256:928cecb0ef9d5a7946eb6ff58417ad2fe9375762382f1bf5c55e61645f2c43ad"}, + {file = "yarl-1.9.4.tar.gz", hash = "sha256:566db86717cf8080b99b58b083b773a908ae40f06681e87e589a976faf8246bf"}, ] [package.dependencies] @@ -1831,20 +1944,20 @@ multidict = ">=4.0" [[package]] name = "zipp" -version = "3.17.0" +version = "3.18.1" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" files = [ - {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, - {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, + {file = "zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b"}, + {file = "zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [metadata] lock-version = "2.0" -python-versions = "^3.9" -content-hash = "7dc51b7cbbd935048b1b613952815663128eb15b811439eb79f56feccda18ad2" +python-versions = "^3.10" +content-hash = "5f01bd26a3a37a88f1e4c7a8ad070e9af52e05246bbecf6234d75cddcbb1f16a" diff --git a/pyproject.toml b/pyproject.toml index 1eb6c8ff8..0ebd7cbe2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Mikhail Yohman "] license = "GPLv3" [tool.poetry.dependencies] -python = "^3.9" +python = "^3.10" ansible-core = "2.15.9" black = "*" codecov = "*" @@ -15,7 +15,7 @@ deepdiff = "*" cryptography = "*" jinja2 = "*" jmespath = "*" -pynetbox = "^7" +pynetbox = "^7.3" pytest = "*" pytest-mock = "*" pytest-xdist = "*" @@ -27,6 +27,7 @@ importlib-metadata = "*" pylint = "*" pytz = "*" packaging = "*" +importlib-resources = "*" [tool.poetry.dev-dependencies] diff --git a/tests/integration/netbox-deploy.py b/tests/integration/netbox-deploy.py index de5e080e4..60f7a4161 100755 --- a/tests/integration/netbox-deploy.py +++ b/tests/integration/netbox-deploy.py @@ -576,7 +576,10 @@ def make_netbox_calls(endpoint, payload): "type": "vxlan", }, ] -created_l2vpns = make_netbox_calls(nb.ipam.l2vpns, l2vpns) +if nb_version >= version.parse("3.7"): + created_l2vpns = make_netbox_calls(nb.vpn.l2vpns, l2vpns) +else: + created_l2vpns = make_netbox_calls(nb.ipam.l2vpns, l2vpns) if ERRORS: sys.exit( diff --git a/tests/integration/targets/inventory-v4.0/.gitignore b/tests/integration/targets/inventory-v4.0/.gitignore new file mode 100644 index 000000000..df76504d5 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/.gitignore @@ -0,0 +1 @@ +runme_config \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/aliases b/tests/integration/targets/inventory-v4.0/aliases new file mode 100644 index 000000000..a3a2089b9 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/aliases @@ -0,0 +1 @@ +# https://docs.ansible.com/ansible/devel/dev_guide/testing/sanity/integration-aliases.html diff --git a/tests/integration/targets/inventory-v4.0/compare_inventory_json.py b/tests/integration/targets/inventory-v4.0/compare_inventory_json.py new file mode 100755 index 000000000..40a032ca0 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/compare_inventory_json.py @@ -0,0 +1,152 @@ +#!/usr/bin/env python + +# Inspired by community.aws collection script_inventory_ec2 test +# https://github.com/ansible-collections/community.aws/blob/master/tests/integration/targets/script_inventory_ec2/inventory_diff.py + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +import argparse +import json +import sys +from operator import itemgetter + +from deepdiff import DeepDiff + +# NetBox includes "created" and "last_updated" times on objects. These end up in the interfaces objects that are included verbatim from the NetBox API. +# "url" may be different if local tests use a different host/port +# Remove these from files saved in git as test data +KEYS_REMOVE = frozenset(["created", "last_updated", "url"]) + +# Ignore these when performing diffs as they will be different for each test run +# (Was previously keys specific to NetBox 2.6) +KEYS_IGNORE = frozenset() + +# Rack Groups became hierarchical in NetBox 2.8. Don't bother comparing against test data in NetBox 2.7 +KEYS_IGNORE_27 = frozenset( + [ + "rack_groups", # host var + "rack_group_parent_rack_group", # group, group_names_raw = False + "parent_rack_group", # group, group_names_raw = True + ] +) + + +# Assume the object will not be recursive, as it originally came from JSON +def remove_keys(obj, keys): + if isinstance(obj, dict): + keys_to_remove = keys.intersection(obj.keys()) + for key in keys_to_remove: + del obj[key] + + for key, value in obj.items(): + remove_keys(value, keys) + + elif isinstance(obj, list): + # Iterate over temporary copy, as we may remove items + for item in obj[:]: + if isinstance(item, str) and item in keys: + # List contains a string that we want to remove + # eg. a group name in list of groups + obj.remove(item) + remove_keys(item, keys) + + +def sort_hostvar_arrays(obj): + meta = obj.get("_meta") + if not meta: + return + + hostvars = meta.get("hostvars") + if not hostvars: + return + + for _, host in hostvars.items(): + if interfaces := host.get("interfaces"): + host["interfaces"] = sorted(interfaces, key=itemgetter("id")) + + if services := host.get("services"): + host["services"] = sorted(services, key=itemgetter("id")) + + +def read_json(filename): + with open(filename, "r", encoding="utf-8") as file: + return json.loads(file.read()) + + +def write_json(filename, data): + with open(filename, "w", encoding="utf-8") as file: + json.dump(data, file, indent=4) + + +def main(): + parser = argparse.ArgumentParser(description="Diff Ansible inventory JSON output") + parser.add_argument( + "filename_a", + metavar="ORIGINAL.json", + type=str, + help="Original json to test against", + ) + parser.add_argument( + "filename_b", + metavar="NEW.json", + type=str, + help="Newly generated json to compare against original", + ) + parser.add_argument( + "--write", + action="store_true", + help=( + "When comparing files, various keys are removed. " + "This option will not compare the files, and instead writes ORIGINAL.json to NEW.json after removing these keys. " + "This is used to clean the test json files before saving to the git repo. " + "For example, this removes dates. " + ), + ) + parser.add_argument( + "--netbox-version", + metavar="VERSION", + type=str, + help=( + "Apply comparison specific to NetBox version. " + "For example, rack_groups arrays will only contain a single item in v2.7, so are ignored in the comparison." + ), + ) + + args = parser.parse_args() + + data_a = read_json(args.filename_a) + + if args.write: + # When writing test data, only remove "remove_keys" that will change on every git commit. + # This makes diffs more easily readable to ensure changes to test data look correct. + remove_keys(data_a, KEYS_REMOVE) + sort_hostvar_arrays(data_a) + write_json(args.filename_b, data_a) + + else: + data_b = read_json(args.filename_b) + + # Ignore keys that we don't want to diff, in addition to the ones removed that change on every commit + keys = KEYS_REMOVE.union(KEYS_IGNORE) + remove_keys(data_a, keys) + remove_keys(data_b, keys) + + sort_hostvar_arrays(data_a) + sort_hostvar_arrays(data_b) + + # Perform the diff + result = DeepDiff(data_a, data_b, ignore_order=True) + + if result: + # Dictionary is not empty - print differences + print(json.dumps(result, sort_keys=True, indent=4)) + sys.exit(1) + else: + # Success, no differences + sys.exit(0) + + +if __name__ == "__main__": + main() diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-bearer-token.json b/tests/integration/targets/inventory-v4.0/files/test-inventory-bearer-token.json new file mode 100644 index 000000000..27ac908c5 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-bearer-token.json @@ -0,0 +1,1417 @@ +{ + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "config_context": {}, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [], + "manufacturer": "cisco", + "rack": "Test Rack Site 2", + "rack_role": "test-rack-role", + "regions": [], + "role": "core-switch", + "serial": "", + "services": [], + "site": "test-site2", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "config_context": {}, + "custom_fields": {}, + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.577667Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" + }, + "display": "Ethernet2/1", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "created": "2024-05-13T19:51:41.876821Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "last_updated": "2024-05-13T19:51:41.876825Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.577671Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.564397Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "Ethernet1/1", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "created": "2024-05-13T19:51:41.784351Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "last_updated": "2024-05-13T19:51:41.784356Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.564404Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:41.659099Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.659103Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.463448Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "telnet (TCP/23)", + "id": 3, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.463452Z", + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.385426Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 11, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.385430Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/11/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.392103Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 12, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.392108Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/12/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [], + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.468448Z", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "id": 4, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.468451Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "config_context": {}, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "config_context": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.606846Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet1", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "created": "2024-05-13T19:51:41.771940Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "last_updated": "2024-05-13T19:51:41.771946Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.606851Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.617680Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet2", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "created": "2024-05-13T19:51:41.778277Z", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "last_updated": "2024-05-13T19:51:41.778280Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.617684Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:41.648568Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.648573Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.443759Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "ssh (TCP/22)", + "id": 1, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.443763Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", + "virtual_machine": null + }, + { + "comments": "", + "created": "2024-05-13T19:51:42.449954Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "http (TCP/80)", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" + } + ], + "last_updated": "2024-05-13T19:51:42.449957Z", + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.317118Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.317123Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.324758Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.324762Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.331470Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.331474Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.338401Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.338405Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.345785Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.345789Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.352485Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.352489Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.359111Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.359115Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.365791Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.365795Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.372298Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.372302Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.378872Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.378876Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [], + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "all": { + "children": [ + "ungrouped", + "site_test_site2", + "region_other_region", + "region_parent_region", + "site_group_other_site_group", + "site_group_parent_site_group", + "rack_Test_Rack_Site_2", + "rack_role_test_rack_role", + "role_core_switch", + "device_type_cisco_test", + "manufacturer_cisco", + "status_active", + "device_type_nexus_parent", + "service_telnet", + "rack_Test_Rack", + "service_ssh", + "service_http", + "cluster_Test_Cluster_2", + "cluster_type_test_cluster_type", + "is_virtual", + "cluster_Test_Cluster", + "cluster_group_test_cluster_group" + ] + }, + "cluster_Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "cluster_group_test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_type_test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "device_type_cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "device_type_nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "location_parent_rack_group": { + "children": [ + "location_test_rack_group" + ] + }, + "location_test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "manufacturer_cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "rack_Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "rack_Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "rack_role_test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "region_parent_region": { + "children": [ + "region_test_region" + ] + }, + "region_test_region": { + "children": [ + "site_test_site" + ] + }, + "role_core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "service_http": { + "hosts": [ + "test100" + ] + }, + "service_ssh": { + "hosts": [ + "test100", + "Test VM With Spaces" + ] + }, + "service_telnet": { + "hosts": [ + "Test Nexus One" + ] + }, + "site_group_parent_site_group": { + "children": [ + "site_group_test_site_group" + ] + }, + "site_test_site": { + "children": [ + "location_parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "site_test_site2": { + "hosts": [ + "R1-Device" + ] + }, + "status_active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-bearer-token.yml b/tests/integration/targets/inventory-v4.0/files/test-inventory-bearer-token.yml new file mode 100644 index 000000000..6af9a1339 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-bearer-token.yml @@ -0,0 +1,32 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: "http://localhost:32768" +token: + type: Token + value: "0123456789abcdef0123456789abcdef01234567" +validate_certs: False + +config_context: True +plurals: False +interfaces: True +services: True + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - services + - status diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2-filter.json b/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2-filter.json new file mode 100644 index 000000000..68e493db8 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2-filter.json @@ -0,0 +1,1233 @@ +{ + "_meta": { + "hostvars": { + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "config_context": {}, + "custom_fields": {}, + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.577667Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" + }, + "display": "Ethernet2/1", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "created": "2024-05-13T19:51:41.876821Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "last_updated": "2024-05-13T19:51:41.876825Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.577671Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.564397Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "Ethernet1/1", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "created": "2024-05-13T19:51:41.784351Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "last_updated": "2024-05-13T19:51:41.784356Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.564404Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:41.659099Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.659103Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.463448Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "telnet (TCP/23)", + "id": 3, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.463452Z", + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "config_context": {}, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "config_context": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.606846Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet1", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "created": "2024-05-13T19:51:41.771940Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "last_updated": "2024-05-13T19:51:41.771946Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.606851Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.617680Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet2", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "created": "2024-05-13T19:51:41.778277Z", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "last_updated": "2024-05-13T19:51:41.778280Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.617684Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:41.648568Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.648573Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.443759Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "ssh (TCP/22)", + "id": 1, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.443763Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", + "virtual_machine": null + }, + { + "comments": "", + "created": "2024-05-13T19:51:42.449954Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "http (TCP/80)", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" + } + ], + "last_updated": "2024-05-13T19:51:42.449957Z", + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.317118Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.317123Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.324758Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.324762Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.331470Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.331474Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.338401Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.338405Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.345785Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.345789Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.352485Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.352489Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.359111Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.359115Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.365791Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.365795Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.372298Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.372302Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.378872Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.378876Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "all": { + "children": [ + "ungrouped", + "site_test_site2", + "region_other_region", + "region_parent_region", + "site_group_other_site_group", + "site_group_parent_site_group", + "role_core_switch", + "device_type_nexus_parent", + "manufacturer_cisco", + "service_telnet", + "status_active", + "rack_Test_Rack", + "device_type_cisco_test", + "service_ssh", + "service_http", + "cluster_Test_Cluster", + "cluster_group_test_cluster_group", + "cluster_type_test_cluster_type", + "is_virtual" + ] + }, + "cluster_Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_group_test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_type_test_cluster_type": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "device_type_cisco_test": { + "hosts": [ + "TestDeviceR1", + "test100" + ] + }, + "device_type_nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "is_virtual": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "location_parent_rack_group": { + "children": [ + "location_test_rack_group" + ] + }, + "location_test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "manufacturer_cisco": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "rack_Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "region_parent_region": { + "children": [ + "region_test_region" + ] + }, + "region_test_region": { + "children": [ + "site_test_site" + ] + }, + "role_core_switch": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "service_http": { + "hosts": [ + "test100" + ] + }, + "service_ssh": { + "hosts": [ + "test100" + ] + }, + "service_telnet": { + "hosts": [ + "Test Nexus One" + ] + }, + "site_group_parent_site_group": { + "children": [ + "site_group_test_site_group" + ] + }, + "site_test_site": { + "children": [ + "location_parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "status_active": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2-filter.yml b/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2-filter.yml new file mode 100644 index 000000000..1dbc1993f --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2-filter.yml @@ -0,0 +1,33 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: "http://localhost:32768" +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: False + +config_context: True +plurals: False +interfaces: True +services: True + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - services + - status + +query_filters: + - site: "{{ 'TEST-SITE' | lower }}" diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2.json b/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2.json new file mode 100644 index 000000000..d104c5cea --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2.json @@ -0,0 +1,384 @@ +{ + "Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "locations": [], + "manufacturer": "cisco", + "rack": "Test Rack Site 2", + "rack_id": "1", + "rack_role": "test-rack-role", + "regions": [], + "role": "core-switch", + "serial": "", + "site": "test-site2", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "rack_id": "2", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "VC1": { + "ansible_host": "nexus.example.com", + "custom_fields": {}, + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "local_context_data": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "disk": 170, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "active": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "all": { + "children": [ + "ungrouped", + "test_site2", + "other_region", + "parent_region", + "other_site_group", + "parent_site_group", + "Test_Rack_Site_2", + "test_rack_role", + "core_switch", + "cisco_test", + "cisco", + "active", + "nexus_parent", + "jinja_test_group", + "Test_Rack", + "Test_Cluster_2", + "test_cluster_type", + "is_virtual", + "Test_Cluster", + "test_cluster_group" + ] + }, + "cisco": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "core_switch": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "jinja_test_group": { + "hosts": [ + "TestDeviceR1", + "Test VM With Spaces" + ] + }, + "nexus_parent": { + "hosts": [ + "VC1" + ] + }, + "parent_rack_group": { + "children": [ + "test_rack_group" + ] + }, + "parent_region": { + "children": [ + "test_region" + ] + }, + "parent_site_group": { + "children": [ + "test_site_group" + ] + }, + "test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "test_rack_group": { + "hosts": [ + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "test_region": { + "children": [ + "test_site" + ] + }, + "test_site": { + "children": [ + "parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_site2": { + "hosts": [ + "R1-Device" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2.yml b/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2.yml new file mode 100644 index 000000000..44ad6f16f --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-jinja2.yml @@ -0,0 +1,62 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: "http://localhost:32768" +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: False + +# Cache is not for performance of tests, but to test the caching option works +# Also set on test-inventory-plurals.yml so that we actually hit the cache on one of these runs +cache: True +cache_timeout: 3600 +cache_plugin: jsonfile +cache_connection: /tmp/inventory_netbox + +config_context: False +plurals: False +interfaces: False +services: False +group_names_raw: True +virtual_chassis_name: True +dns_name: True +ansible_host_dns_name: True + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status + +query_filters: "" + +device_query_filters: + - role: "{{ 'CORE-SWITCH' | lower }}" + +vm_query_filters: + - cluster_type: "{{ 'TEST-CLUSTER-TYPE' | lower }}" + +# See Constructed for details +# https://docs.ansible.com/ansible/latest/plugins/inventory/constructed.html + +compose: + rack_id: rack.id + ntp_servers: config_context.ntp_servers + +keyed_groups: + - prefix: rack + key: rack.name + +groups: + jinja_test_group: inventory_hostname.startswith('Test') diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-legacy.json b/tests/integration/targets/inventory-v4.0/files/test-inventory-legacy.json new file mode 100644 index 000000000..763de9f25 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-legacy.json @@ -0,0 +1,449 @@ +{ + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [], + "manufacturers": [ + "cisco" + ], + "rack_role": "test-rack-role", + "racks": [ + "Test Rack Site 2" + ], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site2" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "nexus-parent" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.463448Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "telnet (TCP/23)", + "id": 3, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.463452Z", + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.468448Z", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "id": 4, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.468451Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "racks": [ + "Test Rack" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB12345678", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.443759Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "ssh (TCP/22)", + "id": 1, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.443763Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", + "virtual_machine": null + }, + { + "comments": "", + "created": "2024-05-13T19:51:42.449954Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "http (TCP/80)", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" + } + ], + "last_updated": "2024-05-13T19:51:42.449957Z", + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "disk": 170, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "all": { + "children": [ + "ungrouped" + ] + }, + "ungrouped": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-legacy.yml b/tests/integration/targets/inventory-v4.0/files/test-inventory-legacy.yml new file mode 100644 index 000000000..d10721865 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-legacy.yml @@ -0,0 +1,10 @@ +--- +# To generate the json result, I checked out nb_inventory.yml from the v0.2.0 release 2d6894b, +# and then ran it against this inventory with the latest test data. + +# Checks that substantial work on the inventory does not diverge from what existing users are using by default. + +plugin: netbox.netbox.nb_inventory +api_endpoint: "http://localhost:32768" +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-noracks.json b/tests/integration/targets/inventory-v4.0/files/test-inventory-noracks.json new file mode 100644 index 000000000..4e4190074 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-noracks.json @@ -0,0 +1,1447 @@ +{ + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [], + "is_virtual": false, + "local_context_data": [ + null + ], + "manufacturers": [ + "cisco" + ], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site2" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "nexus-parent" + ], + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.577667Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" + }, + "display": "Ethernet2/1", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "created": "2024-05-13T19:51:41.876821Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "last_updated": "2024-05-13T19:51:41.876825Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.577671Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.564397Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "Ethernet1/1", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "created": "2024-05-13T19:51:41.784351Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "last_updated": "2024-05-13T19:51:41.784356Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.564404Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:41.659099Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.659103Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "manufacturers": [ + "cisco" + ], + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.463448Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "telnet (TCP/23)", + "id": 3, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.463452Z", + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.385426Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 11, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.385430Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/11/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.392103Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 12, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.392108Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/12/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [], + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.468448Z", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "id": 4, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.468451Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [], + "is_virtual": false, + "local_context_data": [ + null + ], + "manufacturers": [ + "cisco" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB12345678", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "config_context": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.606846Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet1", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "created": "2024-05-13T19:51:41.771940Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "last_updated": "2024-05-13T19:51:41.771946Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.606851Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.617680Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet2", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "created": "2024-05-13T19:51:41.778277Z", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "last_updated": "2024-05-13T19:51:41.778280Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.617684Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:41.648568Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.648573Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "manufacturers": [ + "cisco" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.443759Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "ssh (TCP/22)", + "id": 1, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.443763Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", + "virtual_machine": null + }, + { + "comments": "", + "created": "2024-05-13T19:51:42.449954Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "http (TCP/80)", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" + } + ], + "last_updated": "2024-05-13T19:51:42.449957Z", + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.317118Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.317123Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.324758Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.324762Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.331470Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.331474Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.338401Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.338405Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.345785Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.345789Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.352485Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.352489Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.359111Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.359115Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.365791Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.365795Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.372298Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.372302Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.378872Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.378876Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "regions": [], + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "all": { + "children": [ + "ungrouped", + "sites_test_site2", + "region_other_region", + "region_parent_region", + "site_group_other_site_group", + "site_group_parent_site_group", + "device_roles_core_switch", + "device_types_cisco_test", + "manufacturers_cisco", + "status_active", + "device_types_nexus_parent", + "cluster_Test_Cluster_2", + "cluster_type_test_cluster_type", + "is_virtual", + "cluster_Test_Cluster", + "cluster_group_test_cluster_group" + ] + }, + "cluster_Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "cluster_group_test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_type_test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "device_roles_core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "device_types_cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "device_types_nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "location_parent_rack_group": { + "children": [ + "location_test_rack_group" + ] + }, + "location_test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "manufacturers_cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "region_parent_region": { + "children": [ + "region_test_region" + ] + }, + "region_test_region": { + "children": [ + "sites_test_site" + ] + }, + "site_group_parent_site_group": { + "children": [ + "site_group_test_site_group" + ] + }, + "sites_test_site": { + "children": [ + "location_parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "sites_test_site2": { + "hosts": [ + "R1-Device" + ] + }, + "status_active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-noracks.yml b/tests/integration/targets/inventory-v4.0/files/test-inventory-noracks.yml new file mode 100644 index 000000000..28f08f19d --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-noracks.yml @@ -0,0 +1,28 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: "http://localhost:32768" +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +config_context: True +plurals: True +interfaces: True +services: True +racks: False + +group_by: + - sites + - tenants + - location + - tags + - device_roles + - device_types + - manufacturers + - platforms + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-options-flatten.json b/tests/integration/targets/inventory-v4.0/files/test-inventory-options-flatten.json new file mode 100644 index 000000000..e709203f4 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-options-flatten.json @@ -0,0 +1,1372 @@ +{ + "Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [], + "manufacturer": "cisco", + "rack": "Test Rack Site 2", + "rack_role": "test-rack-role", + "regions": [], + "role": "core-switch", + "serial": "", + "services": [], + "site": "test-site2", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T18:42:37.096176Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" + }, + "display": "Ethernet2/1", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "created": "2024-05-13T18:42:37.310118Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "last_updated": "2024-05-13T18:42:37.310121Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.096180Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T18:42:37.082569Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "Ethernet1/1", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "created": "2024-05-13T18:42:37.304490Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "last_updated": "2024-05-13T18:42:37.304494Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.082575Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.177570Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.177574Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "services": [ + { + "comments": "", + "created": "2024-05-13T18:42:37.967206Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "telnet (TCP/23)", + "id": 3, + "ipaddresses": [], + "last_updated": "2024-05-13T18:42:37.967211Z", + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.888581Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 11, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.888585Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/11/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.895332Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 12, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.895336Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/12/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [], + "services": [ + { + "comments": "", + "created": "2024-05-13T18:42:37.972348Z", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "id": 4, + "ipaddresses": [], + "last_updated": "2024-05-13T18:42:37.972351Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "device_type": "cisco-test", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T18:42:37.126588Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet1", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "created": "2024-05-13T18:42:37.291898Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "last_updated": "2024-05-13T18:42:37.291904Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.126594Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T18:42:37.137551Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet2", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "created": "2024-05-13T18:42:37.298655Z", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "last_updated": "2024-05-13T18:42:37.298668Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.137554Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.167058Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.167063Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "ntp_servers": [ + "pool.ntp.org" + ], + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "created": "2024-05-13T18:42:37.947125Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "ssh (TCP/22)", + "id": 1, + "ipaddresses": [], + "last_updated": "2024-05-13T18:42:37.947130Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", + "virtual_machine": null + }, + { + "comments": "", + "created": "2024-05-13T18:42:37.953341Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "http (TCP/80)", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" + } + ], + "last_updated": "2024-05-13T18:42:37.953344Z", + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.819447Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.819452Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.827324Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.827329Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.835002Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.835006Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.841967Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.841971Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.848584Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.848588Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.855261Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.855265Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.862048Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.862052Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.868723Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.868727Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.875318Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.875321Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.881944Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.881948Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [], + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "all": { + "children": [ + "ungrouped", + "test_site2", + "other_region", + "parent_region", + "other_site_group", + "parent_site_group", + "Test_Rack_Site_2", + "test_rack_role", + "core_switch", + "cisco_test", + "cisco", + "active", + "nexus_parent", + "Test_Rack", + "Test_Cluster_2", + "test_cluster_type", + "is_virtual", + "Test_Cluster", + "test_cluster_group" + ] + }, + "cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "parent_rack_group": { + "children": [ + "test_rack_group" + ] + }, + "parent_region": { + "children": [ + "test_region" + ] + }, + "parent_site_group": { + "children": [ + "test_site_group" + ] + }, + "test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "test_region": { + "children": [ + "test_site" + ] + }, + "test_site": { + "children": [ + "parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_site2": { + "hosts": [ + "R1-Device" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-options-flatten.yml b/tests/integration/targets/inventory-v4.0/files/test-inventory-options-flatten.yml new file mode 100644 index 000000000..989a0fdc8 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-options-flatten.yml @@ -0,0 +1,41 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: "http://localhost:32768" +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: False + +# Use cache on this test to make sure interfaces is tested via the cache +cache: True +cache_timeout: 3600 +cache_plugin: jsonfile +cache_connection: /tmp/inventory_netbox + +config_context: True +flatten_config_context: True +flatten_custom_fields: True +flatten_local_context_data: True +plurals: False +interfaces: True +services: True +fetch_all: False +max_uri_length: 0 +group_names_raw: True + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-options.json b/tests/integration/targets/inventory-v4.0/files/test-inventory-options.json new file mode 100644 index 000000000..d104c5cea --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-options.json @@ -0,0 +1,384 @@ +{ + "Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "locations": [], + "manufacturer": "cisco", + "rack": "Test Rack Site 2", + "rack_id": "1", + "rack_role": "test-rack-role", + "regions": [], + "role": "core-switch", + "serial": "", + "site": "test-site2", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "rack_id": "2", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "VC1": { + "ansible_host": "nexus.example.com", + "custom_fields": {}, + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "custom_fields": {}, + "device_type": "cisco-test", + "is_virtual": false, + "local_context_data": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "disk": 170, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "custom_fields": {}, + "is_virtual": true, + "locations": [], + "regions": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "active": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "all": { + "children": [ + "ungrouped", + "test_site2", + "other_region", + "parent_region", + "other_site_group", + "parent_site_group", + "Test_Rack_Site_2", + "test_rack_role", + "core_switch", + "cisco_test", + "cisco", + "active", + "nexus_parent", + "jinja_test_group", + "Test_Rack", + "Test_Cluster_2", + "test_cluster_type", + "is_virtual", + "Test_Cluster", + "test_cluster_group" + ] + }, + "cisco": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "core_switch": { + "hosts": [ + "R1-Device", + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "jinja_test_group": { + "hosts": [ + "TestDeviceR1", + "Test VM With Spaces" + ] + }, + "nexus_parent": { + "hosts": [ + "VC1" + ] + }, + "parent_rack_group": { + "children": [ + "test_rack_group" + ] + }, + "parent_region": { + "children": [ + "test_region" + ] + }, + "parent_site_group": { + "children": [ + "test_site_group" + ] + }, + "test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "test_rack_group": { + "hosts": [ + "VC1", + "TestDeviceR1", + "test100" + ] + }, + "test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "test_region": { + "children": [ + "test_site" + ] + }, + "test_site": { + "children": [ + "parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_site2": { + "hosts": [ + "R1-Device" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-options.yml b/tests/integration/targets/inventory-v4.0/files/test-inventory-options.yml new file mode 100644 index 000000000..f278a3aa8 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-options.yml @@ -0,0 +1,62 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: "http://localhost:32768" +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: False + +# Cache is not for performance of tests, but to test the caching option works +# Also set on test-inventory-plurals.yml so that we actually hit the cache on one of these runs +cache: True +cache_timeout: 3600 +cache_plugin: jsonfile +cache_connection: /tmp/inventory_netbox + +config_context: False +plurals: False +interfaces: False +services: False +group_names_raw: True +virtual_chassis_name: True +dns_name: True +ansible_host_dns_name: True + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status + +query_filters: "" + +device_query_filters: + - role: core-switch + +vm_query_filters: + - cluster_type: test-cluster-type + +# See Constructed for details +# https://docs.ansible.com/ansible/latest/plugins/inventory/constructed.html + +compose: + rack_id: rack.id + ntp_servers: config_context.ntp_servers + +keyed_groups: + - prefix: rack + key: rack.name + +groups: + jinja_test_group: inventory_hostname.startswith('Test') diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals-flatten.json b/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals-flatten.json new file mode 100644 index 000000000..12e096f53 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals-flatten.json @@ -0,0 +1,440 @@ +{ + "Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [], + "manufacturers": [ + "cisco" + ], + "rack_role": "test-rack-role", + "racks": [ + "Test Rack Site 2" + ], + "regions": [], + "serial": "", + "site_groups": [], + "sites": [ + "test-site2" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "device_roles": [ + "core-switch" + ], + "device_types": [ + "nexus-parent" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "racks": [ + "Test Rack" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB12345678", + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "is_virtual": false, + "local_context_data": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "ntp_servers": [ + "pool.ntp.org" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB01234567", + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "disk": 170, + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "all": { + "children": [ + "ungrouped", + "test_site2", + "other_region", + "parent_region", + "other_site_group", + "parent_site_group", + "Test_Rack_Site_2", + "test_rack_role", + "core_switch", + "cisco_test", + "cisco", + "active", + "nexus_parent", + "Test_Rack", + "Test_Cluster_2", + "test_cluster_type", + "is_virtual", + "Test_Cluster", + "test_cluster_group" + ] + }, + "cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "parent_rack_group": { + "children": [ + "test_rack_group" + ] + }, + "parent_region": { + "children": [ + "test_region" + ] + }, + "parent_site_group": { + "children": [ + "test_site_group" + ] + }, + "test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "test_region": { + "children": [ + "test_site" + ] + }, + "test_site": { + "children": [ + "parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "test_site2": { + "hosts": [ + "R1-Device" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals-flatten.yml b/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals-flatten.yml new file mode 100644 index 000000000..146b6d71c --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals-flatten.yml @@ -0,0 +1,33 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: "http://localhost:32768" +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: False + +config_context: True +flatten_config_context: True +flatten_custom_fields: True +plurals: True +interfaces: False +services: False +fetch_all: True +group_names_raw: True + +group_by: + - sites + - tenants + - racks + - location + - rack_role + - tags + - device_roles + - device_types + - manufacturers + - platforms + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals.json b/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals.json new file mode 100644 index 000000000..4ee185daf --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals.json @@ -0,0 +1,1491 @@ +{ + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [], + "manufacturers": [ + "cisco" + ], + "rack_role": "test-rack-role", + "racks": [ + "Test Rack Site 2" + ], + "regions": [], + "serial": "", + "services": [], + "site_groups": [], + "sites": [ + "test-site2" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "nexus-parent" + ], + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T18:42:37.096176Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" + }, + "display": "Ethernet2/1", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "created": "2024-05-13T18:42:37.310118Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "last_updated": "2024-05-13T18:42:37.310121Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.096180Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T18:42:37.082569Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "Ethernet1/1", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "created": "2024-05-13T18:42:37.304490Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "last_updated": "2024-05-13T18:42:37.304494Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.082575Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.177570Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.177574Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "serial": "", + "services": [ + { + "comments": "", + "created": "2024-05-13T18:42:37.967206Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "telnet (TCP/23)", + "id": 3, + "ipaddresses": [], + "last_updated": "2024-05-13T18:42:37.967211Z", + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.888581Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 11, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.888585Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/11/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.895332Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 12, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.895336Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/12/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "services": [ + { + "comments": "", + "created": "2024-05-13T18:42:37.972348Z", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "id": 4, + "ipaddresses": [], + "last_updated": "2024-05-13T18:42:37.972351Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "TestDeviceR1": { + "config_context": [ + {} + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [], + "is_virtual": false, + "local_context_data": [ + null + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "racks": [ + "Test Rack" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB12345678", + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100": { + "asset_tag": "123456789", + "config_context": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "custom_fields": {}, + "device_roles": [ + "core-switch" + ], + "device_types": [ + "cisco-test" + ], + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T18:42:37.126588Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet1", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "created": "2024-05-13T18:42:37.291898Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "last_updated": "2024-05-13T18:42:37.291904Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.126594Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T18:42:37.137551Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet2", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "created": "2024-05-13T18:42:37.298655Z", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "last_updated": "2024-05-13T18:42:37.298668Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.137554Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.167058Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T18:42:37.167063Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": [ + { + "ntp_servers": [ + "pool.ntp.org" + ] + } + ], + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturers": [ + "cisco" + ], + "regions": [ + "test-region", + "parent-region" + ], + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "created": "2024-05-13T18:42:37.947125Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "ssh (TCP/22)", + "id": 1, + "ipaddresses": [], + "last_updated": "2024-05-13T18:42:37.947130Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", + "virtual_machine": null + }, + { + "comments": "", + "created": "2024-05-13T18:42:37.953341Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "http (TCP/80)", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" + } + ], + "last_updated": "2024-05-13T18:42:37.953344Z", + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", + "virtual_machine": null + } + ], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.819447Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.819452Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.827324Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.827329Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.835002Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.835006Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.841967Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.841971Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.848584Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.848588Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.855261Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.855265Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.862048Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.862052Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.868723Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.868727Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.875318Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.875321Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T18:42:37.881944Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T18:42:37.881948Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + } + ], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site_groups": [], + "sites": [ + "test-site" + ], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": [ + {} + ], + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "local_context_data": [ + null + ], + "locations": [], + "regions": [], + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [] + } + } + }, + "all": { + "children": [ + "ungrouped", + "sites_test_site2", + "region_other_region", + "region_parent_region", + "site_group_other_site_group", + "site_group_parent_site_group", + "racks_Test_Rack_Site_2", + "rack_role_test_rack_role", + "device_roles_core_switch", + "device_types_cisco_test", + "manufacturers_cisco", + "status_active", + "device_types_nexus_parent", + "racks_Test_Rack", + "cluster_Test_Cluster_2", + "cluster_type_test_cluster_type", + "is_virtual", + "cluster_Test_Cluster", + "cluster_group_test_cluster_group" + ] + }, + "cluster_Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "cluster_group_test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_type_test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "device_roles_core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "device_types_cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "device_types_nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "location_parent_rack_group": { + "children": [ + "location_test_rack_group" + ] + }, + "location_test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "manufacturers_cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "rack_role_test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "racks_Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "racks_Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "region_parent_region": { + "children": [ + "region_test_region" + ] + }, + "region_test_region": { + "children": [ + "sites_test_site" + ] + }, + "site_group_parent_site_group": { + "children": [ + "site_group_test_site_group" + ] + }, + "sites_test_site": { + "children": [ + "location_parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "sites_test_site2": { + "hosts": [ + "R1-Device" + ] + }, + "status_active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals.yml b/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals.yml new file mode 100644 index 000000000..244231062 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory-plurals.yml @@ -0,0 +1,38 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: "http://localhost:32768" +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: false + +cache: True +cache_timeout: 3600 +cache_plugin: jsonfile +cache_connection: /tmp/inventory_netbox + +config_context: True +plurals: True +interfaces: True +services: True + +# Enough to fit only 2 devices, so tests chunking logic +max_uri_length: 80 +fetch_all: False + +group_by: + - sites + - tenants + - racks + - location + - rack_role + - tags + - device_roles + - device_types + - manufacturers + - platforms + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - status diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory.json b/tests/integration/targets/inventory-v4.0/files/test-inventory.json new file mode 100644 index 000000000..4063f3f9c --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory.json @@ -0,0 +1,1505 @@ +{ + "_meta": { + "hostvars": { + "R1-Device": { + "asset_tag": "345678901", + "config_context": {}, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [], + "manufacturer": "cisco", + "rack": "Test Rack Site 2", + "rack_role": "test-rack-role", + "regions": [], + "role": "core-switch", + "serial": "", + "services": [], + "site": "test-site2", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "Test Nexus One": { + "ansible_host": "172.16.180.12", + "config_context": {}, + "custom_fields": {}, + "device_type": "nexus-parent", + "dns_name": "nexus.example.com", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.577667Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus Child One", + "id": 5, + "name": "Test Nexus Child One", + "url": "http://localhost:32768/api/dcim/devices/5/" + }, + "display": "Ethernet2/1", + "duplex": null, + "enabled": true, + "id": 2, + "ip_addresses": [ + { + "address": "172.16.180.12/24", + "comments": "", + "created": "2024-05-13T19:51:41.876821Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.12/24", + "dns_name": "nexus.example.com", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 4, + "last_updated": "2024-05-13T19:51:41.876825Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/4/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.577671Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet2/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/2/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.564397Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "Ethernet1/1", + "duplex": null, + "enabled": true, + "id": 1, + "ip_addresses": [ + { + "address": "172.16.180.11/24", + "comments": "", + "created": "2024-05-13T19:51:41.784351Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.11/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 3, + "last_updated": "2024-05-13T19:51:41.784356Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/3/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.564404Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "Ethernet1/1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/1/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:41.659099Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.659103Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/6/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "primary_ip4": "172.16.180.12", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "", + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.463448Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "Test Nexus One", + "id": 4, + "name": "Test Nexus One", + "url": "http://localhost:32768/api/dcim/devices/4/" + }, + "display": "telnet (TCP/23)", + "id": 3, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.463452Z", + "name": "telnet", + "ports": [ + 23 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/3/", + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "Test VM With Spaces": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.385426Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 11, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.385430Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/11/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.392103Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 12, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.392108Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/12/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [], + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.468448Z", + "custom_fields": {}, + "description": "", + "device": null, + "display": "ssh (TCP/22)", + "id": 4, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.468451Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/4/", + "virtual_machine": { + "description": "", + "display": "Test VM With Spaces", + "id": 6, + "name": "Test VM With Spaces", + "url": "http://localhost:32768/api/virtualization/virtual-machines/6/" + } + } + ], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "TestDeviceR1": { + "config_context": {}, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [], + "is_virtual": false, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "rack": "Test Rack", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB12345678", + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "test100": { + "asset_tag": "123456789", + "config_context": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "custom_fields": {}, + "device_type": "cisco-test", + "interfaces": [ + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.606846Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet1", + "duplex": null, + "enabled": true, + "id": 3, + "ip_addresses": [ + { + "address": "172.16.180.1/24", + "comments": "", + "created": "2024-05-13T19:51:41.771940Z", + "custom_fields": {}, + "description": "", + "display": "172.16.180.1/24", + "dns_name": "", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "last_updated": "2024-05-13T19:51:41.771946Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.606851Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/3/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 1, + "created": "2024-05-13T19:51:41.617680Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "GigabitEthernet2", + "duplex": null, + "enabled": true, + "id": 4, + "ip_addresses": [ + { + "address": "2001::1:1/64", + "comments": "", + "created": "2024-05-13T19:51:41.778277Z", + "custom_fields": {}, + "description": "", + "display": "2001::1:1/64", + "dns_name": "", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "last_updated": "2024-05-13T19:51:41.778280Z", + "nat_inside": null, + "nat_outside": [], + "role": null, + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "tenant": null, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/", + "vrf": null + } + ], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.617684Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "GigabitEthernet2", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "1000BASE-T (1GE)", + "value": "1000base-t" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/4/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + }, + { + "_occupied": false, + "bridge": null, + "cable": null, + "cable_end": "", + "connected_endpoints": null, + "connected_endpoints_reachable": null, + "connected_endpoints_type": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:41.648568Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "wlink1", + "duplex": null, + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "label": "", + "lag": null, + "last_updated": "2024-05-13T19:51:41.648573Z", + "link_peers": [], + "link_peers_type": null, + "mac_address": null, + "mark_connected": false, + "mgmt_only": false, + "mode": null, + "module": null, + "mtu": null, + "name": "wlink1", + "parent": null, + "poe_mode": null, + "poe_type": null, + "rf_channel": null, + "rf_channel_frequency": null, + "rf_channel_width": null, + "rf_role": null, + "speed": null, + "tagged_vlans": [], + "tags": [], + "tx_power": null, + "type": { + "label": "IEEE 802.11a", + "value": "ieee802.11a" + }, + "untagged_vlan": null, + "url": "http://localhost:32768/api/dcim/interfaces/5/", + "vdcs": [], + "vrf": null, + "wireless_lans": [], + "wireless_link": null, + "wwn": null + } + ], + "is_virtual": false, + "local_context_data": { + "ntp_servers": [ + "pool.ntp.org" + ] + }, + "locations": [ + "test-rack-group", + "parent-rack-group" + ], + "manufacturer": "cisco", + "regions": [ + "test-region", + "parent-region" + ], + "role": "core-switch", + "serial": "FAB01234567", + "services": [ + { + "comments": "", + "created": "2024-05-13T19:51:42.443759Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "ssh (TCP/22)", + "id": 1, + "ipaddresses": [], + "last_updated": "2024-05-13T19:51:42.443763Z", + "name": "ssh", + "ports": [ + 22 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/1/", + "virtual_machine": null + }, + { + "comments": "", + "created": "2024-05-13T19:51:42.449954Z", + "custom_fields": {}, + "description": "", + "device": { + "description": "", + "display": "test100 (123456789)", + "id": 1, + "name": "test100", + "url": "http://localhost:32768/api/dcim/devices/1/" + }, + "display": "http (TCP/80)", + "id": 2, + "ipaddresses": [ + { + "address": "172.16.180.1/24", + "description": "", + "display": "172.16.180.1/24", + "family": { + "label": "IPv4", + "value": 4 + }, + "id": 1, + "url": "http://localhost:32768/api/ipam/ip-addresses/1/" + }, + { + "address": "2001::1:1/64", + "description": "", + "display": "2001::1:1/64", + "family": { + "label": "IPv6", + "value": 6 + }, + "id": 2, + "url": "http://localhost:32768/api/ipam/ip-addresses/2/" + } + ], + "last_updated": "2024-05-13T19:51:42.449957Z", + "name": "http", + "ports": [ + 80 + ], + "protocol": { + "label": "TCP", + "value": "tcp" + }, + "tags": [], + "url": "http://localhost:32768/api/ipam/services/2/", + "virtual_machine": null + } + ], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [ + { + "created": "2024-05-13T19:51:42.274418Z", + "custom_fields": {}, + "description": "", + "display": "disk1", + "id": 1, + "last_updated": "2024-05-13T19:51:42.274425Z", + "name": "disk1", + "size": 60, + "tags": [], + "url": "http://localhost:32768/api/virtualization/virtual-disks/1/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + } + }, + { + "created": "2024-05-13T19:51:42.279072Z", + "custom_fields": {}, + "description": "", + "display": "disk2", + "id": 2, + "last_updated": "2024-05-13T19:51:42.279077Z", + "name": "disk2", + "size": 110, + "tags": [], + "url": "http://localhost:32768/api/virtualization/virtual-disks/2/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + } + } + ] + }, + "test100-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "disk": 170, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.317118Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 1, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.317123Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/1/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.324758Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 2, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.324762Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/2/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.331470Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 3, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.331474Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/3/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.338401Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 4, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.338405Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/4/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.345785Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 5, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.345789Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/5/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [ + { + "created": "2024-05-13T19:51:42.274418Z", + "custom_fields": {}, + "description": "", + "display": "disk1", + "id": 1, + "last_updated": "2024-05-13T19:51:42.274425Z", + "name": "disk1", + "size": 60, + "tags": [], + "url": "http://localhost:32768/api/virtualization/virtual-disks/1/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + } + }, + { + "created": "2024-05-13T19:51:42.279072Z", + "custom_fields": {}, + "description": "", + "display": "disk2", + "id": 2, + "last_updated": "2024-05-13T19:51:42.279077Z", + "name": "disk2", + "size": 110, + "tags": [], + "url": "http://localhost:32768/api/virtualization/virtual-disks/2/", + "virtual_machine": { + "description": "", + "display": "test100-vm", + "id": 1, + "name": "test100-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/1/" + } + } + ] + }, + "test101-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [ + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.352485Z", + "custom_fields": {}, + "description": "", + "display": "Eth0", + "enabled": true, + "id": 6, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.352489Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth0", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/6/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.359111Z", + "custom_fields": {}, + "description": "", + "display": "Eth1", + "enabled": true, + "id": 7, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.359115Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth1", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/7/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.365791Z", + "custom_fields": {}, + "description": "", + "display": "Eth2", + "enabled": true, + "id": 8, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.365795Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth2", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/8/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.372298Z", + "custom_fields": {}, + "description": "", + "display": "Eth3", + "enabled": true, + "id": 9, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.372302Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth3", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/9/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + }, + { + "bridge": null, + "count_fhrp_groups": 0, + "count_ipaddresses": 0, + "created": "2024-05-13T19:51:42.378872Z", + "custom_fields": {}, + "description": "", + "display": "Eth4", + "enabled": true, + "id": 10, + "ip_addresses": [], + "l2vpn_termination": null, + "last_updated": "2024-05-13T19:51:42.378876Z", + "mac_address": null, + "mode": null, + "mtu": null, + "name": "Eth4", + "parent": null, + "tagged_vlans": [], + "tags": [], + "untagged_vlan": null, + "url": "http://localhost:32768/api/virtualization/interfaces/10/", + "virtual_machine": { + "description": "", + "display": "test101-vm", + "id": 2, + "name": "test101-vm", + "url": "http://localhost:32768/api/virtualization/virtual-machines/2/" + }, + "vrf": null + } + ], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "test102-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "test103-vm": { + "cluster": "Test Cluster", + "cluster_group": "test-cluster-group", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [ + "test-region", + "parent-region" + ], + "services": [], + "site": "test-site", + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + }, + "test104-vm": { + "cluster": "Test Cluster 2", + "cluster_type": "test-cluster-type", + "config_context": {}, + "custom_fields": {}, + "interfaces": [], + "is_virtual": true, + "locations": [], + "regions": [], + "services": [], + "site_groups": [], + "status": { + "label": "Active", + "value": "active" + }, + "tags": [], + "virtual_disks": [] + } + } + }, + "all": { + "children": [ + "ungrouped", + "site_test_site2", + "region_other_region", + "region_parent_region", + "site_group_other_site_group", + "site_group_parent_site_group", + "rack_Test_Rack_Site_2", + "rack_role_test_rack_role", + "role_core_switch", + "device_type_cisco_test", + "manufacturer_cisco", + "status_active", + "device_type_nexus_parent", + "service_telnet", + "rack_Test_Rack", + "service_ssh", + "service_http", + "cluster_Test_Cluster_2", + "cluster_type_test_cluster_type", + "is_virtual", + "cluster_Test_Cluster", + "cluster_group_test_cluster_group" + ] + }, + "cluster_Test_Cluster": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_Test_Cluster_2": { + "hosts": [ + "Test VM With Spaces", + "test104-vm" + ] + }, + "cluster_group_test_cluster_group": { + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "cluster_type_test_cluster_type": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "device_type_cisco_test": { + "hosts": [ + "R1-Device", + "TestDeviceR1", + "test100" + ] + }, + "device_type_nexus_parent": { + "hosts": [ + "Test Nexus One" + ] + }, + "is_virtual": { + "hosts": [ + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + }, + "location_parent_rack_group": { + "children": [ + "location_test_rack_group" + ] + }, + "location_test_rack_group": { + "hosts": [ + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "manufacturer_cisco": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "rack_Test_Rack": { + "hosts": [ + "TestDeviceR1" + ] + }, + "rack_Test_Rack_Site_2": { + "hosts": [ + "R1-Device" + ] + }, + "rack_role_test_rack_role": { + "hosts": [ + "R1-Device" + ] + }, + "region_parent_region": { + "children": [ + "region_test_region" + ] + }, + "region_test_region": { + "children": [ + "site_test_site" + ] + }, + "role_core_switch": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100" + ] + }, + "service_http": { + "hosts": [ + "test100" + ] + }, + "service_ssh": { + "hosts": [ + "test100", + "Test VM With Spaces" + ] + }, + "service_telnet": { + "hosts": [ + "Test Nexus One" + ] + }, + "site_group_parent_site_group": { + "children": [ + "site_group_test_site_group" + ] + }, + "site_test_site": { + "children": [ + "location_parent_rack_group" + ], + "hosts": [ + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm" + ] + }, + "site_test_site2": { + "hosts": [ + "R1-Device" + ] + }, + "status_active": { + "hosts": [ + "R1-Device", + "Test Nexus One", + "TestDeviceR1", + "test100", + "Test VM With Spaces", + "test100-vm", + "test101-vm", + "test102-vm", + "test103-vm", + "test104-vm" + ] + } +} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v4.0/files/test-inventory.yml b/tests/integration/targets/inventory-v4.0/files/test-inventory.yml new file mode 100644 index 000000000..8ddaac090 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/files/test-inventory.yml @@ -0,0 +1,31 @@ +--- +plugin: netbox.netbox.nb_inventory +api_endpoint: "http://localhost:32768" +token: "0123456789abcdef0123456789abcdef01234567" +validate_certs: False + +config_context: True +plurals: False +interfaces: True +virtual_disks: True +services: True + +group_by: + - site + - tenant + - rack + - location + - rack_role + - tag + - role + - device_type + - manufacturer + - platform + - region + - site_group + - cluster + - cluster_group + - cluster_type + - is_virtual + - services + - status diff --git a/tests/integration/targets/inventory-v4.0/runme.sh b/tests/integration/targets/inventory-v4.0/runme.sh new file mode 100755 index 000000000..18579c472 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/runme.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +set -o xtrace # Print commands as they're run +set -o errexit # abort on nonzero exitstatus +set -o nounset # abort on unbound variable +set -o pipefail # don't hide errors within pipes + +# Directory of this script +SCRIPT_DIR="$( dirname "${BASH_SOURCE[0]}" )" +RUNME_CONFIG="$SCRIPT_DIR/runme_config" +INVENTORIES_DIR="$SCRIPT_DIR/files" + +# Load runme_config, if exists - the only way to pass environment when run through ansible-test +if [[ -f "$RUNME_CONFIG" ]] +then + source "$RUNME_CONFIG" +fi + +declare -a COMPARE_OPTIONS # empty array + +# Check if NETBOX_VERSION has been set by runme_config, and if so, pass to compare_inventory_json.py +if [[ "${NETBOX_VERSION:-}" == "v3.5" ]] +then + COMPARE_OPTIONS+=(--netbox-version "${NETBOX_VERSION}") +fi + +# OUTPUT_DIR is set by ansible-test +# OUTPUT_INVENTORY_JSON is only set if running hacking/update_test_inventories.sh to update the test diff data +if [[ -n "${OUTPUT_INVENTORY_JSON:-}" ]] +then + OUTPUT_DIR="$OUTPUT_INVENTORY_JSON" + + # Clean up JSON fields we don't want to store and compare against in tests (creation times, etc.) + COMPARE_OPTIONS+=(--write) +fi + +echo OUTPUT_DIR="$OUTPUT_DIR" + +inventory () { + if [[ -n "${OUTPUT_INVENTORY_JSON:-}" ]] + then + # Running for the purpose of updating test data + ansible-inventory "$@" + else + # Running inside ansible-test + # Run through python.py just to make sure we've definitely got the coverage environment set up + # Just running ansible-inventory directly may not actually find the right one in PATH + python.py "$(command -v ansible-inventory)" "$@" + fi +} + + +RESULT=0 + +for INVENTORY in "$INVENTORIES_DIR"/*.yml +do + NAME="$(basename "$INVENTORY")" + NAME_WITHOUT_EXTENSION="${NAME%.yml}" + + OUTPUT_JSON="$OUTPUT_DIR/$NAME_WITHOUT_EXTENSION.json" + inventory -vvvv --list --inventory "$INVENTORY" --output="$OUTPUT_JSON" + + # Compare the output + if ! "$SCRIPT_DIR/compare_inventory_json.py" "${COMPARE_OPTIONS[@]}" "$INVENTORIES_DIR/$NAME_WITHOUT_EXTENSION.json" "$OUTPUT_JSON" + then + # Returned non-zero status + RESULT=1 + fi + +done + +exit $RESULT diff --git a/tests/integration/targets/inventory-v4.0/runme_config.template b/tests/integration/targets/inventory-v4.0/runme_config.template new file mode 100644 index 000000000..80b42a326 --- /dev/null +++ b/tests/integration/targets/inventory-v4.0/runme_config.template @@ -0,0 +1,6 @@ +# runme_config is source'd by runme.sh to set environment variables used to modify the test against different versions of NetBox. +# .travis.yml uses render_config.sh to generate it from runme_config.template +# There is no other way to pass environment variables to a runme.sh integration test. +# (integration_config.yml files are only helpful to ansible yaml-based tests) + +export NETBOX_VERSION=${VERSION} diff --git a/tests/integration/targets/regression-v4.0/tasks/main.yml b/tests/integration/targets/regression-v4.0/tasks/main.yml new file mode 100644 index 000000000..817546d47 --- /dev/null +++ b/tests/integration/targets/regression-v4.0/tasks/main.yml @@ -0,0 +1,283 @@ +--- +## +## +### TEST NETBOX CONNECTION FAILURE +## +## +- name: "TEST NETBOX CONNECTION FAILURE" + connection: local + block: + - name: "1 - Device with required information" + netbox.netbox.netbox_device: + netbox_url: "http://some-random-invalid-URL" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "R1" + device_type: "Cisco Test" + device_role: "Core Switch" + site: "Test Site" + status: "Staged" + state: present + register: test_one + ignore_errors: yes + + - name: "1 - ASSERT" + assert: + that: + - test_one is failed + - test_one['msg'] == "Failed to establish connection to NetBox API" + + - name: "2 - Check to see if netbox_prefix with parent defined will pass via check-mode" + netbox.netbox.netbox_prefix: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + parent: "10.10.0.0/16" + prefix_length: 24 + first_available: yes + state: present + register: test_two + check_mode: yes + + - name: "2 - ASSERT" + assert: + that: + - test_two is changed + - test_two['msg'] == "New prefix created within 10.10.0.0/16" + + - name: "3 - Add device with tags - Setup device to test #242" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "issue-242" + device_type: "Cisco Test" + device_role: "Core Switch" + site: "Test Site" + status: "Staged" + tags: + - slug: first + - slug: second + + - name: "4 - Add device with tags out of order - shouldn't change - Tests #242 is fixed" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "issue-242" + device_type: "Cisco Test" + device_role: "Core Switch" + site: "Test Site" + status: "Staged" + tags: + - slug: second + - slug: first + register: test_four + diff: yes + + - name: "4 - Assert not changed - Tests #242 is fixed" + assert: + that: + - not test_four["changed"] + + - name: "5 - Add device with extra tag - Tests #242 is fixed" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "issue-242" + device_type: "Cisco Test" + device_role: "Core Switch" + site: "Test Site" + status: "Staged" + asset_tag: "1234" + tags: + - slug: second + - slug: third + - slug: first + register: test_five + diff: yes + + - name: "5 - Assert added tag - Tests #242 is fixed" + assert: + that: + - test_five is changed + - test_five["diff"]["after"]["tags"] is defined + - test_five["device"]["tags"] is defined + + - name: "6 - Loop through and add interface templates to different device interface templates - Fixes #282" + netbox.netbox.netbox_device_interface_template: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "SFP+ (10GE)" + type: "SFP+ (10GE)" + device_type: "{{ item }}" + register: test_six + loop: + - "Cisco Test" + - "Arista Test" + - "Nexus Child" + - "Nexus Parent" + + - name: "6 - Assert device type is correct - Fixes #282" + assert: + that: + - test_six.results[0]["diff"]["before"]["state"] == "absent" + - test_six.results[0]["diff"]["after"]["state"] == "present" + - test_six.results[0]["interface_template"]["device_type"] == 1 + - test_six.results[1]["diff"]["before"]["state"] == "absent" + - test_six.results[1]["diff"]["after"]["state"] == "present" + - test_six.results[1]["interface_template"]["device_type"] == 2 + - test_six.results[2]["diff"]["before"]["state"] == "absent" + - test_six.results[2]["diff"]["after"]["state"] == "present" + - test_six.results[2]["interface_template"]["device_type"] == 4 + - test_six.results[3]["diff"]["before"]["state"] == "absent" + - test_six.results[3]["diff"]["after"]["state"] == "present" + - test_six.results[3]["interface_template"]["device_type"] == 3 + + - name: "7 - Don't prevent updates to other params if tags are specified" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "issue-242" + device_type: "Cisco Test" + device_role: "Core Switch" + site: "Test Site" + status: "Staged" + asset_tag: "Null" + tags: + # Changed these for issue #407 to be IDs + - 2 + - 3 + - 1 + register: test_seven + + - name: "5 - Assert added tag - Tests #242 is fixed" + assert: + that: + - test_seven is changed + - test_seven["diff"]["after"]["asset_tag"] == "Null" + - test_seven["device"]["asset_tag"] == "Null" + + - name: Add ip address to netbox and don't assign it to a device (Issue 372) + netbox.netbox.netbox_ip_address: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 10.255.255.1/24 + query_params: + - address + - vrf + state: present + + - name: Update same ip address to attach to a device interface (Issue 372) + netbox.netbox.netbox_ip_address: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + address: 10.255.255.1/24 + assigned_object: + device: test100 + name: GigabitEthernet1 + query_params: + - address + - vrf + state: present + register: query_params_372 + + - name: Assert ip address was updated and added to device interface + assert: + that: + - query_params_372 is changed + - query_params_372['msg'] == 'ip_address 10.255.255.1/24 updated' + - query_params_372['diff']['after']['assigned_object'] == 3 + - query_params_372['diff']['after']['assigned_object_id'] == 3 + - query_params_372['diff']['after']['assigned_object_type'] == 'dcim.interface' + + - name: "Validate failure due to invalid child params provided by user" + netbox.netbox.netbox_cable: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + termination_a_type: "dcim.interface" + termination_a: + device: "test100" + name: "GigabitEthernet1" + termination_b_type: "circuits.circuittermination" + termination_b: + name: "XYZ987" + ignore_errors: "yes" + register: "test_results" + + - name: "Issue #415 - Assert failure message shows the allowed params and what the user provided" + assert: + that: + - test_results is failed + - 'test_results["msg"] == "One or more of the kwargs provided are invalid for circuits.circuittermination, provided kwargs: name. Acceptable kwargs: circuit, term_side"' + + - name: "Issue #432 - Make sure same IPs get assigned to different device interfaces" + netbox.netbox.netbox_ip_address: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: "{{ item }}" + loop: "{{ data }}" + register: "test_results" + vars: + data: + - address: 121.121.121.121/32 + assigned_object: + device: "Test Nexus One" + name: "Ethernet1/1" + description: ansible-netbox-1.2.1 + dns_name: ansible-netbox-1.2.1 + role: HSRP + status: Active + - address: 121.121.121.121/32 + assigned_object: + device: "Test Nexus Child One" + name: "Ethernet2/1" + description: ansible-netbox-1.2.1 + dns_name: ansible-netbox-1.2.1 + role: HSRP + status: Active + - address: 1.121.121.121/32 + assigned_object: + device: "Test Nexus One" + name: "Ethernet1/1" + description: ansible-netbox-1.2.1 + dns_name: ansible-netbox-1.2.1 + role: HSRP + status: Active + - address: 1.121.121.121/32 + assigned_object: + device: "Test Nexus Child One" + name: "Ethernet2/1" + description: ansible-netbox-1.2.1 + dns_name: ansible-netbox-1.2.1 + role: HSRP + status: Active + + - name: "ASSERT Issue #432 changes reflect correct device" + assert: + that: + - test_results | community.general.json_query('results[?ip_address.address==`1.121.121.121/32`]') | length == 2 + - test_results | community.general.json_query('results[?ip_address.address==`121.121.121.121/32`]') | length == 2 + + - name: "Issue #958 - Make sure we can add same location with different sites" + netbox.netbox.netbox_location: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: Office Building + site: "{{ item }}" + loop: + - Test Site + - Test Site2 + register: test_results + + - name: "ASSERT ISSUE #957 - Location has different IDs" + ansible.builtin.assert: + that: + - test_results.results.0.location.id != test_results.results.1.location.id diff --git a/tests/integration/targets/v4.0/tasks/main.yml b/tests/integration/targets/v4.0/tasks/main.yml new file mode 100644 index 000000000..bb31a2ab0 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/main.yml @@ -0,0 +1,330 @@ +--- +- name: "NETBOX_DEVICE TESTS" + include_tasks: "netbox_device.yml" + +- name: "NETBOX_DEVICE_INTERFACE TESTS" + include_tasks: "netbox_device_interface.yml" + +- name: "NETBOX_DEVICE_INTERFACE_TEMPLATE TESTS" + include_tasks: "netbox_device_interface_template.yml" + +- name: "NETBOX_IP_ADDRESS TESTS" + include_tasks: "netbox_ip_address.yml" + +- name: "NETBOX_PREFIX TESTS" + include_tasks: "netbox_prefix.yml" + +- name: "NETBOX_SITE TESTS" + include_tasks: "netbox_site.yml" + +- name: "NETBOX_SITE_GROUP TESTS" + include_tasks: "netbox_site_group.yml" + +- name: "NETBOX_CONTACT TESTS" + include_tasks: "netbox_contact.yml" + +- name: "NETBOX_CONTACT_ROLE TESTS" + include_tasks: "netbox_contact_role.yml" + +- name: "NETBOX_TENTANT TESTS" + include_tasks: "netbox_tenant.yml" + +- name: "NETBOX_TENTANT_GROUP TESTS" + include_tasks: "netbox_tenant_group.yml" + +- name: "NETBOX_RACK TESTS" + include_tasks: "netbox_rack.yml" + +- name: "NETBOX_RACK_ROLE TESTS" + include_tasks: "netbox_rack_role.yml" + +- name: "NETBOX_LOCATION TESTS" + include_tasks: "netbox_location.yml" + +- name: "NETBOX_MANUFACTURER TESTS" + include_tasks: "netbox_manufacturer.yml" + +- name: "NETBOX_PLATFORM TESTS" + include_tasks: "netbox_platform.yml" + +- name: "NETBOX_DEVICE_TYPE TESTS" + include_tasks: "netbox_device_type.yml" + +- name: "NETBOX_DEVICE_ROLE TESTS" + include_tasks: "netbox_device_role.yml" + +- name: "NETBOX_IPAM_ROLE TESTS" + include_tasks: "netbox_ipam_role.yml" + +- name: "NETBOX_VLAN_GROUP TESTS" + include_tasks: "netbox_vlan_group.yml" + +- name: "NETBOX_VLAN TESTS" + include_tasks: "netbox_vlan.yml" + +- name: "NETBOX_VRF TESTS" + include_tasks: "netbox_vrf.yml" + +- name: "NETBOX_RIR TESTS" + include_tasks: "netbox_rir.yml" + +- name: "NETBOX_AGGREGATE TESTS" + include_tasks: "netbox_aggregate.yml" + +- name: "NETBOX_REGION TESTS" + include_tasks: "netbox_region.yml" + +- name: "NETBOX_DEVICE_BAY TESTS" + include_tasks: "netbox_device_bay.yml" + +- name: "NETBOX_DEVICE_BAY_TEMPLATE TESTS" + include_tasks: "netbox_device_bay_template.yml" + +- name: "NETBOX_INVENTORY_ITEM TESTS" + include_tasks: "netbox_inventory_item.yml" + +- name: "NETBOX_VIRTUAL_MACHINE TESTS" + include_tasks: "netbox_virtual_machine.yml" + +- name: "NETBOX_CLUSTER TESTS" + include_tasks: "netbox_cluster.yml" + +- name: "NETBOX_CLUSTER_GROUP TESTS" + include_tasks: "netbox_cluster_group.yml" + +- name: "NETBOX_CLUSTER_TYPE TESTS" + include_tasks: "netbox_cluster_type.yml" + +- name: "NETBOX_VM_INTERFACE TESTS" + include_tasks: "netbox_vm_interface.yml" + +- name: "NETBOX_PROVIDER TESTS" + include_tasks: "netbox_provider.yml" + +- name: "NETBOX_PROVIDER_NETWORK TESTS" + include_tasks: "netbox_provider_network.yml" + +- name: "NETBOX_CIRCUIT_TYPE TESTS" + include_tasks: "netbox_circuit_type.yml" + +- name: "NETBOX_CIRCUIT TESTS" + include_tasks: "netbox_circuit.yml" + +- name: "NETBOX_CIRCUIT_TERMINATION TESTS" + include_tasks: "netbox_circuit_termination.yml" + +- name: "NETBOX_REAR_PORT TESTS" + include_tasks: "netbox_rear_port.yml" + +- name: "NETBOX_REAR_PORT_TEMPLATE TESTS" + include_tasks: "netbox_rear_port_template.yml" + +- name: "NETBOX_FRONT_PORT TESTS" + include_tasks: "netbox_front_port.yml" + +- name: "NETBOX_FRONT_PORT_TEMPLATE TESTS" + include_tasks: "netbox_front_port_template.yml" + +- name: "NETBOX_CONSOLE_PORT TESTS" + include_tasks: "netbox_console_port.yml" + +- name: "NETBOX_CONSOLE_PORT_TEMPLATE TESTS" + include_tasks: "netbox_console_port_template.yml" + +- name: "NETBOX_CONSOLE_SERVER_PORT TESTS" + include_tasks: "netbox_console_server_port.yml" + +- name: "NETBOX_CONSOLE_SERVER_PORT_TEMPLATE TESTS" + include_tasks: "netbox_console_server_port_template.yml" + +- name: "NETBOX_POWER_PANEL TESTS" + include_tasks: "netbox_power_panel.yml" + +- name: "NETBOX_POWER_FEED TESTS" + include_tasks: "netbox_power_feed.yml" + +- name: "NETBOX_POWER_PORT TESTS" + include_tasks: "netbox_power_port.yml" + +- name: "NETBOX_POWER_PORT_TEMPLATE TESTS" + include_tasks: "netbox_power_port_template.yml" + +- name: "NETBOX_POWER_OUTLET TESTS" + include_tasks: "netbox_power_outlet.yml" + +- name: "NETBOX_POWER_OUTLET_TEMPLATE TESTS" + include_tasks: "netbox_power_outlet_template.yml" + +- name: "NETBOX_VIRTUAL_CHASSIS TESTS" + include_tasks: "netbox_virtual_chassis.yml" + +# Module has to be updated for 3.3 +#- name: "NETBOX_CABLE TESTS" +# include_tasks: "netbox_cable.yml" + +- name: "NETBOX_SERVICE TESTS" + include_tasks: "netbox_service.yml" + +- name: "NETBOX_LOOKUP TESTS" + include_tasks: "netbox_lookup.yml" + +- name: "NETBOX_TAG_TESTS" + include_tasks: + file: "netbox_tag.yml" + apply: + tags: + - netbox_tag + tags: + - netbox_tag + +- name: "NETBOX_ROUTE_TARGET_TESTS" + include_tasks: + file: "netbox_route_target.yml" + apply: + tags: + - netbox_route_target + tags: + - netbox_route_target + +- name: "NETBOX_WIRELESS_LAN TESTS" + include_tasks: + file: "netbox_wireless_lan.yml" + apply: + tags: + - netbox_wireless_lan + tags: + - netbox_wireless_lan + +- name: "NETBOX_WIRELESS_LAN_GROUP TESTS" + include_tasks: + file: "netbox_wireless_lan_group.yml" + apply: + tags: + - netbox_wireless_lan_group + tags: + - netbox_wireless_lan_group + +- name: "NETBOX_WIRELESS_LINK TESTS" + include_tasks: + file: "netbox_wireless_link.yml" + apply: + tags: + - netbox_wireless_link + tags: + - netbox_wireless_link + +- name: "NETBOX_CUSTOM_FIELD TESTS" + include_tasks: + file: "netbox_custom_field.yml" + apply: + tags: + - netbox_custom_field + tags: + - netbox_custom_field + +- name: "NETBOX_CUSTOM_LINK TESTS" + include_tasks: + file: "netbox_custom_link.yml" + apply: + tags: + - netbox_custom_link + tags: + - netbox_custom_link + +- name: "NETBOX_EXPORT_TEMPLATE TESTS" + include_tasks: + file: "netbox_export_template.yml" + apply: + tags: + - netbox_export_template + tags: + - netbox_export_template + +# Must update for 3.7 +#- name: "NETBOX_WEBHOOK TESTS" +# include_tasks: +# file: "netbox_webhook.yml" +# apply: +# tags: +# - netbox_webhook +# tags: +# - netbox_webhook + +#- name: "NETBOX_L2VPN TESTS" +# include_tasks: +# file: "netbox_l2vpn.yml" +# apply: +# tags: +# - netbox_l2vpn +# tags: +# - netbox_l2vpn + +#- name: "NETBOX_L2VPN_TERMINATION TESTS" +# include_tasks: +# file: "netbox_l2vpn_termination.yml" +# apply: +# tags: +# - netbox_l2vpn_termination +# tags: +# - netbox_l2vpn_termination + +- name: "NETBOX_INVENTORY_ITEM_ROLE TESTS" + include_tasks: + file: "netbox_inventory_item_role.yml" + apply: + tags: + - netbox_inventory_item_role + tags: + - netbox_inventory_item_role + +- name: "NETBOX_MODULE_TYPE TESTS" + include_tasks: + file: "netbox_module_type.yml" + apply: + tags: + - netbox_module_type + tags: + - netbox_module_type + +- name: "NETBOX_SERVICE_TEMPLATE TESTS" + include_tasks: + file: "netbox_service_template.yml" + apply: + tags: + - netbox_service_template + tags: + - netbox_service_template + +- name: "NETBOX_ASN TESTS" + include_tasks: "netbox_asn.yml" + +- name: "NETBOX_FHRP_GROUP TESTS" + include_tasks: "netbox_fhrp_group.yml" + +- name: "NETBOX_JOURNAL_ENTRY TESTS" + include_tasks: + file: "netbox_journal_entry.yml" + apply: + tags: + - netbox_journal_entry + tags: + - netbox_journal_entry + +- name: "NETBOX_FHRP_GROUP_ASSIGNMENT TESTS" + include_tasks: + file: "netbox_fhrp_group_assignment.yml" + apply: + tags: + - netbox_fhrp_group_assignmen + tags: + - netbox_fhrp_group_assignmen + +- name: "NETBOX_CONFIG_TEMPLATE" + include_tasks: "netbox_config_template.yml" + tags: + - netbox_config_template + +- name: "NETBOX_VIRTUAL_DISK" + include_tasks: "netbox_virtual_disk.yml" + tags: + - netbox_virtual_disk diff --git a/tests/integration/targets/v4.0/tasks/netbox_aggregate.yml b/tests/integration/targets/v4.0/tasks/netbox_aggregate.yml new file mode 100644 index 000000000..ac02641dc --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_aggregate.yml @@ -0,0 +1,115 @@ +--- +## +## +### NETBOX_AGGEGATE +## +## +- name: "AGGREGATE 1: Necessary info creation" + netbox.netbox.netbox_aggregate: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: "10.0.0.0/8" + rir: "Example RIR" + state: present + register: test_one + +- name: "AGGREGATE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['aggregate']['prefix'] == "10.0.0.0/8" + #- test_one['aggregate']['family'] == 4 + - test_one['aggregate']['rir'] == 1 + - test_one['msg'] == "aggregate 10.0.0.0/8 created" + +- name: "AGGREGATE 2: Create duplicate" + netbox.netbox.netbox_aggregate: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: "10.0.0.0/8" + state: present + register: test_two + +- name: "AGGREGATE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['aggregate']['prefix'] == "10.0.0.0/8" + - test_two['aggregate']['family'] == 4 + - test_two['aggregate']['rir'] == 1 + - test_two['msg'] == "aggregate 10.0.0.0/8 already exists" + +- name: "AGGREGATE 3: ASSERT - Update" + netbox.netbox.netbox_aggregate: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: "10.0.0.0/8" + rir: "Example RIR" + date_added: "1989-01-18" + description: "Test Description" + tags: + - "Schnozzberry" + state: present + register: test_three + +- name: "AGGREGATE 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['date_added'] == "1989-01-18" + - test_three['diff']['after']['description'] == "Test Description" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['aggregate']['prefix'] == "10.0.0.0/8" + - test_three['aggregate']['family'] == 4 + - test_three['aggregate']['rir'] == 1 + - test_three['aggregate']['date_added'] == "1989-01-18" + - test_three['aggregate']['description'] == "Test Description" + - test_three['aggregate']['tags'][0] == 4 + - test_three['msg'] == "aggregate 10.0.0.0/8 updated" + +- name: "AGGREGATE 4: ASSERT - Delete" + netbox.netbox.netbox_aggregate: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: "10.0.0.0/8" + state: absent + register: test_four + +- name: "AGGREGATE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['aggregate']['prefix'] == "10.0.0.0/8" + - test_four['aggregate']['family'] == 4 + - test_four['aggregate']['rir'] == 1 + - test_four['aggregate']['date_added'] == "1989-01-18" + - test_four['aggregate']['description'] == "Test Description" + - test_four['aggregate']['tags'][0] == 4 + - test_four['msg'] == "aggregate 10.0.0.0/8 deleted" + +- name: "AGGREGATE 5: Necessary info creation" + netbox.netbox.netbox_aggregate: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: "2001::/32" + rir: "Example RIR" + state: present + register: test_five + +- name: "AGGREGATE 5: ASSERT - Necessary info creation" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['aggregate']['prefix'] == "2001::/32" + #- test_five['aggregate']['family'] == 6 + - test_five['aggregate']['rir'] == 1 + - test_five['msg'] == "aggregate 2001::/32 created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_asn.yml b/tests/integration/targets/v4.0/tasks/netbox_asn.yml new file mode 100644 index 000000000..346bafda9 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_asn.yml @@ -0,0 +1,88 @@ +--- +## +## +### NETBOX_ASN +## +## +- name: "ASN 1: Test ASN creation" + netbox.netbox.netbox_asn: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + asn: 1111111111 + rir: Example RIR + state: present + register: test_one + +- name: "ASN 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['asn']['asn'] == 1111111111 + - test_one['asn']['rir'] == 1 + - test_one['msg'] == "asn 1111111111 created" + +- name: "ASN 2: Create duplicate" + netbox.netbox.netbox_asn: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + asn: 1111111111 + rir: Example RIR + state: present + register: test_two + +- name: "ASN 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['asn']['asn'] == 1111111111 + - test_two['asn']['rir'] == 1 + - test_two['msg'] == "asn 1111111111 already exists" + +- name: "ASN 3: Update ASN with other fields" + netbox.netbox.netbox_asn: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + asn: 1111111111 + rir: Example RIR + tenant: Test Tenant + description: Test description + tags: + - "Schnozzberry" + state: present + register: test_three + +- name: "ASN 3: ASSERT - Update ASN with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['tenant'] == 1 + - test_three['diff']['after']['description'] == "Test description" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['asn']['asn'] == 1111111111 + - test_three['asn']['rir'] == 1 + - test_three['asn']['tenant'] == 1 + - test_three['asn']['description'] == "Test description" + - test_three['asn']['tags'][0] == 4 + - test_three['msg'] == "asn 1111111111 updated" + +- name: "ASN 4: ASSERT - Delete" + netbox.netbox.netbox_asn: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + asn: 1111111111 + state: absent + register: test_four + +- name: "ASN 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "asn 1111111111 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_cable.yml b/tests/integration/targets/v4.0/tasks/netbox_cable.yml new file mode 100644 index 000000000..5728986c0 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_cable.yml @@ -0,0 +1,193 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_CABLE +## +## +- name: "CABLE 1: Necessary info creation" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + termination_a_type: dcim.interface + termination_a: + device: Test Nexus Child One + name: Ethernet2/2 + termination_b_type: dcim.interface + termination_b: + device: Test Nexus Child One + name: Ethernet2/1 + state: present + register: test_one + +- name: "CABLE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['cable']['termination_a_type'] == "dcim.interface" + - test_one['cable']['termination_a_id'] == 15 + - test_one['cable']['termination_b_type'] == "dcim.interface" + - test_one['cable']['termination_b_id'] == 2 + - test_one['msg'] == "cable dcim.interface Ethernet2/2 <> dcim.interface Ethernet2/1 created" + +- name: "CABLE 2: Create duplicate" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + termination_a_type: dcim.interface + termination_a: + device: Test Nexus Child One + name: Ethernet2/2 + termination_b_type: dcim.interface + termination_b: + device: Test Nexus Child One + name: Ethernet2/1 + state: present + register: test_two + +- name: "CABLE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['cable']['termination_a_type'] == "dcim.interface" + - test_two['cable']['termination_a_id'] == 15 + - test_two['cable']['termination_b_type'] == "dcim.interface" + - test_two['cable']['termination_b_id'] == 2 + - test_two['msg'] == "cable dcim.interface Ethernet2/2 <> dcim.interface Ethernet2/1 already exists" + +- name: "CABLE 3: Update Cable with other fields" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + termination_a_type: dcim.interface + termination_a: + device: Test Nexus Child One + name: Ethernet2/2 + termination_b_type: dcim.interface + termination_b: + device: Test Nexus Child One + name: Ethernet2/1 + type: mmf-om4 + status: planned + label: label123 + color: abcdef + length: 30 + length_unit: m + tags: + - "Schnozzberry" + tenant: "Test Tenant" + state: present + register: test_three + +- name: "CABLE 3: ASSERT - Update Cable with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "mmf-om4" + - test_three['diff']['after']['status'] == "planned" + - test_three['diff']['after']['label'] == "label123" + - test_three['diff']['after']['color'] == "abcdef" + - test_three['diff']['after']['length'] == 30 + - test_three['diff']['after']['length_unit'] == "m" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['diff']['after']['tenant'] == 1 + - test_three['cable']['termination_a_type'] == "dcim.interface" + - test_three['cable']['termination_a_id'] == 15 + - test_three['cable']['termination_b_type'] == "dcim.interface" + - test_three['cable']['termination_b_id'] == 2 + - test_three['cable']['type'] == "mmf-om4" + - test_three['cable']['status'] == "planned" + - test_three['cable']['label'] == "label123" + - test_three['cable']['color'] == "abcdef" + - test_three['cable']['length'] == 30 + - test_three['cable']['length_unit'] == "m" + - test_three['cable']['tags'][0] == 4 + - test_three['cable']['tenant'] == 1 + - test_three['msg'] == "cable dcim.interface Ethernet2/2 <> dcim.interface Ethernet2/1 updated" + +- name: "CABLE 4: ASSERT - Delete" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + termination_a_type: dcim.interface + termination_a: + device: Test Nexus Child One + name: Ethernet2/2 + termination_b_type: dcim.interface + termination_b: + device: Test Nexus Child One + name: Ethernet2/1 + state: absent + register: test_four + +- name: "CABLE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "cable dcim.interface Ethernet2/2 <> dcim.interface Ethernet2/1 deleted" + +- name: "CABLE 5: Connect Console Port and Console Server Port" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + termination_a_type: dcim.consoleserverport + termination_a: + name: Console Server Port + device: test100 + termination_b_type: dcim.consoleport + termination_b: + name: Console Port + device: test100 + state: present + register: test_five + +- name: "CABLE 5: ASSERT - Connect Console Port and Console Server Port" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['cable']['termination_a_type'] == "dcim.consoleserverport" + - test_five['cable']['termination_a_id'] == 1 + - test_five['cable']['termination_b_type'] == "dcim.consoleport" + - test_five['cable']['termination_b_id'] == 1 + - test_five['msg'] == "cable dcim.consoleserverport Console Server Port <> dcim.consoleport Console Port created" + +- name: "CABLE 6: Circuits Termination as side A" + netbox.netbox.netbox_cable: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + termination_a_type: circuits.circuittermination + termination_a: + circuit: "Test Circuit Two" + term_side: "A" + termination_b_type: dcim.interface + termination_b: + device: "test100" + name: "GigabitEthernet2" + state: present + register: test_six + +- name: "CABLE 6: ASSERT - Circuits Termination as side A" + assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['cable']['termination_a_type'] == "circuits.circuittermination" + - test_six['cable']['termination_a_id'] == 1 + - test_six['cable']['termination_b_type'] == "dcim.interface" + - test_six['cable']['termination_b_id'] == 4 + - test_six['msg'] == "cable circuits.circuittermination 1 <> dcim.interface GigabitEthernet2 created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_circuit.yml b/tests/integration/targets/v4.0/tasks/netbox_circuit.yml new file mode 100644 index 000000000..1d8f1ec47 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_circuit.yml @@ -0,0 +1,109 @@ +--- +## +## +### NETBOX_CIRCUIT +## +## +- name: "NETBOX_CIRCUIT 1: Create provider within NetBox with only required information" + netbox.netbox.netbox_circuit: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + cid: Test Circuit One + provider: Test Provider + circuit_type: Test Circuit Type + state: present + register: test_one + +- name: "NETBOX_CIRCUIT 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['circuit']['cid'] == "Test Circuit One" + - test_one['circuit']['provider'] == 1 + - test_one['circuit']['type'] == 1 + - test_one['msg'] == "circuit Test Circuit One created" + +- name: "NETBOX_CIRCUIT 2: Duplicate" + netbox.netbox.netbox_circuit: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + cid: Test Circuit One + provider: Test Provider + circuit_type: Test Circuit Type + state: present + register: test_two + +- name: "NETBOX_CIRCUIT 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['circuit']['cid'] == "Test Circuit One" + - test_two['circuit']['provider'] == 1 + - test_two['circuit']['type'] == 1 + - test_two['msg'] == "circuit Test Circuit One already exists" + +- name: "NETBOX_CIRCUIT 3: Update provider with other fields" + netbox.netbox.netbox_circuit: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + cid: Test Circuit One + provider: Test Provider + circuit_type: Test Circuit Type + status: Planned + tenant: Test Tenant + install_date: "2018-12-25" + commit_rate: 10000 + description: "Test circuit " + comments: "FAST CIRCUIT" + state: present + register: test_three + +- name: "NETBOX_CIRCUIT 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['status'] == "planned" + - test_three['diff']['after']['tenant'] == 1 + - test_three['diff']['after']['install_date'] == "2018-12-25" + - test_three['diff']['after']['commit_rate'] == 10000 + - test_three['diff']['after']['description'] == "Test circuit" + - test_three['diff']['after']['comments'] == "FAST CIRCUIT" + - test_three['circuit']['cid'] == "Test Circuit One" + - test_three['circuit']['provider'] == 1 + - test_three['circuit']['type'] == 1 + - test_three['circuit']['status'] == "planned" + - test_three['circuit']['tenant'] == 1 + - test_three['circuit']['install_date'] == "2018-12-25" + - test_three['circuit']['commit_rate'] == 10000 + - test_three['circuit']['description'] == "Test circuit" + - test_three['circuit']['comments'] == "FAST CIRCUIT" + - test_three['msg'] == "circuit Test Circuit One updated" + +- name: "NETBOX_CIRCUIT 4: Delete provider within netbox" + netbox.netbox.netbox_circuit: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + cid: Test Circuit One + state: absent + register: test_four + +- name: "NETBOX_CIRCUIT 4 : ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['circuit']['cid'] == "Test Circuit One" + - test_four['circuit']['provider'] == 1 + - test_four['circuit']['type'] == 1 + - test_four['circuit']['status'] == "planned" + - test_four['circuit']['tenant'] == 1 + - test_four['circuit']['install_date'] == "2018-12-25" + - test_four['circuit']['commit_rate'] == 10000 + - test_four['circuit']['description'] == "Test circuit" + - test_four['circuit']['comments'] == "FAST CIRCUIT" + - test_four['msg'] == "circuit Test Circuit One deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_circuit_termination.yml b/tests/integration/targets/v4.0/tasks/netbox_circuit_termination.yml new file mode 100644 index 000000000..a37cdc680 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_circuit_termination.yml @@ -0,0 +1,129 @@ +--- +## +## +### NETBOX_CIRCUIT_TERMINATION +## +## +- name: "NETBOX_CIRCUIT_TERMINATION 1: Create provider within NetBox with only required information" + netbox.netbox.netbox_circuit_termination: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + circuit: Test Circuit + term_side: A + site: "Test Site" + port_speed: 10000 + state: present + register: test_one + +- name: "NETBOX_CIRCUIT_TERMINATION 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['circuit_termination']['circuit'] == 1 + - test_one['circuit_termination']['term_side'] == "A" + - test_one['circuit_termination']['site'] == 1 + - test_one['circuit_termination']['port_speed'] == 10000 + - test_one['msg'] == "circuit_termination test_circuit_a created" + +- name: "NETBOX_CIRCUIT_TERMINATION 2: Duplicate" + netbox.netbox.netbox_circuit_termination: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + circuit: Test Circuit + term_side: A + state: present + register: test_two + +- name: "NETBOX_CIRCUIT_TERMINATION 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['circuit_termination']['circuit'] == 1 + - test_two['circuit_termination']['term_side'] == "A" + - test_two['circuit_termination']['site'] == 1 + - test_two['circuit_termination']['port_speed'] == 10000 + - test_two['msg'] == "circuit_termination test_circuit_a already exists" + +- name: "NETBOX_CIRCUIT_TERMINATION 3: Update provider with other fields" + netbox.netbox.netbox_circuit_termination: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + circuit: Test Circuit + term_side: A + upstream_speed: 1000 + xconnect_id: 10X100 + pp_info: PP10-24 + description: "Test description" + state: present + register: test_three + +- name: "NETBOX_CIRCUIT_TERMINATION 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['upstream_speed'] == 1000 + - test_three['diff']['after']['xconnect_id'] == "10X100" + - test_three['diff']['after']['pp_info'] == "PP10-24" + - test_three['diff']['after']['description'] == "Test description" + - test_three['circuit_termination']['circuit'] == 1 + - test_three['circuit_termination']['term_side'] == "A" + - test_three['circuit_termination']['site'] == 1 + - test_three['circuit_termination']['port_speed'] == 10000 + - test_three['circuit_termination']['upstream_speed'] == 1000 + - test_three['circuit_termination']['xconnect_id'] == "10X100" + - test_three['circuit_termination']['pp_info'] == "PP10-24" + - test_three['circuit_termination']['description'] == "Test description" + - test_three['msg'] == "circuit_termination test_circuit_a updated" + +- name: "NETBOX_CIRCUIT_TERMINATION 4: Create Z Side" + netbox.netbox.netbox_circuit_termination: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + circuit: Test Circuit + term_side: Z + site: "Test Site" + port_speed: 10000 + state: present + register: test_four + +- name: "NETBOX_CIRCUIT_TERMINATION 4: ASSERT - Create Z Side" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['circuit_termination']['circuit'] == 1 + - test_four['circuit_termination']['term_side'] == "Z" + - test_four['circuit_termination']['site'] == 1 + - test_four['circuit_termination']['port_speed'] == 10000 + - test_four['msg'] == "circuit_termination test_circuit_z created" + +- name: "NETBOX_CIRCUIT_TERMINATION 5: Delete provider within netbox" + netbox.netbox.netbox_circuit_termination: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + circuit: Test Circuit + term_side: A + state: absent + register: test_five + +- name: "NETBOX_CIRCUIT_TERMINATION 5: ASSERT - Delete" + assert: + that: + - test_five is changed + - test_five['circuit_termination']['circuit'] == 1 + - test_five['circuit_termination']['term_side'] == "A" + - test_five['circuit_termination']['site'] == 1 + - test_five['circuit_termination']['port_speed'] == 10000 + - test_five['circuit_termination']['upstream_speed'] == 1000 + - test_five['circuit_termination']['xconnect_id'] == "10X100" + - test_five['circuit_termination']['pp_info'] == "PP10-24" + - test_five['circuit_termination']['description'] == "Test description" + - test_five['msg'] == "circuit_termination test_circuit_a deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_circuit_type.yml b/tests/integration/targets/v4.0/tasks/netbox_circuit_type.yml new file mode 100644 index 000000000..45f956e34 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_circuit_type.yml @@ -0,0 +1,96 @@ +--- +## +## +### NETBOX_CIRCUIT_TYPE +## +## +- name: "CIRCUIT_TYPE 1: Necessary info creation" + netbox.netbox.netbox_circuit_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Circuit Type One" + state: present + register: test_one + +- name: "CIRCUIT_TYPE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['circuit_type']['name'] == "Test Circuit Type One" + - test_one['circuit_type']['slug'] == "test-circuit-type-one" + - test_one['msg'] == "circuit_type Test Circuit Type One created" + +- name: "CIRCUIT_TYPE 2: Create duplicate" + netbox.netbox.netbox_circuit_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Circuit Type One" + state: present + register: test_two + +- name: "CIRCUIT_TYPE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['circuit_type']['name'] == "Test Circuit Type One" + - test_two['circuit_type']['slug'] == "test-circuit-type-one" + - test_two['msg'] == "circuit_type Test Circuit Type One already exists" + +- name: "CIRCUIT_TYPE 3: User specified slug" + netbox.netbox.netbox_circuit_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Circuit Type Two" + slug: "test-circuit-type-2" + state: present + register: test_three + +- name: "CIRCUIT_TYPE 3: ASSERT - User specified slug" + assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['circuit_type']['name'] == "Test Circuit Type Two" + - test_three['circuit_type']['slug'] == "test-circuit-type-2" + - test_three['msg'] == "circuit_type Test Circuit Type Two created" + +- name: "CIRCUIT_TYPE 4: ASSERT - Delete" + netbox.netbox.netbox_circuit_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Circuit Type One" + state: absent + register: test_four + +- name: "CIRCUIT_TYPE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['circuit_type']['name'] == "Test Circuit Type One" + - test_four['circuit_type']['slug'] == "test-circuit-type-one" + - test_four['msg'] == "circuit_type Test Circuit Type One deleted" + +- name: "CIRCUIT_TYPE 5: ASSERT - Delete" + netbox.netbox.netbox_circuit_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Circuit Type Two" + slug: "test-circuit-type-2" + state: absent + register: test_five + +- name: "CIRCUIT_TYPE 5: ASSERT - Delete" + assert: + that: + - test_five is changed + - test_five['circuit_type']['name'] == "Test Circuit Type Two" + - test_five['circuit_type']['slug'] == "test-circuit-type-2" + - test_five['msg'] == "circuit_type Test Circuit Type Two deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_cluster.yml b/tests/integration/targets/v4.0/tasks/netbox_cluster.yml new file mode 100644 index 000000000..11ba5ef82 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_cluster.yml @@ -0,0 +1,98 @@ +--- +## +## +### NETBOX_CLUSTER +## +## +- name: "CLUSTER 1: Necessary info creation" + netbox.netbox.netbox_cluster: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster One" + cluster_type: "Test Cluster Type" + state: present + register: test_one + +- name: "CLUSTER 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['cluster']['name'] == "Test Cluster One" + - test_one['cluster']['type'] == 1 + - test_one['msg'] == "cluster Test Cluster One created" + +- name: "CLUSTER 2: Create duplicate" + netbox.netbox.netbox_cluster: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster One" + cluster_type: "Test Cluster Type" + state: present + register: test_two + +- name: "CLUSTER 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['cluster']['name'] == "Test Cluster One" + - test_two['cluster']['type'] == 1 + - test_two['msg'] == "cluster Test Cluster One already exists" + +- name: "CLUSTER 3: Update" + netbox.netbox.netbox_cluster: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster One" + cluster_type: "Test Cluster Type" + cluster_group: "Test Cluster Group" + site: "Test Site" + comments: "Updated cluster" + tenant: "Test Tenant" + tags: + - "Schnozzberry" + state: present + register: test_three + +- name: "CLUSTER 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['group'] == 1 + - test_three['diff']['after']['site'] == 1 + - test_three['diff']['after']['comments'] == "Updated cluster" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['diff']['after']['tenant'] == 1 + - test_three['cluster']['name'] == "Test Cluster One" + - test_three['cluster']['type'] == 1 + - test_three['cluster']['group'] == 1 + - test_three['cluster']['site'] == 1 + - test_three['cluster']['comments'] == "Updated cluster" + - test_three['cluster']['tags'][0] == 4 + - test_three['cluster']['tenant'] == 1 + - test_three['msg'] == "cluster Test Cluster One updated" + +- name: "CLUSTER 4: ASSERT - Delete" + netbox.netbox.netbox_cluster: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster One" + state: absent + register: test_four + +- name: "CLUSTER 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['cluster']['name'] == "Test Cluster One" + - test_four['cluster']['type'] == 1 + - test_four['cluster']['group'] == 1 + - test_four['cluster']['site'] == 1 + - test_four['cluster']['comments'] == "Updated cluster" + - test_four['cluster']['tags'][0] == 4 + - test_four['msg'] == "cluster Test Cluster One deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_cluster_group.yml b/tests/integration/targets/v4.0/tasks/netbox_cluster_group.yml new file mode 100644 index 000000000..9f84518ce --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_cluster_group.yml @@ -0,0 +1,96 @@ +--- +## +## +### NETBOX_CLUSTER_GROUP +## +## +- name: "CLUSTER_GROUP 1: Necessary info creation" + netbox.netbox.netbox_cluster_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster Group One" + state: present + register: test_one + +- name: "CLUSTER_GROUP 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['cluster_group']['name'] == "Test Cluster Group One" + - test_one['cluster_group']['slug'] == "test-cluster-group-one" + - test_one['msg'] == "cluster_group Test Cluster Group One created" + +- name: "CLUSTER_GROUP 2: Create duplicate" + netbox.netbox.netbox_cluster_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster Group One" + state: present + register: test_two + +- name: "CLUSTER_GROUP 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['cluster_group']['name'] == "Test Cluster Group One" + - test_two['cluster_group']['slug'] == "test-cluster-group-one" + - test_two['msg'] == "cluster_group Test Cluster Group One already exists" + +- name: "CLUSTER_GROUP 3: User specified slug" + netbox.netbox.netbox_cluster_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster Group Two" + slug: "test-cluster-group-2" + state: present + register: test_three + +- name: "CLUSTER_GROUP 3: ASSERT - User specified slug" + assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['cluster_group']['name'] == "Test Cluster Group Two" + - test_three['cluster_group']['slug'] == "test-cluster-group-2" + - test_three['msg'] == "cluster_group Test Cluster Group Two created" + +- name: "CLUSTER_GROUP 4: ASSERT - Delete" + netbox.netbox.netbox_cluster_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster Group One" + state: absent + register: test_four + +- name: "CLUSTER_GROUP 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['cluster_group']['name'] == "Test Cluster Group One" + - test_four['cluster_group']['slug'] == "test-cluster-group-one" + - test_four['msg'] == "cluster_group Test Cluster Group One deleted" + +- name: "CLUSTER_GROUP 5: ASSERT - Delete" + netbox.netbox.netbox_cluster_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster Group Two" + slug: "test-cluster-group-2" + state: absent + register: test_five + +- name: "CLUSTER_GROUP 5: ASSERT - Delete" + assert: + that: + - test_five is changed + - test_five['cluster_group']['name'] == "Test Cluster Group Two" + - test_five['cluster_group']['slug'] == "test-cluster-group-2" + - test_five['msg'] == "cluster_group Test Cluster Group Two deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_cluster_type.yml b/tests/integration/targets/v4.0/tasks/netbox_cluster_type.yml new file mode 100644 index 000000000..11c88206f --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_cluster_type.yml @@ -0,0 +1,96 @@ +--- +## +## +### NETBOX_CLUSTER_TYPE +## +## +- name: "CLUSTER_TYPE 1: Necessary info creation" + netbox.netbox.netbox_cluster_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster Type One" + state: present + register: test_one + +- name: "CLUSTER_TYPE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['cluster_type']['name'] == "Test Cluster Type One" + - test_one['cluster_type']['slug'] == "test-cluster-type-one" + - test_one['msg'] == "cluster_type Test Cluster Type One created" + +- name: "CLUSTER_TYPE 2: Create duplicate" + netbox.netbox.netbox_cluster_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster Type One" + state: present + register: test_two + +- name: "CLUSTER_TYPE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['cluster_type']['name'] == "Test Cluster Type One" + - test_two['cluster_type']['slug'] == "test-cluster-type-one" + - test_two['msg'] == "cluster_type Test Cluster Type One already exists" + +- name: "CLUSTER_TYPE 3: User specified slug" + netbox.netbox.netbox_cluster_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster Type Two" + slug: "test-cluster-type-2" + state: present + register: test_three + +- name: "CLUSTER_TYPE 3: ASSERT - User specified slug" + assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['cluster_type']['name'] == "Test Cluster Type Two" + - test_three['cluster_type']['slug'] == "test-cluster-type-2" + - test_three['msg'] == "cluster_type Test Cluster Type Two created" + +- name: "CLUSTER_TYPE 4: ASSERT - Delete" + netbox.netbox.netbox_cluster_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster Type One" + state: absent + register: test_four + +- name: "CLUSTER_TYPE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['cluster_type']['name'] == "Test Cluster Type One" + - test_four['cluster_type']['slug'] == "test-cluster-type-one" + - test_four['msg'] == "cluster_type Test Cluster Type One deleted" + +- name: "CLUSTER_TYPE 5: ASSERT - Delete" + netbox.netbox.netbox_cluster_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Cluster Type Two" + slug: "test-cluster-type-2" + state: absent + register: test_five + +- name: "CLUSTER_TYPE 5: ASSERT - Delete" + assert: + that: + - test_five is changed + - test_five['cluster_type']['name'] == "Test Cluster Type Two" + - test_five['cluster_type']['slug'] == "test-cluster-type-2" + - test_five['msg'] == "cluster_type Test Cluster Type Two deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_config_context.yml b/tests/integration/targets/v4.0/tasks/netbox_config_context.yml new file mode 100644 index 000000000..2353dfbfa --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_config_context.yml @@ -0,0 +1,107 @@ +--- +## +## +### NETBOX_CONFIG_CONTEXTS +## +## +- name: "CONFIG_CONTEXT 1: Necessary info creation" + netbox.netbox.netbox_config_context: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "test_context" + description: "Test context" + data: "{ \"testkey\": { \"testsubkey\": [ \"testvaule\" ] } }" + state: present + register: test_one + +- name: "CONFIG_CONTEXT 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['config_context']['name'] == "test_context" + - test_one['config_context']['description'] == "Test context" + - test_one['config_context']['is_active'] == true + - test_one['config_context']['weight'] == 1000 + - test_one['config_context']['data'].testkey.testsubkey[0] == "testvaule" + - test_one['msg'] == "config_context test_context created" + +- name: "CONFIG_CONTEXT 2: Create duplicate" + netbox.netbox.netbox_config_context: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "test_context" + description: "Test context" + data: "{ \"testkey\": { \"testsubkey\": [ \"testvaule\" ] } }" + state: present + register: test_two + +- name: "CONFIG_CONTEXT 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['config_context']['name'] == "test_context" + - test_two['msg'] == "config_context test_context already exists" + +- name: "CONFIG_CONTEXT 3: Update data and attach to site" + netbox.netbox.netbox_config_context: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "test_context" + description: "Updated test context" + data: "{ \"testkey\": { \"testsubkey\": [ \"updatedvaule\" ] } }" + weight: 100 + sites: [test-site] + state: present + register: test_three + +- name: "CONFIG_CONTEXT 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['data'].testkey.testsubkey[0] == "updatedvaule" + - test_three['diff']['after']['description'] == "Updated test context" + - test_three['diff']['after']['weight'] == 100 + - test_three['diff']['after']['sites'][0] == 1 + - test_three['config_context']['name'] == "test_context" + - test_three['msg'] == "config_context test_context updated" + +- name: "CONFIG_CONTEXT 4: Detach from site" + netbox.netbox.netbox_config_context: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "test_context" + data: "{ \"testkey\": { \"testsubkey\": [ \"updatedvaule\" ] } }" + sites: [] + state: present + register: test_four + +- name: "CONFIG_CONTEXT 4: ASSERT - Detached" + assert: + that: + - test_four is changed + - test_four['diff']['after']['sites']|length == 0 + - test_four['config_context']['name'] == "test_context" + - test_four['msg'] == "config_context test_context updated" + +- name: "CONFIG_CONTEXT 5: Delete" + netbox.netbox.netbox_config_context: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "test_context" + state: absent + register: test_five + +- name: "CONFIG_CONTEXT 5: ASSERT - Deleted" + assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['config_context']['name'] == "test_context" + - test_five['msg'] == "config_context test_context deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_config_template.yml b/tests/integration/targets/v4.0/tasks/netbox_config_template.yml new file mode 100644 index 000000000..9abf3ea05 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_config_template.yml @@ -0,0 +1,82 @@ +--- +## +## +### NETBOX_CONFIG_TEMPLATES +## +## +- name: "CONFIG_TEMPLATES 1: Necessary info creation" + netbox.netbox.netbox_config_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "test_template" + description: "Test template" + template_code: "test template" + state: present + register: test_one + +- name: "CONFIG_TEMPLATES 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['config_template']['name'] == "test_template" + - test_one['config_template']['description'] == "Test template" + - test_one['config_template']['template_code'] == "test template" + - test_one['msg'] == "config_template test_template created" + +- name: "CONFIG_TEMPLATES 2: Create duplicate" + netbox.netbox.netbox_config_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "test_template" + description: "Test template" + template_code: "test template" + state: present + register: test_two + +- name: "CONFIG_TEMPLATES 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['config_template']['name'] == "test_template" + - test_two['msg'] == "config_template test_template already exists" + +- name: "CONFIG_TEMPLATES 3: Update data" + netbox.netbox.netbox_config_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "test_template" + description: "Updated test template" + template_code: "updated test template" + state: present + register: test_three + +- name: "CONFIG_TEMPLATES 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['template_code'] == "updated test template" + - test_three['diff']['after']['description'] == "Updated test template" + - test_three['config_template']['name'] == "test_template" + - test_three['msg'] == "config_template test_template updated" + +- name: "CONFIG_TEMPLATES 4: Delete" + netbox.netbox.netbox_config_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "test_template" + state: absent + register: test_four + +- name: "CONFIG_TEMPLATES 4: ASSERT - Deleted" + assert: + that: + - test_four is changed + - test_four['diff']['after']['state'] == "absent" + - test_four['config_template']['name'] == "test_template" + - test_four['msg'] == "config_template test_template deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_console_port.yml b/tests/integration/targets/v4.0/tasks/netbox_console_port.yml new file mode 100644 index 000000000..1c97cb8ad --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_console_port.yml @@ -0,0 +1,108 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_CONSOLE_PORT +## +## +- name: "CONSOLE_PORT 1: Necessary info creation" + netbox.netbox.netbox_console_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Port + device: test100 + state: present + register: test_one + +- name: "CONSOLE_PORT 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['console_port']['name'] == "Console Port" + - test_one['console_port']['device'] == 1 + - test_one['msg'] == "console_port Console Port created" + +- name: "CONSOLE_PORT 2: Create duplicate" + netbox.netbox.netbox_console_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Port + device: test100 + state: present + register: test_two + +- name: "CONSOLE_PORT 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['console_port']['name'] == "Console Port" + - test_two['console_port']['device'] == 1 + - test_two['msg'] == "console_port Console Port already exists" + +- name: "CONSOLE_PORT 3: Update Console Port with other fields" + netbox.netbox.netbox_console_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Port + device: test100 + type: usb-a + description: test description + state: present + register: test_three + +- name: "CONSOLE_PORT 3: ASSERT - Update Console Port with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "usb-a" + - test_three['diff']['after']['description'] == "test description" + - test_three['console_port']['name'] == "Console Port" + - test_three['console_port']['device'] == 1 + - test_three['console_port']['type'] == "usb-a" + - test_three['console_port']['description'] == "test description" + - test_three['msg'] == "console_port Console Port updated" + +- name: "CONSOLE_PORT 4: Create Console Port for Delete Test" + netbox.netbox.netbox_console_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Port 2 + device: test100 + state: present + register: test_four + +- name: "CONSOLE_PORT 4: ASSERT - Create Console Port for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['console_port']['name'] == "Console Port 2" + - test_four['console_port']['device'] == 1 + - test_four['msg'] == "console_port Console Port 2 created" + +- name: "CONSOLE_PORT 5: Delete Console Port" + netbox.netbox.netbox_console_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Port 2 + device: test100 + state: absent + register: test_five + +- name: "CONSOLE_PORT 5: ASSERT - Delete Console Port" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "console_port Console Port 2 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_console_port_template.yml b/tests/integration/targets/v4.0/tasks/netbox_console_port_template.yml new file mode 100644 index 000000000..b1bd1d1e4 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_console_port_template.yml @@ -0,0 +1,105 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_CONSOLE_PORT_TEMPLATE +## +## +- name: "CONSOLE_PORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_console_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Port Template + device_type: Cisco Test + state: present + register: test_one + +- name: "CONSOLE_PORT_TEMPLATE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['console_port_template']['name'] == "Console Port Template" + - test_one['console_port_template']['device_type'] == 1 + - test_one['msg'] == "console_port_template Console Port Template created" + +- name: "CONSOLE_PORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_console_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Port Template + device_type: Cisco Test + state: present + register: test_two + +- name: "CONSOLE_PORT_TEMPLATE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['console_port_template']['name'] == "Console Port Template" + - test_two['console_port_template']['device_type'] == 1 + - test_two['msg'] == "console_port_template Console Port Template already exists" + +- name: "CONSOLE_PORT_TEMPLATE 3: Update Console Port Template with other fields" + netbox.netbox.netbox_console_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Port Template + device_type: Cisco Test + type: usb-a + state: present + register: test_three + +- name: "CONSOLE_PORT_TEMPLATE 3: ASSERT - Update Console Port Template with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "usb-a" + - test_three['console_port_template']['name'] == "Console Port Template" + - test_three['console_port_template']['device_type'] == 1 + - test_three['console_port_template']['type'] == "usb-a" + - test_three['msg'] == "console_port_template Console Port Template updated" + +- name: "CONSOLE_PORT_TEMPLATE 4: Create Console Port Template for Delete Test" + netbox.netbox.netbox_console_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Port Template 2 + device_type: Cisco Test + state: present + register: test_four + +- name: "CONSOLE_PORT_TEMPLATE 4: ASSERT - Create Console Port Template for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['console_port_template']['name'] == "Console Port Template 2" + - test_four['console_port_template']['device_type'] == 1 + - test_four['msg'] == "console_port_template Console Port Template 2 created" + +- name: "CONSOLE_PORT_TEMPLATE 5: Delete Console Port Template" + netbox.netbox.netbox_console_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Port Template 2 + device_type: Cisco Test + state: absent + register: test_five + +- name: "CONSOLE_PORT_TEMPLATE 5: ASSERT - Delete Console Port Template" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "console_port_template Console Port Template 2 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_console_server_port.yml b/tests/integration/targets/v4.0/tasks/netbox_console_server_port.yml new file mode 100644 index 000000000..f70345329 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_console_server_port.yml @@ -0,0 +1,108 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_CONSOLE_SERVER_PORT +## +## +- name: "CONSOLE_SERVER_PORT 1: Necessary info creation" + netbox.netbox.netbox_console_server_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Server Port + device: test100 + state: present + register: test_one + +- name: "CONSOLE_SERVER_PORT 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['console_server_port']['name'] == "Console Server Port" + - test_one['console_server_port']['device'] == 1 + - test_one['msg'] == "console_server_port Console Server Port created" + +- name: "CONSOLE_SERVER_PORT 2: Create duplicate" + netbox.netbox.netbox_console_server_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Server Port + device: test100 + state: present + register: test_two + +- name: "CONSOLE_SERVER_PORT 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['console_server_port']['name'] == "Console Server Port" + - test_two['console_server_port']['device'] == 1 + - test_two['msg'] == "console_server_port Console Server Port already exists" + +- name: "CONSOLE_SERVER_PORT 3: Update Console Server Port with other fields" + netbox.netbox.netbox_console_server_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Server Port + device: test100 + type: usb-a + description: test description + state: present + register: test_three + +- name: "CONSOLE_SERVER_PORT 3: ASSERT - Update Console Server Port with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "usb-a" + - test_three['diff']['after']['description'] == "test description" + - test_three['console_server_port']['name'] == "Console Server Port" + - test_three['console_server_port']['device'] == 1 + - test_three['console_server_port']['type'] == "usb-a" + - test_three['console_server_port']['description'] == "test description" + - test_three['msg'] == "console_server_port Console Server Port updated" + +- name: "CONSOLE_SERVER_PORT 4: Create Console Server Port for Delete Test" + netbox.netbox.netbox_console_server_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Server Port 2 + device: test100 + state: present + register: test_four + +- name: "CONSOLE_SERVER_PORT 4: ASSERT - Create Console Server Port for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['console_server_port']['name'] == "Console Server Port 2" + - test_four['console_server_port']['device'] == 1 + - test_four['msg'] == "console_server_port Console Server Port 2 created" + +- name: "CONSOLE_SERVER_PORT 5: Delete Console Server Port" + netbox.netbox.netbox_console_server_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Server Port 2 + device: test100 + state: absent + register: test_five + +- name: "CONSOLE_SERVER_PORT 5: ASSERT - Delete Console Server Port" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "console_server_port Console Server Port 2 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_console_server_port_template.yml b/tests/integration/targets/v4.0/tasks/netbox_console_server_port_template.yml new file mode 100644 index 000000000..4ad47d40a --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_console_server_port_template.yml @@ -0,0 +1,105 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_CONSOLE_SERVER_PORT_TEMPLATE +## +## +- name: "CONSOLE_SERVER_PORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_console_server_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Server Port Template + device_type: Cisco Test + state: present + register: test_one + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['console_server_port_template']['name'] == "Console Server Port Template" + - test_one['console_server_port_template']['device_type'] == 1 + - test_one['msg'] == "console_server_port_template Console Server Port Template created" + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_console_server_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Server Port Template + device_type: Cisco Test + state: present + register: test_two + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['console_server_port_template']['name'] == "Console Server Port Template" + - test_two['console_server_port_template']['device_type'] == 1 + - test_two['msg'] == "console_server_port_template Console Server Port Template already exists" + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 3: Update Console Server Port Template with other fields" + netbox.netbox.netbox_console_server_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Server Port Template + device_type: Cisco Test + type: usb-a + state: present + register: test_three + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 3: ASSERT - Update Console Server Port Template with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "usb-a" + - test_three['console_server_port_template']['name'] == "Console Server Port Template" + - test_three['console_server_port_template']['device_type'] == 1 + - test_three['console_server_port_template']['type'] == "usb-a" + - test_three['msg'] == "console_server_port_template Console Server Port Template updated" + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 4: Create Console Server Port Template for Delete Test" + netbox.netbox.netbox_console_server_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Server Port Template 2 + device_type: Cisco Test + state: present + register: test_four + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 4: ASSERT - Create Console Server Port Template for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['console_server_port_template']['name'] == "Console Server Port Template 2" + - test_four['console_server_port_template']['device_type'] == 1 + - test_four['msg'] == "console_server_port_template Console Server Port Template 2 created" + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 5: Delete Console Server Port Template" + netbox.netbox.netbox_console_server_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Console Server Port Template 2 + device_type: Cisco Test + state: absent + register: test_five + +- name: "CONSOLE_SERVER_PORT_TEMPLATE 5: ASSERT - Delete Console Server Port Template" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "console_server_port_template Console Server Port Template 2 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_contact.yml b/tests/integration/targets/v4.0/tasks/netbox_contact.yml new file mode 100644 index 000000000..feb9f7e9f --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_contact.yml @@ -0,0 +1,100 @@ +--- +## +## +### NETBOX_CONTACT +## +## +- name: "1 - Test contact creation" + netbox.netbox.netbox_contact: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Contact ABC" + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['contact']['name'] == "Contact ABC" + - test_one['msg'] == "contact Contact ABC created" + +- name: "Test duplicate contact" + netbox.netbox.netbox_contact: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Contact ABC" + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - not test_two['changed'] + - test_two['contact']['name'] == "Contact ABC" + - test_two['msg'] == "contact Contact ABC already exists" + +- name: "3 - Test update" + netbox.netbox.netbox_contact: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Contact ABC" + title: "New Title" + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['after']['title'] == "New Title" + - test_three['contact']['name'] == "Contact ABC" + - test_three['contact']['title'] == "New Title" + - test_three['msg'] == "contact Contact ABC updated" + +- name: "4 - Test delete" + netbox.netbox.netbox_contact: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Contact ABC" + state: "absent" + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "contact Contact ABC deleted" + +- name: "5 - Create contact with all parameters" + netbox.netbox.netbox_contact: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Contact ABC" + title: "Fancy title" + phone: "12345678" + email: "contact@contact.com" + tags: + - "tagA" + - "tagB" + - "tagC" + state: present + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['contact']['name'] == "Contact ABC" + - test_five['contact']['title'] == "Fancy title" + - test_five['contact']['phone'] == "12345678" + - test_five['contact']['tags'] | length == 3 + - test_five['msg'] == "contact Contact ABC created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_contact_role.yml b/tests/integration/targets/v4.0/tasks/netbox_contact_role.yml new file mode 100644 index 000000000..fb875748e --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_contact_role.yml @@ -0,0 +1,94 @@ +--- +## +## +### NETBOX_CONTACT_ROLE +## +## +- name: "CONTACT_ROLE 1: Necessary info creation" + netbox.netbox.netbox_contact_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Contact Role" + state: present + register: test_one + +- name: "CONTACT_ROLE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['contact_role']['name'] == "Test Contact Role" + - test_one['contact_role']['slug'] == "test-contact-role" + - test_one['msg'] == "contact_role Test Contact Role created" + +- name: "CONTACT_ROLE 2: Create duplicate" + netbox.netbox.netbox_contact_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Contact Role" + state: present + register: test_two + +- name: "CONTACT ROLE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['contact_role']['name'] == "Test Contact Role" + - test_two['contact_role']['slug'] == "test-contact-role" + - test_two['msg'] == "contact_role Test Contact Role already exists" + +- name: "CONTACT_ROLE 3: ASSERT - Update" + netbox.netbox.netbox_contact_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Contact Role" + description: "Update description" + state: present + register: test_three + +- name: "IPAM_ROLE 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Update description" + - test_three['contact_role']['name'] == "Test Contact Role" + - test_three['contact_role']['slug'] == "test-contact-role" + - test_three['contact_role']['description'] == "Update description" + - test_three['msg'] == "contact_role Test Contact Role updated" + +- name: "CONTACT_ROLE 4: ASSERT - Delete" + netbox.netbox.netbox_contact_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Contact Role + state: absent + register: test_four + +- name: "CONTACT_ROLE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "contact_role Test Contact Role deleted" + +- name: "CONTACT_ROLE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_contact_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Contact Role + state: absent + register: test_five + +- name: "CONTACT_ROLE 5: ASSERT - Delete non existing`" + assert: + that: + - not test_five['changed'] + - test_five['contact_role'] == None + - test_five['msg'] == "contact_role Test Contact Role already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_custom_field.yml b/tests/integration/targets/v4.0/tasks/netbox_custom_field.yml new file mode 100644 index 000000000..7b8525e8e --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_custom_field.yml @@ -0,0 +1,129 @@ +--- +## +## +### NETBOX_CUSTOM_FIELD +## +## +- name: "CUSTOM_FIELD 1: Necessary info creation" + netbox.netbox.netbox_custom_field: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: A_CustomField + type: text + state: present + register: test_one + +- name: "CUSTOM_FIELD 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['custom_field']['name'] == "A_CustomField" + - test_one['custom_field']['required'] == false + - test_one['custom_field']['content_types'] == ["dcim.device"] + - test_one['custom_field']['type'] == "text" + - test_one['custom_field']['weight'] == 100 + - test_one['msg'] == "custom_field A_CustomField created" + +- name: "CUSTOM_FIELD 2: Create duplicate" + netbox.netbox.netbox_custom_field: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: A_CustomField + state: present + register: test_two + +- name: "CUSTOM_FIELD 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['custom_field']['name'] == "A_CustomField" + - test_two['msg'] == "custom_field A_CustomField already exists" + +- name: "CUSTOM_FIELD 3: Update data and make it required" + netbox.netbox.netbox_custom_field: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: "A_CustomField" + description: "Added a description" + required: yes + state: present + register: test_three + +- name: "CUSTOM_FIELD 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Added a description" + - test_three['diff']['after']['required'] == true + - test_three['custom_field']['name'] == "A_CustomField" + - test_three['msg'] == "custom_field A_CustomField updated" + +- name: "CUSTOM_FIELD 4: Change content type" + netbox.netbox.netbox_custom_field: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "virtualization.virtualmachine" + name: "A_CustomField" + description: "Added a description" + required: yes + state: present + register: test_four + +- name: "CUSTOM_FIELD 4: ASSERT - Change content type" + assert: + that: + - test_four is changed + - test_four['diff']['after']['content_types'] == ["virtualization.virtualmachine"] + - test_four['custom_field']['name'] == "A_CustomField" + - test_four['msg'] == "custom_field A_CustomField updated" + +- name: "CUSTOM_FIELD 5: Delete" + netbox.netbox.netbox_custom_field: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "A_CustomField" + state: absent + register: test_five + +- name: "CUSTOM_FIELD 5: ASSERT - Deleted" + assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['custom_field']['name'] == "A_CustomField" + - test_five['msg'] == "custom_field A_CustomField deleted" + +# Change in NetBox 3.7 +#- name: "CUSTOM_FIELD 6: UI Visibility (hidden-ifunset)" +# netbox.netbox.netbox_custom_field: +# netbox_url: http://localhost:32768 +# netbox_token: 0123456789abcdef0123456789abcdef01234567 +# data: +# content_types: +# - "dcim.device" +# name: A_CustomField +# type: text +# ui_visibility: hidden-ifunset +# state: present +# register: test_six + +#- name: "CUSTOM_FIELD 6: UI Visibility (hidden-ifunset)" +# assert: +# that: +# - test_six is changed +# - test_six['custom_field']['name'] == "A_CustomField" +# - test_six['custom_field']['ui_visibility'] == "hidden-ifunset" diff --git a/tests/integration/targets/v4.0/tasks/netbox_custom_link.yml b/tests/integration/targets/v4.0/tasks/netbox_custom_link.yml new file mode 100644 index 000000000..8376d357b --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_custom_link.yml @@ -0,0 +1,113 @@ +--- +## +## +### NETBOX_CUSTOM_LINK +## +## +- name: "CUSTOM_LINK 1: Necessary info creation" + netbox.netbox.netbox_custom_link: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: Custom Link + link_text: Open Web management + link_url: !unsafe https://{{ obj.name }}.domain.local/ + state: present + register: test_one + +- name: "CUSTOM_LINK 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['custom_link']['name'] == "Custom Link" + - test_one['custom_link']['content_types'] == ["dcim.device"] + - test_one['custom_link']['link_text'] == "Open Web management" + - test_one['msg'] == "custom_link Custom Link created" + +- name: "CUSTOM_LINK 2: Create duplicate" + netbox.netbox.netbox_custom_link: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: Custom Link + link_text: Open Web management + link_url: !unsafe https://{{ obj.name }}.domain.local/ + state: present + register: test_two + +- name: "CUSTOM_LINK 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['custom_link']['name'] == "Custom Link" + - test_two['msg'] == "custom_link Custom Link already exists" + +- name: "CUSTOM_FIELD 3: Update data and add weight" + netbox.netbox.netbox_custom_link: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: Custom Link + link_text: Open Web management + link_url: !unsafe https://{{ obj.name }}.domain.local/ + weight: 50 + state: present + register: test_three + +- name: "CUSTOM_FIELD 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['weight'] == 50 + - test_three['custom_link']['name'] == "Custom Link" + - test_three['msg'] == "custom_link Custom Link updated" + +- name: "CUSTOM_LINK 4: Change content type" + netbox.netbox.netbox_custom_link: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "virtualization.virtualmachine" + name: Custom Link + link_text: Open Web management + link_url: !unsafe https://{{ obj.name }}.domain.local/ + state: present + register: test_four + +- name: "CUSTOM_LINK 4: ASSERT - Change content type" + assert: + that: + - test_four is changed + - test_four['diff']['after']['content_types'] == ["virtualization.virtualmachine"] + - test_four['custom_link']['name'] == "Custom Link" + - test_four['msg'] == "custom_link Custom Link updated" + +- name: "CUSTOM_LINK 5: Delete" + netbox.netbox.netbox_custom_link: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "virtualization.virtualmachine" + name: Custom Link + link_text: Open Web management + link_url: !unsafe https://{{ obj.name }}.domain.local/ + state: absent + register: test_five + +- name: "CUSTOM_LINK 5: ASSERT - Deleted" + assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['custom_link']['name'] == "Custom Link" + - test_five['msg'] == "custom_link Custom Link deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_device.yml b/tests/integration/targets/v4.0/tasks/netbox_device.yml new file mode 100644 index 000000000..711e59648 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_device.yml @@ -0,0 +1,243 @@ +--- +## +## +### NETBOX_DEVICE +## +## +- name: "1 - Device with required information" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "R1" + device_type: + id: "1" + device_role: "Core Switch" + site: "Test Site" + status: "Staged" + state: present + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == 'absent' + - test_one['diff']['after']['state'] == 'present' + - test_one['device']['name'] == "R1" + - test_one['device']['role'] == 1 + - test_one['device']['device_type'] == 1 + - test_one['device']['site'] == 1 + - test_one['device']['status'] == "staged" + - test_one['device']['name'] == "R1" + - test_one['msg'] == "device R1 created" + +- name: "2 - Duplicate device" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "R1" + device_type: "Cisco Test" + device_role: "Core Switch" + site: "Test Site" + status: "Staged" + state: present + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - not test_two['changed'] + - test_two['device']['name'] == "R1" + - test_two['device']['role'] == 1 + - test_two['device']['device_type'] == 1 + - test_two['device']['site'] == 1 + - test_two['device']['status'] == "staged" + - test_two['msg'] == "device R1 already exists" + +- name: "3 - Update device" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "R1" + serial: "FXS1001" + local_context_data: + bgp_as: "65412" + virtual_chassis: "VC1" + vc_position: 3 + vc_priority: 15 + location: "Test Rack Group" + state: present + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['after']['serial'] == "FXS1001" + - test_three['diff']['after']['local_context_data']["bgp_as"] == "65412" + - test_three['diff']['after']['virtual_chassis'] == 1 + - test_three['diff']['after']['vc_position'] == 3 + - test_three['diff']['after']['vc_priority'] == 15 + - test_three['device']['name'] == "R1" + - test_three['device']['role'] == 1 + - test_three['device']['device_type'] == 1 + - test_three['device']['site'] == 1 + - test_three['device']['status'] == "staged" + - test_three['device']['serial'] == "FXS1001" + - test_three['device']['local_context_data']["bgp_as"] == "65412" + - test_three['device']['virtual_chassis'] == 1 + - test_three['device']['vc_position'] == 3 + - test_three['device']['vc_priority'] == 15 + - test_three['device']['location'] == 1 + - test_three['msg'] == "device R1 updated" + +- name: "3.1 - Update device name using query_params" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "R1-changed-name" + serial: "FXS1001" + query_params: + - serial + state: present + register: test_three_dot_one + +- name: "3.1 - ASSERT" + assert: + that: + - test_three_dot_one is changed + - test_three_dot_one['diff']['after']['name'] == "R1-changed-name" + - test_three_dot_one['device']['role'] == 1 + - test_three_dot_one['device']['device_type'] == 1 + - test_three_dot_one['device']['site'] == 1 + - test_three_dot_one['device']['status'] == "staged" + - test_three_dot_one['device']['serial'] == "FXS1001" + - test_three_dot_one['device']['local_context_data']["bgp_as"] == "65412" + - test_three_dot_one['msg'] == "device R1-changed-name updated" + +- name: "4 - Create device with tags and assign to rack" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "TestR1" + device_type: "1841" + device_role: "Core Switch" + site: "Test Site2" + rack: "Test Rack Site 2" + position: 35.5 + face: "Front" + tags: + - "schnozzberry" + tenant: "Test Tenant" + asset_tag: "1234" + state: present + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['device']['name'] == "TestR1" + - test_four['device']['role'] == 1 + - test_four['device']['device_type'] == 5 + - test_four['device']['site'] == 2 + - test_four['device']['status'] == "active" + - test_four['device']['rack'] == 1 + - test_four['device']['tags'][0] == 4 + - test_four['device']['tenant'] == 1 + - test_four['device']['asset_tag'] == '1234' + - test_four['msg'] == "device TestR1 created" + +- name: "5 - Delete previous device" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "TestR1" + state: absent + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "device TestR1 deleted" + +- name: "6 - Delete R1" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "R1-changed-name" + state: absent + register: test_six + +- name: "6 - ASSERT" + assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "present" + - test_six['diff']['after']['state'] == "absent" + - test_six['msg'] == "device R1-changed-name deleted" + +- name: "7 - Add primary_ip4/6 to test100" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "test100" + primary_ip4: "172.16.180.1/24" + primary_ip6: "2001::1:1/64" + state: present + register: test_seven + +- name: "7 - ASSERT" + assert: + that: + - test_seven is changed + - test_seven['diff']['after']['primary_ip4'] == 1 + - test_seven['diff']['after']['primary_ip6'] == 2 + - test_seven['device']['name'] == "test100" + - test_seven['device']['role'] == 1 + - test_seven['device']['device_type'] == 1 + - test_seven['device']['site'] == 1 + - test_seven['device']['status'] == "active" + - test_seven['device']['primary_ip4'] == 1 + - test_seven['device']['primary_ip6'] == 2 + - test_seven['msg'] == "device test100 updated" + +- name: "8 - Device with empty string name" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "" + device_type: + id: 1 + device_role: "Core Switch" + site: "Test Site" + status: "Staged" + state: present + register: test_eight + +- name: "8 - ASSERT" + assert: + that: + - test_eight is changed + - test_eight['diff']['before']['state'] == 'absent' + - test_eight['diff']['after']['state'] == 'present' + - test_eight['device']['role'] == 1 + - test_eight['device']['device_type'] == 1 + - test_eight['device']['site'] == 1 + - test_eight['device']['status'] == "staged" + - "'-' in test_eight['device']['name']" + - "test_eight['device']['name'] | length == 36" diff --git a/tests/integration/targets/v4.0/tasks/netbox_device_bay.yml b/tests/integration/targets/v4.0/tasks/netbox_device_bay.yml new file mode 100644 index 000000000..18a804354 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_device_bay.yml @@ -0,0 +1,87 @@ +--- +## +## +### NETBOX_DEVICE_BAY +## +## +- name: "DEVICE_BAY 1: Necessary info creation" + netbox.netbox.netbox_device_bay: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: "Test Nexus One" + name: "Device Bay One" + state: present + register: test_one + +- name: "DEVICE_BAY 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['device_bay']['name'] == "Device Bay One" + - test_one['device_bay']['device'] == 4 + - test_one['msg'] == "device_bay Device Bay One created" + +- name: "DEVICE_BAY 2: Create duplicate" + netbox.netbox.netbox_device_bay: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: "Test Nexus One" + name: "Device Bay One" + state: present + register: test_two + +- name: "DEVICE_BAY 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['device_bay']['name'] == "Device Bay One" + - test_two['device_bay']['device'] == 4 + - test_two['msg'] == "device_bay Device Bay One already exists" + +- name: "DEVICE_BAY 3: ASSERT - Update" + netbox.netbox.netbox_device_bay: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: "Test Nexus One" + name: "Device Bay One" + installed_device: "Test Nexus Child One" + tags: + - "Schnozzberry" + state: present + register: test_three + +- name: "DEVICE_BAY 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['installed_device'] == 5 + - test_three['diff']['after']['tags'][0] == 4 + - test_three['device_bay']['name'] == "Device Bay One" + - test_three['device_bay']['device'] == 4 + - test_three['device_bay']['installed_device'] == 5 + - test_three['device_bay']['tags'][0] == 4 + - test_three['msg'] == "device_bay Device Bay One updated" + +- name: "DEVICE_BAY 4: ASSERT - Delete" + netbox.netbox.netbox_device_bay: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Device Bay One" + state: absent + register: test_four + +- name: "DEVICE_BAY 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['device_bay']['name'] == "Device Bay One" + - test_four['device_bay']['device'] == 4 + - test_four['device_bay']['installed_device'] == 5 + - test_four['device_bay']['tags'][0] == 4 + - test_four['msg'] == "device_bay Device Bay One deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_device_bay_template.yml b/tests/integration/targets/v4.0/tasks/netbox_device_bay_template.yml new file mode 100644 index 000000000..4b6965033 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_device_bay_template.yml @@ -0,0 +1,81 @@ +--- +## +## +### NETBOX_DEVICE_BAY_TEMPLATE +## +## +- name: "DEVICE_BAY_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_device_bay_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device_type: WS Test 3850 + name: Device Bay Template One + state: present + register: test_one + +- name: "DEVICE_BAY_TEMPLATE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['device_bay_template']['name'] == "Device Bay Template One" + - test_one['device_bay_template']['device_type'] == 7 + - test_one['msg'] == "device_bay_template Device Bay Template One created" + +- name: "DEVICE_BAY_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_device_bay_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device_type: WS Test 3850 + name: Device Bay Template One + state: present + register: test_two + +- name: "DEVICE_BAY_TEMPLATE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['device_bay_template']['name'] == "Device Bay Template One" + - test_two['device_bay_template']['device_type'] == 7 + - test_two['msg'] == "device_bay_template Device Bay Template One already exists" + +- name: "DEVICE_BAY_TEMPLATE 3: ASSERT - Create Device Bay Template for Delete Test" + netbox.netbox.netbox_device_bay_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device_type: WS Test 3850 + name: Device Bay Template Two + state: present + register: test_three + +- name: "DEVICE_BAY_TEMPLATE 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['device_bay_template']['name'] == "Device Bay Template Two" + - test_three['device_bay_template']['device_type'] == 7 + - test_three['msg'] == "device_bay_template Device Bay Template Two created" + +- name: "DEVICE_BAY_TEMPLATE 4: ASSERT - Delete" + netbox.netbox.netbox_device_bay_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Device Bay Template Two + device_type: WS Test 3850 + state: absent + register: test_four + +- name: "DEVICE_BAY_TEMPLATE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['device_bay_template']['name'] == "Device Bay Template Two" + - test_four['device_bay_template']['device_type'] == 7 + - test_four['msg'] == "device_bay_template Device Bay Template Two deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_device_interface.yml b/tests/integration/targets/v4.0/tasks/netbox_device_interface.yml new file mode 100644 index 000000000..fa3f10214 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_device_interface.yml @@ -0,0 +1,312 @@ +--- +# NETBOX_DEVICE_INTERFACE + +- name: "1 - Interface with required information" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet3 + type: "1000Base-T (1GE)" + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['msg'] == "interface GigabitEthernet3 created" + - test_one['diff']['before']['state'] == 'absent' + - test_one['diff']['after']['state'] == 'present' + - test_one['interface']['name'] == "GigabitEthernet3" + - test_one['interface']['device'] == 1 + +- name: "2 - Update test100 - GigabitEthernet3" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet3 + mtu: 1600 + enabled: false + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - test_two is changed + - test_two['msg'] == "interface GigabitEthernet3 updated" + - test_two['diff']['after']['enabled'] == false + - test_two['diff']['after']['mtu'] == 1600 + - test_two['interface']['name'] == "GigabitEthernet3" + - test_two['interface']['device'] == 1 + - test_two['interface']['enabled'] == false + - test_two['interface']['mtu'] == 1600 + +- name: "3 - Delete interface test100 - GigabitEthernet3" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet3 + state: absent + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['msg'] == "interface GigabitEthernet3 deleted" + - test_three['diff']['before']['state'] == "present" + - test_three['diff']['after']['state'] == "absent" + +- name: "4 - Create LAG with several specified options" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: port-channel1 + type: Link Aggregation Group (LAG) + mtu: 1600 + mgmt_only: false + mode: Access + state: present + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['msg'] == "interface port-channel1 created" + - test_four['diff']['before']['state'] == 'absent' + - test_four['diff']['after']['state'] == 'present' + - test_four['interface']['name'] == "port-channel1" + - test_four['interface']['device'] == 1 + - test_four['interface']['enabled'] == true + - test_four['interface']['type'] == "lag" + - test_four['interface']['mgmt_only'] == false + - test_four['interface']['mode'] == "access" + - test_four['interface']['mtu'] == 1600 + +- name: "5 - Create interface and assign it to parent LAG" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet3 + enabled: false + type: 1000Base-T (1GE) + lag: + name: port-channel1 + mtu: 1600 + mgmt_only: false + mode: Access + state: present + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['msg'] == "interface GigabitEthernet3 created" + - test_five['diff']['before']['state'] == 'absent' + - test_five['diff']['after']['state'] == 'present' + - test_five['interface']['name'] == "GigabitEthernet3" + - test_five['interface']['device'] == 1 + - test_five['interface']['enabled'] == false + - test_five['interface']['type'] == "1000base-t" + - test_five['interface']['mgmt_only'] == false + - test_five['interface']['lag'] == test_four["interface"]["id"] + - test_five['interface']['mode'] == "access" + - test_five['interface']['mtu'] == 1600 + +- name: "6 - Create interface as trunk port" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet21 + enabled: false + type: 1000Base-T (1GE) + untagged_vlan: + name: Wireless + site: Test Site + tagged_vlans: + - name: Data + site: Test Site + - name: VoIP + site: Test Site + mtu: 1600 + mgmt_only: true + mode: Tagged + state: present + register: test_six + +- name: "6 - ASSERT" + assert: + that: + - test_six is changed + - test_six['msg'] == "interface GigabitEthernet21 created" + - test_six['diff']['before']['state'] == 'absent' + - test_six['diff']['after']['state'] == 'present' + - test_six['interface']['name'] == "GigabitEthernet21" + - test_six['interface']['device'] == 1 + - test_six['interface']['enabled'] == false + - test_six['interface']['type'] == "1000base-t" + - test_six['interface']['mgmt_only'] == true + - test_six['interface']['mode'] == "tagged" + - test_six['interface']['mtu'] == 1600 + - test_six['interface']['tagged_vlans'] == [2, 3] + - test_six['interface']['untagged_vlan'] == 1 + +- name: "7 - Duplicate Interface" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet1 + register: test_seven + +- name: "7 - ASSERT" + assert: + that: + - not test_seven['changed'] + - test_seven['msg'] == "interface GigabitEthernet1 already exists" + - test_seven['interface']['name'] == "GigabitEthernet1" + - test_seven['interface']['device'] == 1 + +- name: "Add port-channel1 to R1 to test finding proper port-channel1" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: "R1-Device" + name: "port-channel1" + type: "Link Aggregation Group (LAG)" + +- name: "8 - Create interface and assign it to parent LAG - non dict" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet4 + enabled: false + type: 1000Base-T (1GE) + lag: "port-channel1" + mtu: 1600 + mgmt_only: false + mode: Access + state: present + register: test_eight + +- name: "8 - ASSERT" + assert: + that: + - test_eight is changed + - test_eight['msg'] == "interface GigabitEthernet4 created" + - test_eight['diff']['before']['state'] == 'absent' + - test_eight['diff']['after']['state'] == 'present' + - test_eight['interface']['name'] == "GigabitEthernet4" + - test_eight['interface']['device'] == 1 + - test_eight['interface']['enabled'] == false + - test_eight['interface']['type'] == "1000base-t" + - test_eight['interface']['mgmt_only'] == false + - test_eight['interface']['lag'] == 10 + - test_eight['interface']['mode'] == "access" + - test_eight['interface']['mtu'] == 1600 + +- name: "9 - Create interface on VC child" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: Test Nexus Child One + name: Ethernet2/2 + type: 1000Base-T (1GE) + state: present + register: test_nine + +- name: "9 - ASSERT" + assert: + that: + - test_nine is changed + - test_nine['msg'] == "interface Ethernet2/2 created" + - test_nine['diff']['before']['state'] == 'absent' + - test_nine['diff']['after']['state'] == 'present' + - test_nine['interface']['name'] == "Ethernet2/2" + - test_nine['interface']['device'] == 5 + - test_nine['interface']['enabled'] == true + - test_nine['interface']['type'] == "1000base-t" + +- name: "10 - Update interface on VC child" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: Test Nexus One + name: Ethernet2/2 + description: "Updated child interface from parent device" + type: 1000Base-T (1GE) + update_vc_child: True + state: present + register: test_ten + +- name: "10 - ASSERT" + assert: + that: + - test_ten is changed + - test_ten['msg'] == "interface Ethernet2/2 updated" + - test_ten['diff']['after']['description'] == 'Updated child interface from parent device' + - test_ten['interface']['name'] == "Ethernet2/2" + - test_ten['interface']['device'] == 5 + - test_ten['interface']['enabled'] == true + - test_ten['interface']['type'] == "1000base-t" + - test_ten['interface']['description'] == 'Updated child interface from parent device' + +- name: "11 - Update interface on VC child w/o update_vc_child" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: Test Nexus One + name: Ethernet2/2 + description: "Updated child interface from parent device - test" + type: 1000Base-T (1GE) + state: present + ignore_errors: yes + register: test_eleven + +- name: "11 - ASSERT" + assert: + that: + - test_eleven is failed + - test_eleven['msg'] == "Must set update_vc_child to True to allow child device interface modification" + +- name: "12 - Create interface and mark it as connected" + netbox.netbox.netbox_device_interface: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: test100 + name: GigabitEthernet5 + type: 1000Base-T (1GE) + mark_connected: true + register: test_twelve + +- name: "12- ASSERT" + assert: + that: + - test_twelve is changed + - test_twelve['msg'] == "interface GigabitEthernet5 created" + - test_twelve['diff']['before']['state'] == 'absent' + - test_twelve['diff']['after']['state'] == 'present' + - test_twelve['interface']['name'] == "GigabitEthernet5" + - test_twelve['interface']['device'] == 1 + - test_twelve['interface']['mark_connected'] == true diff --git a/tests/integration/targets/v4.0/tasks/netbox_device_interface_template.yml b/tests/integration/targets/v4.0/tasks/netbox_device_interface_template.yml new file mode 100644 index 000000000..b6e98914f --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_device_interface_template.yml @@ -0,0 +1,109 @@ +--- +## +## +### NETBOX_DEVICE_INTERFACE_TEMPLATE +## +## +- name: "1 - Interface with required information" + netbox.netbox.netbox_device_interface_template: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: Arista Test + name: 10GBASE-T (10GE) + type: 10gbase-t + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['msg'] == "interface_template 10GBASE-T (10GE) created" + - test_one['diff']['before']['state'] == 'absent' + - test_one['diff']['after']['state'] == 'present' + - test_one['interface_template']['name'] == "10GBASE-T (10GE)" + - test_one['interface_template']['device_type'] == 2 + - test_one['interface_template']['type'] == '10gbase-t' + +- name: "2 - Update 10GBASE-T (10GE)" + netbox.netbox.netbox_device_interface_template: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: Arista Test + name: 10GBASE-T (10GE) + type: 10gbase-t + mgmt_only: true + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - test_two is changed + - test_two['msg'] == "interface_template 10GBASE-T (10GE) updated" + - test_two['diff']['after']['mgmt_only'] == true + - test_two['interface_template']['name'] == "10GBASE-T (10GE)" + - test_two['interface_template']['device_type'] == 2 + - test_two['interface_template']['mgmt_only'] == true + +- name: "3 - Delete interface template 10GBASE-T (10GE)" + netbox.netbox.netbox_device_interface_template: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: Arista Test + name: 10GBASE-T (10GE) + type: 10gbase-t + state: absent + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['msg'] == "interface_template 10GBASE-T (10GE) deleted" + - test_three['diff']['before']['state'] == "present" + - test_three['diff']['after']['state'] == "absent" + +- name: "4 - Create LAG with several specified options" + netbox.netbox.netbox_device_interface_template: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: Arista Test + name: port channel template + type: lag + mgmt_only: false + state: present + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['msg'] == "interface_template port channel template created" + - test_four['diff']['before']['state'] == 'absent' + - test_four['diff']['after']['state'] == 'present' + - test_four['interface_template']['name'] == "port channel template" + - test_four['interface_template']['device_type'] == 2 + - test_four['interface_template']['type'] == "lag" + - test_four['interface_template']['mgmt_only'] == false + +- name: "5 - Duplicate Interface Template port channel template" + netbox.netbox.netbox_device_interface_template: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device_type: Arista Test + name: port channel template + type: lag + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - not test_five['changed'] + - test_five['msg'] == "interface_template port channel template already exists" + - test_five['interface_template']['name'] == "port channel template" + - test_five['interface_template']['device_type'] == 2 + - test_five['interface_template']['type'] == "lag" diff --git a/tests/integration/targets/v4.0/tasks/netbox_device_role.yml b/tests/integration/targets/v4.0/tasks/netbox_device_role.yml new file mode 100644 index 000000000..64ec9840f --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_device_role.yml @@ -0,0 +1,101 @@ +--- +## +## +### NETBOX_DEVICE_ROLE +## +## +- name: "DEVICE_ROLE 1: Necessary info creation" + netbox.netbox.netbox_device_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Device Role" + color: "FFFFFF" + state: present + register: test_one + +- name: "DEVICE_ROLE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['device_role']['name'] == "Test Device Role" + - test_one['device_role']['slug'] == "test-device-role" + - test_one['device_role']['color'] == "ffffff" + - test_one['msg'] == "device_role Test Device Role created" + +- name: "DEVICE_ROLE 2: Create duplicate" + netbox.netbox.netbox_device_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Device Role" + color: "FFFFFF" + state: present + register: test_two + +- name: "DEVICE_ROLE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['device_role']['name'] == "Test Device Role" + - test_two['device_role']['slug'] == "test-device-role" + - test_two['device_role']['color'] == "ffffff" + - test_two['msg'] == "device_role Test Device Role already exists" + +- name: "DEVICE_ROLE 3: ASSERT - Update" + netbox.netbox.netbox_device_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Device Role" + color: "003EFF" + vm_role: false + state: present + register: test_three + +- name: "DEVICE_ROLE 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['after']['color'] == "003eff" + - test_three['diff']['after']['vm_role'] == false + - test_three['device_role']['name'] == "Test Device Role" + - test_three['device_role']['slug'] == "test-device-role" + - test_three['device_role']['color'] == "003eff" + - test_three['device_role']['vm_role'] == false + - test_three['msg'] == "device_role Test Device Role updated" + +- name: "DEVICE_ROLE 4: ASSERT - Delete" + netbox.netbox.netbox_device_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Device Role + state: absent + register: test_four + +- name: "DEVICE_ROLE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "device_role Test Device Role deleted" + +- name: "DEVICE_ROLE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_device_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Device Role + state: absent + register: test_five + +- name: "DEVICE_ROLE 5: ASSERT - Delete non existing`" + assert: + that: + - not test_five['changed'] + - test_five['device_role'] == None + - test_five['msg'] == "device_role Test Device Role already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_device_type.yml b/tests/integration/targets/v4.0/tasks/netbox_device_type.yml new file mode 100644 index 000000000..5587119f3 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_device_type.yml @@ -0,0 +1,132 @@ +--- +## +## +### NETBOX_DEVICE_TYPE +## +## +- name: "DEVICE_TYPE 1: Necessary info creation" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + slug: test-device-type + model: ws-test-3750 + manufacturer: Test Manufacturer + state: present + register: test_one + +- name: "DEVICE_TYPE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['device_type']['slug'] == "test-device-type" + - test_one['device_type']['model'] == "ws-test-3750" + - test_one['device_type']['manufacturer'] == 3 + - test_one['msg'] == "device_type test-device-type created" + +- name: "DEVICE_TYPE 2: Create duplicate" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + slug: test-device-type + model: "ws-test-3750" + manufacturer: Test Manufacturer + state: present + register: test_two + +- name: "DEVICE_TYPE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_one['device_type']['slug'] == "test-device-type" + - test_one['device_type']['model'] == "ws-test-3750" + - test_one['device_type']['manufacturer'] == 3 + - test_two['msg'] == "device_type test-device-type already exists" + +- name: "DEVICE_TYPE 3: ASSERT - Update" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + slug: test-device-type + model: ws-test-3750 + manufacturer: Test Manufacturer + part_number: ws-3750g-v2 + u_height: 1.5 + is_full_depth: false + subdevice_role: parent + state: present + register: test_three + +- name: "DEVICE_TYPE 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['after']['is_full_depth'] == false + - test_three['diff']['after']['part_number'] == "ws-3750g-v2" + - test_three['diff']['after']['subdevice_role'] == "parent" + - test_three['device_type']['slug'] == "test-device-type" + - test_three['device_type']['model'] == "ws-test-3750" + - test_three['device_type']['manufacturer'] == 3 + - test_three['device_type']['is_full_depth'] == false + - test_three['device_type']['part_number'] == "ws-3750g-v2" + - test_three['device_type']['subdevice_role'] == "parent" + - test_three['msg'] == "device_type test-device-type updated" + +- name: "DEVICE_TYPE 4: ASSERT - Delete" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + model: test-device-type + state: absent + register: test_four + +- name: "DEVICE_TYPE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "device_type test-device-type deleted" + +- name: "DEVICE_TYPE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + model: "Test Device Type" + state: absent + register: test_five + +- name: "DEVICE_TYPE 5: ASSERT - Delete non existing`" + assert: + that: + - not test_five['changed'] + - test_five['device_type'] == None + - test_five['msg'] == "device_type Test Device Type already absent" + +- name: "DEVICE_TYPE 6: Without Slug" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + model: "WS Test 3850" + manufacturer: "Test Manufacturer" + subdevice_role: "parent" + state: present + register: test_six + +- name: "DEVICE_TYPE 6: ASSERT - Without Slug" + assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['device_type']['slug'] == "ws-test-3850" + - test_six['device_type']['model'] == "WS Test 3850" + - test_six['device_type']['manufacturer'] == 3 + - test_six['msg'] == "device_type WS Test 3850 created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_export_template.yml b/tests/integration/targets/v4.0/tasks/netbox_export_template.yml new file mode 100644 index 000000000..b3dcea015 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_export_template.yml @@ -0,0 +1,118 @@ +--- +## +## +### NETBOX_EXPORT_TEMPLATE +## +## +- name: "EXPORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_export_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: Example Export Template + description: Export Devices + template_code: !unsafe >- + {% for obj in queryset %}{{ obj.name }}{% endfor %} + state: present + register: test_one + +- name: "EXPORT_TEMPLATE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['export_template']['name'] == "Example Export Template" + - test_one['export_template']['content_types'] == ["dcim.device"] + - test_one['export_template']['description'] == "Export Devices" + - test_one['msg'] == "export_template Example Export Template created" + +- name: "EXPORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_export_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: Example Export Template + description: Export Devices + template_code: !unsafe >- + {% for obj in queryset %}{{ obj.name }}{% endfor %} + state: present + register: test_two + +- name: "EXPORT_TEMPLATE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['export_template']['name'] == "Example Export Template" + - test_two['msg'] == "export_template Example Export Template already exists" + +- name: "EXPORT_TEMPLATE 3: Update data and remove as_attachment" + netbox.netbox.netbox_export_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: Example Export Template + description: Export Devices + template_code: !unsafe >- + {% for obj in queryset %}{{ obj.name }}{% endfor %} + as_attachment: no + state: present + register: test_three + +- name: "EXPORT_TEMPLATE 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['as_attachment'] == false + - test_three['export_template']['name'] == "Example Export Template" + - test_three['msg'] == "export_template Example Export Template updated" + +- name: "EXPORT_TEMPLATE 4: Change content type" + netbox.netbox.netbox_export_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "virtualization.virtualmachine" + name: Example Export Template + description: Export Devices + template_code: !unsafe >- + {% for obj in queryset %}{{ obj.name }}{% endfor %} + state: present + register: test_four + +- name: "EXPORT_TEMPLATE 4: ASSERT - Change content type" + assert: + that: + - test_four is changed + - test_four['diff']['after']['content_types'] == ["virtualization.virtualmachine"] + - test_four['export_template']['name'] == "Example Export Template" + - test_four['msg'] == "export_template Example Export Template updated" + +- name: "EXPORT_TEMPLATE 5: Delete" + netbox.netbox.netbox_export_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "virtualization.virtualmachine" + name: Example Export Template + description: Export Devices + template_code: !unsafe >- + {% for obj in queryset %}{{ obj.name }}{% endfor %} + state: absent + register: test_five + +- name: "EXPORT_TEMPLATE 5: ASSERT - Deleted" + assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['export_template']['name'] == "Example Export Template" + - test_five['msg'] == "export_template Example Export Template deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_fhrp_group.yml b/tests/integration/targets/v4.0/tasks/netbox_fhrp_group.yml new file mode 100644 index 000000000..91788ef02 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_fhrp_group.yml @@ -0,0 +1,91 @@ +--- +## +## +### NETBOX_FHRP_GROUP +## +## +- name: "FHRP group 1: Test FHRP group creation" + netbox.netbox.netbox_fhrp_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + protocol: "glbp" + group_id: 111 + state: present + register: test_one + +- name: "FHRP group: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['fhrp_group']['group_id'] == 111 + - test_one['fhrp_group']['protocol'] == "glbp" + - test_one['msg'] == "fhrp_group 111 created" + +- name: "FHRP group 2: Create duplicate" + netbox.netbox.netbox_fhrp_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + protocol: "glbp" + group_id: 111 + state: present + register: test_two + +- name: "FHRP group 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['fhrp_group']['group_id'] == 111 + - test_two['fhrp_group']['protocol'] == "glbp" + - test_two['msg'] == "fhrp_group 111 already exists" + +- name: "FHRP group 3: Update FHRP group with other fields" + netbox.netbox.netbox_fhrp_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + protocol: "glbp" + group_id: 111 + auth_type: md5 + auth_key: 11111 + description: Test description + tags: + - "Schnozzberry" + state: present + register: test_three + +- name: "FHRP group 3: ASSERT - Update FHRP group with other fields" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['auth_type'] == "md5" + - test_three['diff']['after']['auth_key'] == "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER" + - test_three['diff']['after']['description'] == "Test description" + - test_three['diff']['after']['tags'][0] == 4 + - test_three['fhrp_group']['group_id'] == 111 + - test_three['fhrp_group']['protocol'] == "glbp" + - test_three['fhrp_group']['auth_type'] == "md5" + - test_three['fhrp_group']['auth_key'] == "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER" + - test_three['fhrp_group']['description'] == "Test description" + - test_three['fhrp_group']['tags'][0] == 4 + - test_three['msg'] == "fhrp_group 111 updated" + +- name: "FHRP group 4: ASSERT - Delete" + netbox.netbox.netbox_fhrp_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + group_id: 111 + state: absent + register: test_four + +- name: "FHRP group 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "fhrp_group 111 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_fhrp_group_assignment.yml b/tests/integration/targets/v4.0/tasks/netbox_fhrp_group_assignment.yml new file mode 100644 index 000000000..27f20c293 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_fhrp_group_assignment.yml @@ -0,0 +1,92 @@ +--- +## +## +### NETBOX_FHRP_GROUP_ASSIGNMENT +## +## +- name: "FHRP group assignment 1: Test FHRP group assignment creation" + netbox.netbox.netbox_fhrp_group_assignment: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + fhrp_group: 1 + interface_type: dcim.interface + interface_id: 1 + priority: 1 + state: present + register: test_one + +- name: "FHRP group assignment: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['fhrp_group_assignment']['group'] == 1 + - test_one['fhrp_group_assignment']['interface_type'] == "dcim.interface" + - test_one['fhrp_group_assignment']['interface_id'] == 1 + - test_one['fhrp_group_assignment']['priority'] == 1 + - test_one['msg'] == "fhrp_group_assignment fhrp_group 1 > dcim.interface 1 created" + +- name: "FHRP group assignment 2: Create duplicate" + netbox.netbox.netbox_fhrp_group_assignment: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + fhrp_group: 1 + interface_type: dcim.interface + interface_id: 1 + priority: 1 + state: present + register: test_two + +- name: "FHRP group assignment 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['fhrp_group_assignment']['group'] == 1 + - test_two['fhrp_group_assignment']['interface_type'] == "dcim.interface" + - test_two['fhrp_group_assignment']['interface_id'] == 1 + - test_two['fhrp_group_assignment']['priority'] == 1 + - test_two['msg'] == "fhrp_group_assignment fhrp_group 1 > dcim.interface 1 already exists" + +- name: "FHRP group assignment 3: Update FHRP group assignment" + netbox.netbox.netbox_fhrp_group_assignment: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + fhrp_group: 1 + interface_type: dcim.interface + interface_id: 1 + priority: 2 + state: present + register: test_three + +- name: "FHRP group assignment 3: ASSERT - Update FHRP group assignment" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['fhrp_group_assignment']['group'] == 1 + - test_three['fhrp_group_assignment']['interface_type'] == "dcim.interface" + - test_three['fhrp_group_assignment']['interface_id'] == 1 + - test_three['fhrp_group_assignment']['priority'] == 2 + - test_three['msg'] == "fhrp_group_assignment fhrp_group 1 > dcim.interface 1 updated" + +- name: "FHRP group assignment 4: Delete FHRP group assignment" + netbox.netbox.netbox_fhrp_group_assignment: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + fhrp_group: 1 + interface_type: dcim.interface + interface_id: 1 + state: absent + register: test_four + +- name: "FHRP group assignment 3: ASSERT - Delete FHRP group assignment" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "fhrp_group_assignment fhrp_group 1 > dcim.interface 1 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_front_port.yml b/tests/integration/targets/v4.0/tasks/netbox_front_port.yml new file mode 100644 index 000000000..1f4c60a4d --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_front_port.yml @@ -0,0 +1,150 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_FRONT_PORT +## +## +- name: "FRONT_PORT 1: Necessary info creation" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port + device: test100 + type: bnc + rear_port: Rear Port + state: present + register: test_one + +- name: "FRONT_PORT 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['front_port']['name'] == "Front Port" + - test_one['front_port']['device'] == 1 + - test_one['front_port']['type'] == "bnc" + - test_one['front_port']['rear_port'] == 1 + - test_one['msg'] == "front_port Front Port created" + +- name: "FRONT_PORT 2: Create duplicate" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port + device: test100 + type: bnc + rear_port: Rear Port + state: present + register: test_two + +- name: "FRONT_PORT 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['front_port']['name'] == "Front Port" + - test_two['front_port']['device'] == 1 + - test_two['front_port']['type'] == "bnc" + - test_two['front_port']['rear_port'] == 1 + - test_two['msg'] == "front_port Front Port already exists" + +- name: "FRONT_PORT 3: Update Front Port with other fields" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port + device: test100 + type: bnc + rear_port: Rear Port + rear_port_position: 5 + description: test description + state: present + register: test_three + +- name: "FRONT_PORT 3: ASSERT - Update Front Port with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['rear_port_position'] == 5 + - test_three['diff']['after']['description'] == "test description" + - test_three['front_port']['name'] == "Front Port" + - test_three['front_port']['device'] == 1 + - test_three['front_port']['type'] == "bnc" + - test_three['front_port']['rear_port'] == 1 + - test_three['front_port']['rear_port_position'] == 5 + - test_three['front_port']['description'] == "test description" + - test_three['msg'] == "front_port Front Port updated" + +- name: "FRONT_PORT 4: Create Front Port for Delete Test" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port 2 + device: test100 + type: bnc + rear_port: Rear Port + state: present + register: test_four + +- name: "FRONT_PORT 4: ASSERT - Create Front Port for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['front_port']['name'] == "Front Port 2" + - test_four['front_port']['device'] == 1 + - test_four['front_port']['type'] == "bnc" + - test_four['front_port']['rear_port'] == 1 + - test_four['msg'] == "front_port Front Port 2 created" + +- name: "FRONT_PORT 5: Delete Front Port" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port 2 + device: test100 + type: bnc + rear_port: Rear Port + state: absent + register: test_five + +- name: "FRONT_PORT 5: ASSERT - Delete Front Port" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "front_port Front Port 2 deleted" + +- name: "FRONT_PORT 6: Create duplicate with rear_port dictionary" + netbox.netbox.netbox_front_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port + device: test100 + type: bnc + rear_port: + device: test100 + name: Rear Port + state: present + register: test_six + +- name: "FRONT_PORT 6: ASSERT - Create duplicate with rear_port dictionary" + assert: + that: + - not test_six['changed'] + - test_six['front_port']['name'] == "Front Port" + - test_six['front_port']['device'] == 1 + - test_six['front_port']['type'] == "bnc" + - test_six['front_port']['rear_port'] == 1 + - test_six['msg'] == "front_port Front Port already exists" diff --git a/tests/integration/targets/v4.0/tasks/netbox_front_port_template.yml b/tests/integration/targets/v4.0/tasks/netbox_front_port_template.yml new file mode 100644 index 000000000..30e907100 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_front_port_template.yml @@ -0,0 +1,147 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_FRONT_PORT_TEMPLATE +## +## +- name: "FRONT_PORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port Template + device_type: Cisco Test + type: bnc + rear_port_template: Rear Port Template + state: present + register: test_one + +- name: "FRONT_PORT_TEMPLATE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['front_port_template']['name'] == "Front Port Template" + - test_one['front_port_template']['device_type'] == 1 + - test_one['front_port_template']['type'] == "bnc" + - test_one['front_port_template']['rear_port'] == 1 + - test_one['msg'] == "front_port_template Front Port Template created" + +- name: "FRONT_PORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port Template + device_type: Cisco Test + type: bnc + rear_port_template: Rear Port Template + state: present + register: test_two + +- name: "FRONT_PORT_TEMPLATE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['front_port_template']['name'] == "Front Port Template" + - test_two['front_port_template']['device_type'] == 1 + - test_two['front_port_template']['type'] == "bnc" + - test_two['front_port_template']['rear_port'] == 1 + - test_two['msg'] == "front_port_template Front Port Template already exists" + +- name: "FRONT_PORT_TEMPLATE 3: Update Front Port Template with other fields" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port Template + device_type: Cisco Test + type: bnc + rear_port_template: Rear Port Template + rear_port_template_position: 5 + state: present + register: test_three + +- name: "FRONT_PORT_TEMPLATE 3: ASSERT - Update Front Port Template with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['rear_port_position'] == 5 + - test_three['front_port_template']['name'] == "Front Port Template" + - test_three['front_port_template']['device_type'] == 1 + - test_three['front_port_template']['type'] == "bnc" + - test_three['front_port_template']['rear_port_position'] == 5 + - test_three['front_port_template']['rear_port'] == 1 + - test_three['msg'] == "front_port_template Front Port Template updated" + +- name: "FRONT_PORT_TEMPLATE 4: Create Front Port Template for Delete Test" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port Template 2 + device_type: Cisco Test + type: bnc + rear_port_template: Rear Port Template + state: present + register: test_four + +- name: "FRONT_PORT_TEMPLATE 4: ASSERT - Create Front Port Template for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['front_port_template']['name'] == "Front Port Template 2" + - test_four['front_port_template']['device_type'] == 1 + - test_four['front_port_template']['type'] == "bnc" + - test_four['front_port_template']['rear_port'] == 1 + - test_four['msg'] == "front_port_template Front Port Template 2 created" + +- name: "FRONT_PORT_TEMPLATE 5: Delete Front Port Template" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port Template 2 + device_type: Cisco Test + type: bnc + rear_port_template: Rear Port Template + state: absent + register: test_five + +- name: "FRONT_PORT_TEMPLATE 5: ASSERT - Delete Front Port Template" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "front_port_template Front Port Template 2 deleted" + +- name: "FRONT_PORT 6: Create duplicate with rear_port_template dictionary" + netbox.netbox.netbox_front_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Front Port Template + device_type: Cisco Test + type: bnc + rear_port_template: + device: Cisco Test + name: Rear Port Template + state: present + register: test_six + +- name: "FRONT_PORT 6: ASSERT - Create duplicate with rear_port_template dictionary" + assert: + that: + - not test_six['changed'] + - test_six['front_port_template']['name'] == "Front Port Template" + - test_six['front_port_template']['device_type'] == 1 + - test_six['front_port_template']['type'] == "bnc" + - test_six['front_port_template']['rear_port'] == 1 + - test_six['msg'] == "front_port_template Front Port Template already exists" diff --git a/tests/integration/targets/v4.0/tasks/netbox_inventory_item.yml b/tests/integration/targets/v4.0/tasks/netbox_inventory_item.yml new file mode 100644 index 000000000..cc038ac94 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_inventory_item.yml @@ -0,0 +1,203 @@ +--- +## +## +### NETBOX_INVENTORY_ITEM +## +## +- name: "INVENTORY_ITEM 1: Necessary info creation" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: "test100" + name: "10G-SFP+" + state: present + register: test_one + +- name: "INVENTORY_ITEM 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one.diff.before.state == "absent" + - test_one.diff.after.state == "present" + - test_one.inventory_item.name == "10G-SFP+" + - test_one.inventory_item.device == 1 + - test_one.msg == "inventory_item 10G-SFP+ created" + +- name: "INVENTORY_ITEM 2: Create duplicate" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: "test100" + name: "10G-SFP+" + state: present + register: test_two + +- name: "INVENTORY_ITEM 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two.changed + - test_two.inventory_item.name == "10G-SFP+" + - test_two.inventory_item.device == 1 + - test_two.msg == "inventory_item 10G-SFP+ already exists" + +- name: "INVENTORY_ITEM 3: Update properties" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: "test100" + name: "10G-SFP+" + manufacturer: "Cisco" + part_id: "10G-SFP+" + serial: "1234" + asset_tag: "1234" + description: "New SFP" + discovered: True + tags: + - "Schnozzberry" + state: present + register: test_three + +- name: "INVENTORY_ITEM 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three.diff.after.asset_tag == "1234" + - test_three.diff.after.serial == "1234" + - test_three.diff.after.description == "New SFP" + - test_three.diff.after.manufacturer == 1 + - test_three.diff.after.part_id == "10G-SFP+" + - test_three.diff.after.tags[0] == 4 + - test_three.diff.after.discovered == True + - test_three.inventory_item.name == "10G-SFP+" + - test_three.inventory_item.device == 1 + - test_three.inventory_item.asset_tag == "1234" + - test_three.inventory_item.serial == "1234" + - test_three.inventory_item.description == "New SFP" + - test_three.inventory_item.manufacturer == 1 + - test_three.inventory_item.part_id == "10G-SFP+" + - test_three.inventory_item.tags[0] == 4 + - test_three.inventory_item.discovered == True + - test_three.msg == "inventory_item 10G-SFP+ updated" + +- name: "INVENTORY_ITEM 4: Delete inventory item" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: "test100" + name: "10G-SFP+" + state: absent + register: test_four + +- name: "INVENTORY_ITEM 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four.inventory_item.name == "10G-SFP+" + - test_four.inventory_item.device == 1 + - test_four.inventory_item.asset_tag == "1234" + - test_four.inventory_item.serial == "1234" + - test_four.inventory_item.description == "New SFP" + - test_four.inventory_item.manufacturer == 1 + - test_four.inventory_item.part_id == "10G-SFP+" + - test_four.inventory_item.tags[0] == 4 + - test_four.msg == "inventory_item 10G-SFP+ deleted" + +- name: "INVENTORY_ITEM 5: PREWORK - Create inventory item role" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Processor + color: FFFFFF + state: present + register: test_five_prework + +- name: "INVENTORY_ITEM 5: Create inventory item with role" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: test100 + name: test_processor + inventory_item_role: Processor + state: present + register: test_five + +- name: "INVENTORY_ITEM 5: ASSERT - Inventory item creation with role" + ansible.builtin.assert: + that: + - test_five is changed + - test_five.diff.before.state == "absent" + - test_five.diff.after.state == "present" + - test_five.inventory_item.name == "test_processor" + - test_five.inventory_item.role == test_five_prework.inventory_item_role.id + - test_five.inventory_item.device == 1 + - test_five.msg == "inventory_item test_processor created" + +- name: "INVENTORY_ITEM 6: Create inventory item with missing role" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: test100 + name: test_processor + inventory_item_role: Foo + state: present + ignore_errors: true + register: test_six + +- name: "INVENTORY_ITEM 6: ASSERT - Inventory item creation with missing role" + ansible.builtin.assert: + that: + - test_six.failed + - test_six.msg == "Could not resolve id of inventory_item_role: Foo" + +- name: "INVENTORY_ITEM 7: Create inventory item with component" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: test100 + name: test_component + component_type: "dcim.interface" + component: + name: GigabitEthernet2 + device: "test100" + state: present + register: test_seven + +- name: "INVENTORY_ITEM 7: ASSERT - Inventory item creation with component" + ansible.builtin.assert: + that: + - test_seven is changed + - test_seven.diff.before.state == "absent" + - test_seven.diff.after.state == "present" + - test_seven.inventory_item.name == "test_component" + - test_seven.inventory_item.component_type == "dcim.interface" + - test_seven.inventory_item.component_id == 4 + - test_seven.inventory_item.device == 1 + - test_seven.msg == "inventory_item test_component created" + +- name: "INVENTORY_ITEM 8: Create inventory item with missing component_type" + netbox.netbox.netbox_inventory_item: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + device: test100 + name: test_component + component: + name: GigabitEthernet2 + device: "test100" + state: present + ignore_errors: true + register: test_eight + +- name: "INVENTORY_ITEM 8: ASSERT - Inventory item creation with missing component_type" + ansible.builtin.assert: + that: + - test_eight.failed + - test_eight.msg == "parameters are required together: component_type, component" diff --git a/tests/integration/targets/v4.0/tasks/netbox_inventory_item_role.yml b/tests/integration/targets/v4.0/tasks/netbox_inventory_item_role.yml new file mode 100644 index 000000000..1c2de3f03 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_inventory_item_role.yml @@ -0,0 +1,98 @@ +--- +## +## +### NETBOX_INVENTORY_ITEM_ROLE +## +## +- name: "INVENTORY_ITEM_ROLE 1: Necessary info creation" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Inventory Item Role" + color: "FFFFFF" + state: present + register: test_one + +- name: "INVENTORY_ITEM_ROLE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['inventory_item_role']['name'] == "Test Inventory Item Role" + - test_one['inventory_item_role']['slug'] == "test-inventory-item-role" + - test_one['inventory_item_role']['color'] == "ffffff" + - test_one['msg'] == "inventory_item_role Test Inventory Item Role created" + +- name: "INVENTORY_ITEM_ROLE 2: Create duplicate" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Inventory Item Role" + color: "FFFFFF" + state: present + register: test_two + +- name: "INVENTORY_ITEM_ROLE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['inventory_item_role']['name'] == "Test Inventory Item Role" + - test_two['inventory_item_role']['slug'] == "test-inventory-item-role" + - test_two['inventory_item_role']['color'] == "ffffff" + - test_two['msg'] == "inventory_item_role Test Inventory Item Role already exists" + +- name: "INVENTORY_ITEM_ROLE 3: ASSERT - Update" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Inventory Item Role" + color: "003EFF" + state: present + register: test_three + +- name: "INVENTORY_ITEM_ROLE 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['after']['color'] == "003eff" + - test_three['inventory_item_role']['name'] == "Test Inventory Item Role" + - test_three['inventory_item_role']['slug'] == "test-inventory-item-role" + - test_three['inventory_item_role']['color'] == "003eff" + - test_three['msg'] == "inventory_item_role Test Inventory Item Role updated" + +- name: "INVENTORY_ITEM_ROLE 4: ASSERT - Delete" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Inventory Item Role + state: absent + register: test_four + +- name: "INVENTORY_ITEM_ROLE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "inventory_item_role Test Inventory Item Role deleted" + +- name: "INVENTORY_ITEM_ROLE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_inventory_item_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Inventory Item Role + state: absent + register: test_five + +- name: "INVENTORY_ITEM_ROLE 5: ASSERT - Delete non existing`" + assert: + that: + - not test_five['changed'] + - test_five['inventory_item_role'] == None + - test_five['msg'] == "inventory_item_role Test Inventory Item Role already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_ip_address.yml b/tests/integration/targets/v4.0/tasks/netbox_ip_address.yml new file mode 100644 index 000000000..c18cad9bd --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_ip_address.yml @@ -0,0 +1,352 @@ +--- +## +## +### NETBOX_IP_ADDRESS +## +## +- name: "1 - Create IP address within NetBox with only required information - State: Present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + address: 192.168.1.10/30 + state: present + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['msg'] == "ip_address 192.168.1.10/30 created" + - test_one['ip_address']['address'] == "192.168.1.10/30" + +- name: "2 - Update 192.168.1.10/30" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + address: 192.168.1.10/30 + description: "Updated ip address" + tags: + - "Updated" + state: present + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - test_two is changed + - test_two['diff']['after']['description'] == "Updated ip address" + - test_two['diff']['after']['tags'][0] == 10 + - test_two['msg'] == "ip_address 192.168.1.10/30 updated" + - test_two['ip_address']['address'] == "192.168.1.10/30" + - test_two['ip_address']['tags'][0] == 10 + - test_two['ip_address']['description'] == "Updated ip address" + +- name: "3 - Delete IP - 192.168.1.10 - State: Absent" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + address: 192.168.1.10/30 + state: absent + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "present" + - test_three['diff']['after']['state'] == "absent" + - test_three['msg'] == "ip_address 192.168.1.10/30 deleted" + +- name: "4 - Create IP in global VRF - 192.168.1.20/30 - State: Present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + address: 192.168.1.20/30 + state: present + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['msg'] == "ip_address 192.168.1.20/30 created" + - test_four['ip_address']['address'] == "192.168.1.20/30" + +# Enforce uniqueness in NetBox 3.7 +#- name: "5 - Create IP in global VRF - 192.168.1.20/30 - State: New" +# netbox.netbox.netbox_ip_address: +# netbox_url: http://localhost:32768 +# netbox_token: 0123456789abcdef0123456789abcdef01234567 +# data: +# address: 192.168.1.20/30 +# state: new +# register: test_five + +#- name: "5 - ASSERT" +# assert: +# that: +# - test_five is changed +# - test_five['diff']['before']['state'] == "absent" +# - test_five['diff']['after']['state'] == "present" +# - test_five['msg'] == "ip_address 192.168.1.20/30 created" +# - test_five['ip_address']['address'] == "192.168.1.20/30" + +- name: "6 - Create new address with only prefix specified - State: new" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: 192.168.100.0/24 + state: new + register: test_six + +- name: "6 - ASSERT" + assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['msg'] == "ip_address 192.168.100.1/24 created" + - test_six['ip_address']['address'] == "192.168.100.1/24" + +- name: "7 - Create IP address with several specified" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + family: 4 + address: 172.16.1.20/24 + vrf: Test VRF + tenant: Test Tenant + status: Reserved + role: Loopback + description: Test description + tags: + - "Schnozzberry" + state: present + register: test_seven + +- name: "7 - ASSERT" + assert: + that: + - test_seven is changed + - test_seven['diff']['before']['state'] == "absent" + - test_seven['diff']['after']['state'] == "present" + - test_seven['msg'] == "ip_address 172.16.1.20/24 created" + - test_seven['ip_address']['address'] == "172.16.1.20/24" + - test_seven['ip_address']['description'] == "Test description" + - test_seven['ip_address']['family'] == 4 + - test_seven['ip_address']['role'] == "loopback" + - test_seven['ip_address']['status'] == "reserved" + - test_seven['ip_address']['tags'][0] == 4 + - test_seven['ip_address']['tenant'] == 1 + - test_seven['ip_address']['vrf'] == 1 + +- name: "8 - Create IP address and assign a nat_inside IP" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + family: 4 + address: 10.10.1.30/16 + vrf: Test VRF + nat_inside: + address: 172.16.1.20 + vrf: Test VRF + register: test_eight + +- name: "8 - ASSERT" + assert: + that: + - test_eight is changed + - test_eight['diff']['before']['state'] == "absent" + - test_eight['diff']['after']['state'] == "present" + - test_eight['msg'] == "ip_address 10.10.1.30/16 created" + - test_eight['ip_address']['address'] == "10.10.1.30/16" + - test_eight['ip_address']['family'] == 4 + - test_eight['ip_address'].get('nat_inside') + - test_eight['ip_address']['vrf'] == 1 + +- name: "9 - Create IP address on GigabitEthernet2 - test100 - State: present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + family: 4 + address: 10.10.200.30/16 + assigned_object: + name: GigabitEthernet2 + device: test100 + register: test_nine + +- name: "9 - ASSERT" + assert: + that: + - test_nine is changed + - test_nine['diff']['before']['state'] == "absent" + - test_nine['diff']['after']['state'] == "present" + - test_nine['msg'] == "ip_address 10.10.200.30/16 created" + - test_nine['ip_address']['address'] == "10.10.200.30/16" + - test_nine['ip_address']['family'] == 4 + - test_nine['ip_address']['assigned_object_type'] == "dcim.interface" + - test_nine['ip_address']['assigned_object_id'] == 4 + +- name: "10 - Create IP address on GigabitEthernet2 - test100 - State: new" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + family: 4 + prefix: 10.10.0.0/16 + assigned_object: + name: GigabitEthernet2 + device: test100 + state: new + register: test_ten + +- name: "10 - ASSERT" + assert: + that: + - test_ten is changed + - test_ten['diff']['before']['state'] == "absent" + - test_ten['diff']['after']['state'] == "present" + - test_ten['msg'] == "ip_address 10.10.0.1/16 created" + - test_ten['ip_address']['address'] == "10.10.0.1/16" + - test_ten['ip_address']['family'] == 4 + - test_ten['ip_address']['assigned_object_type'] == "dcim.interface" + - test_ten['ip_address']['assigned_object_id'] == 4 + +- name: "11 - Create IP address on GigabitEthernet2 - test100 - State: present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + family: 4 + prefix: 192.168.100.0/24 + assigned_object: + name: GigabitEthernet2 + device: test100 + state: present + register: test_eleven + +- name: "11 - ASSERT" + assert: + that: + - test_eleven is changed + - test_eleven['diff']['before']['state'] == "absent" + - test_eleven['diff']['after']['state'] == "present" + - test_eleven['msg'] == "ip_address 192.168.100.2/24 created" + - test_eleven['ip_address']['address'] == "192.168.100.2/24" + +- name: "12 - Duplicate - 192.168.100.2/24 on interface" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + address: 192.168.100.2/24 + assigned_object: + name: GigabitEthernet2 + device: test100 + state: present + register: test_twelve + +- name: "12 - ASSERT" + assert: + that: + - not test_twelve['changed'] + - test_twelve['msg'] == "ip_address 192.168.100.2/24 already exists" + - test_twelve['ip_address']['address'] == "192.168.100.2/24" + - test_twelve['ip_address']['assigned_object_type'] == "dcim.interface" + - test_twelve['ip_address']['assigned_object_id'] == 4 + +- name: "13 - Duplicate - 192.168.100.2/24" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + address: 192.168.100.2/24 + state: present + register: test_thirteen + +- name: "13 - ASSERT" + assert: + that: + - not test_thirteen['changed'] + - test_thirteen['msg'] == "ip_address 192.168.100.2/24 already exists" + - test_thirteen['ip_address']['address'] == "192.168.100.2/24" + +- name: "14 - Create IP address on Eth0 - test100-vm - State: present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + family: 4 + address: 10.188.1.100/24 + assigned_object: + name: Eth0 + virtual_machine: test100-vm + register: test_fourteen + +- name: "14 - ASSERT" + assert: + that: + - test_fourteen is changed + - test_fourteen['diff']['before']['state'] == "absent" + - test_fourteen['diff']['after']['state'] == "present" + - test_fourteen['msg'] == "ip_address 10.188.1.100/24 created" + - test_fourteen['ip_address']['address'] == "10.188.1.100/24" + - test_fourteen['ip_address']['family'] == 4 + - test_fourteen['ip_address']['assigned_object_type'] == "virtualization.vminterface" + - test_fourteen['ip_address']['assigned_object_id'] == 1 + +# Enforce uniqueness in NetBox 3.7 +#- name: "15 - Create same IP address on Eth0 - test101-vm - State: present" +# netbox.netbox.netbox_ip_address: +# netbox_url: http://localhost:32768 +# netbox_token: 0123456789abcdef0123456789abcdef01234567 +# data: +# family: 4 +# address: 10.188.1.100/24 +# assigned_object: +# name: Eth0 +# virtual_machine: test101-vm +# state: "present" +# register: test_fifteen + +#- name: "15 - ASSERT" +# assert: +# that: +# - test_fifteen is changed +# - test_fifteen['diff']['before']['state'] == "absent" +# - test_fifteen['diff']['after']['state'] == "present" +# - test_fifteen['msg'] == "ip_address 10.188.1.100/24 created" +# - test_fifteen['ip_address']['address'] == "10.188.1.100/24" +# - test_fifteen['ip_address']['family'] == 4 +# - test_fifteen['ip_address']['assigned_object_type'] == "virtualization.vminterface" +# - test_fifteen['ip_address']['assigned_object_id'] == 6 + +- name: "16 - Create IP address with no mask - State: Present" + netbox.netbox.netbox_ip_address: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + address: 10.120.10.1 + state: present + register: test_sixteen + +- name: "16 - ASSERT" + assert: + that: + - test_sixteen is changed + - test_sixteen['diff']['before']['state'] == "absent" + - test_sixteen['diff']['after']['state'] == "present" + - test_sixteen['msg'] == "ip_address 10.120.10.1/32 created" + - test_sixteen['ip_address']['address'] == "10.120.10.1/32" diff --git a/tests/integration/targets/v4.0/tasks/netbox_ipam_role.yml b/tests/integration/targets/v4.0/tasks/netbox_ipam_role.yml new file mode 100644 index 000000000..1f1ff0f36 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_ipam_role.yml @@ -0,0 +1,94 @@ +--- +## +## +### NETBOX_IPAM_ROLE +## +## +- name: "IPAM_ROLE 1: Necessary info creation" + netbox.netbox.netbox_ipam_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test IPAM Role" + state: present + register: test_one + +- name: "IPAM_ROLE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['role']['name'] == "Test IPAM Role" + - test_one['role']['slug'] == "test-ipam-role" + - test_one['msg'] == "role Test IPAM Role created" + +- name: "IPAM_ROLE 2: Create duplicate" + netbox.netbox.netbox_ipam_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test IPAM Role" + state: present + register: test_two + +- name: "IPAM_ROLE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['role']['name'] == "Test IPAM Role" + - test_two['role']['slug'] == "test-ipam-role" + - test_two['msg'] == "role Test IPAM Role already exists" + +- name: "IPAM_ROLE 3: ASSERT - Update" + netbox.netbox.netbox_ipam_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test IPAM Role" + weight: 4096 + state: present + register: test_three + +- name: "IPAM_ROLE 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['after']['weight'] == 4096 + - test_three['role']['name'] == "Test IPAM Role" + - test_three['role']['slug'] == "test-ipam-role" + - test_three['role']['weight'] == 4096 + - test_three['msg'] == "role Test IPAM Role updated" + +- name: "IPAM_ROLE 4: ASSERT - Delete" + netbox.netbox.netbox_ipam_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test IPAM Role + state: absent + register: test_four + +- name: "IPAM_ROLE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "role Test IPAM Role deleted" + +- name: "IPAM_ROLE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_ipam_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test IPAM Role + state: absent + register: test_five + +- name: "IPAM_ROLE 5: ASSERT - Delete non existing`" + assert: + that: + - not test_five['changed'] + - test_five['role'] == None + - test_five['msg'] == "role Test IPAM Role already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_journal_entry.yml b/tests/integration/targets/v4.0/tasks/netbox_journal_entry.yml new file mode 100644 index 000000000..d65e64cb8 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_journal_entry.yml @@ -0,0 +1,26 @@ +--- +## +## +### NETBOX_JOURNAL_ENTRY +## +## +- name: "JOURNAL ENTRY 1: Creation" + netbox.netbox.netbox_journal_entry: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + assigned_object_type: dcim.device + assigned_object_id: 1 + comments: | + Comment on device + state: new + register: test_one + +- name: "JOURNAL_ENTRY 1: ASSERT - Creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['journal_entry']['kind'] == "info" + - test_one['msg'] == "journal_entry created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_l2vpn.yml b/tests/integration/targets/v4.0/tasks/netbox_l2vpn.yml new file mode 100644 index 000000000..292badb93 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_l2vpn.yml @@ -0,0 +1,99 @@ +--- +## +## +### NETBOX_L2VPN +## +## +- name: "L2VPN 1: Necessary info creation" + netbox.netbox.netbox_l2vpn: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test L2VPN + type: vxlan + state: present + register: test_one + +- name: "L2VPN 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['l2vpn']['name'] == "Test L2VPN" + - test_one['l2vpn']['type'] == "vxlan" + - test_one['msg'] == "l2vpn Test L2VPN created" + +- name: "L2VPN 2: Create duplicate" + netbox.netbox.netbox_l2vpn: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test L2VPN + type: vxlan + state: present + register: test_two + +- name: "L2VPN 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['l2vpn']['name'] == "Test L2VPN" + - test_two['l2vpn']['type'] == "vxlan" + - test_two['msg'] == "l2vpn Test L2VPN already exists" + +- name: "L2VPN 4: ASSERT - Update" + netbox.netbox.netbox_l2vpn: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test L2VPN" + type: vxlan + tenant: "Test Tenant" + description: Updated description + import_targets: + - "4000:4000" + - "5000:5000" + export_targets: + - "6000:6000" + tags: + - "Schnozzberry" + state: present + register: test_four + +- name: "L2VPN: ASSERT - Updated" + assert: + that: + - test_four is changed + - test_four['diff']['after']['description'] == "Updated description" + - test_four['diff']['after']['import_targets'] == [1, 2] + - test_four['diff']['after']['export_targets'] == [3] + - test_four['diff']['after']['tags'][0] == 4 + - test_four['l2vpn']['name'] == "Test L2VPN" + - test_four['l2vpn']['tenant'] == 1 + - test_four['l2vpn']['import_targets'] == [1, 2] + - test_four['l2vpn']['export_targets'] == [3] + - test_four['l2vpn']['description'] == "Updated description" + - test_four['l2vpn']['tags'][0] == 4 + - test_four['msg'] == "l2vpn Test L2VPN updated" + +- name: "L2VPN: ASSERT - Delete" + netbox.netbox.netbox_l2vpn: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test L2VPN" + type: vxlan + state: absent + register: test_six + +- name: "L2VPN 6: ASSERT - Delete" + assert: + that: + - test_six is changed + - test_six['l2vpn']['name'] == "Test L2VPN" + - test_six['l2vpn']['tenant'] == 1 + - test_six['l2vpn']['type'] == "vxlan" + - test_six['l2vpn']['description'] == "Updated description" + - test_six['l2vpn']['tags'][0] == 4 + - test_six['msg'] == "l2vpn Test L2VPN deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_l2vpn_termination.yml b/tests/integration/targets/v4.0/tasks/netbox_l2vpn_termination.yml new file mode 100644 index 000000000..a4560f407 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_l2vpn_termination.yml @@ -0,0 +1,94 @@ +--- +## +## +### NETBOX_L2VPN_TERMINATION +## +## +- name: "L2VPN_TERMINATION 1: Necessary info creation" + netbox.netbox.netbox_l2vpn_termination: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + l2vpn: 1 + assigned_object_type: dcim.interface + assigned_object_id: 1 + state: present + register: test_one + +- name: "L2VPN_TERMINATION 1: ASSERT - Necessary info creation" + ansible.builtin.assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['l2vpn_termination']['l2vpn'] == 1 + - test_one['l2vpn_termination']['assigned_object_type'] == "dcim.interface" + - test_one['l2vpn_termination']['assigned_object_id'] == 1 + - test_one['msg'] == "l2vpn_termination l2vpn 1 <> dcim.interface 1 created" + +- name: "L2VPN_TERMINATION 2: Create duplicate" + netbox.netbox.netbox_l2vpn_termination: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + l2vpn: 1 + assigned_object_type: dcim.interface + assigned_object_id: 1 + state: present + register: test_two + +- name: "L2VPN_TERMINATION 2: ASSERT - Create duplicate" + ansible.builtin.assert: + that: + - not test_two['changed'] + - test_two['l2vpn_termination']['l2vpn'] == 1 + - test_two['l2vpn_termination']['assigned_object_type'] == "dcim.interface" + - test_two['l2vpn_termination']['assigned_object_id'] == 1 + - test_two['msg'] == "l2vpn_termination l2vpn 1 <> dcim.interface 1 already exists" + +- name: "L2VPN_TERMINATION 3: Update" + netbox.netbox.netbox_l2vpn_termination: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + l2vpn: 1 + assigned_object_type: dcim.interface + assigned_object_id: 1 + tags: + - "Schnozzberry" + state: present + register: test_three + +- name: "L2VPN_TERMINATION 3: ASSERT - Updated" + ansible.builtin.assert: + that: + - test_three is changed + - test_three['diff']['after']['tags'][0] == 4 + - test_three['l2vpn_termination']['l2vpn'] == 1 + - test_three['l2vpn_termination']['assigned_object_type'] == "dcim.interface" + - test_three['l2vpn_termination']['assigned_object_id'] == 1 + - test_three['l2vpn_termination']['tags'][0] == 4 + - test_three['msg'] == "l2vpn_termination l2vpn 1 <> dcim.interface 1 updated" + +- name: "L2VPN_TERMINATION 4: Delete" + netbox.netbox.netbox_l2vpn_termination: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + l2vpn: 1 + assigned_object_type: dcim.interface + assigned_object_id: 1 + state: absent + register: test_four + +- name: "L2VPN_TERMINATION 4: ASSERT - Delete" + ansible.builtin.assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['l2vpn_termination']['l2vpn'] == 1 + - test_four['l2vpn_termination']['assigned_object_type'] == "dcim.interface" + - test_four['l2vpn_termination']['assigned_object_id'] == 1 + - test_four['l2vpn_termination']['tags'][0] == 4 + - test_four['msg'] == "l2vpn_termination l2vpn 1 <> dcim.interface 1 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_location.yml b/tests/integration/targets/v4.0/tasks/netbox_location.yml new file mode 100644 index 000000000..f2f7bb9db --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_location.yml @@ -0,0 +1,85 @@ +--- +## +## +### NETBOX_LOCATION +## +## +- name: "LOCATION 1: Necessary info creation" + netbox.netbox.netbox_location: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Location + site: Test Site + state: present + register: test_one + +- name: "LOCATION 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['location']['name'] == "Location" + - test_one['location']['slug'] == "location" + - test_one['location']['site'] == 1 + - test_one['msg'] == "location Location created" + +- name: "LOCATION 2: Create duplicate" + netbox.netbox.netbox_location: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Location + site: Test Site + state: present + register: test_two + +- name: "LOCATION 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['location']['name'] == "Location" + - test_two['location']['slug'] == "location" + - test_two['location']['site'] == 1 + - test_two['msg'] == "location Location already exists" + +- name: "LOCATION 3: Update" + netbox.netbox.netbox_location: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Location + parent_location: Parent Rack Group + description: This is a location + state: present + register: test_three + +- name: "LOCATION 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['after']['parent'] == 2 + - test_three['diff']['after']['description'] == "This is a location" + - test_three['location']['name'] == "Location" + - test_three['location']['slug'] == "location" + - test_three['location']['parent'] == 2 + - test_three['location']['description'] == "This is a location" + - test_three['msg'] == "location Location updated" + +- name: "LOCATION 4: Delete" + netbox.netbox.netbox_location: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Location + state: absent + register: test_four + +- name: "LOCATION 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "location Location deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_lookup.yml b/tests/integration/targets/v4.0/tasks/netbox_lookup.yml new file mode 100644 index 000000000..277454fcd --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_lookup.yml @@ -0,0 +1,83 @@ +--- +## +## +### NETBOX_LOOKUP +## +## +- name: "NETBOX_LOOKUP 1: Lookup returns exactly two sites" + assert: + that: query_result == "3" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'sites', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567')|count }}" + +- name: "NETBOX_LOOKUP 2: Query doesn't return Wibble (sanity check json_query)" + assert: + that: query_result == "0" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567')|community.general.json_query('[?value.display==`Wibble`]')|count}}" + +- name: "NETBOX_LOOKUP 3: Device query returns exactly one TestDeviceR1" + assert: + that: query_result == "1" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567')|community.general.json_query('[?value.display==`TestDeviceR1`]')|count }}" + +- name: "NETBOX_LOOKUP 4: VLAN ID 400 can be queried and is named 'Test VLAN'" + assert: + that: query_result == 'Test VLAN' + vars: + query_result: "{{ (query('netbox.netbox.nb_lookup', 'vlans', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567')|community.general.json_query('[?value.vid==`400`].value.name'))[0] }}" + +- name: "NETBOX_LOOKUP 5: Add one of two devices for lookup filter test." + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "L1" + device_type: "Cisco Test" + device_role: "Core Switch" + site: "Test Site" + status: "Staged" + tags: + - "nolookup" + state: present + +- name: "NETBOX_LOOKUP 6: Add two of two devices for lookup filter test." + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "L2" + device_type: "Cisco Test" + device_role: "Core Switch" + site: "Test Site2" + status: "Staged" + tags: + - "lookup" + state: present + +- name: "NETBOX_LOOKUP 7: Device query returns exactly the L2 device" + assert: + that: query_result == "1" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_filter='role=core-switch tag=lookup', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567')|community.general.json_query('[?value.display==`L2`]')|count }}" + +- name: "NETBOX_LOOKUP 8: Device query specifying raw data returns payload without key/value dict" + assert: + that: query_result == "1" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_filter='role=core-switch tag=lookup', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567', raw_data=True)|community.general.json_query('[?display==`L2`]')|count }}" + +- name: "NETBOX_LOOKUP 9: Device query specifying multiple sites, Make sure L1 and L2 are in the results" + assert: + that: + - "'L1' in query_result" + - "'L2' in query_result" + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_filter='role=core-switch site=test-site site=test-site2', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567', raw_data=True)|community.general.json_query('[*].display') }}" + +- name: "NETBOX_LOOKUP 10: Device query by ID" + assert: + that: query_result + vars: + query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_filter='id=1', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" diff --git a/tests/integration/targets/v4.0/tasks/netbox_manufacturer.yml b/tests/integration/targets/v4.0/tasks/netbox_manufacturer.yml new file mode 100644 index 000000000..4dd1907eb --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_manufacturer.yml @@ -0,0 +1,91 @@ +--- +## +## +### NETBOX_MANUFACTURER +## +## +- name: "MANUFACTURER 1: Necessary info creation" + netbox.netbox.netbox_manufacturer: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Manufacturer Two + state: present + register: test_one + +- name: "MANUFACTURER 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['manufacturer']['name'] == "Test Manufacturer Two" + - test_one['manufacturer']['slug'] == "test-manufacturer-two" + - test_one['msg'] == "manufacturer Test Manufacturer Two created" + +- name: "MANUFACTURER 2: Create duplicate" + netbox.netbox.netbox_manufacturer: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Manufacturer Two + state: present + register: test_two + +- name: "MANUFACTURER 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['manufacturer']['name'] == "Test Manufacturer Two" + - test_two['manufacturer']['slug'] == "test-manufacturer-two" + - test_two['msg'] == "manufacturer Test Manufacturer Two already exists" + +- name: "MANUFACTURER 3: Update" + netbox.netbox.netbox_manufacturer: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: test manufacturer two + state: present + register: test_three + +- name: "MANUFACTURER 3: ASSERT - Update" + assert: + that: + - test_three['changed'] + - test_three['manufacturer']['name'] == "test manufacturer two" + - test_three['manufacturer']['slug'] == "test-manufacturer-two" + - test_three['msg'] == "manufacturer test manufacturer two updated" + +- name: "MANUFACTURER 4: ASSERT - Delete" + netbox.netbox.netbox_manufacturer: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: test manufacturer two + state: absent + register: test_four + +- name: "MANUFACTURER 3: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "manufacturer test manufacturer two deleted" + +- name: "MANUFACTURER 5: ASSERT - Delete non existing" + netbox.netbox.netbox_manufacturer: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Manufacturer Two + state: absent + register: test_five + +- name: "MANUFACTURER 5: ASSERT - Delete non existing" + assert: + that: + - not test_five['changed'] + - test_five['manufacturer'] == None + - test_five['msg'] == "manufacturer Test Manufacturer Two already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_module.yml b/tests/integration/targets/v4.0/tasks/netbox_module.yml new file mode 100644 index 000000000..e8f090d8c --- /dev/null +++ b/tests/integration/targets/v4.0/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/v4.0/tasks/netbox_module_bay.yml b/tests/integration/targets/v4.0/tasks/netbox_module_bay.yml new file mode 100644 index 000000000..44bb76269 --- /dev/null +++ b/tests/integration/targets/v4.0/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/v4.0/tasks/netbox_module_type.yml b/tests/integration/targets/v4.0/tasks/netbox_module_type.yml new file mode 100644 index 000000000..e1d51c4cb --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_module_type.yml @@ -0,0 +1,97 @@ +--- +## +## +### NETBOX_MODULE_TYPE +## +## +- name: "MODULE_TYPE 1: Necessary info creation" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + model: ws-test-3750 + manufacturer: Test Manufacturer + state: present + register: test_one + +- name: "MODULE_TYPE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['module_type']['model'] == "ws-test-3750" + - test_one['module_type']['manufacturer'] == 3 + - test_one['msg'] == "module_type ws-test-3750 created" + +- name: "MODULE_TYPE 2: Create duplicate" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + model: "ws-test-3750" + manufacturer: Test Manufacturer + state: present + register: test_two + +- name: "MODULE_TYPE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_one['module_type']['model'] == "ws-test-3750" + - test_one['module_type']['manufacturer'] == 3 + - test_two['msg'] == "module_type ws-test-3750 already exists" + +- name: "MODULE_TYPE 3: ASSERT - Update" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + model: ws-test-3750 + manufacturer: Test Manufacturer + part_number: ws-3750g-v2 + state: present + register: test_three + +- name: "MODULE_TYPE 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['after']['part_number'] == "ws-3750g-v2" + - test_three['module_type']['model'] == "ws-test-3750" + - test_three['module_type']['manufacturer'] == 3 + - test_three['module_type']['part_number'] == "ws-3750g-v2" + - test_three['msg'] == "module_type ws-test-3750 updated" + +- name: "MODULE_TYPE 4: ASSERT - Delete" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + model: ws-test-3750 + state: absent + register: test_four + +- name: "MODULE_TYPE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "module_type ws-test-3750 deleted" + +- name: "MODULE_TYPE 5: ASSERT - Delete non existing" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + model: "Test Module Type" + state: absent + register: test_five + +- name: "MODULE_TYPE 5: ASSERT - Delete non existing`" + assert: + that: + - not test_five['changed'] + - test_five['module_type'] == None + - test_five['msg'] == "module_type Test Module Type already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_platform.yml b/tests/integration/targets/v4.0/tasks/netbox_platform.yml new file mode 100644 index 000000000..1e3621add --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_platform.yml @@ -0,0 +1,92 @@ +--- +## +## +### NETBOX_PLATFORM +## +## +- name: "PLATFORM 1: Necessary info creation" + netbox.netbox.netbox_platform: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Platform + state: present + register: test_one + +- name: "PLATFORM 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['platform']['name'] == "Test Platform" + - test_one['platform']['slug'] == "test-platform" + - test_one['msg'] == "platform Test Platform created" + +- name: "PLATFORM 2: Create duplicate" + netbox.netbox.netbox_platform: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Platform + state: present + register: test_two + +- name: "PLATFORM 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['platform']['name'] == "Test Platform" + - test_two['platform']['slug'] == "test-platform" + - test_two['msg'] == "platform Test Platform already exists" + +- name: "PLATFORM 3: ASSERT - Update" + netbox.netbox.netbox_platform: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Platform + manufacturer: Test Manufacturer + state: present + register: test_three + +- name: "PLATFORM 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['after']['manufacturer'] == 3 + - test_three['platform']['manufacturer'] == 3 + - test_three['msg'] == "platform Test Platform updated" + +- name: "PLATFORM 4: ASSERT - Delete" + netbox.netbox.netbox_platform: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Platform + state: absent + register: test_four + +- name: "PLATFORM 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "platform Test Platform deleted" + +- name: "PLATFORM 5: ASSERT - Delete non existing" + netbox.netbox.netbox_platform: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Platform + state: absent + register: test_five + +- name: "PLATFORM 5: ASSERT - Delete non existing`" + assert: + that: + - not test_five['changed'] + - test_five['platform'] == None + - test_five['msg'] == "platform Test Platform already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_power_feed.yml b/tests/integration/targets/v4.0/tasks/netbox_power_feed.yml new file mode 100644 index 000000000..a02fd9129 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_power_feed.yml @@ -0,0 +1,127 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_FEED +## +## +- name: "POWER_FEED 1: Necessary info creation" + netbox.netbox.netbox_power_feed: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Feed + power_panel: Power Panel + state: present + register: test_one + +- name: "POWER_FEED 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_feed']['name'] == "Power Feed" + - test_one['power_feed']['power_panel'] == 1 + - test_one['msg'] == "power_feed Power Feed created" + +- name: "POWER_FEED 2: Create duplicate" + netbox.netbox.netbox_power_feed: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Feed + power_panel: Power Panel + state: present + register: test_two + +- name: "POWER_FEED 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['power_feed']['name'] == "Power Feed" + - test_two['power_feed']['power_panel'] == 1 + - test_two['msg'] == "power_feed Power Feed already exists" + +- name: "POWER_FEED 3: Update power_feed with other fields" + netbox.netbox.netbox_power_feed: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Feed + power_panel: Power Panel + status: offline + type: redundant + supply: dc + phase: three-phase + voltage: 400 + amperage: 32 + max_utilization: 25 + comments: totally normal power feed + state: present + register: test_three + +- name: "POWER_FEED 3: ASSERT - Update power_feed with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['status'] == "offline" + - test_three['diff']['after']['type'] == "redundant" + - test_three['diff']['after']['supply'] == "dc" + - test_three['diff']['after']['phase'] == "three-phase" + - test_three['diff']['after']['voltage'] == 400 + - test_three['diff']['after']['amperage'] == 32 + - test_three['diff']['after']['max_utilization'] == 25 + - test_three['diff']['after']['comments'] == "totally normal power feed" + - test_three['power_feed']['name'] == "Power Feed" + - test_three['power_feed']['power_panel'] == 1 + - test_three['power_feed']['status'] == "offline" + - test_three['power_feed']['type'] == "redundant" + - test_three['power_feed']['supply'] == "dc" + - test_three['power_feed']['phase'] == "three-phase" + - test_three['power_feed']['voltage'] == 400 + - test_three['power_feed']['amperage'] == 32 + - test_three['power_feed']['max_utilization'] == 25 + - test_three['power_feed']['comments'] == "totally normal power feed" + - test_three['msg'] == "power_feed Power Feed updated" + +- name: "POWER_FEED 4: Create Power Feed for Delete Test" + netbox.netbox.netbox_power_feed: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Feed 2 + power_panel: Power Panel + state: present + register: test_four + +- name: "POWER_FEED 4: ASSERT - Create Power Feed for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_feed']['name'] == "Power Feed 2" + - test_four['power_feed']['power_panel'] == 1 + - test_four['msg'] == "power_feed Power Feed 2 created" + + +- name: "POWER_FEED 5: Delete Power Feed" + netbox.netbox.netbox_power_feed: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Feed 2 + power_panel: Power Panel + state: absent + register: test_five + +- name: "POWER_FEED 5: ASSERT - Delete Power Feed" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_feed Power Feed 2 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_power_outlet.yml b/tests/integration/targets/v4.0/tasks/netbox_power_outlet.yml new file mode 100644 index 000000000..c7b5f7d3d --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_power_outlet.yml @@ -0,0 +1,114 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_OUTLET +## +## +- name: "POWER_OUTLET 1: Necessary info creation" + netbox.netbox.netbox_power_outlet: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Outlet + device: Device Power Tests + state: present + register: test_one + +- name: "POWER_OUTLET 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_outlet']['name'] == "Power Outlet" + - test_one['power_outlet']['device'] == 10 + - test_one['msg'] == "power_outlet Power Outlet created" + +- name: "POWER_OUTLET 2: Create duplicate" + netbox.netbox.netbox_power_outlet: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Outlet + device: Device Power Tests + state: present + register: test_two + +- name: "POWER_OUTLET 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['power_outlet']['name'] == "Power Outlet" + - test_two['power_outlet']['device'] == 10 + - test_two['msg'] == "power_outlet Power Outlet already exists" + +- name: "POWER_OUTLET 3: Update power_outlet with other fields" + netbox.netbox.netbox_power_outlet: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Outlet + device: Device Power Tests + type: ita-e + power_port: Power Port + feed_leg: B + description: test description + state: present + register: test_three + +- name: "POWER_OUTLET 3: ASSERT - Update power_outlet with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "ita-e" + - test_three['diff']['after']['power_port'] == 1 + - test_three['diff']['after']['feed_leg'] == "B" + - test_three['diff']['after']['description'] == "test description" + - test_three['power_outlet']['name'] == "Power Outlet" + - test_three['power_outlet']['device'] == 10 + - test_three['power_outlet']['type'] == "ita-e" + - test_three['power_outlet']['power_port'] == 1 + - test_three['power_outlet']['feed_leg'] == "B" + - test_three['power_outlet']['description'] == "test description" + - test_three['msg'] == "power_outlet Power Outlet updated" + +- name: "POWER_OUTLET 4: Create Power Outlet for Delete Test" + netbox.netbox.netbox_power_outlet: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Outlet 2 + device: Device Power Tests + state: present + register: test_four + +- name: "POWER_OUTLET 4: ASSERT - Create Power Outlet for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_outlet']['name'] == "Power Outlet 2" + - test_four['power_outlet']['device'] == 10 + - test_four['msg'] == "power_outlet Power Outlet 2 created" + +- name: "POWER_OUTLET 5: Delete Power Outlet" + netbox.netbox.netbox_power_outlet: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Outlet 2 + device: Device Power Tests + state: absent + register: test_five + +- name: "POWER_OUTLET 5: ASSERT - Delete Power Outlet" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_outlet Power Outlet 2 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_power_outlet_template.yml b/tests/integration/targets/v4.0/tasks/netbox_power_outlet_template.yml new file mode 100644 index 000000000..96f283486 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_power_outlet_template.yml @@ -0,0 +1,111 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_OUTLET_TEMPLATE +## +## +- name: "POWER_OUTLET_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_power_outlet_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Outlet Template + device_type: Device Type Power Tests + state: present + register: test_one + +- name: "POWER_OUTLET_TEMPLATE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_outlet_template']['name'] == "Power Outlet Template" + - test_one['power_outlet_template']['device_type'] == 8 + - test_one['msg'] == "power_outlet_template Power Outlet Template created" + +- name: "POWER_OUTLET_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_power_outlet_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Outlet Template + device_type: Device Type Power Tests + state: present + register: test_two + +- name: "POWER_OUTLET_TEMPLATE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['power_outlet_template']['name'] == "Power Outlet Template" + - test_two['power_outlet_template']['device_type'] == 8 + - test_two['msg'] == "power_outlet_template Power Outlet Template already exists" + +- name: "POWER_OUTLET_TEMPLATE 3: Update power_outlet_template with other fields" + netbox.netbox.netbox_power_outlet_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Outlet Template + device_type: Device Type Power Tests + type: ita-e + power_port_template: Power Port Template + feed_leg: B + state: present + register: test_three + +- name: "POWER_OUTLET_TEMPLATE 3: ASSERT - Update power_outlet_template with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "ita-e" + - test_three['diff']['after']['power_port'] == 1 + - test_three['diff']['after']['feed_leg'] == "B" + - test_three['power_outlet_template']['name'] == "Power Outlet Template" + - test_three['power_outlet_template']['device_type'] == 8 + - test_three['power_outlet_template']['type'] == "ita-e" + - test_three['power_outlet_template']['power_port'] == 1 + - test_three['power_outlet_template']['feed_leg'] == "B" + - test_three['msg'] == "power_outlet_template Power Outlet Template updated" + +- name: "POWER_OUTLET_TEMPLATE 4: Create Power Outlet Template for Delete Test" + netbox.netbox.netbox_power_outlet_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Outlet Template 2 + device_type: Device Type Power Tests + state: present + register: test_four + +- name: "POWER_OUTLET_TEMPLATE 4: ASSERT - Create Power Outlet Template for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_outlet_template']['name'] == "Power Outlet Template 2" + - test_four['power_outlet_template']['device_type'] == 8 + - test_four['msg'] == "power_outlet_template Power Outlet Template 2 created" + +- name: "POWER_OUTLET_TEMPLATE 5: Delete Power Outlet Template" + netbox.netbox.netbox_power_outlet_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Outlet Template 2 + device_type: Device Type Power Tests + state: absent + register: test_five + +- name: "POWER_OUTLET_TEMPLATE 5: ASSERT - Delete Power Outlet Template" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_outlet_template Power Outlet Template 2 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_power_panel.yml b/tests/integration/targets/v4.0/tasks/netbox_power_panel.yml new file mode 100644 index 000000000..082a6b375 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_power_panel.yml @@ -0,0 +1,105 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_PANEL +## +## +- name: "POWER_PANEL 1: Necessary info creation" + netbox.netbox.netbox_power_panel: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Panel + site: Test Site + state: present + register: test_one + +- name: "POWER_PANEL 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_panel']['name'] == "Power Panel" + - test_one['power_panel']['site'] == 1 + - test_one['msg'] == "power_panel Power Panel created" + +- name: "POWER_PANEL 2: Create duplicate" + netbox.netbox.netbox_power_panel: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Panel + site: Test Site + state: present + register: test_two + +- name: "POWER_PANEL 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['power_panel']['name'] == "Power Panel" + - test_two['power_panel']['site'] == 1 + - test_two['msg'] == "power_panel Power Panel already exists" + +- name: "POWER_PANEL 3: Update power_panel with other fields" + netbox.netbox.netbox_power_panel: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Panel + site: Test Site + location: Test Rack Group + state: present + register: test_three + +- name: "POWER_PANEL 3: ASSERT - Update power_panel with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['location'] == 1 + - test_three['power_panel']['name'] == "Power Panel" + - test_three['power_panel']['site'] == 1 + - test_three['power_panel']['location'] == 1 + - test_three['msg'] == "power_panel Power Panel updated" + +- name: "POWER_PANEL 4: Create Power Panel for Delete Test" + netbox.netbox.netbox_power_panel: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Panel 2 + site: Test Site + state: present + register: test_four + +- name: "POWER_PANEL 4: ASSERT - Create Power Panel for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_panel']['name'] == "Power Panel 2" + - test_four['power_panel']['site'] == 1 + - test_four['msg'] == "power_panel Power Panel 2 created" + +- name: "POWER_PANEL 5: Delete Power Panel" + netbox.netbox.netbox_power_panel: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Panel 2 + site: Test Site + state: absent + register: test_five + +- name: "POWER_PANEL 5: ASSERT - Delete Power Panel" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_panel Power Panel 2 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_power_port.yml b/tests/integration/targets/v4.0/tasks/netbox_power_port.yml new file mode 100644 index 000000000..b6368bd92 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_power_port.yml @@ -0,0 +1,125 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_PORT +## +## +- name: "POWER_PORT 0: Create device for testing power ports" + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Device Power Tests + device_type: Cisco Test + device_role: Core Switch + site: Test Site + state: present + +- name: "POWER_PORT 1: Necessary info creation" + netbox.netbox.netbox_power_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Port + device: Device Power Tests + state: present + register: test_one + +- name: "POWER_PORT 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_port']['name'] == "Power Port" + - test_one['power_port']['device'] == 10 + - test_one['msg'] == "power_port Power Port created" + +- name: "POWER_PORT 2: Create duplicate" + netbox.netbox.netbox_power_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Port + device: Device Power Tests + state: present + register: test_two + +- name: "POWER_PORT 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['power_port']['name'] == "Power Port" + - test_two['power_port']['device'] == 10 + - test_two['msg'] == "power_port Power Port already exists" + +- name: "POWER_FEED 3: Update power_port with other fields" + netbox.netbox.netbox_power_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Port + device: Device Power Tests + type: ita-e + allocated_draw: 10 + maximum_draw: 20 + description: test description + state: present + register: test_three + +- name: "POWER_FEED 3: ASSERT - Update power_port with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "ita-e" + - test_three['diff']['after']['allocated_draw'] == 10 + - test_three['diff']['after']['maximum_draw'] == 20 + - test_three['diff']['after']['description'] == "test description" + - test_three['power_port']['name'] == "Power Port" + - test_three['power_port']['device'] == 10 + - test_three['power_port']['type'] == "ita-e" + - test_three['power_port']['allocated_draw'] == 10 + - test_three['power_port']['maximum_draw'] == 20 + - test_three['power_port']['description'] == "test description" + - test_three['msg'] == "power_port Power Port updated" + +- name: "POWER_PORT 4: Create Power Port for Delete Test" + netbox.netbox.netbox_power_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Port 2 + device: Device Power Tests + state: present + register: test_four + +- name: "POWER_PORT 4: ASSERT - Create Power Port for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_port']['name'] == "Power Port 2" + - test_four['power_port']['device'] == 10 + - test_four['msg'] == "power_port Power Port 2 created" + +- name: "POWER_PORT 5: Delete Power Port" + netbox.netbox.netbox_power_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Port 2 + device: Device Power Tests + state: absent + register: test_five + +- name: "POWER_PORT 5: ASSERT - Delete Power Port" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_port Power Port 2 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_power_port_template.yml b/tests/integration/targets/v4.0/tasks/netbox_power_port_template.yml new file mode 100644 index 000000000..aaa5eb43c --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_power_port_template.yml @@ -0,0 +1,212 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_POWER_PORT_TEMPLATE +## +## +- name: "POWER_PORT_TEMPLATE 0.1: Create device type for testing power ports on device types" + netbox.netbox.netbox_device_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + model: Device Type Power Tests + manufacturer: Test Manufacturer + state: present + +- name: "POWER_PORT_TEMPLATE 0.2: Create module type for testing power ports on module types" + netbox.netbox.netbox_module_type: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + model: Module Type Power Tests + manufacturer: Test Manufacturer + state: present + +- name: "POWER_PORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Port Template + device_type: Device Type Power Tests + state: present + register: test_one + +- name: "POWER_PORT_TEMPLATE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['power_port_template']['name'] == "Power Port Template" + - test_one['power_port_template']['device_type'] == 8 + - test_one['msg'] == "power_port_template Power Port Template created" + +- name: "POWER_PORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Port Template + device_type: Device Type Power Tests + state: present + register: test_two + +- name: "POWER_PORT_TEMPLATE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['power_port_template']['name'] == "Power Port Template" + - test_two['power_port_template']['device_type'] == 8 + - test_two['msg'] == "power_port_template Power Port Template already exists" + +- name: "POWER_PORT_TEMPLATE 3: Update power_port_template with other fields" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Port Template + device_type: Device Type Power Tests + type: ita-e + allocated_draw: 10 + maximum_draw: 20 + state: present + register: test_three + +- name: "POWER_PORT_TEMPLATE 3: ASSERT - Update power_port_template with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['type'] == "ita-e" + - test_three['diff']['after']['allocated_draw'] == 10 + - test_three['diff']['after']['maximum_draw'] == 20 + - test_three['power_port_template']['name'] == "Power Port Template" + - test_three['power_port_template']['device_type'] == 8 + - test_three['power_port_template']['type'] == "ita-e" + - test_three['power_port_template']['allocated_draw'] == 10 + - test_three['power_port_template']['maximum_draw'] == 20 + - test_three['msg'] == "power_port_template Power Port Template updated" + +- name: "POWER_PORT_TEMPLATE 4: Create Power Port Template for Delete Test" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Port Template 2 + device_type: Device Type Power Tests + state: present + register: test_four + +- name: "POWER_PORT_TEMPLATE 4: ASSERT - Create Power Port Template for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['power_port_template']['name'] == "Power Port Template 2" + - test_four['power_port_template']['device_type'] == 8 + - test_four['msg'] == "power_port_template Power Port Template 2 created" + +- name: "POWER_PORT_TEMPLATE 5: Delete Power Port Template" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Power Port Template 2 + device_type: Device Type Power Tests + state: absent + register: test_five + +- name: "POWER_PORT_TEMPLATE 5: ASSERT - Delete Power Port Template" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "power_port_template Power Port Template 2 deleted" + +- name: "POWER_PORT_TEMPLATE 6: Necessary info creation" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Module Power Port Template + module_type: Module Type Power Tests + state: present + register: test_six + +- name: "POWER_PORT_TEMPLATE 6: ASSERT - Necessary info creation" + assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['power_port_template']['name'] == "Module Power Port Template" + - test_six['power_port_template']['module_type'] == 1 + - test_six['msg'] == "power_port_template Module Power Port Template created" + +- name: "POWER_PORT_TEMPLATE 7: Create duplicate" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Module Power Port Template + module_type: Module Type Power Tests + state: present + register: test_seven + +- name: "POWER_PORT_TEMPLATE 7: ASSERT - Create duplicate" + assert: + that: + - not test_seven['changed'] + - test_seven['power_port_template']['name'] == "Module Power Port Template" + - test_seven['power_port_template']['module_type'] == 1 + - test_seven['msg'] == "power_port_template Module Power Port Template already exists" + +- name: "POWER_PORT_TEMPLATE 8: Update power_port_template with other fields" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Module Power Port Template + module_type: Module Type Power Tests + type: ita-e + allocated_draw: 10 + maximum_draw: 20 + state: present + register: test_eight + +- name: "POWER_PORT_TEMPLATE 8: ASSERT - Update power_port_template with other fields" + assert: + that: + - test_eight is changed + - test_eight['diff']['after']['type'] == "ita-e" + - test_eight['diff']['after']['allocated_draw'] == 10 + - test_eight['diff']['after']['maximum_draw'] == 20 + - test_eight['power_port_template']['name'] == "Module Power Port Template" + - test_eight['power_port_template']['module_type'] == 1 + - test_eight['power_port_template']['type'] == "ita-e" + - test_eight['power_port_template']['allocated_draw'] == 10 + - test_eight['power_port_template']['maximum_draw'] == 20 + - test_eight['msg'] == "power_port_template Module Power Port Template updated" + +- name: "POWER_PORT_TEMPLATE 9: Delete Power Port Template" + netbox.netbox.netbox_power_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Module Power Port Template + module_type: Module Type Power Tests + state: absent + register: test_nine + +- name: "POWER_PORT_TEMPLATE 9: ASSERT - Delete Power Port Template" + assert: + that: + - test_nine is changed + - test_nine['diff']['before']['state'] == "present" + - test_nine['diff']['after']['state'] == "absent" + - test_nine['msg'] == "power_port_template Module Power Port Template deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_prefix.yml b/tests/integration/targets/v4.0/tasks/netbox_prefix.yml new file mode 100644 index 000000000..59ed336ad --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_prefix.yml @@ -0,0 +1,245 @@ +--- +## +## +### NETBOX_PREFIX +## +## +- name: "1 - Create prefix within NetBox with only required information" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: 10.156.0.0/19 + state: present + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['msg'] == "prefix 10.156.0.0/19 created" + - test_one['prefix']['prefix'] == "10.156.0.0/19" + +- name: "2 - Duplicate" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: 10.156.0.0/19 + state: present + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - not test_two['changed'] + - test_two['msg'] == "prefix 10.156.0.0/19 already exists" + - test_two['prefix']['prefix'] == "10.156.0.0/19" + +- name: "3 - Update 10.156.0.0/19" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: 10.156.0.0/19 + site: Test Site + status: Reserved + description: "This prefix has been updated" + state: present + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['after']['site'] == 1 + - test_three['diff']['after']['status'] == "reserved" + - test_three['diff']['after']['description'] == "This prefix has been updated" + - test_three['msg'] == "prefix 10.156.0.0/19 updated" + - test_three['prefix']['prefix'] == "10.156.0.0/19" + - test_three['prefix']['site'] == 1 + - test_three['prefix']['status'] == "reserved" + - test_three['prefix']['description'] == "This prefix has been updated" + +- name: "4 - Delete prefix within netbox" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: 10.156.0.0/19 + state: absent + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "prefix 10.156.0.0/19 deleted" + +- name: "5 - Create prefix with several specified options" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + family: 4 + prefix: 10.156.32.0/19 + site: Test Site + vrf: Test VRF + tenant: Test Tenant + vlan: + name: Test VLAN + site: Test Site + tenant: Test Tenant + vlan_group: Test Vlan Group + status: Reserved + prefix_role: Network of care + description: Test description + is_pool: true + tags: + - "Schnozzberry" + state: present + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['msg'] == "prefix 10.156.32.0/19 created" + - test_five['prefix']['prefix'] == "10.156.32.0/19" + - test_five['prefix']['family'] == 4 + - test_five['prefix']['site'] == 1 + - test_five['prefix']['vrf'] == 1 + - test_five['prefix']['tenant'] == 1 + - test_five['prefix']['vlan'] == 4 + - test_five['prefix']['status'] == "reserved" + - test_five['prefix']['role'] == 1 + - test_five['prefix']['description'] == "Test description" + - test_five['prefix']['is_pool'] == true + - test_five['prefix']['tags'][0] == 4 + +- name: "6 - Get a new /24 inside 10.156.0.0/19 within NetBox - Parent doesn't exist" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + parent: 10.156.0.0/19 + prefix_length: 24 + state: present + first_available: yes + register: test_six + +- name: "6 - ASSERT" + assert: + that: + - not test_six['changed'] + - test_six['msg'] == "Parent prefix does not exist - 10.156.0.0/19" + +- name: "7 - Create prefix within NetBox with only required information" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: 10.156.0.0/19 + state: present + register: test_seven + +- name: "7 - ASSERT" + assert: + that: + - test_seven is changed + - test_seven['diff']['before']['state'] == "absent" + - test_seven['diff']['after']['state'] == "present" + - test_seven['msg'] == "prefix 10.156.0.0/19 created" + - test_seven['prefix']['prefix'] == "10.156.0.0/19" + +- name: "8 - Get a new /24 inside 10.156.0.0/19 within NetBox" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + parent: 10.156.0.0/19 + prefix_length: 24 + state: present + first_available: yes + register: test_eight + +- name: "8 - ASSERT" + assert: + that: + - test_eight is changed + - test_eight['diff']['before']['state'] == "absent" + - test_eight['diff']['after']['state'] == "present" + - test_eight['msg'] == "prefix 10.156.0.0/24 created" + - test_eight['prefix']['prefix'] == "10.156.0.0/24" + +- name: "9 - Create 10.157.0.0/19" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + prefix: 10.157.0.0/19 + vrf: Test VRF + site: Test Site + state: present + register: test_nine + +- name: "9 - ASSERT" + assert: + that: + - test_nine is changed + - test_nine['diff']['before']['state'] == "absent" + - test_nine['diff']['after']['state'] == "present" + - test_nine['msg'] == "prefix 10.157.0.0/19 created" + - test_nine['prefix']['prefix'] == "10.157.0.0/19" + - test_nine['prefix']['site'] == 1 + - test_nine['prefix']['vrf'] == 1 + +- name: "10 - Get a new /24 inside 10.157.0.0/19 within NetBox with additional values" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + parent: 10.157.0.0/19 + prefix_length: 24 + vrf: Test VRF + site: Test Site + state: present + first_available: yes + register: test_ten + +- name: "10 - ASSERT" + assert: + that: + - test_ten is changed + - test_ten['diff']['before']['state'] == "absent" + - test_ten['diff']['after']['state'] == "present" + - test_ten['msg'] == "prefix 10.157.0.0/24 created" + - test_ten['prefix']['prefix'] == "10.157.0.0/24" + - test_ten['prefix']['site'] == 1 + - test_ten['prefix']['vrf'] == 1 + +- name: "11 - Get a new /24 inside 10.156.0.0/19 within NetBox" + netbox.netbox.netbox_prefix: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + parent: 10.156.0.0/19 + prefix_length: 24 + state: present + first_available: yes + register: test_eleven + +- name: "11 - ASSERT" + assert: + that: + - test_eleven is changed + - test_eleven['diff']['before']['state'] == "absent" + - test_eleven['diff']['after']['state'] == "present" + - test_eleven['msg'] == "prefix 10.156.1.0/24 created" + - test_eleven['prefix']['prefix'] == "10.156.1.0/24" diff --git a/tests/integration/targets/v4.0/tasks/netbox_provider.yml b/tests/integration/targets/v4.0/tasks/netbox_provider.yml new file mode 100644 index 000000000..cba224eb4 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_provider.yml @@ -0,0 +1,79 @@ +--- +## +## +### NETBOX_PROVIDER +## +## +- name: "NETBOX_PROVIDER 1: Create provider within NetBox with only required information" + netbox.netbox.netbox_provider: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Provider One + state: present + register: test_one + +- name: "NETBOX_PROVIDER 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['provider']['name'] == "Test Provider One" + - test_one['provider']['slug'] == "test-provider-one" + - test_one['msg'] == "provider Test Provider One created" + +- name: "NETBOX_PROVIDER 2: Duplicate" + netbox.netbox.netbox_provider: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Provider One + state: present + register: test_two + +- name: "NETBOX_PROVIDER 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['provider']['name'] == "Test Provider One" + - test_two['provider']['slug'] == "test-provider-one" + - test_two['msg'] == "provider Test Provider One already exists" + +- name: "NETBOX_PROVIDER 3: Update provider with other fields" + netbox.netbox.netbox_provider: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Provider One + comments: "BAD PROVIDER" + state: present + register: test_three + +- name: "NETBOX_PROVIDER 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['comments'] == "BAD PROVIDER" + - test_three['provider']['name'] == "Test Provider One" + - test_three['provider']['slug'] == "test-provider-one" + - test_three['provider']['comments'] == "BAD PROVIDER" + - test_three['msg'] == "provider Test Provider One updated" + +- name: "NETBOX_PROVIDER 4: Delete provider within netbox" + netbox.netbox.netbox_provider: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test Provider One + state: absent + register: test_four + +- name: "NETBOX_PROVIDER 4 : ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['provider']['name'] == "Test Provider One" + - test_four['provider']['slug'] == "test-provider-one" + - test_four['provider']['comments'] == "BAD PROVIDER" + - test_four['msg'] == "provider Test Provider One deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_provider_network.yml b/tests/integration/targets/v4.0/tasks/netbox_provider_network.yml new file mode 100644 index 000000000..bf7d4bf97 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_provider_network.yml @@ -0,0 +1,83 @@ +--- +## +## +### NETBOX_PROVIDER +## +## +- name: "NETBOX_PROVIDER_NETWORK 1: Create provider network within NetBox with only required information" + netbox.netbox.netbox_provider_network: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + provider: Test Provider + name: Test Provider Network One + state: present + register: test_one + +- name: "NETBOX_PROVIDER_NETWORK 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['provider_network']['name'] == "Test Provider Network One" + - test_one['msg'] == "provider_network Test Provider Network One created" + +- name: "NETBOX_PROVIDER_NETWORK 2: Duplicate" + netbox.netbox.netbox_provider_network: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + provider: Test Provider + name: Test Provider Network One + state: present + register: test_two + +- name: "NETBOX_PROVIDER_NETWORK 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['provider_network']['name'] == "Test Provider Network One" + - test_two['msg'] == "provider_network Test Provider Network One already exists" + +- name: "NETBOX_PROVIDER_NETWORK 3: Update provider network with other fields" + netbox.netbox.netbox_provider_network: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + provider: Test Provider + name: Test Provider Network One + description: Describe a Provider Network + comments: "A provider network" + state: present + register: test_three + +- name: "NETBOX_PROVIDER_NETWORK 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['comments'] == "A provider network" + - test_three['diff']['after']['description'] == "Describe a Provider Network" + - test_three['provider_network']['name'] == "Test Provider Network One" + - test_three['provider_network']['comments'] == "A provider network" + - test_three['provider_network']['description'] == "Describe a Provider Network" + - test_three['msg'] == "provider_network Test Provider Network One updated" + +- name: "NETBOX_PROVIDER_NETWORK 4: Delete provider within netbox" + netbox.netbox.netbox_provider_network: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + provider: Test Provider + name: Test Provider Network One + state: absent + register: test_four + +- name: "NETBOX_PROVIDER_NETWORK 4 : ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['provider_network']['name'] == "Test Provider Network One" + - test_four['provider_network']['comments'] == "A provider network" + - test_four['provider_network']['description'] == "Describe a Provider Network" + - test_four['msg'] == "provider_network Test Provider Network One deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_rack.yml b/tests/integration/targets/v4.0/tasks/netbox_rack.yml new file mode 100644 index 000000000..245dd0c29 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_rack.yml @@ -0,0 +1,226 @@ +--- +## +## +### NETBOX_RACK +## +## +- name: "1 - Test rack creation" + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test rack one" + site: "Test Site" + location: "Test Rack Group" + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rack']['name'] == "Test rack one" + - test_one['rack']['site'] == 1 + +- name: "Test duplicate rack" + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test rack one" + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - not test_two['changed'] + - test_two['rack']['name'] == "Test rack one" + - test_two['rack']['site'] == 1 + - test_two['msg'] == "rack Test rack one already exists" + +- name: "3 - Create new rack with similar name" + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test rack - Test Site + site: Test Site + state: present + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['rack']['name'] == "Test rack - Test Site" + - test_three['rack']['site'] == 1 + - test_three['msg'] == "rack Test rack - Test Site created" + +- name: "4 - Attempt to create Test rack one again" + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test rack one + site: Test Site + location: "Test Rack Group" + state: present + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - not test_four['changed'] + - test_four['rack']['name'] == "Test rack one" + - test_four['rack']['site'] == 1 + - test_four['msg'] == "rack Test rack one already exists" + +- name: "5 - Update Test rack one with more options" + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test rack one + site: Test Site + rack_role: "Test Rack Role" + location: "Test Rack Group" + facility_id: "EQUI10291" + tenant: "Test Tenant" + status: Available + serial: "FXS10001" + asset_tag: "1234" + width: 23 + u_height: 48 + type: "2-post frame" + outer_width: 32 + outer_depth: 24 + outer_unit: "Inches" + comments: "Just testing rack module" + tags: + - "Schnozzberry" + state: present + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['diff']['after']['asset_tag'] == "1234" + - test_five['diff']['after']['comments'] == "Just testing rack module" + - test_five['diff']['after']['facility_id'] == "EQUI10291" + - test_five['diff']['after']['outer_depth'] == 24 + - test_five['diff']['after']['outer_unit'] == "in" + - test_five['diff']['after']['outer_width'] == 32 + - test_five['diff']['after']['role'] == 1 + - test_five['diff']['after']['serial'] == "FXS10001" + - test_five['diff']['after']['status'] == "available" + - test_five['diff']['after']['tenant'] == 1 + - test_five['diff']['after']['tags'][0] == 4 + - test_five['diff']['after']['type'] == "2-post-frame" + - test_five['diff']['after']['u_height'] == 48 + - test_five['diff']['after']['width'] == 23 + - test_five['rack']['name'] == "Test rack one" + - test_five['rack']['site'] == 1 + - test_five['rack']['asset_tag'] == "1234" + - test_five['rack']['comments'] == "Just testing rack module" + - test_five['rack']['facility_id'] == "EQUI10291" + - test_five['rack']['location'] == 1 + - test_five['rack']['outer_depth'] == 24 + - test_five['rack']['outer_unit'] == "in" + - test_five['rack']['outer_width'] == 32 + - test_five['rack']['role'] == 1 + - test_five['rack']['serial'] == "FXS10001" + - test_five['rack']['status'] == "available" + - test_five['rack']['tenant'] == 1 + - test_five['rack']['tags'][0] == 4 + - test_five['rack']['type'] == "2-post-frame" + - test_five['rack']['u_height'] == 48 + - test_five['rack']['width'] == 23 + - test_five['msg'] == "rack Test rack one updated" + +- name: "6 - Update Test rack one with same options" + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test rack one + site: Test Site + rack_role: "Test Rack Role" + location: "Test Rack Group" + facility_id: "EQUI10291" + tenant: "Test Tenant" + status: Available + serial: "FXS10001" + asset_tag: "1234" + width: 23 + u_height: 48 + type: "2-post frame" + outer_width: 32 + outer_depth: 24 + outer_unit: "Inches" + comments: "Just testing rack module" + tags: + - "Schnozzberry" + state: present + register: test_six + +- name: "6 - ASSERT" + assert: + that: + - test_six is not changed + - test_six['rack']['name'] == "Test rack one" + - test_six['rack']['site'] == 1 + - test_six['rack']['asset_tag'] == "1234" + - test_six['rack']['comments'] == "Just testing rack module" + - test_six['rack']['facility_id'] == "EQUI10291" + - test_six['rack']['location'] == 1 + - test_six['rack']['outer_depth'] == 24 + - test_six['rack']['outer_unit'] == "in" + - test_six['rack']['outer_width'] == 32 + - test_six['rack']['role'] == 1 + - test_six['rack']['serial'] == "FXS10001" + - test_six['rack']['status'] == "available" + - test_six['rack']['tenant'] == 1 + - test_six['rack']['tags'][0] == 4 + - test_six['rack']['type'] == "2-post-frame" + - test_six['rack']['u_height'] == 48 + - test_six['rack']['width'] == 23 + +- name: "7 - Create rack with same asset tag and serial number" + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test rack two + site: Test Site + serial: "FXS10001" + asset_tag: "1234" + state: present + ignore_errors: yes + register: test_seven + +- name: "7 - ASSERT" + assert: + that: + - test_seven is failed + - "'asset tag already exists' in test_seven['msg']" + +- name: "8 - Test delete" + netbox.netbox.netbox_rack: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test rack one" + state: "absent" + register: test_eight + +- name: "8 - ASSERT" + assert: + that: + - test_eight is changed + - test_eight['diff']['before']['state'] == "present" + - test_eight['diff']['after']['state'] == "absent" + - test_eight['msg'] == "rack Test rack one deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_rack_group.yml b/tests/integration/targets/v4.0/tasks/netbox_rack_group.yml new file mode 100644 index 000000000..6a10cbf94 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_rack_group.yml @@ -0,0 +1,62 @@ +--- +## +## +### NETBOX_RACK_GROUP +## +## +- name: "RACK_GROUP 1: Necessary info creation" + netbox.netbox.netbox_rack_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rack Group + site: Test Site + state: present + register: test_one + +- name: "RACK_GROUP 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rack_group']['name'] == "Rack Group" + - test_one['rack_group']['slug'] == "rack-group" + - test_one['rack_group']['site'] == 1 + - test_one['msg'] == "rack_group Rack Group created" + +- name: "RACK_GROUP 2: Create duplicate" + netbox.netbox.netbox_rack_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rack Group + site: Test Site + state: present + register: test_two + +- name: "RACK_GROUP 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['rack_group']['name'] == "Rack Group" + - test_two['rack_group']['slug'] == "rack-group" + - test_two['rack_group']['site'] == 1 + - test_two['msg'] == "rack_group Rack Group already exists" + +- name: "RACK_GROUP 3: ASSERT - Delete" + netbox.netbox.netbox_rack_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rack Group + state: absent + register: test_three + +- name: "RACK_GROUP 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "present" + - test_three['diff']['after']['state'] == "absent" + - test_three['msg'] == "rack_group Rack Group deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_rack_role.yml b/tests/integration/targets/v4.0/tasks/netbox_rack_role.yml new file mode 100644 index 000000000..5ca9e44eb --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_rack_role.yml @@ -0,0 +1,81 @@ +--- +## +## +### NETBOX_RACK_ROLE +## +## +- name: "RACK_ROLE 1: Necessary info creation" + netbox.netbox.netbox_rack_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rack Role + color: "ffffff" + state: present + register: test_one + +- name: "RACK_ROLE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rack_role']['name'] == "Rack Role" + - test_one['rack_role']['slug'] == "rack-role" + - test_one['rack_role']['color'] == "ffffff" + - test_one['msg'] == "rack_role Rack Role created" + +- name: "RACK_ROLE 2: Create duplicate" + netbox.netbox.netbox_rack_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rack Role + state: present + register: test_two + +- name: "RACK_ROLE 1: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['rack_role']['name'] == "Rack Role" + - test_two['rack_role']['slug'] == "rack-role" + - test_two['rack_role']['color'] == "ffffff" + - test_two['msg'] == "rack_role Rack Role already exists" + +- name: "RACK_ROLE 3: Update" + netbox.netbox.netbox_rack_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rack Role + color: "003EFF" + state: present + register: test_three + +- name: "RACK_ROLE 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['after']['color'] == "003eff" + - test_three['rack_role']['name'] == "Rack Role" + - test_three['rack_role']['slug'] == "rack-role" + - test_three['rack_role']['color'] == "003eff" + - test_three['msg'] == "rack_role Rack Role updated" + +- name: "RACK_ROLE 4: Delete" + netbox.netbox.netbox_rack_role: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rack Role + state: absent + register: test_four + +- name: "RACK_ROLE 4: ASSERT - Update" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "rack_role Rack Role deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_rear_port.yml b/tests/integration/targets/v4.0/tasks/netbox_rear_port.yml new file mode 100644 index 000000000..10eb23098 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_rear_port.yml @@ -0,0 +1,139 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_REAR_PORT +## +## +- name: "REAR_PORT 1: Necessary info creation" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port + device: test100 + type: bnc + state: present + register: test_one + +- name: "REAR_PORT 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rear_port']['name'] == "Rear Port" + - test_one['rear_port']['device'] == 1 + - test_one['rear_port']['type'] == "bnc" + - test_one['msg'] == "rear_port Rear Port created" + +- name: "REAR_PORT 2: Create duplicate" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port + device: test100 + type: bnc + state: present + register: test_two + +- name: "REAR_PORT 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['rear_port']['name'] == "Rear Port" + - test_two['rear_port']['device'] == 1 + - test_two['rear_port']['type'] == "bnc" + - test_two['msg'] == "rear_port Rear Port already exists" + +- name: "REAR_PORT 3: Update Rear Port with other fields" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port + device: test100 + type: bnc + positions: 5 + description: test description + state: present + register: test_three + +- name: "REAR_PORT 3: ASSERT - Update Rear Port with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['positions'] == 5 + - test_three['diff']['after']['description'] == "test description" + - test_three['rear_port']['name'] == "Rear Port" + - test_three['rear_port']['device'] == 1 + - test_three['rear_port']['type'] == "bnc" + - test_three['rear_port']['positions'] == 5 + - test_three['rear_port']['description'] == "test description" + - test_three['msg'] == "rear_port Rear Port updated" + +- name: "REAR_PORT 4: Create Rear Port for Delete Test" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port 2 + device: test100 + type: bnc + state: present + register: test_four + +- name: "REAR_PORT 4: ASSERT - Create Rear Port for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['rear_port']['name'] == "Rear Port 2" + - test_four['rear_port']['device'] == 1 + - test_four['rear_port']['type'] == "bnc" + - test_four['msg'] == "rear_port Rear Port 2 created" + +- name: "REAR_PORT 5: Delete Rear Port" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port 2 + device: test100 + type: bnc + state: absent + register: test_five + +- name: "REAR_PORT 5: ASSERT - Delete Rear Port" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "rear_port Rear Port 2 deleted" + +- name: "REAR_PORT 6: Create second Rear Port" + netbox.netbox.netbox_rear_port: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port + device: Test Nexus One + type: bnc + state: present + register: test_six + +- name: "REAR_PORT 6: ASSERT - Create second Rear Port" + assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['rear_port']['name'] == "Rear Port" + - test_six['rear_port']['device'] == 4 + - test_six['rear_port']['type'] == "bnc" + - test_six['msg'] == "rear_port Rear Port created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_rear_port_template.yml b/tests/integration/targets/v4.0/tasks/netbox_rear_port_template.yml new file mode 100644 index 000000000..ca867619a --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_rear_port_template.yml @@ -0,0 +1,136 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_REAR_PORT_TEMPLATE +## +## +- name: "REAR_PORT_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port Template + device_type: Cisco Test + type: bnc + state: present + register: test_one + +- name: "REAR_PORT_TEMPLATE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rear_port_template']['name'] == "Rear Port Template" + - test_one['rear_port_template']['device_type'] == 1 + - test_one['rear_port_template']['type'] == "bnc" + - test_one['msg'] == "rear_port_template Rear Port Template created" + +- name: "REAR_PORT_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port Template + device_type: Cisco Test + type: bnc + state: present + register: test_two + +- name: "REAR_PORT_TEMPLATE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['rear_port_template']['name'] == "Rear Port Template" + - test_two['rear_port_template']['device_type'] == 1 + - test_two['rear_port_template']['type'] == "bnc" + - test_two['msg'] == "rear_port_template Rear Port Template already exists" + +- name: "REAR_PORT_TEMPLATE 3: Update Rear Port Template with other fields" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port Template + device_type: Cisco Test + type: bnc + positions: 5 + state: present + register: test_three + +- name: "REAR_PORT_TEMPLATE 3: ASSERT - Update Rear Port Template with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['positions'] == 5 + - test_three['rear_port_template']['name'] == "Rear Port Template" + - test_three['rear_port_template']['device_type'] == 1 + - test_three['rear_port_template']['type'] == "bnc" + - test_three['rear_port_template']['positions'] == 5 + - test_three['msg'] == "rear_port_template Rear Port Template updated" + +- name: "REAR_PORT_TEMPLATE 4: Create Rear Port Template for Delete Test" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port Template 2 + device_type: Cisco Test + type: bnc + state: present + register: test_four + +- name: "REAR_PORT_TEMPLATE 4: ASSERT - Create Rear Port Template for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['rear_port_template']['name'] == "Rear Port Template 2" + - test_four['rear_port_template']['device_type'] == 1 + - test_four['rear_port_template']['type'] == "bnc" + - test_four['msg'] == "rear_port_template Rear Port Template 2 created" + +- name: "REAR_PORT_TEMPLATE 5: Delete Rear Port Template" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port Template 2 + device_type: Cisco Test + type: bnc + state: absent + register: test_five + +- name: "REAR_PORT_TEMPLATE 5: ASSERT - Delete Rear Port Template" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "rear_port_template Rear Port Template 2 deleted" + +- name: "REAR_PORT_TEMPLATE 6: Create second Rear Port Template" + netbox.netbox.netbox_rear_port_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Rear Port Template 2 + device_type: Arista Test + type: bnc + state: present + register: test_six + +- name: "REAR_PORT_TEMPLATE 6: ASSERT - Create second Rear Port Template" + assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "absent" + - test_six['diff']['after']['state'] == "present" + - test_six['rear_port_template']['name'] == "Rear Port Template 2" + - test_six['rear_port_template']['device_type'] == 2 + - test_six['rear_port_template']['type'] == "bnc" + - test_six['msg'] == "rear_port_template Rear Port Template 2 created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_region.yml b/tests/integration/targets/v4.0/tasks/netbox_region.yml new file mode 100644 index 000000000..1359598af --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_region.yml @@ -0,0 +1,79 @@ +--- +## +## +### NETBOX_REGION +## +## +- name: "REGION 1: Necessary info creation" + netbox.netbox.netbox_region: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Region One" + state: present + register: test_one + +- name: "REGION 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['region']['name'] == "Test Region One" + - test_one['region']['slug'] == "test-region-one" + - test_one['msg'] == "region Test Region One created" + +- name: "REGION 2: Create duplicate" + netbox.netbox.netbox_region: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Region One" + state: present + register: test_two + +- name: "REGION 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['region']['name'] == "Test Region One" + - test_two['region']['slug'] == "test-region-one" + - test_two['msg'] == "region Test Region One already exists" + +- name: "REGION 3: ASSERT - Update" + netbox.netbox.netbox_region: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Region One" + parent_region: "Test Region" + state: present + register: test_three + +- name: "REGION 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['parent'] == 1 + - test_three['region']['name'] == "Test Region One" + - test_three['region']['slug'] == "test-region-one" + - test_three['region']['parent'] == 1 + - test_three['msg'] == "region Test Region One updated" + +- name: "REGION 4: ASSERT - Delete" + netbox.netbox.netbox_region: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Region One" + state: absent + register: test_four + +- name: "REGION 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['region']['name'] == "Test Region One" + - test_four['region']['slug'] == "test-region-one" + - test_four['region']['parent'] == 1 + - test_four['msg'] == "region Test Region One deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_rir.yml b/tests/integration/targets/v4.0/tasks/netbox_rir.yml new file mode 100644 index 000000000..cc4935938 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_rir.yml @@ -0,0 +1,79 @@ +--- +## +## +### NETBOX_RIR +## +## +- name: "RIR 1: Necessary info creation" + netbox.netbox.netbox_rir: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test RIR One + state: present + register: test_one + +- name: "RIR 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['rir']['name'] == "Test RIR One" + - test_one['rir']['slug'] == "test-rir-one" + - test_one['msg'] == "rir Test RIR One created" + +- name: "RIR 2: Create duplicate" + netbox.netbox.netbox_rir: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test RIR One + state: present + register: test_two + +- name: "RIR 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['rir']['name'] == "Test RIR One" + - test_two['rir']['slug'] == "test-rir-one" + - test_two['msg'] == "rir Test RIR One already exists" + +- name: "RIR 3: ASSERT - Update" + netbox.netbox.netbox_rir: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test RIR One" + is_private: true + state: present + register: test_three + +- name: "RIR 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['is_private'] == true + - test_three['rir']['name'] == "Test RIR One" + - test_three['rir']['slug'] == "test-rir-one" + - test_three['rir']['is_private'] == true + - test_three['msg'] == "rir Test RIR One updated" + +- name: "RIR 4: ASSERT - Delete" + netbox.netbox.netbox_rir: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test RIR One" + state: absent + register: test_four + +- name: "RIR 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['rir']['name'] == "Test RIR One" + - test_four['rir']['slug'] == "test-rir-one" + - test_four['rir']['is_private'] == true + - test_four['msg'] == "rir Test RIR One deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_route_target.yml b/tests/integration/targets/v4.0/tasks/netbox_route_target.yml new file mode 100644 index 000000000..354978dc2 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_route_target.yml @@ -0,0 +1,204 @@ +--- +# +# ADD (CHECK MODE) +- name: "NETBOX_ROUTE_TARGET_ADD: Check Mode - Add all fields except description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "65000:65001" + tenant: "Test Tenant" + tags: + - first + - second + check_mode: yes + register: test_results + +- name: "NETBOX_ROUTE_TARGET_ADD: (ASSERT) Check Mode - Add all fields except description" + assert: + that: + - test_results is changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['diff']['after']['state'] == "present" + - test_results['diff']['before']['state'] == "absent" + - test_results['msg'] == "route_target 65000:65001 created" + +# ADD +- name: "NETBOX_ROUTE_TARGET_ADD: Add all fields except description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "65000:65001" + tenant: "Test Tenant" + tags: + - first + - second + register: test_results + +- name: "NETBOX_ROUTE_TARGET_ADD: (ASSERT) Add all fields except description" + assert: + that: + - test_results is changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['diff']['after']['state'] == "present" + - test_results['diff']['before']['state'] == "absent" + - test_results['msg'] == "route_target 65000:65001 created" + +# ADD (IDEMPOTENT) +- name: "NETBOX_ROUTE_TARGET_ADD_IDEM: (IDEMPOTENT) Add all fields except description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "65000:65001" + tenant: "Test Tenant" + tags: + - first + - second + register: test_results + +- name: "NETBOX_ROUTE_TARGET_ADD_IDEM: (IDEMPOTENT) Add all fields except description" + assert: + that: + - test_results is not changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['msg'] == "route_target 65000:65001 already exists" + +# +# UPDATE (CHECK MODE) +- name: "NETBOX_ROUTE_TARGET_UPDATE: Check Mode - Update description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "65000:65001" + description: "NEW DESCRIPTION" + tenant: "Test Tenant" + tags: + - first + - second + check_mode: yes + register: test_results + +- name: "NETBOX_ROUTE_TARGET_UPDATE: (ASSERT) Check Mode - Update description" + assert: + that: + - test_results is changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['route_target']['description'] == "NEW DESCRIPTION" + - test_results['diff']['after']['description'] == "NEW DESCRIPTION" + - test_results['diff']['before']['description'] == "" + - test_results['msg'] == "route_target 65000:65001 updated" + +# UPDATE +- name: "NETBOX_ROUTE_TARGET_UPDATE: Update description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "65000:65001" + tenant: "Test Tenant" + description: "NEW DESCRIPTION" + tags: + - first + - second + register: test_results + +- name: "NETBOX_ROUTE_TARGET_UPDATE: (ASSERT) Update description" + assert: + that: + - test_results is changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['route_target']['description'] == "NEW DESCRIPTION" + - test_results['diff']['after']['description'] == "NEW DESCRIPTION" + - test_results['diff']['before']['description'] == "" + - test_results['msg'] == "route_target 65000:65001 updated" + +# UPDATE (IDEMPOTENT) +- name: "NETBOX_ROUTE_TARGET_UPDATE_IDEM: (IDEMPOTENT) Update description" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "65000:65001" + tenant: "Test Tenant" + description: "NEW DESCRIPTION" + tags: + - first + - second + register: test_results + +- name: "NETBOX_ROUTE_TARGET_UPDATE_IDEM: (IDEMPOTENT) Update description" + assert: + that: + - test_results is not changed + - test_results['route_target']['name'] == "65000:65001" + - test_results['route_target']['tenant'] == 1 + - test_results['route_target']['tags'] | length == 2 + - test_results['route_target']['description'] == "NEW DESCRIPTION" + - test_results['msg'] == "route_target 65000:65001 already exists" + +# +# DELETE (CHECK MODE) +- name: "NETBOX_ROUTE_TARGET_DELETE: Check Mode - Delete route target" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "65000:65001" + state: absent + check_mode: yes + register: test_results + +- name: "NETBOX_ROUTE_TARGET_DELETE: (ASSERT) Check Mode - Delete route target" + assert: + that: + - test_results is changed + - test_results['diff']['after']['state'] == "absent" + - test_results['diff']['before']['state'] == "present" + - test_results['msg'] == "route_target 65000:65001 deleted" + +# DELETE +- name: "NETBOX_ROUTE_TARGET_DELETE: Delete route target" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "65000:65001" + state: absent + register: test_results + +- name: "NETBOX_ROUTE_TARGET_DELETE: (ASSERT) Delete route target" + assert: + that: + - test_results is changed + - test_results['diff']['after']['state'] == "absent" + - test_results['diff']['before']['state'] == "present" + - test_results['msg'] == "route_target 65000:65001 deleted" + +# DELETE (IDEMPOTENT) +- name: "NETBOX_ROUTE_TARGET_DELETE_IDEM: (IDEMPOTENT) Delete route target" + netbox.netbox.netbox_route_target: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "65000:65001" + state: absent + register: test_results + +- name: "NETBOX_ROUTE_TARGET_DELETE_IDEM: (IDEMPOTENT) Delete route target" + assert: + that: + - test_results is not changed + - test_results['msg'] == "route_target 65000:65001 already absent" diff --git a/tests/integration/targets/v4.0/tasks/netbox_service.yml b/tests/integration/targets/v4.0/tasks/netbox_service.yml new file mode 100644 index 000000000..09a993c3d --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_service.yml @@ -0,0 +1,196 @@ +--- +## +## +### NETBOX_SERVICE +## +## +- name: "1 - Device with required information needs to add new service" + netbox.netbox.netbox_device: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "FOR_SERVICE" + device_type: "Cisco Test" + device_role: "Core Switch" + site: "Test Site" + status: "Staged" + state: present + +- name: "NETBOX_SERVICE: Create new service" + netbox.netbox.netbox_service: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: "FOR_SERVICE" + name: "node-exporter" + port: 9100 + protocol: TCP + state: present + register: test_service_create + +- name: "NETBOX_SERVICE ASSERT - Create" + assert: + that: + - test_service_create is changed + - test_service_create['services']['name'] == "node-exporter" + - test_service_create['services']['ports'] == [9100] + - test_service_create['services']['protocol'] == "tcp" + - test_service_create['diff']['after']['state'] == "present" + - test_service_create['diff']['before']['state'] == "absent" + - test_service_create['msg'] == "services node-exporter created" + +- name: "NETBOX_SERVICE: Test idempotence" + netbox.netbox.netbox_service: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: "FOR_SERVICE" + name: "node-exporter" + port: 9100 + protocol: TCP + state: present + register: test_service_idempotence + +- name: "NETBOX_SERVICE ASSERT - Not changed" + assert: + that: + - test_service_idempotence['services']['name'] == "node-exporter" + - test_service_idempotence['services']['ports'] == [9100] + - test_service_idempotence['services']['protocol'] == "tcp" + - test_service_idempotence['msg'] == "services node-exporter already exists" + +- name: "NETBOX_SERVICE: Test update" + netbox.netbox.netbox_service: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: "FOR_SERVICE" + name: "node-exporter" + ports: + - 9100 + - 9200 + protocol: TCP + tags: + - "Schnozzberry" + state: present + register: test_service_update + +- name: "NETBOX_SERVICE ASSERT - Service has been updated" + assert: + that: + - test_service_update is changed + - test_service_update['diff']['after']['tags'][0] == 4 + - test_service_update['diff']['after']['ports'] == [9100, 9200] + - test_service_update['msg'] == "services node-exporter updated" + +- name: "NETBOX_SERVICE: Test same details, but different protocol - Create" + netbox.netbox.netbox_service: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: "FOR_SERVICE" + name: "node-exporter" + port: 9100 + protocol: UDP + state: present + register: test_service_protocol + +- name: "NETBOX_SERVICE ASSERT - Different protocol - Create" + assert: + that: + - test_service_protocol is changed + - test_service_protocol['diff']['after']['state'] == "present" + - test_service_protocol['diff']['before']['state'] == "absent" + - test_service_protocol['services']['name'] == "node-exporter" + - test_service_protocol['services']['ports'] == [9100] + - test_service_protocol['services']['protocol'] == "udp" + - test_service_protocol['msg'] == "services node-exporter created" + +- name: "NETBOX_SERVICE: Test service deletion" + netbox.netbox.netbox_service: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: "FOR_SERVICE" + name: "node-exporter" + port: 9100 + protocol: UDP + state: absent + register: test_service_delete + +- name: "NETBOX_SERVICE ASSERT - Service has been deleted" + assert: + that: + - test_service_delete is changed + - test_service_delete['diff']['after']['state'] == "absent" + - test_service_delete['diff']['before']['state'] == "present" + - test_service_delete['msg'] == "services node-exporter deleted" + +- name: "NETBOX_SERVICE: Test service IP addresses" + netbox.netbox.netbox_service: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + device: "test100" + name: "node-exporter" + port: 9100 + protocol: UDP + ipaddresses: + - address: "172.16.180.1/24" + state: present + register: test_service_ip_addresses + +- name: "NETBOX_SERVICE ASSERT - Service has been created with IP address" + assert: + that: + - test_service_ip_addresses is changed + - test_service_ip_addresses['diff']['after']['state'] == "present" + - test_service_ip_addresses['diff']['before']['state'] == "absent" + - test_service_ip_addresses['services']['name'] == "node-exporter" + - test_service_ip_addresses['services']['ports'] == [9100] + - test_service_ip_addresses['services']['protocol'] == "udp" + - test_service_ip_addresses['services']['ipaddresses'] is defined + - test_service_ip_addresses['msg'] == "services node-exporter created" + +- name: "NETBOX_SERVICE: Missing both device & virtual_machine options - Tests required_one_of" + netbox.netbox.netbox_service: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + name: "node-exporter" + port: 9100 + protocol: UDP + ipaddresses: + - address: "172.16.180.1/24" + state: present + ignore_errors: yes + register: test_service_required_one_of + +- name: "NETBOX_SERVICE ASSERT - Failed due to missing arguments" + assert: + that: + - test_service_required_one_of is failed + - 'test_service_required_one_of["msg"] == "one of the following is required: device, virtual_machine"' + +- name: "NETBOX_SERVICE: Create new service on virtual_machine" + netbox.netbox.netbox_service: + netbox_url: "http://localhost:32768" + netbox_token: "0123456789abcdef0123456789abcdef01234567" + data: + virtual_machine: "test100-vm" + name: "node-exporter" + port: 9100 + protocol: TCP + state: present + register: test_service_create_vm + +- name: "NETBOX_SERVICE ASSERT - Create" + assert: + that: + - test_service_create_vm is changed + - test_service_create_vm['services']['name'] == "node-exporter" + - test_service_create_vm['services']['ports'] == [9100] + - test_service_create_vm['services']['protocol'] == "tcp" + - test_service_create_vm['diff']['after']['state'] == "present" + - test_service_create_vm['diff']['before']['state'] == "absent" + - test_service_create_vm['msg'] == "services node-exporter created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_service_template.yml b/tests/integration/targets/v4.0/tasks/netbox_service_template.yml new file mode 100644 index 000000000..f64509acf --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_service_template.yml @@ -0,0 +1,115 @@ +--- +## +## +### NETBOX_SERVICE_TEMPLATE +## +## +- name: "SERVICE_TEMPLATE 1: Necessary info creation" + netbox.netbox.netbox_service_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Service Template for SSH + ports: + - 22 + protocol: tcp + state: present + register: test_one + +- name: "SERVICE_TEMPLATE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['service_template']['name'] == "Service Template for SSH" + - test_one['service_template']['ports'] == [22] + - test_one['service_template']['protocol'] == "tcp" + - test_one['msg'] == "service_template Service Template for SSH created" + +- name: "SERVICE_TEMPLATE 2: Create duplicate" + netbox.netbox.netbox_service_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Service Template for SSH + ports: + - 22 + protocol: tcp + state: present + register: test_two + +- name: "SERVICE_TEMPLATE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['service_template']['name'] == "Service Template for SSH" + - test_two['service_template']['ports'] == [22] + - test_two['service_template']['protocol'] == "tcp" + - test_two['msg'] == "service_template Service Template for SSH already exists" + +- name: "SERVICE_TEMPLATE 3: Update Service Template with other fields" + netbox.netbox.netbox_service_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Service Template for SSH + ports: + - 22 + protocol: tcp + comments: For SSH service + state: present + register: test_three + +- name: "SERVICE_TEMPLATE 3: ASSERT - Update Service Template with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['comments'] == "For SSH service" + - test_three['service_template']['name'] == "Service Template for SSH" + - test_three['service_template']['ports'] == [22] + - test_three['service_template']['protocol'] == "tcp" + - test_three['service_template']['comments'] == "For SSH service" + - test_three['msg'] == "service_template Service Template for SSH updated" + +- name: "SERVICE_TEMPLATE 4: Create Service Template for Delete Test" + netbox.netbox.netbox_service_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Service Template for DNS + ports: + - 53 + protocol: udp + comments: Domain Name System + state: present + register: test_four + +- name: "SERVICE_TEMPLATE 4: ASSERT - Create Service Template for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['service_template']['name'] == "Service Template for DNS" + - test_four['service_template']['ports'] == [53] + - test_four['service_template']['protocol'] == "udp" + - test_four['service_template']['comments'] == "Domain Name System" + - test_four['msg'] == "service_template Service Template for DNS created" + +- name: "SERVICE_TEMPLATE 5: Delete Service Template" + netbox.netbox.netbox_service_template: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Service Template for DNS + state: absent + register: test_five + +- name: "SERVICE_TEMPLATE 5: ASSERT - Delete Service Template" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "service_template Service Template for DNS deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_site.yml b/tests/integration/targets/v4.0/tasks/netbox_site.yml new file mode 100644 index 000000000..6960eeb3d --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_site.yml @@ -0,0 +1,165 @@ +--- +## +## +### NETBOX_SITE +## +## +- name: "1 - Create site within NetBox with only required information" + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test - Colorado + state: present + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['site']['name'] == "Test - Colorado" + - test_one['msg'] == "site Test - Colorado created" + +- name: "2 - Duplicate" + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test - Colorado + state: present + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - not test_two['changed'] + - test_two['msg'] == "site Test - Colorado already exists" + - test_two['site']['name'] == "Test - Colorado" + +- name: "3 - Update Test - Colorado" + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test - Colorado + status: Planned + region: Test Region + state: present + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['after']['status'] == "planned" + - test_three['diff']['after']['region'] == 1 + - test_three['msg'] == "site Test - Colorado updated" + - test_three['site']['name'] == "Test - Colorado" + - test_three['site']['status'] == "planned" + - test_three['site']['region'] == 1 + +- name: "4 - Create site with all parameters" + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test - California + status: Planned + region: Test Region + site_group: Test Site Group + tenant: Test Tenant + facility: EquinoxCA7 + time_zone: America/Los Angeles + description: This is a test description + physical_address: Hollywood, CA, 90210 + shipping_address: Hollywood, CA, 90210 + latitude: "22.169141" + longitude: "-100.994041" + comments: "### Placeholder" + slug: "test_california" + state: present + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['site']['name'] == "Test - California" + - test_four['msg'] == "site Test - California created" + - test_four['site']['status'] == "planned" + - test_four['site']['region'] == 1 + - test_four['site']['group'] == 4 + - test_four['site']['tenant'] == 1 + - test_four['site']['facility'] == "EquinoxCA7" + - test_four['site']['time_zone'] == "America/Los_Angeles" + - test_four['site']['description'] == "This is a test description" + - test_four['site']['physical_address'] == "Hollywood, CA, 90210" + - test_four['site']['shipping_address'] == "Hollywood, CA, 90210" + - test_four['site']['latitude'] == 22.169141 + - test_four['site']['longitude'] == -100.994041 + - test_four['site']['comments'] == "### Placeholder" + - test_four['site']['slug'] == "test_california" + +- name: "NETBOX_SITE_IDEM: Idempotency - Create duplicate site with all parameters" + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test - California + status: Planned + region: Test Region + site_group: Test Site Group + tenant: Test Tenant + facility: EquinoxCA7 + time_zone: America/Los Angeles + description: This is a test description + physical_address: Hollywood, CA, 90210 + shipping_address: Hollywood, CA, 90210 + latitude: "22.169141" + longitude: "-100.994041" + comments: "### Placeholder" + slug: "test_california" + state: present + register: test_results + +- name: "NETBOX_SITE_IDEM: (ASSERT) Idempotency - Duplicate device site with all parameters" + assert: + that: + - test_results is not changed + - test_results['site']['name'] == "Test - California" + - test_results['msg'] == "site Test - California already exists" + - test_results['site']['status'] == "planned" + - test_results['site']['region'] == 1 + - test_results['site']['group'] == 4 + - test_results['site']['tenant'] == 1 + - test_results['site']['facility'] == "EquinoxCA7" + - test_results['site']['time_zone'] == "America/Los_Angeles" + - test_results['site']['description'] == "This is a test description" + - test_results['site']['physical_address'] == "Hollywood, CA, 90210" + - test_results['site']['shipping_address'] == "Hollywood, CA, 90210" + - test_results['site']['latitude'] == 22.169141 + - test_results['site']['longitude'] == -100.994041 + - test_results['site']['comments'] == "### Placeholder" + - test_results['site']['slug'] == "test_california" + +- name: "5 - Delete site within netbox" + netbox.netbox.netbox_site: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test - Colorado + state: absent + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['site']['name'] == "Test - Colorado" + - test_five['msg'] == "site Test - Colorado deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_site_group.yml b/tests/integration/targets/v4.0/tasks/netbox_site_group.yml new file mode 100644 index 000000000..09e2df4c6 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_site_group.yml @@ -0,0 +1,81 @@ +--- +## +## +### NETBOX_SITE_GROUP +## +## +- name: "SITE_GROUP 1: Necessary info creation" + netbox.netbox.netbox_site_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Site Group + state: present + register: test_one + +- name: "SITE_GROUP 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['site_group']['name'] == "Site Group" + - test_one['site_group']['slug'] == "site-group" + - test_one['msg'] == "site_group Site Group created" + +- name: "SITE_GROUP 2: Create duplicate" + netbox.netbox.netbox_site_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Site Group + state: present + register: test_two + +- name: "SITE_GROUP 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['site_group']['name'] == "Site Group" + - test_two['site_group']['slug'] == "site-group" + - test_two['msg'] == "site_group Site Group already exists" + +- name: "SITE_GROUP 3: Update" + netbox.netbox.netbox_site_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Site Group + parent_site_group: Test Site Group + description: This is a site group + state: present + register: test_three + +- name: "SITE_GROUP 3: ASSERT - Update" + assert: + that: + - test_three is changed + - test_three['diff']['after']['parent'] == 4 + - test_three['diff']['after']['description'] == "This is a site group" + - test_three['site_group']['name'] == "Site Group" + - test_three['site_group']['slug'] == "site-group" + - test_three['site_group']['parent'] == 4 + - test_three['site_group']['description'] == "This is a site group" + - test_three['msg'] == "site_group Site Group updated" + +- name: "SITE_GROUP 4: Delete" + netbox.netbox.netbox_site_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Site Group + state: absent + register: test_four + +- name: "SITE_GROUP 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "site_group Site Group deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_tag.yml b/tests/integration/targets/v4.0/tasks/netbox_tag.yml new file mode 100644 index 000000000..38c4157c2 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_tag.yml @@ -0,0 +1,110 @@ +--- +## +## +### NETBOX_TAGS +## +## +- name: "TAG 1: ASSERT - Necessary info creation" + netbox.netbox.netbox_tag: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Tag 1" + description: "Tag 1 test" + color: "0000ff" + state: present + register: test_one + +- name: "TAG 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tags']['color'] == "0000ff" + - test_one['tags']['description'] == "Tag 1 test" + - test_one['tags']['name'] == "Test Tag 1" + - test_one['tags']['slug'] == "test-tag-1" + - test_one['msg'] == "tags Test Tag 1 created" + +- name: "TAG 2: Create duplicate" + netbox.netbox.netbox_tag: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Tag 1" + description: "Tag 1 test" + color: "0000ff" + state: present + register: test_two + +- name: "TAG 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['tags']['name'] == "Test Tag 1" + - test_two['msg'] == "tags Test Tag 1 already exists" + +- name: "TAG 3: ASSERT - Update" + netbox.netbox.netbox_tag: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Tag 1" + description: "Tag 1 update test" + color: "00ff00" + state: present + register: test_three + +- name: "TAG 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['color'] == "00ff00" + - test_three['diff']['after']['description'] == "Tag 1 update test" + - test_three['tags']['name'] == "Test Tag 1" + - test_three['tags']['description'] == "Tag 1 update test" + - test_three['tags']['color'] == "00ff00" + - test_three['msg'] == "tags Test Tag 1 updated" + +- name: "TAG 4: ASSERT - Delete" + netbox.netbox.netbox_tag: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Tag 1" + state: absent + register: test_four + +- name: "TAG 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['diff']['after']['state'] == "absent" + - test_four['tags']['name'] == "Test Tag 1" + - test_four['tags']['slug'] == "test-tag-1" + - test_four['msg'] == "tags Test Tag 1 deleted" + +- name: "TAG 5: ASSERT - Necessary info creation" + netbox.netbox.netbox_tag: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Tag 5" + slug: "test-tag-five" + description: "Tag 5 test" + color: "0000ff" + state: present + register: test_five + +- name: "TAG 5: ASSERT - Necessary info creation" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['tags']['color'] == "0000ff" + - test_five['tags']['description'] == "Tag 5 test" + - test_five['tags']['name'] == "Test Tag 5" + - test_five['tags']['slug'] == "test-tag-five" + - test_five['msg'] == "tags Test Tag 5 created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_tenant.yml b/tests/integration/targets/v4.0/tasks/netbox_tenant.yml new file mode 100644 index 000000000..7c9af8b9f --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_tenant.yml @@ -0,0 +1,106 @@ +--- +## +## +### NETBOX_TENANT +## +## +- name: "1 - Test tenant creation" + netbox.netbox.netbox_tenant: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Tenant ABC" + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tenant']['name'] == "Tenant ABC" + - test_one['tenant']['slug'] == "tenant-abc" + - test_one['msg'] == "tenant Tenant ABC created" + +- name: "Test duplicate tenant" + netbox.netbox.netbox_tenant: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Tenant ABC" + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - not test_two['changed'] + - test_two['tenant']['name'] == "Tenant ABC" + - test_two['tenant']['slug'] == "tenant-abc" + - test_two['msg'] == "tenant Tenant ABC already exists" + +- name: "3 - Test update" + netbox.netbox.netbox_tenant: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Tenant ABC" + description: "Updated description" + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "Updated description" + - test_three['tenant']['name'] == "Tenant ABC" + - test_three['tenant']['slug'] == "tenant-abc" + - test_three['tenant']['description'] == "Updated description" + - test_three['msg'] == "tenant Tenant ABC updated" + +- name: "4 - Test delete" + netbox.netbox.netbox_tenant: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Tenant ABC" + state: "absent" + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "tenant Tenant ABC deleted" + +- name: "5 - Create tenant with all parameters" + netbox.netbox.netbox_tenant: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Tenant ABC" + description: "ABC Incorporated" + comments: "### This tenant is super cool" + tenant_group: "Test Tenant Group" + slug: "tenant_abc" + tags: + - "tagA" + - "tagB" + - "tagC" + state: present + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['tenant']['name'] == "Tenant ABC" + - test_five['tenant']['slug'] == "tenant_abc" + - test_five['tenant']['description'] == "ABC Incorporated" + - test_five['tenant']['comments'] == "### This tenant is super cool" + - test_five['tenant']['group'] == 1 + - test_five['tenant']['tags'] | length == 3 + - test_five['msg'] == "tenant Tenant ABC created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_tenant_group.yml b/tests/integration/targets/v4.0/tasks/netbox_tenant_group.yml new file mode 100644 index 000000000..4113a2260 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_tenant_group.yml @@ -0,0 +1,129 @@ +--- +## +## +### NETBOX_TENANT_GROUP +## +## +- name: "1 - Test tenant group creation" + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Tenant Group Two" + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['tenant_group']['name'] == "Test Tenant Group Two" + - test_one['tenant_group']['slug'] == "test-tenant-group-two" + - test_one['msg'] == "tenant_group Test Tenant Group Two created" + +- name: "Test duplicate tenant group" + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Tenant Group Two" + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - not test_two['changed'] + - test_two['tenant_group']['name'] == "Test Tenant Group Two" + - test_two['tenant_group']['slug'] == "test-tenant-group-two" + - test_two['msg'] == "tenant_group Test Tenant Group Two already exists" + +- name: "3 - Test delete" + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Tenant Group Two" + state: "absent" + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "present" + - test_three['diff']['after']['state'] == "absent" + - test_three['msg'] == "tenant_group Test Tenant Group Two deleted" + +- name: "4 - Test tenant group creation with custom slug" + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Tenant Group ABC" + slug: "test_tenant_group_four" + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['tenant_group']['name'] == "Test Tenant Group ABC" + - test_four['tenant_group']['slug'] == "test_tenant_group_four" + - test_four['msg'] == "tenant_group Test Tenant Group ABC created" + +- name: "5 - Test child tenant group creation" + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Child Test Tenant Group" + parent_tenant_group: "{{ test_four.tenant_group.slug }}" + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['tenant_group']['name'] == "Child Test Tenant Group" + - test_five['tenant_group']['parent'] == test_four.tenant_group.id + - test_five['msg'] == "tenant_group Child Test Tenant Group created" + +- name: "6 - Test child tenant group deletion" + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Child Test Tenant Group" + state: "absent" + register: test_six + +- name: "6 - ASSERT" + assert: + that: + - test_six is changed + - test_six['diff']['before']['state'] == "present" + - test_six['diff']['after']['state'] == "absent" + - test_six['msg'] == "tenant_group Child Test Tenant Group deleted" + +- name: "7 - Test deletion of the tenant group with custom slug" + netbox.netbox.netbox_tenant_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test Tenant Group ABC" + slug: "test_tenant_group_four" + state: "absent" + register: test_seven + +- name: "7 - ASSERT" + assert: + that: + - test_seven is changed + - test_seven['diff']['before']['state'] == "present" + - test_seven['diff']['after']['state'] == "absent" + - test_seven['msg'] == "tenant_group Test Tenant Group ABC deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_virtual_chassis.yml b/tests/integration/targets/v4.0/tasks/netbox_virtual_chassis.yml new file mode 100644 index 000000000..04ada8411 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_virtual_chassis.yml @@ -0,0 +1,131 @@ +--- +# © 2020 Nokia +# Licensed under the GNU General Public License v3.0 only +# SPDX-License-Identifier: GPL-3.0-only +## +## +### NETBOX_VIRTUAL_CHASSIS +## +## +- name: "VIRTUAL_CHASSIS 0: Create device for testing virtual chassis" + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Device Virtual Chassis Tests + device_type: Cisco Test + device_role: Core Switch + site: Test Site + vc_position: 1 + vc_priority: 1 + state: present + +- name: "VIRTUAL_CHASSIS 1: Necessary info creation" + netbox.netbox.netbox_virtual_chassis: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "First VC" + master: Device Virtual Chassis Tests + state: present + register: test_one + +- name: "VIRTUAL_CHASSIS 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['virtual_chassis']['master'] == 11 + - test_one['virtual_chassis']['name'] == "First VC" + - test_one['msg'] == "virtual_chassis First VC created" + +- name: "VIRTUAL_CHASSIS 2: Create duplicate" + netbox.netbox.netbox_virtual_chassis: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "First VC" + master: Device Virtual Chassis Tests + state: present + register: test_two + +- name: "VIRTUAL_CHASSIS 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['virtual_chassis']['master'] == 11 + - test_two['virtual_chassis']['name'] == "First VC" + - test_two['msg'] == "virtual_chassis First VC already exists" + +- name: "POWER_FEED 3: Update virtual_chassis with other fields" + netbox.netbox.netbox_virtual_chassis: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "First VC" + master: Device Virtual Chassis Tests + domain: Domain Text + state: present + register: test_three + +- name: "POWER_FEED 3: ASSERT - Update virtual_chassis with other fields" + assert: + that: + - test_three is changed + - test_three['diff']['after']['domain'] == "Domain Text" + - test_three['virtual_chassis']['master'] == 11 + - test_three['virtual_chassis']['domain'] == "Domain Text" + - test_three['virtual_chassis']['name'] == "First VC" + - test_three['msg'] == "virtual_chassis First VC updated" + +- name: "VIRTUAL_CHASSIS 4: Create device for testing virtual chassis deletion" + netbox.netbox.netbox_device: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Device Virtual Chassis Tests 2 + device_type: Cisco Test + device_role: Core Switch + site: Test Site + vc_position: 1 + vc_priority: 15 + state: present + +- name: "VIRTUAL_CHASSIS 4: Create Virtual Chassis for Delete Test" + netbox.netbox.netbox_virtual_chassis: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Second VC" + master: Device Virtual Chassis Tests 2 + state: present + register: test_four + +- name: "VIRTUAL_CHASSIS 4: ASSERT - Create Virtual Chassis for Delete Test" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "absent" + - test_four['diff']['after']['state'] == "present" + - test_four['virtual_chassis']['master'] == 12 + - test_four['virtual_chassis']['name'] == "Second VC" + - test_four['msg'] == "virtual_chassis Second VC created" + +- name: "VIRTUAL_CHASSIS 5: Delete Virtual Chassis" + netbox.netbox.netbox_virtual_chassis: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Second VC" + master: Device Virtual Chassis Tests 2 + state: absent + register: test_five + +- name: "VIRTUAL_CHASSIS 5: ASSERT - Delete Virtual Chassis" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "present" + - test_five['diff']['after']['state'] == "absent" + - test_five['msg'] == "virtual_chassis Second VC deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_virtual_disk.yml b/tests/integration/targets/v4.0/tasks/netbox_virtual_disk.yml new file mode 100644 index 000000000..999d3edc3 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_virtual_disk.yml @@ -0,0 +1,87 @@ +--- +## +## +### NETBOX_VIRTUAL_DISK +## +## +- name: "NETBOX_VIRTUAL_DISK 1: Necessary info creation" + netbox.netbox.netbox_virtual_disk: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + virtual_machine: "test100-vm" + name: "disk0" + size: 50 + state: present + register: test_one + +- name: "NETBOX_VIRTUAL_DISK 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['virtual_disk']['name'] == "disk0" + - test_one['virtual_disk']['virtual_machine'] == 1 + - test_one['msg'] == "virtual_disk disk0 created" + +- name: "NETBOX_VIRTUAL_DISK 2: Create duplicate" + netbox.netbox.netbox_virtual_disk: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + virtual_machine: "test100-vm" + name: "disk0" + size: 50 + state: present + register: test_two + +- name: "NETBOX_VIRTUAL_DISK 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['virtual_disk']['name'] == "disk0" + - test_two['virtual_disk']['virtual_machine'] == 1 + - test_two['msg'] == "virtual_disk disk0 already exists" + +- name: "NETBOX_VIRTUAL_DISK 3: Update" + netbox.netbox.netbox_virtual_disk: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + virtual_machine: "test100-vm" + name: "disk0" + size: 60 + tags: + - "Schnozzberry" + state: present + register: test_three + +- name: "NETBOX_VIRTUAL_DISK 4: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['size'] == 60 + - test_three['virtual_disk']['name'] == "disk0" + - test_three['virtual_disk']['virtual_machine'] == 1 + - test_three['virtual_disk']['size'] == 60 + - test_three['virtual_disk']['tags'][0] == 4 + - test_three['msg'] == "virtual_disk disk0 updated" + +- name: "NETBOX_VIRTUAL_DISK 4: ASSERT - Delete" + netbox.netbox.netbox_virtual_disk: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "disk0" + virtual_machine: "test100-vm" + state: absent + register: test_four + +- name: "NETBOX_VIRTUAL_DISK 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['virtual_disk']['name'] == "disk0" + - test_four['virtual_disk']['virtual_machine'] == 1 + - test_four['msg'] == "virtual_disk disk0 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_virtual_machine.yml b/tests/integration/targets/v4.0/tasks/netbox_virtual_machine.yml new file mode 100644 index 000000000..79d3882bc --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_virtual_machine.yml @@ -0,0 +1,128 @@ +--- +## +## +### NETBOX_VIRTUAL_MACHINES +## +## +- name: "VIRTUAL_MACHINE 1: Necessary info creation" + netbox.netbox.netbox_virtual_machine: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VM One" + cluster: "Test Cluster" + state: present + register: test_one + +- name: "VIRTUAL_MACHINE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['virtual_machine']['name'] == "Test VM One" + - test_one['virtual_machine']['cluster'] == 1 + - test_one['msg'] == "virtual_machine Test VM One created" + +- name: "VIRTUAL_MACHINE 2: Create duplicate" + netbox.netbox.netbox_virtual_machine: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VM One" + cluster: "Test Cluster" + state: present + register: test_two + +- name: "VIRTUAL_MACHINE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['virtual_machine']['name'] == "Test VM One" + - test_two['virtual_machine']['cluster'] == 1 + - test_two['msg'] == "virtual_machine Test VM One already exists" + +- name: "VIRTUAL_MACHINE 3: Update" + netbox.netbox.netbox_virtual_machine: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VM One" + cluster: "Test Cluster" + vcpus: 8.5 + memory: 8 + status: "Planned" + virtual_machine_role: "Test VM Role" + tags: + - "Schnozzberry" + state: present + register: test_three + +- name: "VIRTUAL_MACHINE 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['vcpus'] == 8.5 + - test_three['diff']['after']['memory'] == 8 + - test_three['diff']['after']['status'] == "planned" + - test_three['diff']['after']['role'] == 2 + - test_three['diff']['after']['tags'][0] == 4 + - test_three['virtual_machine']['name'] == "Test VM One" + - test_three['virtual_machine']['cluster'] == 1 + - test_three['virtual_machine']['vcpus'] == 8.5 + - test_three['virtual_machine']['memory'] == 8 + - test_three['virtual_machine']['status'] == "planned" + - test_three['virtual_machine']['role'] == 2 + - test_three['virtual_machine']['tags'][0] == 4 + - test_three['msg'] == "virtual_machine Test VM One updated" + +- name: "VIRTUAL_MACHINE 4: Test idempotence" + netbox.netbox.netbox_virtual_machine: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VM One" + cluster: "Test Cluster" + vcpus: 8.5 + memory: 8 + status: "Planned" + virtual_machine_role: "Test VM Role" + tags: + - "Schnozzberry" + state: present + register: test_four_idempotence + +- name: "VIRTUAL_MACHINE 4: ASSERT - Not changed" + assert: + that: + - test_four_idempotence is not changed + - test_four_idempotence['virtual_machine']['name'] == "Test VM One" + - test_four_idempotence['virtual_machine']['cluster'] == 1 + - test_four_idempotence['virtual_machine']['vcpus'] == 8.5 + - test_four_idempotence['virtual_machine']['memory'] == 8 + - test_four_idempotence['virtual_machine']['status'] == "planned" + - test_four_idempotence['virtual_machine']['role'] == 2 + - test_four_idempotence['virtual_machine']['tags'][0] == 4 + - test_four_idempotence['msg'] == "virtual_machine Test VM One already exists" + +- name: "VIRTUAL_MACHINE 5: Delete" + netbox.netbox.netbox_virtual_machine: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VM One" + state: absent + register: test_five + +- name: "VIRTUAL_MACHINE 5: ASSERT - Delete" + assert: + that: + - test_five is changed + - test_five['virtual_machine']['name'] == "Test VM One" + - test_five['virtual_machine']['cluster'] == 1 + - test_five['virtual_machine']['vcpus'] == 8.5 + - test_five['virtual_machine']['memory'] == 8 + - test_five['virtual_machine']['status'] == "planned" + - test_five['virtual_machine']['role'] == 2 + - test_five['virtual_machine']['tags'][0] == 4 + - test_five['msg'] == "virtual_machine Test VM One deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_vlan.yml b/tests/integration/targets/v4.0/tasks/netbox_vlan.yml new file mode 100644 index 000000000..d95abbeca --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_vlan.yml @@ -0,0 +1,193 @@ +--- +## +## +### NETBOX_VLAN +## +## +- name: "VLAN 1: Necessary info creation" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test VLAN 500 + vid: 500 + state: present + register: test_one + +- name: "VLAN 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['vlan']['name'] == "Test VLAN 500" + - test_one['vlan']['vid'] == 500 + - test_one['msg'] == "vlan Test VLAN 500 created" + +- name: "VLAN 2: Create duplicate" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test VLAN 500 + vid: 500 + state: present + register: test_two + +- name: "VLAN 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['vlan']['name'] == "Test VLAN 500" + - test_two['vlan']['vid'] == 500 + - test_two['msg'] == "vlan Test VLAN 500 already exists" + +- name: "VLAN 3: Create VLAN with same name, but different site" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test VLAN 500 + vid: 500 + site: Test Site + tenant: Test Tenant + vlan_group: "Test VLAN Group" + state: present + register: test_three + +- name: "VLAN 3: ASSERT - Create VLAN with same name, but different site" + assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['vlan']['name'] == "Test VLAN 500" + - test_three['vlan']['vid'] == 500 + - test_three['vlan']['site'] == 1 + - test_three['vlan']['group'] == 1 + - test_three['msg'] == "vlan Test VLAN 500 created" + +- name: "VLAN 4: ASSERT - Update" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VLAN 500" + vid: 500 + tenant: "Test Tenant" + vlan_group: "Test VLAN Group" + status: Reserved + vlan_role: Network of care + description: Updated description + site: "Test Site" + tags: + - "Schnozzberry" + state: present + register: test_four + +- name: "VLAN 4: ASSERT - Updated" + assert: + that: + - test_four is changed + - test_four['diff']['after']['status'] == "reserved" + - test_four['diff']['after']['role'] == 1 + - test_four['diff']['after']['description'] == "Updated description" + - test_four['diff']['after']['tags'][0] == 4 + - test_four['vlan']['name'] == "Test VLAN 500" + - test_four['vlan']['tenant'] == 1 + - test_four['vlan']['site'] == 1 + - test_four['vlan']['group'] == 1 + - test_four['vlan']['status'] == "reserved" + - test_four['vlan']['role'] == 1 + - test_four['vlan']['description'] == "Updated description" + - test_four['vlan']['tags'][0] == 4 + - test_four['msg'] == "vlan Test VLAN 500 updated" + +- name: "VLAN: ASSERT - IDEMPOTENT WITH VLAN_GROUP" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VLAN 500" + vid: 500 + tenant: "Test Tenant" + vlan_group: "Test VLAN Group" + status: Reserved + vlan_role: Network of care + description: Updated description + site: "Test Site" + tags: + - "Schnozzberry" + state: present + register: idempotent_vlan_group + +- name: "VLAN: ASSERT - IDEMPOTENT WITH VLAN_GROUP" + assert: + that: + - idempotent_vlan_group is not changed + +- name: "VLAN: Create VLAN with same name, but different vlan_group" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test VLAN 500 + vid: 500 + site: Test Site + tenant: Test Tenant + vlan_group: "Test VLAN Group 2" + state: present + register: new_vlan_group + +- name: "VLAN: ASSERT - Create VLAN with same name, but different vlan_group" + assert: + that: + - new_vlan_group is changed + - new_vlan_group['diff']['before']['state'] == "absent" + - new_vlan_group['diff']['after']['state'] == "present" + - new_vlan_group['vlan']['name'] == "Test VLAN 500" + - new_vlan_group['vlan']['vid'] == 500 + - new_vlan_group['vlan']['site'] == 1 + - new_vlan_group['vlan']['group'] == 2 + - new_vlan_group['msg'] == "vlan Test VLAN 500 created" + +- name: "VLAN 5: ASSERT - Delete more than one result" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VLAN 500" + state: absent + ignore_errors: yes + register: test_five + +- name: "VLAN 5: ASSERT - Delete more than one result" + assert: + that: + - test_five is failed + - test_five['msg'] == "More than one result returned for Test VLAN 500" + +- name: "VLAN 6: ASSERT - Delete" + netbox.netbox.netbox_vlan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VLAN 500" + site: Test Site + vlan_group: "Test VLAN Group" + state: absent + register: test_six + +- name: "VLAN 6: ASSERT - Delete" + assert: + that: + - test_six is changed + - test_six['vlan']['name'] == "Test VLAN 500" + - test_six['vlan']['tenant'] == 1 + - test_six['vlan']['site'] == 1 + - test_six['vlan']['group'] == 1 + - test_six['vlan']['status'] == "reserved" + - test_six['vlan']['role'] == 1 + - test_six['vlan']['description'] == "Updated description" + - test_six['vlan']['tags'][0] == 4 + - test_six['msg'] == "vlan Test VLAN 500 deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_vlan_group.yml b/tests/integration/targets/v4.0/tasks/netbox_vlan_group.yml new file mode 100644 index 000000000..2be4fd3df --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_vlan_group.yml @@ -0,0 +1,314 @@ +--- +## +## +### NETBOX_VLAN_GROUP +## +## +- name: "VLAN_GROUP 1: Necessary info creation" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "VLAN Group One" + scope_type: "dcim.site" + scope: Test Site + state: present + register: results + +- name: "VLAN_GROUP 1: ASSERT - Necessary info creation" + assert: + that: + - results is changed + - results['diff']['before']['state'] == "absent" + - results['diff']['after']['state'] == "present" + - results['vlan_group']['name'] == "VLAN Group One" + - results['vlan_group']['slug'] == "vlan-group-one" + - results['vlan_group']['scope_type'] == "dcim.site" + - results['vlan_group']['scope_id'] == 1 + - results['msg'] == "vlan_group VLAN Group One created" + +- name: "VLAN_GROUP 2: Create duplicate" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "VLAN Group One" + scope_type: "dcim.site" + scope: Test Site + state: present + register: results + +- name: "VLAN_GROUP 2: ASSERT - Create duplicate" + assert: + that: + - not results['changed'] + - results['vlan_group']['name'] == "VLAN Group One" + - results['vlan_group']['slug'] == "vlan-group-one" + - results['vlan_group']['scope_type'] == "dcim.site" + - results['vlan_group']['scope_id'] == 1 + - results['msg'] == "vlan_group VLAN Group One already exists" + +- name: "VLAN_GROUP 3: ASSERT - Create with same name, different site" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "VLAN Group One" + scope_type: "dcim.site" + scope: "Test Site2" + state: present + register: results + +- name: "VLAN_GROUP 3: ASSERT - Create with same name, different site" + assert: + that: + - results is changed + - results['vlan_group']['name'] == "VLAN Group One" + - results['vlan_group']['slug'] == "vlan-group-one" + - results['vlan_group']['scope_type'] == "dcim.site" + - results['vlan_group']['scope_id'] == 2 + - results['msg'] == "vlan_group VLAN Group One created" + +- name: "VLAN_GROUP 4: ASSERT - Create vlan group, no site" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "VLAN Group One" + state: present + ignore_errors: yes + register: results + +- name: "VLAN_GROUP 4: ASSERT - Create with same name, different site" + assert: + that: + - results is failed + - results['msg'] == "More than one result returned for VLAN Group One" + +- name: "VLAN_GROUP 5: ASSERT - Delete" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: VLAN Group One + scope_type: "dcim.site" + scope: Test Site2 + state: absent + register: results + +- name: "VLAN_GROUP 5: ASSERT - Delete" + assert: + that: + - results is changed + - results['diff']['before']['state'] == "present" + - results['diff']['after']['state'] == "absent" + - results['vlan_group']['name'] == "VLAN Group One" + - results['vlan_group']['slug'] == "vlan-group-one" + - results['vlan_group']['scope_type'] == "dcim.site" + - results['vlan_group']['scope_id'] == 2 + - results['msg'] == "vlan_group VLAN Group One deleted" + +- name: "VLAN_GROUP 6: ASSERT - Delete non existing" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: VLAN Group One + scope_type: "dcim.site" + scope: Test Site2 + state: absent + register: results + +- name: "VLAN_GROUP 6: ASSERT - Delete non existing`" + assert: + that: + - not results['changed'] + - results['vlan_group'] == None + - results['msg'] == "vlan_group VLAN Group One already absent" + +- name: "VLAN_GROUP 7: Necessary info creation - scope_type: dcim.location" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "VLAN Group Location" + scope_type: "dcim.location" + scope: Test Rack Group + state: present + register: results + +- name: "VLAN_GROUP 7: ASSERT - Necessary info creation - scope_type: dcim.location" + assert: + that: + - results is changed + - results['diff']['before']['state'] == "absent" + - results['diff']['after']['state'] == "present" + - results['vlan_group']['name'] == "VLAN Group Location" + - results['vlan_group']['slug'] == "vlan-group-location" + - results['vlan_group']['scope_type'] == "dcim.location" + - results['vlan_group']['scope_id'] == 1 + - results['msg'] == "vlan_group VLAN Group Location created" + +- name: "VLAN_GROUP 8: Necessary info creation - scope_type: dcim.rack" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "VLAN Group Rack" + scope_type: "dcim.rack" + scope: Test Rack + state: present + register: results + +- name: "VLAN_GROUP 8: ASSERT - Necessary info creation - scope_type: dcim.rack" + assert: + that: + - results is changed + - results['diff']['before']['state'] == "absent" + - results['diff']['after']['state'] == "present" + - results['vlan_group']['name'] == "VLAN Group Rack" + - results['vlan_group']['slug'] == "vlan-group-rack" + - results['vlan_group']['scope_type'] == "dcim.rack" + - results['vlan_group']['scope_id'] == 2 + - results['msg'] == "vlan_group VLAN Group Rack created" + +- name: "VLAN_GROUP 9: Necessary info creation - scope_type: dcim.region" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "VLAN Group Region" + scope_type: "dcim.region" + scope: Test Region + state: present + register: results + +- name: "VLAN_GROUP 9: ASSERT - Necessary info creation - scope_type: dcim.region" + assert: + that: + - results is changed + - results['diff']['before']['state'] == "absent" + - results['diff']['after']['state'] == "present" + - results['vlan_group']['name'] == "VLAN Group Region" + - results['vlan_group']['slug'] == "vlan-group-region" + - results['vlan_group']['scope_type'] == "dcim.region" + - results['vlan_group']['scope_id'] == 1 + - results['msg'] == "vlan_group VLAN Group Region created" + +- name: "VLAN_GROUP 10: Necessary info creation - scope_type: dcim.sitegroup" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "VLAN Group Site Group" + scope_type: "dcim.sitegroup" + scope: Test Site Group + state: present + register: results + +- name: "VLAN_GROUP 10: ASSERT - Necessary info creation - scope_type: dcim.sitegroup" + assert: + that: + - results is changed + - results['diff']['before']['state'] == "absent" + - results['diff']['after']['state'] == "present" + - results['vlan_group']['name'] == "VLAN Group Site Group" + - results['vlan_group']['slug'] == "vlan-group-site-group" + - results['vlan_group']['scope_type'] == "dcim.sitegroup" + - results['vlan_group']['scope_id'] == 4 + - results['msg'] == "vlan_group VLAN Group Site Group created" + +# Commented out due to invalid content type being reported back by API +#- name: "VLAN_GROUP 11: Necessary info creation - scope_type: virtualization.cluster" +# netbox.netbox.netbox_vlan_group: +# netbox_url: http://localhost:32768 +# netbox_token: 0123456789abcdef0123456789abcdef01234567 +# data: +# name: "VLAN Group Cluster" +# scope_type: "virtualization.cluster" +# scope: Test Cluster +# state: present +# register: results + +#- name: "VLAN_GROUP 11: ASSERT - Necessary info creation - scope_type: virtualization.cluster" +# assert: +# that: +# - results is changed +# - results['diff']['before']['state'] == "absent" +# - results['diff']['after']['state'] == "present" +# - results['vlan_group']['name'] == "VLAN Group Cluster" +# - results['vlan_group']['slug'] == "vlan-group-cluster" +# - results['vlan_group']['scope_type'] == "virtualization.cluster" +# - results['vlan_group']['scope_id'] == 1 +# - results['msg'] == "vlan_group VLAN Group Cluster created" +# +#- name: "VLAN_GROUP 12: Necessary info creation - scope_type: virtualization.clustergroup" +# netbox.netbox.netbox_vlan_group: +# netbox_url: http://localhost:32768 +# netbox_token: 0123456789abcdef0123456789abcdef01234567 +# data: +# name: "VLAN Group Cluster Group" +# scope_type: "virtualization.clustergroup" +# scope: Test Cluster Group +# state: present +# register: results +# +#- name: "VLAN_GROUP 12: ASSERT - Necessary info creation - scope_type: virtualization.clustergroup" +# assert: +# that: +# - results is changed +# - results['diff']['before']['state'] == "absent" +# - results['diff']['after']['state'] == "present" +# - results['vlan_group']['name'] == "VLAN Group Cluster Group" +# - results['vlan_group']['slug'] == "vlan-group-cluster-group" +# - results['vlan_group']['scope_type'] == "virtualization.clustergroup" +# - results['vlan_group']['scope_id'] == 1 +# - results['msg'] == "vlan_group VLAN Group Cluster Group created" + +- name: "VLAN_GROUP 12: Update Description - scope_type: dcim.location" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "VLAN Group Location" + scope_type: "dcim.location" + scope: Test Rack Group + description: "Ansible updated description" + state: present + register: results + +- name: "VLAN_GROUP 12: ASSERT - Update Description - scope_type: dcim.location" + assert: + that: + - results is changed + - results['diff']['before']['description'] == "" + - results['diff']['after']['description'] == "Ansible updated description" + - results['vlan_group']['name'] == "VLAN Group Location" + - results['vlan_group']['slug'] == "vlan-group-location" + - results['vlan_group']['scope_type'] == "dcim.location" + - results['vlan_group']['scope_id'] == 1 + - results['vlan_group']['description'] == "Ansible updated description" + - results['msg'] == "vlan_group VLAN Group Location updated" + +- name: "VLAN_GROUP 12: Update Description (IDEM) - scope_type: dcim.location" + netbox.netbox.netbox_vlan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "VLAN Group Location" + scope_type: "dcim.location" + scope: Test Rack Group + description: "Ansible updated description" + state: present + register: results + +- name: "VLAN_GROUP 12: ASSERT - Update Description (IDEM) - scope_type: dcim.location" + assert: + that: + - results is not changed + - results['vlan_group']['name'] == "VLAN Group Location" + - results['vlan_group']['slug'] == "vlan-group-location" + - results['vlan_group']['scope_type'] == "dcim.location" + - results['vlan_group']['scope_id'] == 1 + - results['vlan_group']['description'] == "Ansible updated description" + - results['msg'] == "vlan_group VLAN Group Location already exists" diff --git a/tests/integration/targets/v4.0/tasks/netbox_vm_interface.yml b/tests/integration/targets/v4.0/tasks/netbox_vm_interface.yml new file mode 100644 index 000000000..799d04b16 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_vm_interface.yml @@ -0,0 +1,159 @@ +--- +## +## +### NETBOX_VM_INTERFACE +## +## +- name: "NETBOX_VM_INTERFACE 1: Necessary info creation" + netbox.netbox.netbox_vm_interface: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + virtual_machine: "test100-vm" + name: "Eth10" + state: present + register: test_one + +- name: "NETBOX_VM_INTERFACE 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['interface']['name'] == "Eth10" + - test_one['interface']['virtual_machine'] == 1 + - test_one['msg'] == "interface Eth10 created" + +- name: "NETBOX_VM_INTERFACE 2: Create duplicate" + netbox.netbox.netbox_vm_interface: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + virtual_machine: "test100-vm" + name: "Eth10" + state: present + register: test_two + +- name: "NETBOX_VM_INTERFACE 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['interface']['name'] == "Eth10" + - test_two['interface']['virtual_machine'] == 1 + - test_two['msg'] == "interface Eth10 already exists" + +- name: "NETBOX_VM_INTERFACE 3: Updated" + netbox.netbox.netbox_vm_interface: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + virtual_machine: "test100-vm" + name: "Eth10" + enabled: false + mtu: 9000 + mac_address: "00:00:00:AA:AA:01" + description: "Updated test100-vm" + mode: Tagged + #untagged_vlan: + # name: Wireless + # site: Test Site + #tagged_vlans: + # - name: Data + # site: Test Site + # - name: VoIP + # site: Test Site + tags: + - "Schnozzberry" + state: present + register: test_three + +- name: "NETBOX_VM_INTERFACE 4: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['diff']['after']['enabled'] == false + - test_three['diff']['after']['mtu'] == 9000 + - test_three['diff']['after']['mac_address'] == "00:00:00:AA:AA:01" + - test_three['diff']['after']['description'] == "Updated test100-vm" + - test_three['diff']['after']['mode'] == "tagged" + #- test_three['diff']['after']['untagged_vlan'] == 1 + #- test_three['diff']['after']['tagged_vlans'] == [2, 3] + - test_three['diff']['after']['tags'][0] == 4 + - test_three['interface']['name'] == "Eth10" + - test_three['interface']['virtual_machine'] == 1 + - test_three['interface']['enabled'] == false + - test_three['interface']['mtu'] == 9000 + - test_three['interface']['mac_address'] == "00:00:00:AA:AA:01" + - test_three['interface']['description'] == "Updated test100-vm" + - test_three['interface']['mode'] == "tagged" + #- test_three['interface']['untagged_vlan'] == 1 + #- test_three['interface']['tagged_vlans'] == [2, 3] + - test_three['interface']['tags'][0] == 4 + - test_three['msg'] == "interface Eth10 updated" + +- name: "NETBOX_VM_INTERFACE 4: ASSERT - Delete" + netbox.netbox.netbox_vm_interface: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Eth10" + virtual_machine: "test100-vm" + state: absent + register: test_four + +- name: "NETBOX_VM_INTERFACE 4: ASSERT - Delete" + assert: + that: + - test_four is changed + - test_four['interface']['name'] == "Eth10" + - test_four['interface']['virtual_machine'] == 1 + - test_four['msg'] == "interface Eth10 deleted" + +- name: "NETBOX_VM_INTERFACE 5: Attempt to update interface with same name on other VMs" + netbox.netbox.netbox_vm_interface: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + virtual_machine: "test100-vm" + name: "Eth0" + enabled: false + mtu: 9000 + mac_address: "00:00:00:AA:AA:01" + description: "Updated test100-vm Eth0 intf" + mode: Tagged + #untagged_vlan: + # name: Wireless + # site: Test Site + #tagged_vlans: + # - name: Data + # site: Test Site + # - name: VoIP + # site: Test Site + tags: + - "Schnozzberry" + state: present + register: test_five + +- name: "NETBOX_VM_INTERFACE 5: ASSERT - Updated" + assert: + that: + - test_five is changed + - test_five['diff']['after']['enabled'] == false + - test_five['diff']['after']['mtu'] == 9000 + - test_five['diff']['after']['mac_address'] == "00:00:00:AA:AA:01" + - test_five['diff']['after']['description'] == "Updated test100-vm Eth0 intf" + - test_five['diff']['after']['mode'] == "tagged" + #- test_five['diff']['after']['untagged_vlan'] == 1 + #- test_five['diff']['after']['tagged_vlans'] == [2, 3] + - test_five['diff']['after']['tags'][0] == 4 + - test_five['interface']['name'] == "Eth0" + - test_five['interface']['virtual_machine'] == 1 + - test_five['interface']['enabled'] == false + - test_five['interface']['mtu'] == 9000 + - test_five['interface']['mac_address'] == "00:00:00:AA:AA:01" + - test_five['interface']['description'] == "Updated test100-vm Eth0 intf" + - test_five['interface']['mode'] == "tagged" + #- test_five['interface']['untagged_vlan'] == 1 + #- test_five['interface']['tagged_vlans'] == [2, 3] + - test_five['interface']['tags'][0] == 4 + - test_five['msg'] == "interface Eth0 updated" diff --git a/tests/integration/targets/v4.0/tasks/netbox_vrf.yml b/tests/integration/targets/v4.0/tasks/netbox_vrf.yml new file mode 100644 index 000000000..abf9bab0e --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_vrf.yml @@ -0,0 +1,137 @@ +--- +## +## +### NETBOX_VRF +## +## +- name: "VRF 1: Necessary info creation" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test VRF One + state: present + register: test_one + +- name: "VRF 1: ASSERT - Necessary info creation" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['vrf']['name'] == "Test VRF One" + - test_one['msg'] == "vrf Test VRF One created" + +- name: "VRF 2: Create duplicate" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test VRF One + state: present + register: test_two + +- name: "VRF 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['vrf']['name'] == "Test VRF One" + - test_two['msg'] == "vrf Test VRF One already exists" + +- name: "VRF 3: Create VRF with same name, but different tenant" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Test VRF One + tenant: Test Tenant + state: present + register: test_three + +- name: "VRF 3: ASSERT - Create VRF with same name, but different site" + assert: + that: + - test_three is changed + - test_three['diff']['before']['state'] == "absent" + - test_three['diff']['after']['state'] == "present" + - test_three['vrf']['name'] == "Test VRF One" + - test_three['vrf']['tenant'] == 1 + - test_three['msg'] == "vrf Test VRF One created" + +- name: "VRF 4: ASSERT - Update" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VRF One" + rd: "65001:1" + enforce_unique: False + tenant: "Test Tenant" + description: Updated description + import_targets: + - "4000:4000" + - "5000:5000" + export_targets: + - "5000:5000" + tags: + - "Schnozzberry" + state: present + register: test_four + +- name: "VRF 4: ASSERT - Updated" + assert: + that: + - test_four is changed + - test_four['diff']['after']['rd'] == "65001:1" + - test_four['diff']['after']['enforce_unique'] == false + - test_four['diff']['after']['description'] == "Updated description" + - test_four['diff']['after']['tags'][0] == 4 + - test_four['diff']['after']['import_targets'] | length == 2 + - test_four['diff']['after']['export_targets'] | length == 1 + - test_four['vrf']['name'] == "Test VRF One" + - test_four['vrf']['tenant'] == 1 + - test_four['vrf']['rd'] == "65001:1" + - test_four['vrf']['enforce_unique'] == false + - test_four['vrf']['description'] == "Updated description" + - test_four['vrf']['tags'][0] == 4 + - test_four['vrf']['import_targets'] | length == 2 + - test_four['vrf']['export_targets'] | length == 1 + - test_four['msg'] == "vrf Test VRF One updated" + +- name: "VRF 5: ASSERT - Delete more than one result" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VRF One" + state: absent + ignore_errors: yes + register: test_five + +- name: "VRF 5: ASSERT - Delete more than one result" + assert: + that: + - test_five is failed + - test_five['msg'] == "More than one result returned for Test VRF One" + +- name: "VRF 6: ASSERT - Delete" + netbox.netbox.netbox_vrf: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Test VRF One" + tenant: Test Tenant + state: absent + register: test_six + +- name: "VRF 6: ASSERT - Delete" + assert: + that: + - test_six is changed + - test_six['vrf']['name'] == "Test VRF One" + - test_six['vrf']['tenant'] == 1 + - test_six['vrf']['rd'] == "65001:1" + - test_six['vrf']['enforce_unique'] == false + - test_six['vrf']['description'] == "Updated description" + - test_six['vrf']['tags'][0] == 4 + - test_six['msg'] == "vrf Test VRF One deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_webhook.yml b/tests/integration/targets/v4.0/tasks/netbox_webhook.yml new file mode 100644 index 000000000..f2f5d517e --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_webhook.yml @@ -0,0 +1,121 @@ +--- +## +## +### NETBOX_WEBHOOK +## +## +- name: "WEBHOOK 1: Necessary info creation" + netbox.netbox.netbox_webhook: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: Example Webhook + type_create: yes + payload_url: https://payload.url + body_template: !unsafe >- + {{ data }} + state: present + register: test_one + +- name: "WEBHOOK 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['webhook']['name'] == "Example Webhook" + - test_one['webhook']['type_create'] == True + - test_one['webhook']['payload_url'] == "https://payload.url" + - test_one['webhook']['content_types'] == ["dcim.device"] + - test_one['msg'] == "webhook Example Webhook created" + +- name: "WEBHOOK 2: Create duplicate" + netbox.netbox.netbox_webhook: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + name: Example Webhook + type_create: yes + payload_url: https://payload.url + body_template: !unsafe >- + {{ data }} + state: present + register: test_two + +- name: "WEBHOOK 2: ASSERT - Create duplicate" + assert: + that: + - not test_two['changed'] + - test_two['webhook']['name'] == "Example Webhook" + - test_two['msg'] == "webhook Example Webhook already exists" + +- name: "WEBHOOK 3: Update data and add on delete" + netbox.netbox.netbox_webhook: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "dcim.device" + type_create: yes + type_delete: yes + name: Example Webhook + payload_url: https://payload.url + body_template: !unsafe >- + {{ data }} + state: present + register: test_three + +- name: "WEBHOOK 3: ASSERT - Updated" + assert: + that: + - test_three is changed + - test_three['webhook']['name'] == "Example Webhook" + - test_three['msg'] == "webhook Example Webhook updated" + +- name: "WEBHOOK 4: Change content type" + netbox.netbox.netbox_webhook: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "virtualization.virtualmachine" + name: Example Webhook + payload_url: https://payload.url + body_template: !unsafe >- + {{ data }} + state: present + register: test_four + +- name: "WEBHOOK 4: ASSERT - Change content type" + assert: + that: + - test_four is changed + - test_four['diff']['after']['content_types'] == ["virtualization.virtualmachine"] + - test_four['webhook']['name'] == "Example Webhook" + - test_four['msg'] == "webhook Example Webhook updated" + +- name: "WEBHOOK 5: Delete" + netbox.netbox.netbox_webhook: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + content_types: + - "virtualization.virtualmachine" + name: Example Webhook + payload_url: https://payload.url + body_template: !unsafe >- + {{ data }} + state: absent + register: test_five + +- name: "WEBHOOK 5: ASSERT - Deleted" + assert: + that: + - test_five is changed + - test_five['diff']['after']['state'] == "absent" + - test_five['webhook']['name'] == "Example Webhook" + - test_five['msg'] == "webhook Example Webhook deleted" diff --git a/tests/integration/targets/v4.0/tasks/netbox_wireless_lan.yml b/tests/integration/targets/v4.0/tasks/netbox_wireless_lan.yml new file mode 100644 index 000000000..e59af42ee --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_wireless_lan.yml @@ -0,0 +1,103 @@ +--- +## +## +### NETBOX_WIRELESS_LAN +## +## +- name: "1 - Test wireless LAN creation" + netbox.netbox.netbox_wireless_lan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + ssid: "Wireless LAN One" + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['wireless_lan']['ssid'] == "Wireless LAN One" + - test_one['msg'] == "wireless_lan Wireless LAN One created" + +- name: "Test duplicate wireless LAN" + netbox.netbox.netbox_wireless_lan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + ssid: "Wireless LAN One" + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - not test_two['changed'] + - test_two['wireless_lan']['ssid'] == "Wireless LAN One" + - test_two['msg'] == "wireless_lan Wireless LAN One already exists" + +- name: "3 - Test update" + netbox.netbox.netbox_wireless_lan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + ssid: "Wireless LAN One" + description: "New Description" + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "New Description" + - test_three['wireless_lan']['ssid'] == "Wireless LAN One" + - test_three['wireless_lan']['description'] == "New Description" + - test_three['msg'] == "wireless_lan Wireless LAN One updated" + +- name: "4 - Test delete" + netbox.netbox.netbox_wireless_lan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + ssid: "Wireless LAN One" + state: "absent" + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "wireless_lan Wireless LAN One deleted" + +- name: "5 - Create wireless LAN with all parameters" + netbox.netbox.netbox_wireless_lan: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + ssid: Wireless Network One + description: Cool Wireless Network + auth_type: wpa-enterprise + auth_cipher: aes + auth_psk: psk123456 + tags: + - tagA + - tagB + - tagC + state: present + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['wireless_lan']['ssid'] == "Wireless Network One" + - test_five['wireless_lan']['description'] == "Cool Wireless Network" + - test_five['wireless_lan']['auth_type'] == "wpa-enterprise" + - test_five['wireless_lan']['auth_cipher'] == "aes" + - test_five['wireless_lan']['auth_psk'] == "psk123456" + #- test_five['wireless_lan']['tags'] | length == 3 + - test_five['msg'] == "wireless_lan Wireless Network One created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_wireless_lan_group.yml b/tests/integration/targets/v4.0/tasks/netbox_wireless_lan_group.yml new file mode 100644 index 000000000..51ae3a74f --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_wireless_lan_group.yml @@ -0,0 +1,97 @@ +--- +## +## +### NETBOX_WIRELESS_LAN_GROUP +## +## +- name: "1 - Test wireless LAN group creation" + netbox.netbox.netbox_wireless_lan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Wireless LAN Group One" + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['wireless_lan_group']['name'] == "Wireless LAN Group One" + - test_one['msg'] == "wireless_lan_group Wireless LAN Group One created" + +- name: "Test duplicate wireless LAN group" + netbox.netbox.netbox_wireless_lan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Wireless LAN Group One" + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - not test_two['changed'] + - test_two['wireless_lan_group']['name'] == "Wireless LAN Group One" + - test_two['msg'] == "wireless_lan_group Wireless LAN Group One already exists" + +- name: "3 - Test update" + netbox.netbox.netbox_wireless_lan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Wireless LAN Group One" + description: "New Description" + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['after']['description'] == "New Description" + - test_three['wireless_lan_group']['name'] == "Wireless LAN Group One" + - test_three['wireless_lan_group']['description'] == "New Description" + - test_three['msg'] == "wireless_lan_group Wireless LAN Group One updated" + +- name: "4 - Test delete" + netbox.netbox.netbox_wireless_lan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: "Wireless LAN Group One" + state: "absent" + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "wireless_lan_group Wireless LAN Group One deleted" + +- name: "5 - Create wireless LAN group with all parameters" + netbox.netbox.netbox_wireless_lan_group: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + name: Wireless LAN Group One + description: Cool Wireless LAN Group + tags: + - tagA + - tagB + - tagC + state: present + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['wireless_lan_group']['name'] == "Wireless LAN Group One" + - test_five['wireless_lan_group']['description'] == "Cool Wireless LAN Group" + - test_five['wireless_lan_group']['tags'] | length == 3 + - test_five['msg'] == "wireless_lan_group Wireless LAN Group One created" diff --git a/tests/integration/targets/v4.0/tasks/netbox_wireless_link.yml b/tests/integration/targets/v4.0/tasks/netbox_wireless_link.yml new file mode 100644 index 000000000..baa4574d1 --- /dev/null +++ b/tests/integration/targets/v4.0/tasks/netbox_wireless_link.yml @@ -0,0 +1,130 @@ +--- +## +## +### NETBOX_WIRELESS_LINK +## +## +- name: "1 - Test wireless link creation" + netbox.netbox.netbox_wireless_link: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + interface_a: + device: Test Nexus One + name: wlink1 + interface_b: + device: test100 + name: wlink1 + register: test_one + +- name: "1 - ASSERT" + assert: + that: + - test_one is changed + - test_one['diff']['before']['state'] == "absent" + - test_one['diff']['after']['state'] == "present" + - test_one['wireless_link']['interface_a'] == 6 + - test_one['wireless_link']['interface_b'] == 5 + - test_one['msg'] == "wireless_link Test Nexus One wlink1 <> test100 wlink1 created" + +- name: "Test duplicate wireless link" + netbox.netbox.netbox_wireless_link: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + interface_a: + device: Test Nexus One + name: wlink1 + interface_b: + device: test100 + name: wlink1 + register: test_two + +- name: "2 - ASSERT" + assert: + that: + - not test_two['changed'] + - test_two['msg'] == "wireless_link Test Nexus One wlink1 <> test100 wlink1 already exists" + +- name: "3 - Test update" + netbox.netbox.netbox_wireless_link: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + interface_a: + device: Test Nexus One + name: wlink1 + interface_b: + device: test100 + name: wlink1 + status: planned + register: test_three + +- name: "3 - ASSERT" + assert: + that: + - test_three is changed + - test_three['diff']['after']['status'] == "planned" + - test_three['wireless_link']['status'] == "planned" + - test_three['msg'] == "wireless_link Test Nexus One wlink1 <> test100 wlink1 updated" + +- name: "4 - Test delete" + netbox.netbox.netbox_wireless_link: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + interface_a: + device: Test Nexus One + name: wlink1 + interface_b: + device: test100 + name: wlink1 + state: "absent" + register: test_four + +- name: "4 - ASSERT" + assert: + that: + - test_four is changed + - test_four['diff']['before']['state'] == "present" + - test_four['diff']['after']['state'] == "absent" + - test_four['msg'] == "wireless_link Test Nexus One wlink1 <> test100 wlink1 deleted" + +- name: "5 - Create wireless link with all parameters" + netbox.netbox.netbox_wireless_link: + netbox_url: http://localhost:32768 + netbox_token: 0123456789abcdef0123456789abcdef01234567 + data: + interface_a: + device: Test Nexus One + name: wlink1 + interface_b: + device: test100 + name: wlink1 + ssid: Wireless Network One + description: Cool Wireless Network + auth_type: wpa-enterprise + auth_cipher: aes + auth_psk: psk123456 + tags: + - tagA + - tagB + - tagC + state: present + register: test_five + +- name: "5 - ASSERT" + assert: + that: + - test_five is changed + - test_five['diff']['before']['state'] == "absent" + - test_five['diff']['after']['state'] == "present" + - test_five['wireless_link']['ssid'] == "Wireless Network One" + - test_five['wireless_link']['description'] == "Cool Wireless Network" + - test_five['wireless_link']['interface_a'] == 6 + - test_five['wireless_link']['interface_b'] == 5 + - test_five['wireless_link']['auth_type'] == "wpa-enterprise" + - test_five['wireless_link']['auth_cipher'] == "aes" + - test_five['wireless_link']['auth_psk'] == "psk123456" + # - test_five['wireless_link']['tags'] | length == 3 + - test_five['msg'] == "wireless_link Test Nexus One wlink1 <> test100 wlink1 created" diff --git a/tests/netbox-docker/v4.0/docker-compose.override.yml b/tests/netbox-docker/v4.0/docker-compose.override.yml new file mode 100644 index 000000000..5649eff1b --- /dev/null +++ b/tests/netbox-docker/v4.0/docker-compose.override.yml @@ -0,0 +1,25 @@ +--- +version: '3.4' +services: + netbox-worker: &netbox-override + image: netboxcommunity/netbox:v4.0 + healthcheck: + start_period: 300s + timeout: 3s + interval: 15s + test: "ps -aux | grep -v grep | grep -q rqworker || exit 1" + netbox: + <<: *netbox-override + ports: + - 32768:8080 + healthcheck: + start_period: 300s + timeout: 3s + interval: 15s + test: "curl -f http://localhost:8080/api/ || exit 1" + environment: + SKIP_SUPERUSER: "false" + SUPERUSER_API_TOKEN: "0123456789abcdef0123456789abcdef01234567" + SUPERUSER_EMAIL: "admin@localhost.com" + SUPERUSER_NAME: "admin" + SUPERUSER_PASSWORD: "admin"