From 74974025d2eaaba2ee0a730c63868c74af503e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20R=C3=B8dvand?= Date: Thu, 2 Nov 2023 19:46:09 +0100 Subject: [PATCH 1/5] Remove 3.3 tests --- .../targets/inventory-v3.3/.gitignore | 1 - .../targets/inventory-v3.3/aliases | 1 - .../inventory-v3.3/compare_inventory_json.py | 152 -- .../files/test-inventory-bearer-token.json | 1248 ---------------- .../files/test-inventory-bearer-token.yml | 32 - .../files/test-inventory-jinja2-filter.json | 706 --------- .../files/test-inventory-jinja2-filter.yml | 33 - .../files/test-inventory-jinja2.json | 361 ----- .../files/test-inventory-jinja2.yml | 62 - .../files/test-inventory-legacy.json | 390 ----- .../files/test-inventory-legacy.yml | 10 - .../files/test-inventory-noracks.json | 1270 ---------------- .../files/test-inventory-noracks.yml | 28 - .../files/test-inventory-options-flatten.json | 1203 --------------- .../files/test-inventory-options-flatten.yml | 41 - .../files/test-inventory-options.json | 361 ----- .../files/test-inventory-options.yml | 62 - .../files/test-inventory-plurals-flatten.json | 409 ----- .../files/test-inventory-plurals-flatten.yml | 33 - .../files/test-inventory-plurals.json | 1314 ----------------- .../files/test-inventory-plurals.yml | 38 - .../inventory-v3.3/files/test-inventory.json | 1248 ---------------- .../inventory-v3.3/files/test-inventory.yml | 30 - .../targets/inventory-v3.3/runme.sh | 72 - .../inventory-v3.3/runme_config.template | 6 - .../targets/regression-v3.3/tasks/main.yml | 266 ---- tests/integration/targets/v3.3/tasks/main.yml | 290 ---- .../targets/v3.3/tasks/netbox_aggregate.yml | 115 -- .../targets/v3.3/tasks/netbox_asn.yml | 88 -- .../targets/v3.3/tasks/netbox_cable.yml | 193 --- .../targets/v3.3/tasks/netbox_circuit.yml | 109 -- .../v3.3/tasks/netbox_circuit_termination.yml | 129 -- .../v3.3/tasks/netbox_circuit_type.yml | 96 -- .../targets/v3.3/tasks/netbox_cluster.yml | 98 -- .../v3.3/tasks/netbox_cluster_group.yml | 96 -- .../v3.3/tasks/netbox_cluster_type.yml | 96 -- .../v3.3/tasks/netbox_config_context.yml | 107 -- .../v3.3/tasks/netbox_console_port.yml | 108 -- .../tasks/netbox_console_port_template.yml | 105 -- .../v3.3/tasks/netbox_console_server_port.yml | 108 -- .../netbox_console_server_port_template.yml | 105 -- .../targets/v3.3/tasks/netbox_contact.yml | 100 -- .../v3.3/tasks/netbox_contact_role.yml | 94 -- .../v3.3/tasks/netbox_custom_field.yml | 108 -- .../targets/v3.3/tasks/netbox_custom_link.yml | 108 -- .../targets/v3.3/tasks/netbox_device.yml | 243 --- .../targets/v3.3/tasks/netbox_device_bay.yml | 87 -- .../v3.3/tasks/netbox_device_bay_template.yml | 81 - .../v3.3/tasks/netbox_device_interface.yml | 313 ---- .../netbox_device_interface_template.yml | 109 -- .../targets/v3.3/tasks/netbox_device_role.yml | 101 -- .../targets/v3.3/tasks/netbox_device_type.yml | 132 -- .../v3.3/tasks/netbox_export_template.yml | 113 -- .../targets/v3.3/tasks/netbox_fhrp_group.yml | 91 -- .../tasks/netbox_fhrp_group_assignment.yml | 92 -- .../targets/v3.3/tasks/netbox_front_port.yml | 150 -- .../v3.3/tasks/netbox_front_port_template.yml | 147 -- .../v3.3/tasks/netbox_inventory_item.yml | 203 --- .../v3.3/tasks/netbox_inventory_item_role.yml | 98 -- .../targets/v3.3/tasks/netbox_ip_address.yml | 350 ----- .../targets/v3.3/tasks/netbox_ipam_role.yml | 94 -- .../targets/v3.3/tasks/netbox_l2vpn.yml | 99 -- .../v3.3/tasks/netbox_l2vpn_termination.yml | 94 -- .../targets/v3.3/tasks/netbox_location.yml | 85 -- .../targets/v3.3/tasks/netbox_lookup.yml | 82 - .../v3.3/tasks/netbox_manufacturer.yml | 91 -- .../targets/v3.3/tasks/netbox_module_type.yml | 97 -- .../targets/v3.3/tasks/netbox_platform.yml | 99 -- .../targets/v3.3/tasks/netbox_power_feed.yml | 127 -- .../v3.3/tasks/netbox_power_outlet.yml | 114 -- .../tasks/netbox_power_outlet_template.yml | 111 -- .../targets/v3.3/tasks/netbox_power_panel.yml | 105 -- .../targets/v3.3/tasks/netbox_power_port.yml | 125 -- .../v3.3/tasks/netbox_power_port_template.yml | 120 -- .../targets/v3.3/tasks/netbox_prefix.yml | 245 --- .../targets/v3.3/tasks/netbox_provider.yml | 99 -- .../v3.3/tasks/netbox_provider_network.yml | 83 -- .../targets/v3.3/tasks/netbox_rack.yml | 226 --- .../targets/v3.3/tasks/netbox_rack_group.yml | 62 - .../targets/v3.3/tasks/netbox_rack_role.yml | 81 - .../targets/v3.3/tasks/netbox_rear_port.yml | 139 -- .../v3.3/tasks/netbox_rear_port_template.yml | 136 -- .../targets/v3.3/tasks/netbox_region.yml | 79 - .../targets/v3.3/tasks/netbox_rir.yml | 79 - .../v3.3/tasks/netbox_route_target.yml | 204 --- .../targets/v3.3/tasks/netbox_service.yml | 196 --- .../targets/v3.3/tasks/netbox_site.yml | 165 --- .../targets/v3.3/tasks/netbox_site_group.yml | 81 - .../targets/v3.3/tasks/netbox_tag.yml | 110 -- .../targets/v3.3/tasks/netbox_tenant.yml | 106 -- .../v3.3/tasks/netbox_tenant_group.yml | 129 -- .../v3.3/tasks/netbox_virtual_chassis.yml | 131 -- .../v3.3/tasks/netbox_virtual_machine.yml | 128 -- .../targets/v3.3/tasks/netbox_vlan.yml | 193 --- .../targets/v3.3/tasks/netbox_vlan_group.yml | 314 ---- .../v3.3/tasks/netbox_vm_interface.yml | 159 -- .../targets/v3.3/tasks/netbox_vrf.yml | 137 -- .../targets/v3.3/tasks/netbox_webhook.yml | 121 -- .../v3.3/tasks/netbox_wireless_lan.yml | 103 -- .../v3.3/tasks/netbox_wireless_lan_group.yml | 97 -- .../v3.3/tasks/netbox_wireless_link.yml | 130 -- 101 files changed, 19116 deletions(-) delete mode 100644 tests/integration/targets/inventory-v3.3/.gitignore delete mode 100644 tests/integration/targets/inventory-v3.3/aliases delete mode 100755 tests/integration/targets/inventory-v3.3/compare_inventory_json.py delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-bearer-token.json delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-bearer-token.yml delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2-filter.json delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2-filter.yml delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2.json delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2.yml delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-legacy.json delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-legacy.yml delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-noracks.json delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-noracks.yml delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-options-flatten.json delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-options-flatten.yml delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-options.json delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-options.yml delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-plurals-flatten.json delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-plurals-flatten.yml delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-plurals.json delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory-plurals.yml delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory.json delete mode 100644 tests/integration/targets/inventory-v3.3/files/test-inventory.yml delete mode 100755 tests/integration/targets/inventory-v3.3/runme.sh delete mode 100644 tests/integration/targets/inventory-v3.3/runme_config.template delete mode 100644 tests/integration/targets/regression-v3.3/tasks/main.yml delete mode 100644 tests/integration/targets/v3.3/tasks/main.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_aggregate.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_asn.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_cable.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_circuit.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_circuit_termination.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_circuit_type.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_cluster.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_cluster_group.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_cluster_type.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_config_context.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_console_port.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_console_port_template.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_console_server_port.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_console_server_port_template.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_contact.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_contact_role.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_custom_field.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_custom_link.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_device.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_device_bay.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_device_bay_template.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_device_interface.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_device_interface_template.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_device_role.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_device_type.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_export_template.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_fhrp_group.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_fhrp_group_assignment.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_front_port.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_front_port_template.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_inventory_item.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_inventory_item_role.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_ip_address.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_ipam_role.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_l2vpn.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_l2vpn_termination.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_location.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_lookup.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_manufacturer.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_module_type.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_platform.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_power_feed.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_power_outlet.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_power_outlet_template.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_power_panel.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_power_port.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_power_port_template.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_prefix.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_provider.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_provider_network.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_rack.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_rack_group.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_rack_role.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_rear_port.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_rear_port_template.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_region.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_rir.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_route_target.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_service.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_site.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_site_group.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_tag.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_tenant.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_tenant_group.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_virtual_chassis.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_virtual_machine.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_vlan.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_vlan_group.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_vm_interface.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_vrf.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_webhook.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_wireless_lan.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_wireless_lan_group.yml delete mode 100644 tests/integration/targets/v3.3/tasks/netbox_wireless_link.yml diff --git a/tests/integration/targets/inventory-v3.3/.gitignore b/tests/integration/targets/inventory-v3.3/.gitignore deleted file mode 100644 index df76504d5..000000000 --- a/tests/integration/targets/inventory-v3.3/.gitignore +++ /dev/null @@ -1 +0,0 @@ -runme_config \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/aliases b/tests/integration/targets/inventory-v3.3/aliases deleted file mode 100644 index a3a2089b9..000000000 --- a/tests/integration/targets/inventory-v3.3/aliases +++ /dev/null @@ -1 +0,0 @@ -# https://docs.ansible.com/ansible/devel/dev_guide/testing/sanity/integration-aliases.html diff --git a/tests/integration/targets/inventory-v3.3/compare_inventory_json.py b/tests/integration/targets/inventory-v3.3/compare_inventory_json.py deleted file mode 100755 index 40a032ca0..000000000 --- a/tests/integration/targets/inventory-v3.3/compare_inventory_json.py +++ /dev/null @@ -1,152 +0,0 @@ -#!/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-v3.3/files/test-inventory-bearer-token.json b/tests/integration/targets/inventory-v3.3/files/test-inventory-bearer-token.json deleted file mode 100644 index 374fde8be..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-bearer-token.json +++ /dev/null @@ -1,1248 +0,0 @@ -{ - "_meta": { - "hostvars": { - "R1-Device": { - "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", - "services": [], - "site": "test-site2", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "", - "asset_tag": "345678901" - }, - "Test Nexus One": { - "ansible_host": "172.16.180.12", - "config_context": {}, - "custom_fields": {}, - "device_type": "nexus-parent", - "dns_name": "nexus.example.com", - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "Ethernet1/1", - "duplex": null, - "enabled": true, - "id": 1, - "ip_addresses": [ - { - "address": "172.16.180.11/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.11/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 3, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet1/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" - }, - "display": "Ethernet2/1", - "duplex": null, - "enabled": true, - "id": 2, - "ip_addresses": [ - { - "address": "172.16.180.12/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 4, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet2/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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", - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "telnet (TCP/23)", - "id": 3, - "ipaddresses": [], - "name": "telnet", - "ports": [ - 23 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "" - }, - "Test VM With Spaces": { - "cluster": "Test Cluster 2", - "cluster_type": "test-cluster-type", - "config_context": {}, - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 11, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 12, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - }, - "vrf": null - } - ], - "is_virtual": true, - "locations": [], - "regions": [], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": null, - "display": "ssh (TCP/22)", - "id": 4, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - } - } - ], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "TestDeviceR1": { - "config_context": {}, - "custom_fields": {}, - "device_type": "cisco-test", - "interfaces": [], - "is_virtual": false, - "locations": [ - "test-rack-group", - "parent-rack-group" - ], - "manufacturer": "cisco", - "rack": "Test Rack", - "regions": [ - "test-region", - "parent-region" - ], - "role": "core-switch", - "services": [], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB12345678" - }, - "test100": { - "config_context": { - "ntp_servers": [ - "pool.ntp.org" - ] - }, - "custom_fields": {}, - "device_type": "cisco-test", - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet1", - "duplex": null, - "enabled": true, - "id": 3, - "ip_addresses": [ - { - "address": "172.16.180.1/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.1/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 1, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet2", - "duplex": null, - "enabled": true, - "id": 4, - "ip_addresses": [ - { - "address": "2001::1:1/64", - "custom_fields": {}, - "description": "", - "display": "2001::1:1/64", - "dns_name": "", - "family": { - "label": "IPv6", - "value": 6 - }, - "id": 2, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet2", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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", - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "ssh (TCP/22)", - "id": 1, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - }, - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "http (TCP/80)", - "id": 2, - "ipaddresses": [ - { - "address": "172.16.180.1/24", - "display": "172.16.180.1/24", - "family": 4, - "id": 1 - }, - { - "address": "2001::1:1/64", - "display": "2001::1:1/64", - "family": 6, - "id": 2 - } - ], - "name": "http", - "ports": [ - 80 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB01234567", - "asset_tag": "123456789" - }, - "test100-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "config_context": {}, - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 1, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 2, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth2", - "enabled": true, - "id": 3, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth2", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth3", - "enabled": true, - "id": 4, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth3", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth4", - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth4", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - } - ], - "is_virtual": true, - "locations": [], - "regions": [], - "services": [], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "test101-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "config_context": {}, - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 7, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth2", - "enabled": true, - "id": 8, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth2", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth3", - "enabled": true, - "id": 9, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth3", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth4", - "enabled": true, - "id": 10, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth4", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - } - ], - "is_virtual": true, - "locations": [], - "regions": [], - "services": [], - "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": [], - "services": [], - "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": [], - "services": [], - "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": [ - "cluster_Test_Cluster", - "cluster_Test_Cluster_2", - "cluster_group_test_cluster_group", - "cluster_type_test_cluster_type", - "device_type_cisco_test", - "device_type_nexus_parent", - "is_virtual", - "manufacturer_cisco", - "rack_Test_Rack", - "rack_Test_Rack_Site_2", - "rack_role_test_rack_role", - "region_other_region", - "region_parent_region", - "role_core_switch", - "service_http", - "service_ssh", - "service_telnet", - "site_group_other_site_group", - "site_group_parent_site_group", - "site_test_site2", - "status_active", - "ungrouped" - ] - }, - "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": [ - "Test VM With Spaces", - "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" - ] - }, - "site_test_site2": { - "hosts": [ - "R1-Device" - ] - }, - "status_active": { - "hosts": [ - "R1-Device", - "Test Nexus One", - "Test VM With Spaces", - "TestDeviceR1", - "test100", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - } -} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/files/test-inventory-bearer-token.yml b/tests/integration/targets/inventory-v3.3/files/test-inventory-bearer-token.yml deleted file mode 100644 index 6af9a1339..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-bearer-token.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -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-v3.3/files/test-inventory-jinja2-filter.json b/tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2-filter.json deleted file mode 100644 index b483aebc8..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2-filter.json +++ /dev/null @@ -1,706 +0,0 @@ -{ - "_meta": { - "hostvars": { - "Test Nexus One": { - "ansible_host": "172.16.180.12", - "config_context": {}, - "custom_fields": {}, - "device_type": "nexus-parent", - "dns_name": "nexus.example.com", - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "Ethernet1/1", - "duplex": null, - "enabled": true, - "id": 1, - "ip_addresses": [ - { - "address": "172.16.180.11/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.11/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 3, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet1/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" - }, - "display": "Ethernet2/1", - "duplex": null, - "enabled": true, - "id": 2, - "ip_addresses": [ - { - "address": "172.16.180.12/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 4, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet2/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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", - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "telnet (TCP/23)", - "id": 3, - "ipaddresses": [], - "name": "telnet", - "ports": [ - 23 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "" - }, - "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", - "services": [], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB12345678" - }, - "test100": { - "config_context": { - "ntp_servers": [ - "pool.ntp.org" - ] - }, - "custom_fields": {}, - "device_type": "cisco-test", - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet1", - "duplex": null, - "enabled": true, - "id": 3, - "ip_addresses": [ - { - "address": "172.16.180.1/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.1/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 1, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet2", - "duplex": null, - "enabled": true, - "id": 4, - "ip_addresses": [ - { - "address": "2001::1:1/64", - "custom_fields": {}, - "description": "", - "display": "2001::1:1/64", - "dns_name": "", - "family": { - "label": "IPv6", - "value": 6 - }, - "id": 2, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet2", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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", - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "ssh (TCP/22)", - "id": 1, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - }, - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "http (TCP/80)", - "id": 2, - "ipaddresses": [ - { - "address": "172.16.180.1/24", - "display": "172.16.180.1/24", - "family": 4, - "id": 1 - }, - { - "address": "2001::1:1/64", - "display": "2001::1:1/64", - "family": 6, - "id": 2 - } - ], - "name": "http", - "ports": [ - 80 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB01234567", - "asset_tag": "123456789" - } - } - }, - "all": { - "children": [ - "device_type_cisco_test", - "device_type_nexus_parent", - "manufacturer_cisco", - "rack_Test_Rack", - "region_other_region", - "region_parent_region", - "role_core_switch", - "service_http", - "service_ssh", - "service_telnet", - "site_group_other_site_group", - "site_group_parent_site_group", - "site_test_site2", - "status_active", - "ungrouped" - ] - }, - "device_type_cisco_test": { - "hosts": [ - "TestDeviceR1", - "test100" - ] - }, - "device_type_nexus_parent": { - "hosts": [ - "Test Nexus One" - ] - }, - "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" - ] - }, - "status_active": { - "hosts": [ - "Test Nexus One", - "TestDeviceR1", - "test100" - ] - } -} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2-filter.yml b/tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2-filter.yml deleted file mode 100644 index 1dbc1993f..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2-filter.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -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-v3.3/files/test-inventory-jinja2.json b/tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2.json deleted file mode 100644 index 5e3fe42d4..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2.json +++ /dev/null @@ -1,361 +0,0 @@ -{ - "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": { - "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", - "site": "test-site2", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "", - "asset_tag": "345678901" - }, - "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", - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB12345678" - }, - "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", - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "" - }, - "test100": { - "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", - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB01234567", - "asset_tag": "123456789" - }, - "test100-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "custom_fields": {}, - "is_virtual": true, - "locations": [], - "regions": [], - "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": [], - "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": [], - "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": [], - "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", - "Test VM With Spaces", - "TestDeviceR1", - "VC1", - "test100", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - }, - "all": { - "children": [ - "Test_Cluster", - "Test_Cluster_2", - "Test_Rack", - "Test_Rack_Site_2", - "active", - "cisco", - "cisco_test", - "core_switch", - "is_virtual", - "jinja_test_group", - "nexus_parent", - "other_region", - "other_site_group", - "parent_region", - "parent_site_group", - "test_cluster_group", - "test_cluster_type", - "test_rack_role", - "test_site2", - "ungrouped" - ] - }, - "cisco": { - "hosts": [ - "R1-Device", - "TestDeviceR1", - "VC1", - "test100" - ] - }, - "cisco_test": { - "hosts": [ - "R1-Device", - "TestDeviceR1", - "test100" - ] - }, - "core_switch": { - "hosts": [ - "R1-Device", - "TestDeviceR1", - "VC1", - "test100" - ] - }, - "is_virtual": { - "hosts": [ - "Test VM With Spaces", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - }, - "jinja_test_group": { - "hosts": [ - "Test VM With Spaces", - "TestDeviceR1" - ] - }, - "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": [ - "TestDeviceR1", - "VC1", - "test100" - ] - }, - "test_rack_role": { - "hosts": [ - "R1-Device" - ] - }, - "test_region": { - "children": [ - "test_site" - ] - }, - "test_site": { - "children": [ - "parent_rack_group" - ] - }, - "test_site2": { - "hosts": [ - "R1-Device" - ] - } -} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2.yml b/tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2.yml deleted file mode 100644 index 44ad6f16f..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-jinja2.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- -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-v3.3/files/test-inventory-legacy.json b/tests/integration/targets/inventory-v3.3/files/test-inventory-legacy.json deleted file mode 100644 index 57b457548..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-legacy.json +++ /dev/null @@ -1,390 +0,0 @@ -{ - "_meta": { - "hostvars": { - "R1-Device": { - "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": [], - "services": [], - "site_groups": [], - "sites": [ - "test-site2" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "", - "asset_tag": "345678901" - }, - "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" - ], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "telnet (TCP/23)", - "id": 3, - "ipaddresses": [], - "name": "telnet", - "ports": [ - 23 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "" - }, - "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": [ - { - "custom_fields": {}, - "description": "", - "device": null, - "display": "ssh (TCP/22)", - "id": 4, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - } - } - ], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "TestDeviceR1": { - "custom_fields": {}, - "device_roles": [ - "core-switch" - ], - "device_types": [ - "cisco-test" - ], - "is_virtual": false, - "local_context_data": [ - null - ], - "locations": [ - "test-rack-group", - "parent-rack-group" - ], - "manufacturers": [ - "cisco" - ], - "racks": [ - "Test Rack" - ], - "regions": [ - "test-region", - "parent-region" - ], - "services": [], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB12345678" - }, - "test100": { - "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" - ], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "ssh (TCP/22)", - "id": 1, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - }, - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "http (TCP/80)", - "id": 2, - "ipaddresses": [ - { - "address": "172.16.180.1/24", - "display": "172.16.180.1/24", - "family": 4, - "id": 1 - }, - { - "address": "2001::1:1/64", - "display": "2001::1:1/64", - "family": 6, - "id": 2 - } - ], - "name": "http", - "ports": [ - 80 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB01234567", - "asset_tag": "123456789" - }, - "test100-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": [], - "services": [], - "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, - "local_context_data": [ - null - ], - "locations": [], - "regions": [], - "services": [], - "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, - "local_context_data": [ - null - ], - "locations": [], - "regions": [], - "services": [], - "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, - "local_context_data": [ - null - ], - "locations": [], - "regions": [], - "services": [], - "site_groups": [], - "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", - "Test VM With Spaces", - "TestDeviceR1", - "test100", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - } -} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/files/test-inventory-legacy.yml b/tests/integration/targets/inventory-v3.3/files/test-inventory-legacy.yml deleted file mode 100644 index d10721865..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-legacy.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# 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-v3.3/files/test-inventory-noracks.json b/tests/integration/targets/inventory-v3.3/files/test-inventory-noracks.json deleted file mode 100644 index 652ba2f1d..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-noracks.json +++ /dev/null @@ -1,1270 +0,0 @@ -{ - "_meta": { - "hostvars": { - "R1-Device": { - "config_context": [ - {} - ], - "custom_fields": {}, - "device_roles": [ - "core-switch" - ], - "device_types": [ - "cisco-test" - ], - "interfaces": [], - "is_virtual": false, - "local_context_data": [ - null - ], - "manufacturers": [ - "cisco" - ], - "regions": [], - "services": [], - "site_groups": [], - "sites": [ - "test-site2" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "", - "asset_tag": "345678901" - }, - "Test Nexus One": { - "ansible_host": "172.16.180.12", - "config_context": [ - {} - ], - "custom_fields": {}, - "device_roles": [ - "core-switch" - ], - "device_types": [ - "nexus-parent" - ], - "dns_name": "nexus.example.com", - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "Ethernet1/1", - "duplex": null, - "enabled": true, - "id": 1, - "ip_addresses": [ - { - "address": "172.16.180.11/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.11/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 3, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet1/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" - }, - "display": "Ethernet2/1", - "duplex": null, - "enabled": true, - "id": 2, - "ip_addresses": [ - { - "address": "172.16.180.12/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 4, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet2/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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" - ], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "telnet (TCP/23)", - "id": 3, - "ipaddresses": [], - "name": "telnet", - "ports": [ - 23 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "" - }, - "Test VM With Spaces": { - "cluster": "Test Cluster 2", - "cluster_type": "test-cluster-type", - "config_context": [ - {} - ], - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 11, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 12, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - }, - "vrf": null - } - ], - "is_virtual": true, - "local_context_data": [ - null - ], - "regions": [], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": null, - "display": "ssh (TCP/22)", - "id": 4, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - } - } - ], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "TestDeviceR1": { - "config_context": [ - {} - ], - "custom_fields": {}, - "device_roles": [ - "core-switch" - ], - "device_types": [ - "cisco-test" - ], - "interfaces": [], - "is_virtual": false, - "local_context_data": [ - null - ], - "manufacturers": [ - "cisco" - ], - "regions": [ - "test-region", - "parent-region" - ], - "services": [], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB12345678" - }, - "test100": { - "config_context": [ - { - "ntp_servers": [ - "pool.ntp.org" - ] - } - ], - "custom_fields": {}, - "device_roles": [ - "core-switch" - ], - "device_types": [ - "cisco-test" - ], - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet1", - "duplex": null, - "enabled": true, - "id": 3, - "ip_addresses": [ - { - "address": "172.16.180.1/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.1/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 1, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet2", - "duplex": null, - "enabled": true, - "id": 4, - "ip_addresses": [ - { - "address": "2001::1:1/64", - "custom_fields": {}, - "description": "", - "display": "2001::1:1/64", - "dns_name": "", - "family": { - "label": "IPv6", - "value": 6 - }, - "id": 2, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet2", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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" - ], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "ssh (TCP/22)", - "id": 1, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - }, - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "http (TCP/80)", - "id": 2, - "ipaddresses": [ - { - "address": "172.16.180.1/24", - "display": "172.16.180.1/24", - "family": 4, - "id": 1 - }, - { - "address": "2001::1:1/64", - "display": "2001::1:1/64", - "family": 6, - "id": 2 - } - ], - "name": "http", - "ports": [ - 80 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB01234567", - "asset_tag": "123456789" - }, - "test100-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "config_context": [ - {} - ], - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 1, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 2, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth2", - "enabled": true, - "id": 3, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth2", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth3", - "enabled": true, - "id": 4, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth3", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth4", - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth4", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - } - ], - "is_virtual": true, - "local_context_data": [ - null - ], - "regions": [], - "services": [], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "test101-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "config_context": [ - {} - ], - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 7, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth2", - "enabled": true, - "id": 8, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth2", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth3", - "enabled": true, - "id": 9, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth3", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth4", - "enabled": true, - "id": 10, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth4", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - } - ], - "is_virtual": true, - "local_context_data": [ - null - ], - "regions": [], - "services": [], - "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, - "local_context_data": [ - null - ], - "regions": [], - "services": [], - "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, - "local_context_data": [ - null - ], - "regions": [], - "services": [], - "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, - "local_context_data": [ - null - ], - "regions": [], - "services": [], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - } - } - }, - "all": { - "children": [ - "cluster_Test_Cluster", - "cluster_Test_Cluster_2", - "cluster_group_test_cluster_group", - "cluster_type_test_cluster_type", - "device_roles_core_switch", - "device_types_cisco_test", - "device_types_nexus_parent", - "is_virtual", - "manufacturers_cisco", - "region_other_region", - "region_parent_region", - "site_group_other_site_group", - "site_group_parent_site_group", - "sites_test_site2", - "status_active", - "ungrouped" - ] - }, - "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" - ] - }, - "sites_test_site2": { - "hosts": [ - "R1-Device" - ] - }, - "status_active": { - "hosts": [ - "R1-Device", - "Test Nexus One", - "Test VM With Spaces", - "TestDeviceR1", - "test100", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - } -} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/files/test-inventory-noracks.yml b/tests/integration/targets/inventory-v3.3/files/test-inventory-noracks.yml deleted file mode 100644 index 28f08f19d..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-noracks.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -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-v3.3/files/test-inventory-options-flatten.json b/tests/integration/targets/inventory-v3.3/files/test-inventory-options-flatten.json deleted file mode 100644 index 621dcefee..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-options-flatten.json +++ /dev/null @@ -1,1203 +0,0 @@ -{ - "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": { - "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", - "services": [], - "site": "test-site2", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "", - "asset_tag": "345678901" - }, - "Test Nexus One": { - "ansible_host": "172.16.180.12", - "device_type": "nexus-parent", - "dns_name": "nexus.example.com", - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "Ethernet1/1", - "duplex": null, - "enabled": true, - "id": 1, - "ip_addresses": [ - { - "address": "172.16.180.11/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.11/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 3, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet1/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" - }, - "display": "Ethernet2/1", - "duplex": null, - "enabled": true, - "id": 2, - "ip_addresses": [ - { - "address": "172.16.180.12/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 4, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet2/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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", - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "telnet (TCP/23)", - "id": 3, - "ipaddresses": [], - "name": "telnet", - "ports": [ - 23 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "" - }, - "Test VM With Spaces": { - "cluster": "Test Cluster 2", - "cluster_type": "test-cluster-type", - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 11, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 12, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - }, - "vrf": null - } - ], - "is_virtual": true, - "locations": [], - "regions": [], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": null, - "display": "ssh (TCP/22)", - "id": 4, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - } - } - ], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "TestDeviceR1": { - "device_type": "cisco-test", - "interfaces": [], - "is_virtual": false, - "locations": [ - "test-rack-group", - "parent-rack-group" - ], - "manufacturer": "cisco", - "rack": "Test Rack", - "regions": [ - "test-region", - "parent-region" - ], - "role": "core-switch", - "services": [], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB12345678" - }, - "test100": { - "device_type": "cisco-test", - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet1", - "duplex": null, - "enabled": true, - "id": 3, - "ip_addresses": [ - { - "address": "172.16.180.1/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.1/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 1, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet2", - "duplex": null, - "enabled": true, - "id": 4, - "ip_addresses": [ - { - "address": "2001::1:1/64", - "custom_fields": {}, - "description": "", - "display": "2001::1:1/64", - "dns_name": "", - "family": { - "label": "IPv6", - "value": 6 - }, - "id": 2, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet2", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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", - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "ssh (TCP/22)", - "id": 1, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - }, - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "http (TCP/80)", - "id": 2, - "ipaddresses": [ - { - "address": "172.16.180.1/24", - "display": "172.16.180.1/24", - "family": 4, - "id": 1 - }, - { - "address": "2001::1:1/64", - "display": "2001::1:1/64", - "family": 6, - "id": 2 - } - ], - "name": "http", - "ports": [ - 80 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB01234567", - "asset_tag": "123456789" - }, - "test100-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 1, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 2, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth2", - "enabled": true, - "id": 3, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth2", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth3", - "enabled": true, - "id": 4, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth3", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth4", - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth4", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - } - ], - "is_virtual": true, - "locations": [], - "regions": [], - "services": [], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "test101-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 7, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth2", - "enabled": true, - "id": 8, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth2", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth3", - "enabled": true, - "id": 9, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth3", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth4", - "enabled": true, - "id": 10, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth4", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - } - ], - "is_virtual": true, - "locations": [], - "regions": [], - "services": [], - "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": [], - "services": [], - "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": [], - "services": [], - "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", - "Test VM With Spaces", - "TestDeviceR1", - "test100", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - }, - "all": { - "children": [ - "Test_Cluster", - "Test_Cluster_2", - "Test_Rack", - "Test_Rack_Site_2", - "active", - "cisco", - "cisco_test", - "core_switch", - "is_virtual", - "nexus_parent", - "other_region", - "other_site_group", - "parent_region", - "parent_site_group", - "test_cluster_group", - "test_cluster_type", - "test_rack_role", - "test_site2", - "ungrouped" - ] - }, - "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" - ] - }, - "test_site2": { - "hosts": [ - "R1-Device" - ] - } -} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/files/test-inventory-options-flatten.yml b/tests/integration/targets/inventory-v3.3/files/test-inventory-options-flatten.yml deleted file mode 100644 index 989a0fdc8..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-options-flatten.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -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-v3.3/files/test-inventory-options.json b/tests/integration/targets/inventory-v3.3/files/test-inventory-options.json deleted file mode 100644 index 5e3fe42d4..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-options.json +++ /dev/null @@ -1,361 +0,0 @@ -{ - "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": { - "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", - "site": "test-site2", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "", - "asset_tag": "345678901" - }, - "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", - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB12345678" - }, - "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", - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "" - }, - "test100": { - "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", - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB01234567", - "asset_tag": "123456789" - }, - "test100-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "custom_fields": {}, - "is_virtual": true, - "locations": [], - "regions": [], - "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": [], - "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": [], - "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": [], - "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", - "Test VM With Spaces", - "TestDeviceR1", - "VC1", - "test100", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - }, - "all": { - "children": [ - "Test_Cluster", - "Test_Cluster_2", - "Test_Rack", - "Test_Rack_Site_2", - "active", - "cisco", - "cisco_test", - "core_switch", - "is_virtual", - "jinja_test_group", - "nexus_parent", - "other_region", - "other_site_group", - "parent_region", - "parent_site_group", - "test_cluster_group", - "test_cluster_type", - "test_rack_role", - "test_site2", - "ungrouped" - ] - }, - "cisco": { - "hosts": [ - "R1-Device", - "TestDeviceR1", - "VC1", - "test100" - ] - }, - "cisco_test": { - "hosts": [ - "R1-Device", - "TestDeviceR1", - "test100" - ] - }, - "core_switch": { - "hosts": [ - "R1-Device", - "TestDeviceR1", - "VC1", - "test100" - ] - }, - "is_virtual": { - "hosts": [ - "Test VM With Spaces", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - }, - "jinja_test_group": { - "hosts": [ - "Test VM With Spaces", - "TestDeviceR1" - ] - }, - "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": [ - "TestDeviceR1", - "VC1", - "test100" - ] - }, - "test_rack_role": { - "hosts": [ - "R1-Device" - ] - }, - "test_region": { - "children": [ - "test_site" - ] - }, - "test_site": { - "children": [ - "parent_rack_group" - ] - }, - "test_site2": { - "hosts": [ - "R1-Device" - ] - } -} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/files/test-inventory-options.yml b/tests/integration/targets/inventory-v3.3/files/test-inventory-options.yml deleted file mode 100644 index f278a3aa8..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-options.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- -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-v3.3/files/test-inventory-plurals-flatten.json b/tests/integration/targets/inventory-v3.3/files/test-inventory-plurals-flatten.json deleted file mode 100644 index faa43a845..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-plurals-flatten.json +++ /dev/null @@ -1,409 +0,0 @@ -{ - "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": { - "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": [], - "site_groups": [], - "sites": [ - "test-site2" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "", - "asset_tag": "345678901" - }, - "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" - ], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "" - }, - "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" - ], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB12345678" - }, - "test100": { - "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" - ], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB01234567", - "asset_tag": "123456789" - }, - "test100-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "is_virtual": true, - "local_context_data": [ - null - ], - "locations": [], - "regions": [], - "site_groups": [], - "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": [], - "site_groups": [], - "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": [], - "site_groups": [], - "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": [], - "site_groups": [], - "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", - "Test VM With Spaces", - "TestDeviceR1", - "test100", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - }, - "all": { - "children": [ - "Test_Cluster", - "Test_Cluster_2", - "Test_Rack", - "Test_Rack_Site_2", - "active", - "cisco", - "cisco_test", - "core_switch", - "is_virtual", - "nexus_parent", - "other_region", - "other_site_group", - "parent_region", - "parent_site_group", - "test_cluster_group", - "test_cluster_type", - "test_rack_role", - "test_site2", - "ungrouped" - ] - }, - "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" - ] - }, - "test_site2": { - "hosts": [ - "R1-Device" - ] - } -} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/files/test-inventory-plurals-flatten.yml b/tests/integration/targets/inventory-v3.3/files/test-inventory-plurals-flatten.yml deleted file mode 100644 index 146b6d71c..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-plurals-flatten.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -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-v3.3/files/test-inventory-plurals.json b/tests/integration/targets/inventory-v3.3/files/test-inventory-plurals.json deleted file mode 100644 index c92311673..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-plurals.json +++ /dev/null @@ -1,1314 +0,0 @@ -{ - "_meta": { - "hostvars": { - "R1-Device": { - "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": [], - "services": [], - "site_groups": [], - "sites": [ - "test-site2" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "", - "asset_tag": "345678901" - }, - "Test Nexus One": { - "ansible_host": "172.16.180.12", - "config_context": [ - {} - ], - "custom_fields": {}, - "device_roles": [ - "core-switch" - ], - "device_types": [ - "nexus-parent" - ], - "dns_name": "nexus.example.com", - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "Ethernet1/1", - "duplex": null, - "enabled": true, - "id": 1, - "ip_addresses": [ - { - "address": "172.16.180.11/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.11/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 3, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet1/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" - }, - "display": "Ethernet2/1", - "duplex": null, - "enabled": true, - "id": 2, - "ip_addresses": [ - { - "address": "172.16.180.12/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 4, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet2/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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" - ], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "telnet (TCP/23)", - "id": 3, - "ipaddresses": [], - "name": "telnet", - "ports": [ - 23 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "" - }, - "Test VM With Spaces": { - "cluster": "Test Cluster 2", - "cluster_type": "test-cluster-type", - "config_context": [ - {} - ], - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 11, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 12, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - }, - "vrf": null - } - ], - "is_virtual": true, - "local_context_data": [ - null - ], - "locations": [], - "regions": [], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": null, - "display": "ssh (TCP/22)", - "id": 4, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - } - } - ], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "TestDeviceR1": { - "config_context": [ - {} - ], - "custom_fields": {}, - "device_roles": [ - "core-switch" - ], - "device_types": [ - "cisco-test" - ], - "interfaces": [], - "is_virtual": false, - "local_context_data": [ - null - ], - "locations": [ - "test-rack-group", - "parent-rack-group" - ], - "manufacturers": [ - "cisco" - ], - "racks": [ - "Test Rack" - ], - "regions": [ - "test-region", - "parent-region" - ], - "services": [], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB12345678" - }, - "test100": { - "config_context": [ - { - "ntp_servers": [ - "pool.ntp.org" - ] - } - ], - "custom_fields": {}, - "device_roles": [ - "core-switch" - ], - "device_types": [ - "cisco-test" - ], - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet1", - "duplex": null, - "enabled": true, - "id": 3, - "ip_addresses": [ - { - "address": "172.16.180.1/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.1/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 1, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet2", - "duplex": null, - "enabled": true, - "id": 4, - "ip_addresses": [ - { - "address": "2001::1:1/64", - "custom_fields": {}, - "description": "", - "display": "2001::1:1/64", - "dns_name": "", - "family": { - "label": "IPv6", - "value": 6 - }, - "id": 2, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet2", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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" - ], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "ssh (TCP/22)", - "id": 1, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - }, - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "http (TCP/80)", - "id": 2, - "ipaddresses": [ - { - "address": "172.16.180.1/24", - "display": "172.16.180.1/24", - "family": 4, - "id": 1 - }, - { - "address": "2001::1:1/64", - "display": "2001::1:1/64", - "family": 6, - "id": 2 - } - ], - "name": "http", - "ports": [ - 80 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site_groups": [], - "sites": [ - "test-site" - ], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB01234567", - "asset_tag": "123456789" - }, - "test100-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "config_context": [ - {} - ], - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 1, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 2, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth2", - "enabled": true, - "id": 3, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth2", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth3", - "enabled": true, - "id": 4, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth3", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth4", - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth4", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - } - ], - "is_virtual": true, - "local_context_data": [ - null - ], - "locations": [], - "regions": [], - "services": [], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "test101-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "config_context": [ - {} - ], - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 7, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth2", - "enabled": true, - "id": 8, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth2", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth3", - "enabled": true, - "id": 9, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth3", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth4", - "enabled": true, - "id": 10, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth4", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - } - ], - "is_virtual": true, - "local_context_data": [ - null - ], - "locations": [], - "regions": [], - "services": [], - "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, - "local_context_data": [ - null - ], - "locations": [], - "regions": [], - "services": [], - "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, - "local_context_data": [ - null - ], - "locations": [], - "regions": [], - "services": [], - "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, - "local_context_data": [ - null - ], - "locations": [], - "regions": [], - "services": [], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - } - } - }, - "all": { - "children": [ - "cluster_Test_Cluster", - "cluster_Test_Cluster_2", - "cluster_group_test_cluster_group", - "cluster_type_test_cluster_type", - "device_roles_core_switch", - "device_types_cisco_test", - "device_types_nexus_parent", - "is_virtual", - "manufacturers_cisco", - "rack_role_test_rack_role", - "racks_Test_Rack", - "racks_Test_Rack_Site_2", - "region_other_region", - "region_parent_region", - "site_group_other_site_group", - "site_group_parent_site_group", - "sites_test_site2", - "status_active", - "ungrouped" - ] - }, - "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" - ] - }, - "sites_test_site2": { - "hosts": [ - "R1-Device" - ] - }, - "status_active": { - "hosts": [ - "R1-Device", - "Test Nexus One", - "Test VM With Spaces", - "TestDeviceR1", - "test100", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - } -} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/files/test-inventory-plurals.yml b/tests/integration/targets/inventory-v3.3/files/test-inventory-plurals.yml deleted file mode 100644 index 244231062..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory-plurals.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -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-v3.3/files/test-inventory.json b/tests/integration/targets/inventory-v3.3/files/test-inventory.json deleted file mode 100644 index 374fde8be..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory.json +++ /dev/null @@ -1,1248 +0,0 @@ -{ - "_meta": { - "hostvars": { - "R1-Device": { - "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", - "services": [], - "site": "test-site2", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "", - "asset_tag": "345678901" - }, - "Test Nexus One": { - "ansible_host": "172.16.180.12", - "config_context": {}, - "custom_fields": {}, - "device_type": "nexus-parent", - "dns_name": "nexus.example.com", - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "Ethernet1/1", - "duplex": null, - "enabled": true, - "id": 1, - "ip_addresses": [ - { - "address": "172.16.180.11/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.11/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 3, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet1/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus Child One", - "id": 5, - "name": "Test Nexus Child One" - }, - "display": "Ethernet2/1", - "duplex": null, - "enabled": true, - "id": 2, - "ip_addresses": [ - { - "address": "172.16.180.12/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.12/24", - "dns_name": "nexus.example.com", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 4, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "Ethernet2/1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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", - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "Test Nexus One", - "id": 4, - "name": "Test Nexus One" - }, - "display": "telnet (TCP/23)", - "id": 3, - "ipaddresses": [], - "name": "telnet", - "ports": [ - 23 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "" - }, - "Test VM With Spaces": { - "cluster": "Test Cluster 2", - "cluster_type": "test-cluster-type", - "config_context": {}, - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 11, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 12, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - }, - "vrf": null - } - ], - "is_virtual": true, - "locations": [], - "regions": [], - "services": [ - { - "custom_fields": {}, - "description": "", - "device": null, - "display": "ssh (TCP/22)", - "id": 4, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": { - "display": "Test VM With Spaces", - "id": 6, - "name": "Test VM With Spaces" - } - } - ], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "TestDeviceR1": { - "config_context": {}, - "custom_fields": {}, - "device_type": "cisco-test", - "interfaces": [], - "is_virtual": false, - "locations": [ - "test-rack-group", - "parent-rack-group" - ], - "manufacturer": "cisco", - "rack": "Test Rack", - "regions": [ - "test-region", - "parent-region" - ], - "role": "core-switch", - "services": [], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB12345678" - }, - "test100": { - "config_context": { - "ntp_servers": [ - "pool.ntp.org" - ] - }, - "custom_fields": {}, - "device_type": "cisco-test", - "interfaces": [ - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet1", - "duplex": null, - "enabled": true, - "id": 3, - "ip_addresses": [ - { - "address": "172.16.180.1/24", - "custom_fields": {}, - "description": "", - "display": "172.16.180.1/24", - "dns_name": "", - "family": { - "label": "IPv4", - "value": 4 - }, - "id": 1, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 1, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "GigabitEthernet2", - "duplex": null, - "enabled": true, - "id": 4, - "ip_addresses": [ - { - "address": "2001::1:1/64", - "custom_fields": {}, - "description": "", - "display": "2001::1:1/64", - "dns_name": "", - "family": { - "label": "IPv6", - "value": 6 - }, - "id": 2, - "nat_inside": null, - "nat_outside": [], - "role": null, - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "tenant": null, - "vrf": null - } - ], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "GigabitEthernet2", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "1000BASE-T (1GE)", - "value": "1000base-t" - }, - "untagged_vlan": null, - "vrf": null, - "wireless_lans": [], - "wireless_link": null, - "wwn": null - }, - { - "_occupied": false, - "bridge": null, - "cable": null, - "cable_end": "", - "connected_endpoints": null, - "connected_endpoints_reachable": null, - "connected_endpoints_type": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "wlink1", - "duplex": null, - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "label": "", - "lag": null, - "link_peers": [], - "link_peers_type": null, - "mac_address": null, - "mark_connected": false, - "mgmt_only": false, - "mode": null, - "module": null, - "mtu": null, - "name": "wlink1", - "parent": null, - "poe_mode": null, - "poe_type": null, - "rf_channel": null, - "rf_channel_frequency": null, - "rf_channel_width": null, - "rf_role": null, - "speed": null, - "tagged_vlans": [], - "tags": [], - "tx_power": null, - "type": { - "label": "IEEE 802.11a", - "value": "ieee802.11a" - }, - "untagged_vlan": null, - "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", - "services": [ - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "ssh (TCP/22)", - "id": 1, - "ipaddresses": [], - "name": "ssh", - "ports": [ - 22 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - }, - { - "custom_fields": {}, - "description": "", - "device": { - "display": "test100 (123456789)", - "id": 1, - "name": "test100" - }, - "display": "http (TCP/80)", - "id": 2, - "ipaddresses": [ - { - "address": "172.16.180.1/24", - "display": "172.16.180.1/24", - "family": 4, - "id": 1 - }, - { - "address": "2001::1:1/64", - "display": "2001::1:1/64", - "family": 6, - "id": 2 - } - ], - "name": "http", - "ports": [ - 80 - ], - "protocol": { - "label": "TCP", - "value": "tcp" - }, - "tags": [], - "virtual_machine": null - } - ], - "site": "test-site", - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [], - "serial": "FAB01234567", - "asset_tag": "123456789" - }, - "test100-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "config_context": {}, - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 1, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 2, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth2", - "enabled": true, - "id": 3, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth2", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth3", - "enabled": true, - "id": 4, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth3", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth4", - "enabled": true, - "id": 5, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth4", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test100-vm", - "id": 1, - "name": "test100-vm" - }, - "vrf": null - } - ], - "is_virtual": true, - "locations": [], - "regions": [], - "services": [], - "site_groups": [], - "status": { - "label": "Active", - "value": "active" - }, - "tags": [] - }, - "test101-vm": { - "cluster": "Test Cluster", - "cluster_group": "test-cluster-group", - "cluster_type": "test-cluster-type", - "config_context": {}, - "custom_fields": {}, - "interfaces": [ - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth0", - "enabled": true, - "id": 6, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth0", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth1", - "enabled": true, - "id": 7, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth1", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth2", - "enabled": true, - "id": 8, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth2", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth3", - "enabled": true, - "id": 9, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth3", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - }, - { - "bridge": null, - "count_fhrp_groups": 0, - "count_ipaddresses": 0, - "custom_fields": {}, - "description": "", - "display": "Eth4", - "enabled": true, - "id": 10, - "ip_addresses": [], - "l2vpn_termination": null, - "mac_address": null, - "mode": null, - "mtu": null, - "name": "Eth4", - "parent": null, - "tagged_vlans": [], - "tags": [], - "untagged_vlan": null, - "virtual_machine": { - "display": "test101-vm", - "id": 2, - "name": "test101-vm" - }, - "vrf": null - } - ], - "is_virtual": true, - "locations": [], - "regions": [], - "services": [], - "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": [], - "services": [], - "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": [], - "services": [], - "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": [ - "cluster_Test_Cluster", - "cluster_Test_Cluster_2", - "cluster_group_test_cluster_group", - "cluster_type_test_cluster_type", - "device_type_cisco_test", - "device_type_nexus_parent", - "is_virtual", - "manufacturer_cisco", - "rack_Test_Rack", - "rack_Test_Rack_Site_2", - "rack_role_test_rack_role", - "region_other_region", - "region_parent_region", - "role_core_switch", - "service_http", - "service_ssh", - "service_telnet", - "site_group_other_site_group", - "site_group_parent_site_group", - "site_test_site2", - "status_active", - "ungrouped" - ] - }, - "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": [ - "Test VM With Spaces", - "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" - ] - }, - "site_test_site2": { - "hosts": [ - "R1-Device" - ] - }, - "status_active": { - "hosts": [ - "R1-Device", - "Test Nexus One", - "Test VM With Spaces", - "TestDeviceR1", - "test100", - "test100-vm", - "test101-vm", - "test102-vm", - "test103-vm", - "test104-vm" - ] - } -} \ No newline at end of file diff --git a/tests/integration/targets/inventory-v3.3/files/test-inventory.yml b/tests/integration/targets/inventory-v3.3/files/test-inventory.yml deleted file mode 100644 index c88c96593..000000000 --- a/tests/integration/targets/inventory-v3.3/files/test-inventory.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -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 diff --git a/tests/integration/targets/inventory-v3.3/runme.sh b/tests/integration/targets/inventory-v3.3/runme.sh deleted file mode 100755 index 7c0d92737..000000000 --- a/tests/integration/targets/inventory-v3.3/runme.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/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.3" ]] -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-v3.3/runme_config.template b/tests/integration/targets/inventory-v3.3/runme_config.template deleted file mode 100644 index 80b42a326..000000000 --- a/tests/integration/targets/inventory-v3.3/runme_config.template +++ /dev/null @@ -1,6 +0,0 @@ -# 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-v3.3/tasks/main.yml b/tests/integration/targets/regression-v3.3/tasks/main.yml deleted file mode 100644 index 6041ab82b..000000000 --- a/tests/integration/targets/regression-v3.3/tasks/main.yml +++ /dev/null @@ -1,266 +0,0 @@ ---- -## -## -### 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 diff --git a/tests/integration/targets/v3.3/tasks/main.yml b/tests/integration/targets/v3.3/tasks/main.yml deleted file mode 100644 index e12680a30..000000000 --- a/tests/integration/targets/v3.3/tasks/main.yml +++ /dev/null @@ -1,290 +0,0 @@ ---- - -- 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: "netbox_tag.yml" - -- name: "NETBOX_ROUTE_TARGET_TESTS" - include_tasks: "netbox_route_target.yml" - -- 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 - -- 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_ASN TESTS" - include_tasks: "netbox_asn.yml" - -- name: "NETBOX_FHRP_GROUP TESTS" - include_tasks: "netbox_fhrp_group.yml" - -- 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 diff --git a/tests/integration/targets/v3.3/tasks/netbox_aggregate.yml b/tests/integration/targets/v3.3/tasks/netbox_aggregate.yml deleted file mode 100644 index 8fbd2b7dd..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_aggregate.yml +++ /dev/null @@ -1,115 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_asn.yml b/tests/integration/targets/v3.3/tasks/netbox_asn.yml deleted file mode 100644 index 346bafda9..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_asn.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_cable.yml b/tests/integration/targets/v3.3/tasks/netbox_cable.yml deleted file mode 100644 index 5728986c0..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_cable.yml +++ /dev/null @@ -1,193 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_circuit.yml b/tests/integration/targets/v3.3/tasks/netbox_circuit.yml deleted file mode 100644 index 1d8f1ec47..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_circuit.yml +++ /dev/null @@ -1,109 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_circuit_termination.yml b/tests/integration/targets/v3.3/tasks/netbox_circuit_termination.yml deleted file mode 100644 index a37cdc680..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_circuit_termination.yml +++ /dev/null @@ -1,129 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_circuit_type.yml b/tests/integration/targets/v3.3/tasks/netbox_circuit_type.yml deleted file mode 100644 index 45f956e34..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_circuit_type.yml +++ /dev/null @@ -1,96 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_cluster.yml b/tests/integration/targets/v3.3/tasks/netbox_cluster.yml deleted file mode 100644 index 11ba5ef82..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_cluster.yml +++ /dev/null @@ -1,98 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_cluster_group.yml b/tests/integration/targets/v3.3/tasks/netbox_cluster_group.yml deleted file mode 100644 index 9f84518ce..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_cluster_group.yml +++ /dev/null @@ -1,96 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_cluster_type.yml b/tests/integration/targets/v3.3/tasks/netbox_cluster_type.yml deleted file mode 100644 index 11c88206f..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_cluster_type.yml +++ /dev/null @@ -1,96 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_config_context.yml b/tests/integration/targets/v3.3/tasks/netbox_config_context.yml deleted file mode 100644 index 2353dfbfa..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_config_context.yml +++ /dev/null @@ -1,107 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_console_port.yml b/tests/integration/targets/v3.3/tasks/netbox_console_port.yml deleted file mode 100644 index 1c97cb8ad..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_console_port.yml +++ /dev/null @@ -1,108 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_console_port_template.yml b/tests/integration/targets/v3.3/tasks/netbox_console_port_template.yml deleted file mode 100644 index b1bd1d1e4..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_console_port_template.yml +++ /dev/null @@ -1,105 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_console_server_port.yml b/tests/integration/targets/v3.3/tasks/netbox_console_server_port.yml deleted file mode 100644 index f70345329..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_console_server_port.yml +++ /dev/null @@ -1,108 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_console_server_port_template.yml b/tests/integration/targets/v3.3/tasks/netbox_console_server_port_template.yml deleted file mode 100644 index 4ad47d40a..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_console_server_port_template.yml +++ /dev/null @@ -1,105 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_contact.yml b/tests/integration/targets/v3.3/tasks/netbox_contact.yml deleted file mode 100644 index feb9f7e9f..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_contact.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_contact_role.yml b/tests/integration/targets/v3.3/tasks/netbox_contact_role.yml deleted file mode 100644 index fb875748e..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_contact_role.yml +++ /dev/null @@ -1,94 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_custom_field.yml b/tests/integration/targets/v3.3/tasks/netbox_custom_field.yml deleted file mode 100644 index 0db0b5e1a..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_custom_field.yml +++ /dev/null @@ -1,108 +0,0 @@ ---- -## -## -### 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" diff --git a/tests/integration/targets/v3.3/tasks/netbox_custom_link.yml b/tests/integration/targets/v3.3/tasks/netbox_custom_link.yml deleted file mode 100644 index 4a7b8d84a..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_custom_link.yml +++ /dev/null @@ -1,108 +0,0 @@ ---- -## -## -### 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_type: "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_type'] == "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_type: "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_type: "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_type: "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_type'] == "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_type: "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/v3.3/tasks/netbox_device.yml b/tests/integration/targets/v3.3/tasks/netbox_device.yml deleted file mode 100644 index badf1c9f1..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_device.yml +++ /dev/null @@ -1,243 +0,0 @@ ---- -## -## -### 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']['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']['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']['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']['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 - 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']['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']['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']['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/v3.3/tasks/netbox_device_bay.yml b/tests/integration/targets/v3.3/tasks/netbox_device_bay.yml deleted file mode 100644 index 18a804354..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_device_bay.yml +++ /dev/null @@ -1,87 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_device_bay_template.yml b/tests/integration/targets/v3.3/tasks/netbox_device_bay_template.yml deleted file mode 100644 index 4b6965033..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_device_bay_template.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_device_interface.yml b/tests/integration/targets/v3.3/tasks/netbox_device_interface.yml deleted file mode 100644 index d8e187d65..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_device_interface.yml +++ /dev/null @@ -1,313 +0,0 @@ ---- -## -## -### 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'] == 10 - - 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" - 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" - 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/v3.3/tasks/netbox_device_interface_template.yml b/tests/integration/targets/v3.3/tasks/netbox_device_interface_template.yml deleted file mode 100644 index b6e98914f..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_device_interface_template.yml +++ /dev/null @@ -1,109 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_device_role.yml b/tests/integration/targets/v3.3/tasks/netbox_device_role.yml deleted file mode 100644 index 64ec9840f..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_device_role.yml +++ /dev/null @@ -1,101 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_device_type.yml b/tests/integration/targets/v3.3/tasks/netbox_device_type.yml deleted file mode 100644 index 098c75d27..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_device_type.yml +++ /dev/null @@ -1,132 +0,0 @@ ---- -## -## -### 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 - 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/v3.3/tasks/netbox_export_template.yml b/tests/integration/targets/v3.3/tasks/netbox_export_template.yml deleted file mode 100644 index e7419b9bd..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_export_template.yml +++ /dev/null @@ -1,113 +0,0 @@ ---- -## -## -### 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_type: "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_type'] == "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_type: "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_type: "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_type: "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_type'] == "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_type: "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/v3.3/tasks/netbox_fhrp_group.yml b/tests/integration/targets/v3.3/tasks/netbox_fhrp_group.yml deleted file mode 100644 index 91788ef02..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_fhrp_group.yml +++ /dev/null @@ -1,91 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_fhrp_group_assignment.yml b/tests/integration/targets/v3.3/tasks/netbox_fhrp_group_assignment.yml deleted file mode 100644 index 27f20c293..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_fhrp_group_assignment.yml +++ /dev/null @@ -1,92 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_front_port.yml b/tests/integration/targets/v3.3/tasks/netbox_front_port.yml deleted file mode 100644 index 1f4c60a4d..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_front_port.yml +++ /dev/null @@ -1,150 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_front_port_template.yml b/tests/integration/targets/v3.3/tasks/netbox_front_port_template.yml deleted file mode 100644 index 30e907100..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_front_port_template.yml +++ /dev/null @@ -1,147 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_inventory_item.yml b/tests/integration/targets/v3.3/tasks/netbox_inventory_item.yml deleted file mode 100644 index cc038ac94..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_inventory_item.yml +++ /dev/null @@ -1,203 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_inventory_item_role.yml b/tests/integration/targets/v3.3/tasks/netbox_inventory_item_role.yml deleted file mode 100644 index 1c2de3f03..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_inventory_item_role.yml +++ /dev/null @@ -1,98 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_ip_address.yml b/tests/integration/targets/v3.3/tasks/netbox_ip_address.yml deleted file mode 100644 index 3cda56d3c..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_ip_address.yml +++ /dev/null @@ -1,350 +0,0 @@ ---- -## -## -### 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" - -- 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 - -- 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/v3.3/tasks/netbox_ipam_role.yml b/tests/integration/targets/v3.3/tasks/netbox_ipam_role.yml deleted file mode 100644 index 1f1ff0f36..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_ipam_role.yml +++ /dev/null @@ -1,94 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_l2vpn.yml b/tests/integration/targets/v3.3/tasks/netbox_l2vpn.yml deleted file mode 100644 index 292badb93..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_l2vpn.yml +++ /dev/null @@ -1,99 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_l2vpn_termination.yml b/tests/integration/targets/v3.3/tasks/netbox_l2vpn_termination.yml deleted file mode 100644 index a4560f407..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_l2vpn_termination.yml +++ /dev/null @@ -1,94 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_location.yml b/tests/integration/targets/v3.3/tasks/netbox_location.yml deleted file mode 100644 index f2f7bb9db..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_location.yml +++ /dev/null @@ -1,85 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_lookup.yml b/tests/integration/targets/v3.3/tasks/netbox_lookup.yml deleted file mode 100644 index d3d99c181..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_lookup.yml +++ /dev/null @@ -1,82 +0,0 @@ ---- -## -## -### NETBOX_LOOKUP -## -## -- name: "NETBOX_LOOKUP 1: Lookup returns exactly two sites" - assert: - that: "{{ query_result|count }} == 3" - vars: - query_result: "{{ query('netbox.netbox.nb_lookup', 'sites', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" - -- name: "NETBOX_LOOKUP 2: Query doesn't return Wibble (sanity check json_query)" - assert: - that: "{{ query_result|community.general.json_query('[?value.display==`Wibble`]')|count }} == 0" - vars: - query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" - -- name: "NETBOX_LOOKUP 3: Device query returns exactly one TestDeviceR1" - assert: - that: "{{ query_result|community.general.json_query('[?value.display==`TestDeviceR1`]')|count }} == 1" - vars: - query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" - -- name: "NETBOX_LOOKUP 4: VLAN ID 400 can be queried and is named 'Test VLAN'" - assert: - that: "{{ (query_result|community.general.json_query('[?value.vid==`400`].value.name'))[0] == 'Test VLAN' }}" - vars: - query_result: "{{ query('netbox.netbox.nb_lookup', 'vlans', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" - -- 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|community.general.json_query('[?value.display==`L2`]')|count }} == 1" - vars: - query_result: "{{ query('netbox.netbox.nb_lookup', 'devices', api_filter='role=core-switch tag=lookup', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" - -- name: "NETBOX_LOOKUP 8: Device query specifying raw data returns payload without key/value dict" - assert: - that: "{{ query_result|community.general.json_query('[?display==`L2`]')|count }} == 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) }}" - -- name: "NETBOX_LOOKUP 9: Device query specifying multiple sites, Make sure L1 and L2 are in the results" - assert: - that: - - "'L1' in {{ query_result |community.general.json_query('[*].display') }}" - - "'L2' in {{ query_result |community.general.json_query('[*].display') }}" - 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) }}" - -- name: "NETBOX_LOOKUP 10: Device query by ID" - assert: - that: - - "{{ query('netbox.netbox.nb_lookup', 'devices', api_filter='id=1', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" diff --git a/tests/integration/targets/v3.3/tasks/netbox_manufacturer.yml b/tests/integration/targets/v3.3/tasks/netbox_manufacturer.yml deleted file mode 100644 index 4dd1907eb..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_manufacturer.yml +++ /dev/null @@ -1,91 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_module_type.yml b/tests/integration/targets/v3.3/tasks/netbox_module_type.yml deleted file mode 100644 index e1d51c4cb..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_module_type.yml +++ /dev/null @@ -1,97 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_platform.yml b/tests/integration/targets/v3.3/tasks/netbox_platform.yml deleted file mode 100644 index 95ccdb4cf..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_platform.yml +++ /dev/null @@ -1,99 +0,0 @@ ---- -## -## -### 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 - napalm_driver: ios - napalm_args: - global_delay_factor: 2 - state: present - register: test_three - -- name: "PLATFORM 3: ASSERT - Update" - assert: - that: - - test_three is changed - - test_three['diff']['after']['manufacturer'] == 3 - - test_three['diff']['after']['napalm_args']['global_delay_factor'] == 2 - - test_three['diff']['after']['napalm_driver'] == "ios" - - test_three['platform']['manufacturer'] == 3 - - test_three['platform']['napalm_args']['global_delay_factor'] == 2 - - test_three['platform']['napalm_driver'] == "ios" - - 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/v3.3/tasks/netbox_power_feed.yml b/tests/integration/targets/v3.3/tasks/netbox_power_feed.yml deleted file mode 100644 index a02fd9129..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_power_feed.yml +++ /dev/null @@ -1,127 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_power_outlet.yml b/tests/integration/targets/v3.3/tasks/netbox_power_outlet.yml deleted file mode 100644 index c7b5f7d3d..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_power_outlet.yml +++ /dev/null @@ -1,114 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_power_outlet_template.yml b/tests/integration/targets/v3.3/tasks/netbox_power_outlet_template.yml deleted file mode 100644 index 96f283486..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_power_outlet_template.yml +++ /dev/null @@ -1,111 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_power_panel.yml b/tests/integration/targets/v3.3/tasks/netbox_power_panel.yml deleted file mode 100644 index 082a6b375..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_power_panel.yml +++ /dev/null @@ -1,105 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_power_port.yml b/tests/integration/targets/v3.3/tasks/netbox_power_port.yml deleted file mode 100644 index b6368bd92..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_power_port.yml +++ /dev/null @@ -1,125 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_power_port_template.yml b/tests/integration/targets/v3.3/tasks/netbox_power_port_template.yml deleted file mode 100644 index 9e7547fd9..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_power_port_template.yml +++ /dev/null @@ -1,120 +0,0 @@ ---- -# © 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: Create device type for testing power ports" - 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 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" diff --git a/tests/integration/targets/v3.3/tasks/netbox_prefix.yml b/tests/integration/targets/v3.3/tasks/netbox_prefix.yml deleted file mode 100644 index 59ed336ad..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_prefix.yml +++ /dev/null @@ -1,245 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_provider.yml b/tests/integration/targets/v3.3/tasks/netbox_provider.yml deleted file mode 100644 index fd9b8d35f..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_provider.yml +++ /dev/null @@ -1,99 +0,0 @@ ---- -## -## -### 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 - asn: 65001 - account: "200129104" - portal_url: http://provider.net - noc_contact: noc@provider.net - admin_contact: admin@provider.net - comments: "BAD PROVIDER" - state: present - register: test_three - -- name: "NETBOX_PROVIDER 3: ASSERT - Updated" - assert: - that: - - test_three is changed - - test_three['diff']['after']['asn'] == 65001 - - test_three['diff']['after']['account'] == "200129104" - - test_three['diff']['after']['portal_url'] == "http://provider.net" - - test_three['diff']['after']['noc_contact'] == "noc@provider.net" - - test_three['diff']['after']['admin_contact'] == "admin@provider.net" - - test_three['diff']['after']['comments'] == "BAD PROVIDER" - - test_three['provider']['name'] == "Test Provider One" - - test_three['provider']['slug'] == "test-provider-one" - - test_three['provider']['asn'] == 65001 - - test_three['provider']['account'] == "200129104" - - test_three['provider']['portal_url'] == "http://provider.net" - - test_three['provider']['noc_contact'] == "noc@provider.net" - - test_three['provider']['admin_contact'] == "admin@provider.net" - - 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']['asn'] == 65001 - - test_four['provider']['account'] == "200129104" - - test_four['provider']['portal_url'] == "http://provider.net" - - test_four['provider']['noc_contact'] == "noc@provider.net" - - test_four['provider']['admin_contact'] == "admin@provider.net" - - test_four['provider']['comments'] == "BAD PROVIDER" - - test_four['msg'] == "provider Test Provider One deleted" diff --git a/tests/integration/targets/v3.3/tasks/netbox_provider_network.yml b/tests/integration/targets/v3.3/tasks/netbox_provider_network.yml deleted file mode 100644 index bf7d4bf97..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_provider_network.yml +++ /dev/null @@ -1,83 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_rack.yml b/tests/integration/targets/v3.3/tasks/netbox_rack.yml deleted file mode 100644 index 8b96c56c1..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_rack.yml +++ /dev/null @@ -1,226 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_rack_group.yml b/tests/integration/targets/v3.3/tasks/netbox_rack_group.yml deleted file mode 100644 index 6a10cbf94..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_rack_group.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_rack_role.yml b/tests/integration/targets/v3.3/tasks/netbox_rack_role.yml deleted file mode 100644 index 5ca9e44eb..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_rack_role.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_rear_port.yml b/tests/integration/targets/v3.3/tasks/netbox_rear_port.yml deleted file mode 100644 index 10eb23098..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_rear_port.yml +++ /dev/null @@ -1,139 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_rear_port_template.yml b/tests/integration/targets/v3.3/tasks/netbox_rear_port_template.yml deleted file mode 100644 index ca867619a..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_rear_port_template.yml +++ /dev/null @@ -1,136 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_region.yml b/tests/integration/targets/v3.3/tasks/netbox_region.yml deleted file mode 100644 index 1359598af..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_region.yml +++ /dev/null @@ -1,79 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_rir.yml b/tests/integration/targets/v3.3/tasks/netbox_rir.yml deleted file mode 100644 index cc4935938..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_rir.yml +++ /dev/null @@ -1,79 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_route_target.yml b/tests/integration/targets/v3.3/tasks/netbox_route_target.yml deleted file mode 100644 index 354978dc2..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_route_target.yml +++ /dev/null @@ -1,204 +0,0 @@ ---- -# -# 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/v3.3/tasks/netbox_service.yml b/tests/integration/targets/v3.3/tasks/netbox_service.yml deleted file mode 100644 index 09a993c3d..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_service.yml +++ /dev/null @@ -1,196 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_site.yml b/tests/integration/targets/v3.3/tasks/netbox_site.yml deleted file mode 100644 index 6960eeb3d..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_site.yml +++ /dev/null @@ -1,165 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_site_group.yml b/tests/integration/targets/v3.3/tasks/netbox_site_group.yml deleted file mode 100644 index 09e2df4c6..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_site_group.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_tag.yml b/tests/integration/targets/v3.3/tasks/netbox_tag.yml deleted file mode 100644 index 38c4157c2..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_tag.yml +++ /dev/null @@ -1,110 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_tenant.yml b/tests/integration/targets/v3.3/tasks/netbox_tenant.yml deleted file mode 100644 index 7c9af8b9f..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_tenant.yml +++ /dev/null @@ -1,106 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_tenant_group.yml b/tests/integration/targets/v3.3/tasks/netbox_tenant_group.yml deleted file mode 100644 index 47ad78431..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_tenant_group.yml +++ /dev/null @@ -1,129 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_virtual_chassis.yml b/tests/integration/targets/v3.3/tasks/netbox_virtual_chassis.yml deleted file mode 100644 index 04ada8411..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_virtual_chassis.yml +++ /dev/null @@ -1,131 +0,0 @@ ---- -# © 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/v3.3/tasks/netbox_virtual_machine.yml b/tests/integration/targets/v3.3/tasks/netbox_virtual_machine.yml deleted file mode 100644 index 79d3882bc..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_virtual_machine.yml +++ /dev/null @@ -1,128 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_vlan.yml b/tests/integration/targets/v3.3/tasks/netbox_vlan.yml deleted file mode 100644 index d95abbeca..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_vlan.yml +++ /dev/null @@ -1,193 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_vlan_group.yml b/tests/integration/targets/v3.3/tasks/netbox_vlan_group.yml deleted file mode 100644 index 2be4fd3df..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_vlan_group.yml +++ /dev/null @@ -1,314 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_vm_interface.yml b/tests/integration/targets/v3.3/tasks/netbox_vm_interface.yml deleted file mode 100644 index 799d04b16..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_vm_interface.yml +++ /dev/null @@ -1,159 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_vrf.yml b/tests/integration/targets/v3.3/tasks/netbox_vrf.yml deleted file mode 100644 index abf9bab0e..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_vrf.yml +++ /dev/null @@ -1,137 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_webhook.yml b/tests/integration/targets/v3.3/tasks/netbox_webhook.yml deleted file mode 100644 index f2f5d517e..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_webhook.yml +++ /dev/null @@ -1,121 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_wireless_lan.yml b/tests/integration/targets/v3.3/tasks/netbox_wireless_lan.yml deleted file mode 100644 index e59af42ee..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_wireless_lan.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_wireless_lan_group.yml b/tests/integration/targets/v3.3/tasks/netbox_wireless_lan_group.yml deleted file mode 100644 index 51ae3a74f..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_wireless_lan_group.yml +++ /dev/null @@ -1,97 +0,0 @@ ---- -## -## -### 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/v3.3/tasks/netbox_wireless_link.yml b/tests/integration/targets/v3.3/tasks/netbox_wireless_link.yml deleted file mode 100644 index baa4574d1..000000000 --- a/tests/integration/targets/v3.3/tasks/netbox_wireless_link.yml +++ /dev/null @@ -1,130 +0,0 @@ ---- -## -## -### 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" From 843a899264d3ccf9d7051fb4fc8e8c1868260153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20R=C3=B8dvand?= Date: Thu, 2 Nov 2023 19:47:18 +0100 Subject: [PATCH 2/5] Remove 3.3 tests from workflow --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 13dfe7f59..b5a22f0f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,9 +75,7 @@ jobs: strategy: fail-fast: false matrix: - include: - - VERSION: "v3.3" - NETBOX_DOCKER_VERSION: 2.3.0 + include: - VERSION: "v3.4" NETBOX_DOCKER_VERSION: 2.5.3 - VERSION: "v3.5" From d749bb37029ecae8191058733dbe747f0fc9c0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20R=C3=B8dvand?= Date: Thu, 2 Nov 2023 19:49:12 +0100 Subject: [PATCH 3/5] Add 3.12 to test --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b5a22f0f6..822652b97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: From 6608d3a14f54b99411a745616b872c6ebb33ae16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20R=C3=B8dvand?= Date: Thu, 2 Nov 2023 19:51:31 +0100 Subject: [PATCH 4/5] Lint --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 822652b97..1c436d9a2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - include: + include: - VERSION: "v3.4" NETBOX_DOCKER_VERSION: 2.5.3 - VERSION: "v3.5" From 8b2676600fbc3615c22b9a7a694a27ff9b64a149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20R=C3=B8dvand?= Date: Thu, 2 Nov 2023 20:06:00 +0100 Subject: [PATCH 5/5] Poetry update --- .github/workflows/main.yml | 4 +- poetry.lock | 302 ++++++++++++++++++------------------- 2 files changed, 153 insertions(+), 153 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c436d9a2..fccb40655 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11"] steps: @@ -107,7 +107,7 @@ jobs: python-version: ${{ env.python-version }} - name: Install and configure Poetry - uses: snok/install-poetry@v1.3.3 + uses: snok/install-poetry@v1.3.4 with: virtualenvs-create: false diff --git a/poetry.lock b/poetry.lock index 5b2a42840..324a17514 100644 --- a/poetry.lock +++ b/poetry.lock @@ -296,29 +296,29 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte [[package]] name = "black" -version = "23.10.0" +version = "23.10.1" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" files = [ - {file = "black-23.10.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:f8dc7d50d94063cdfd13c82368afd8588bac4ce360e4224ac399e769d6704e98"}, - {file = "black-23.10.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:f20ff03f3fdd2fd4460b4f631663813e57dc277e37fb216463f3b907aa5a9bdd"}, - {file = "black-23.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3d9129ce05b0829730323bdcb00f928a448a124af5acf90aa94d9aba6969604"}, - {file = "black-23.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:960c21555be135c4b37b7018d63d6248bdae8514e5c55b71e994ad37407f45b8"}, - {file = "black-23.10.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:30b78ac9b54cf87bcb9910ee3d499d2bc893afd52495066c49d9ee6b21eee06e"}, - {file = "black-23.10.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:0e232f24a337fed7a82c1185ae46c56c4a6167fb0fe37411b43e876892c76699"}, - {file = "black-23.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31946ec6f9c54ed7ba431c38bc81d758970dd734b96b8e8c2b17a367d7908171"}, - {file = "black-23.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:c870bee76ad5f7a5ea7bd01dc646028d05568d33b0b09b7ecfc8ec0da3f3f39c"}, - {file = "black-23.10.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:6901631b937acbee93c75537e74f69463adaf34379a04eef32425b88aca88a23"}, - {file = "black-23.10.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:481167c60cd3e6b1cb8ef2aac0f76165843a374346aeeaa9d86765fe0dd0318b"}, - {file = "black-23.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f74892b4b836e5162aa0452393112a574dac85e13902c57dfbaaf388e4eda37c"}, - {file = "black-23.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:47c4510f70ec2e8f9135ba490811c071419c115e46f143e4dce2ac45afdcf4c9"}, - {file = "black-23.10.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:76baba9281e5e5b230c9b7f83a96daf67a95e919c2dfc240d9e6295eab7b9204"}, - {file = "black-23.10.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:a3c2ddb35f71976a4cfeca558848c2f2f89abc86b06e8dd89b5a65c1e6c0f22a"}, - {file = "black-23.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db451a3363b1e765c172c3fd86213a4ce63fb8524c938ebd82919bf2a6e28c6a"}, - {file = "black-23.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:7fb5fc36bb65160df21498d5a3dd330af8b6401be3f25af60c6ebfe23753f747"}, - {file = "black-23.10.0-py3-none-any.whl", hash = "sha256:e223b731a0e025f8ef427dd79d8cd69c167da807f5710add30cdf131f13dd62e"}, - {file = "black-23.10.0.tar.gz", hash = "sha256:31b9f87b277a68d0e99d2905edae08807c007973eaa609da5f0c62def6b7c0bd"}, + {file = "black-23.10.1-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:ec3f8e6234c4e46ff9e16d9ae96f4ef69fa328bb4ad08198c8cee45bb1f08c69"}, + {file = "black-23.10.1-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:1b917a2aa020ca600483a7b340c165970b26e9029067f019e3755b56e8dd5916"}, + {file = "black-23.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c74de4c77b849e6359c6f01987e94873c707098322b91490d24296f66d067dc"}, + {file = "black-23.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:7b4d10b0f016616a0d93d24a448100adf1699712fb7a4efd0e2c32bbb219b173"}, + {file = "black-23.10.1-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:b15b75fc53a2fbcac8a87d3e20f69874d161beef13954747e053bca7a1ce53a0"}, + {file = "black-23.10.1-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:e293e4c2f4a992b980032bbd62df07c1bcff82d6964d6c9496f2cd726e246ace"}, + {file = "black-23.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d56124b7a61d092cb52cce34182a5280e160e6aff3137172a68c2c2c4b76bcb"}, + {file = "black-23.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:3f157a8945a7b2d424da3335f7ace89c14a3b0625e6593d21139c2d8214d55ce"}, + {file = "black-23.10.1-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:cfcce6f0a384d0da692119f2d72d79ed07c7159879d0bb1bb32d2e443382bf3a"}, + {file = "black-23.10.1-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:33d40f5b06be80c1bbce17b173cda17994fbad096ce60eb22054da021bf933d1"}, + {file = "black-23.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:840015166dbdfbc47992871325799fd2dc0dcf9395e401ada6d88fe11498abad"}, + {file = "black-23.10.1-cp38-cp38-win_amd64.whl", hash = "sha256:037e9b4664cafda5f025a1728c50a9e9aedb99a759c89f760bd83730e76ba884"}, + {file = "black-23.10.1-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:7cb5936e686e782fddb1c73f8aa6f459e1ad38a6a7b0e54b403f1f05a1507ee9"}, + {file = "black-23.10.1-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:7670242e90dc129c539e9ca17665e39a146a761e681805c54fbd86015c7c84f7"}, + {file = "black-23.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ed45ac9a613fb52dad3b61c8dea2ec9510bf3108d4db88422bacc7d1ba1243d"}, + {file = "black-23.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:6d23d7822140e3fef190734216cefb262521789367fbdc0b3f22af6744058982"}, + {file = "black-23.10.1-py3-none-any.whl", hash = "sha256:d431e6739f727bb2e0495df64a6c7a5310758e87505f5f8cde9ff6c0f2d7e4fe"}, + {file = "black-23.10.1.tar.gz", hash = "sha256:1f8ce316753428ff68749c65a5f7844631aa18c8679dfd3ca9dc1a289979c258"}, ] [package.dependencies] @@ -437,101 +437,101 @@ pycparser = "*" [[package]] name = "charset-normalizer" -version = "3.3.0" +version = "3.3.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7.0" files = [ - {file = "charset-normalizer-3.3.0.tar.gz", hash = "sha256:63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:effe5406c9bd748a871dbcaf3ac69167c38d72db8c9baf3ff954c344f31c4cbe"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4162918ef3098851fcd8a628bf9b6a98d10c380725df9e04caf5ca6dd48c847a"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0570d21da019941634a531444364f2482e8db0b3425fcd5ac0c36565a64142c8"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5707a746c6083a3a74b46b3a631d78d129edab06195a92a8ece755aac25a3f3d"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:278c296c6f96fa686d74eb449ea1697f3c03dc28b75f873b65b5201806346a69"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a4b71f4d1765639372a3b32d2638197f5cd5221b19531f9245fcc9ee62d38f56"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5969baeaea61c97efa706b9b107dcba02784b1601c74ac84f2a532ea079403e"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3f93dab657839dfa61025056606600a11d0b696d79386f974e459a3fbc568ec"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:db756e48f9c5c607b5e33dd36b1d5872d0422e960145b08ab0ec7fd420e9d649"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:232ac332403e37e4a03d209a3f92ed9071f7d3dbda70e2a5e9cff1c4ba9f0678"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e5c1502d4ace69a179305abb3f0bb6141cbe4714bc9b31d427329a95acfc8bdd"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:2502dd2a736c879c0f0d3e2161e74d9907231e25d35794584b1ca5284e43f596"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23e8565ab7ff33218530bc817922fae827420f143479b753104ab801145b1d5b"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-win32.whl", hash = "sha256:1872d01ac8c618a8da634e232f24793883d6e456a66593135aeafe3784b0848d"}, - {file = "charset_normalizer-3.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:557b21a44ceac6c6b9773bc65aa1b4cc3e248a5ad2f5b914b91579a32e22204d"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d7eff0f27edc5afa9e405f7165f85a6d782d308f3b6b9d96016c010597958e63"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6a685067d05e46641d5d1623d7c7fdf15a357546cbb2f71b0ebde91b175ffc3e"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0d3d5b7db9ed8a2b11a774db2bbea7ba1884430a205dbd54a32d61d7c2a190fa"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2935ffc78db9645cb2086c2f8f4cfd23d9b73cc0dc80334bc30aac6f03f68f8c"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fe359b2e3a7729010060fbca442ca225280c16e923b37db0e955ac2a2b72a05"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:380c4bde80bce25c6e4f77b19386f5ec9db230df9f2f2ac1e5ad7af2caa70459"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0d1e3732768fecb052d90d62b220af62ead5748ac51ef61e7b32c266cac9293"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1b2919306936ac6efb3aed1fbf81039f7087ddadb3160882a57ee2ff74fd2382"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f8888e31e3a85943743f8fc15e71536bda1c81d5aa36d014a3c0c44481d7db6e"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:82eb849f085624f6a607538ee7b83a6d8126df6d2f7d3b319cb837b289123078"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7b8b8bf1189b3ba9b8de5c8db4d541b406611a71a955bbbd7385bbc45fcb786c"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5adf257bd58c1b8632046bbe43ee38c04e1038e9d37de9c57a94d6bd6ce5da34"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c350354efb159b8767a6244c166f66e67506e06c8924ed74669b2c70bc8735b1"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-win32.whl", hash = "sha256:02af06682e3590ab952599fbadac535ede5d60d78848e555aa58d0c0abbde786"}, - {file = "charset_normalizer-3.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:86d1f65ac145e2c9ed71d8ffb1905e9bba3a91ae29ba55b4c46ae6fc31d7c0d4"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:3b447982ad46348c02cb90d230b75ac34e9886273df3a93eec0539308a6296d7"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:abf0d9f45ea5fb95051c8bfe43cb40cda383772f7e5023a83cc481ca2604d74e"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b09719a17a2301178fac4470d54b1680b18a5048b481cb8890e1ef820cb80455"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b3d9b48ee6e3967b7901c052b670c7dda6deb812c309439adaffdec55c6d7b78"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:edfe077ab09442d4ef3c52cb1f9dab89bff02f4524afc0acf2d46be17dc479f5"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3debd1150027933210c2fc321527c2299118aa929c2f5a0a80ab6953e3bd1908"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86f63face3a527284f7bb8a9d4f78988e3c06823f7bea2bd6f0e0e9298ca0403"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24817cb02cbef7cd499f7c9a2735286b4782bd47a5b3516a0e84c50eab44b98e"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c71f16da1ed8949774ef79f4a0260d28b83b3a50c6576f8f4f0288d109777989"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:9cf3126b85822c4e53aa28c7ec9869b924d6fcfb76e77a45c44b83d91afd74f9"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:b3b2316b25644b23b54a6f6401074cebcecd1244c0b8e80111c9a3f1c8e83d65"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:03680bb39035fbcffe828eae9c3f8afc0428c91d38e7d61aa992ef7a59fb120e"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4cc152c5dd831641e995764f9f0b6589519f6f5123258ccaca8c6d34572fefa8"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-win32.whl", hash = "sha256:b8f3307af845803fb0b060ab76cf6dd3a13adc15b6b451f54281d25911eb92df"}, - {file = "charset_normalizer-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:8eaf82f0eccd1505cf39a45a6bd0a8cf1c70dcfc30dba338207a969d91b965c0"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dc45229747b67ffc441b3de2f3ae5e62877a282ea828a5bdb67883c4ee4a8810"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f4a0033ce9a76e391542c182f0d48d084855b5fcba5010f707c8e8c34663d77"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ada214c6fa40f8d800e575de6b91a40d0548139e5dc457d2ebb61470abf50186"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b1121de0e9d6e6ca08289583d7491e7fcb18a439305b34a30b20d8215922d43c"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1063da2c85b95f2d1a430f1c33b55c9c17ffaf5e612e10aeaad641c55a9e2b9d"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70f1d09c0d7748b73290b29219e854b3207aea922f839437870d8cc2168e31cc"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:250c9eb0f4600361dd80d46112213dff2286231d92d3e52af1e5a6083d10cad9"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:750b446b2ffce1739e8578576092179160f6d26bd5e23eb1789c4d64d5af7dc7"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:fc52b79d83a3fe3a360902d3f5d79073a993597d48114c29485e9431092905d8"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:588245972aca710b5b68802c8cad9edaa98589b1b42ad2b53accd6910dad3545"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e39c7eb31e3f5b1f88caff88bcff1b7f8334975b46f6ac6e9fc725d829bc35d4"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-win32.whl", hash = "sha256:abecce40dfebbfa6abf8e324e1860092eeca6f7375c8c4e655a8afb61af58f2c"}, - {file = "charset_normalizer-3.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:24a91a981f185721542a0b7c92e9054b7ab4fea0508a795846bc5b0abf8118d4"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:67b8cc9574bb518ec76dc8e705d4c39ae78bb96237cb533edac149352c1f39fe"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ac71b2977fb90c35d41c9453116e283fac47bb9096ad917b8819ca8b943abecd"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3ae38d325b512f63f8da31f826e6cb6c367336f95e418137286ba362925c877e"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:542da1178c1c6af8873e143910e2269add130a299c9106eef2594e15dae5e482"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:30a85aed0b864ac88309b7d94be09f6046c834ef60762a8833b660139cfbad13"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aae32c93e0f64469f74ccc730a7cb21c7610af3a775157e50bbd38f816536b38"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15b26ddf78d57f1d143bdf32e820fd8935d36abe8a25eb9ec0b5a71c82eb3895"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f5d10bae5d78e4551b7be7a9b29643a95aded9d0f602aa2ba584f0388e7a557"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:249c6470a2b60935bafd1d1d13cd613f8cd8388d53461c67397ee6a0f5dce741"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c5a74c359b2d47d26cdbbc7845e9662d6b08a1e915eb015d044729e92e7050b7"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:b5bcf60a228acae568e9911f410f9d9e0d43197d030ae5799e20dca8df588287"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:187d18082694a29005ba2944c882344b6748d5be69e3a89bf3cc9d878e548d5a"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:81bf654678e575403736b85ba3a7867e31c2c30a69bc57fe88e3ace52fb17b89"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-win32.whl", hash = "sha256:85a32721ddde63c9df9ebb0d2045b9691d9750cb139c161c80e500d210f5e26e"}, - {file = "charset_normalizer-3.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:468d2a840567b13a590e67dd276c570f8de00ed767ecc611994c301d0f8c014f"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e0fc42822278451bc13a2e8626cf2218ba570f27856b536e00cfa53099724828"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:09c77f964f351a7369cc343911e0df63e762e42bac24cd7d18525961c81754f4"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:12ebea541c44fdc88ccb794a13fe861cc5e35d64ed689513a5c03d05b53b7c82"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:805dfea4ca10411a5296bcc75638017215a93ffb584c9e344731eef0dcfb026a"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96c2b49eb6a72c0e4991d62406e365d87067ca14c1a729a870d22354e6f68115"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aaf7b34c5bc56b38c931a54f7952f1ff0ae77a2e82496583b247f7c969eb1479"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:619d1c96099be5823db34fe89e2582b336b5b074a7f47f819d6b3a57ff7bdb86"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0ac5e7015a5920cfce654c06618ec40c33e12801711da6b4258af59a8eff00a"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:93aa7eef6ee71c629b51ef873991d6911b906d7312c6e8e99790c0f33c576f89"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7966951325782121e67c81299a031f4c115615e68046f79b85856b86ebffc4cd"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:02673e456dc5ab13659f85196c534dc596d4ef260e4d86e856c3b2773ce09843"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:c2af80fb58f0f24b3f3adcb9148e6203fa67dd3f61c4af146ecad033024dde43"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:153e7b6e724761741e0974fc4dcd406d35ba70b92bfe3fedcb497226c93b9da7"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-win32.whl", hash = "sha256:d47ecf253780c90ee181d4d871cd655a789da937454045b17b5798da9393901a"}, - {file = "charset_normalizer-3.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:d97d85fa63f315a8bdaba2af9a6a686e0eceab77b3089af45133252618e70884"}, - {file = "charset_normalizer-3.3.0-py3-none-any.whl", hash = "sha256:e46cd37076971c1040fc8c41273a8b3e2c624ce4f2be3f5dfcb7a430c1d3acc2"}, + {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, + {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, ] [[package]] @@ -652,34 +652,34 @@ toml = ["tomli"] [[package]] name = "cryptography" -version = "41.0.4" +version = "41.0.5" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" files = [ - {file = "cryptography-41.0.4-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:80907d3faa55dc5434a16579952ac6da800935cd98d14dbd62f6f042c7f5e839"}, - {file = "cryptography-41.0.4-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:35c00f637cd0b9d5b6c6bd11b6c3359194a8eba9c46d4e875a3660e3b400005f"}, - {file = "cryptography-41.0.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cecfefa17042941f94ab54f769c8ce0fe14beff2694e9ac684176a2535bf9714"}, - {file = "cryptography-41.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e40211b4923ba5a6dc9769eab704bdb3fbb58d56c5b336d30996c24fcf12aadb"}, - {file = "cryptography-41.0.4-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:23a25c09dfd0d9f28da2352503b23e086f8e78096b9fd585d1d14eca01613e13"}, - {file = "cryptography-41.0.4-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:2ed09183922d66c4ec5fdaa59b4d14e105c084dd0febd27452de8f6f74704143"}, - {file = "cryptography-41.0.4-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:5a0f09cefded00e648a127048119f77bc2b2ec61e736660b5789e638f43cc397"}, - {file = "cryptography-41.0.4-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:9eeb77214afae972a00dee47382d2591abe77bdae166bda672fb1e24702a3860"}, - {file = "cryptography-41.0.4-cp37-abi3-win32.whl", hash = "sha256:3b224890962a2d7b57cf5eeb16ccaafba6083f7b811829f00476309bce2fe0fd"}, - {file = "cryptography-41.0.4-cp37-abi3-win_amd64.whl", hash = "sha256:c880eba5175f4307129784eca96f4e70b88e57aa3f680aeba3bab0e980b0f37d"}, - {file = "cryptography-41.0.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:004b6ccc95943f6a9ad3142cfabcc769d7ee38a3f60fb0dddbfb431f818c3a67"}, - {file = "cryptography-41.0.4-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:86defa8d248c3fa029da68ce61fe735432b047e32179883bdb1e79ed9bb8195e"}, - {file = "cryptography-41.0.4-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:37480760ae08065437e6573d14be973112c9e6dcaf5f11d00147ee74f37a3829"}, - {file = "cryptography-41.0.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:b5f4dfe950ff0479f1f00eda09c18798d4f49b98f4e2006d644b3301682ebdca"}, - {file = "cryptography-41.0.4-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7e53db173370dea832190870e975a1e09c86a879b613948f09eb49324218c14d"}, - {file = "cryptography-41.0.4-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5b72205a360f3b6176485a333256b9bcd48700fc755fef51c8e7e67c4b63e3ac"}, - {file = "cryptography-41.0.4-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:93530900d14c37a46ce3d6c9e6fd35dbe5f5601bf6b3a5c325c7bffc030344d9"}, - {file = "cryptography-41.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:efc8ad4e6fc4f1752ebfb58aefece8b4e3c4cae940b0994d43649bdfce8d0d4f"}, - {file = "cryptography-41.0.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c3391bd8e6de35f6f1140e50aaeb3e2b3d6a9012536ca23ab0d9c35ec18c8a91"}, - {file = "cryptography-41.0.4-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:0d9409894f495d465fe6fda92cb70e8323e9648af912d5b9141d616df40a87b8"}, - {file = "cryptography-41.0.4-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:8ac4f9ead4bbd0bc8ab2d318f97d85147167a488be0e08814a37eb2f439d5cf6"}, - {file = "cryptography-41.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:047c4603aeb4bbd8db2756e38f5b8bd7e94318c047cfe4efeb5d715e08b49311"}, - {file = "cryptography-41.0.4.tar.gz", hash = "sha256:7febc3094125fc126a7f6fb1f420d0da639f3f32cb15c8ff0dc3997c4549f51a"}, + {file = "cryptography-41.0.5-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:da6a0ff8f1016ccc7477e6339e1d50ce5f59b88905585f77193ebd5068f1e797"}, + {file = "cryptography-41.0.5-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:b948e09fe5fb18517d99994184854ebd50b57248736fd4c720ad540560174ec5"}, + {file = "cryptography-41.0.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d38e6031e113b7421db1de0c1b1f7739564a88f1684c6b89234fbf6c11b75147"}, + {file = "cryptography-41.0.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e270c04f4d9b5671ebcc792b3ba5d4488bf7c42c3c241a3748e2599776f29696"}, + {file = "cryptography-41.0.5-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ec3b055ff8f1dce8e6ef28f626e0972981475173d7973d63f271b29c8a2897da"}, + {file = "cryptography-41.0.5-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:7d208c21e47940369accfc9e85f0de7693d9a5d843c2509b3846b2db170dfd20"}, + {file = "cryptography-41.0.5-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:8254962e6ba1f4d2090c44daf50a547cd5f0bf446dc658a8e5f8156cae0d8548"}, + {file = "cryptography-41.0.5-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:a48e74dad1fb349f3dc1d449ed88e0017d792997a7ad2ec9587ed17405667e6d"}, + {file = "cryptography-41.0.5-cp37-abi3-win32.whl", hash = "sha256:d3977f0e276f6f5bf245c403156673db103283266601405376f075c849a0b936"}, + {file = "cryptography-41.0.5-cp37-abi3-win_amd64.whl", hash = "sha256:73801ac9736741f220e20435f84ecec75ed70eda90f781a148f1bad546963d81"}, + {file = "cryptography-41.0.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3be3ca726e1572517d2bef99a818378bbcf7d7799d5372a46c79c29eb8d166c1"}, + {file = "cryptography-41.0.5-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:e886098619d3815e0ad5790c973afeee2c0e6e04b4da90b88e6bd06e2a0b1b72"}, + {file = "cryptography-41.0.5-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:573eb7128cbca75f9157dcde974781209463ce56b5804983e11a1c462f0f4e88"}, + {file = "cryptography-41.0.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0c327cac00f082013c7c9fb6c46b7cc9fa3c288ca702c74773968173bda421bf"}, + {file = "cryptography-41.0.5-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:227ec057cd32a41c6651701abc0328135e472ed450f47c2766f23267b792a88e"}, + {file = "cryptography-41.0.5-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:22892cc830d8b2c89ea60148227631bb96a7da0c1b722f2aac8824b1b7c0b6b8"}, + {file = "cryptography-41.0.5-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:5a70187954ba7292c7876734183e810b728b4f3965fbe571421cb2434d279179"}, + {file = "cryptography-41.0.5-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:88417bff20162f635f24f849ab182b092697922088b477a7abd6664ddd82291d"}, + {file = "cryptography-41.0.5-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c707f7afd813478e2019ae32a7c49cd932dd60ab2d2a93e796f68236b7e1fbf1"}, + {file = "cryptography-41.0.5-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:580afc7b7216deeb87a098ef0674d6ee34ab55993140838b14c9b83312b37b86"}, + {file = "cryptography-41.0.5-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:fba1e91467c65fe64a82c689dc6cf58151158993b13eb7a7f3f4b7f395636723"}, + {file = "cryptography-41.0.5-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:0d2a6a598847c46e3e321a7aef8af1436f11c27f1254933746304ff014664d84"}, + {file = "cryptography-41.0.5.tar.gz", hash = "sha256:392cb88b597247177172e02da6b7a63deeff1937fa6fec3bbf902ebd75d97ec7"}, ] [package.dependencies] @@ -1269,17 +1269,17 @@ plugins = ["importlib-metadata"] [[package]] name = "pylint" -version = "3.0.1" +version = "3.0.2" description = "python code static checker" optional = false python-versions = ">=3.8.0" files = [ - {file = "pylint-3.0.1-py3-none-any.whl", hash = "sha256:9c90b89e2af7809a1697f6f5f93f1d0e518ac566e2ac4d2af881a69c13ad01ea"}, - {file = "pylint-3.0.1.tar.gz", hash = "sha256:81c6125637be216b4652ae50cc42b9f8208dfb725cdc7e04c48f6902f4dbdf40"}, + {file = "pylint-3.0.2-py3-none-any.whl", hash = "sha256:60ed5f3a9ff8b61839ff0348b3624ceeb9e6c2a92c514d81c9cc273da3b6bcda"}, + {file = "pylint-3.0.2.tar.gz", hash = "sha256:0d4c286ef6d2f66c8bfb527a7f8a629009e42c99707dec821a03e1b51a4c1496"}, ] [package.dependencies] -astroid = ">=3.0.0,<=3.1.0-dev0" +astroid = ">=3.0.1,<=3.1.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ {version = ">=0.2", markers = "python_version < \"3.11\""}, @@ -1328,13 +1328,13 @@ tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} [[package]] name = "pytest" -version = "7.4.2" +version = "7.4.3" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.4.2-py3-none-any.whl", hash = "sha256:1d881c6124e08ff0a1bb75ba3ec0bfd8b5354a01c194ddd5a0a870a48d99b002"}, - {file = "pytest-7.4.2.tar.gz", hash = "sha256:a766259cfab564a2ad52cb1aae1b881a75c3eb7e34ca3779697c23ed47c47069"}, + {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"}, + {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"}, ] [package.dependencies] @@ -1365,13 +1365,13 @@ pytest = ">=3.10" [[package]] name = "pytest-mock" -version = "3.11.1" +version = "3.12.0" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pytest-mock-3.11.1.tar.gz", hash = "sha256:7f6b125602ac6d743e523ae0bfa71e1a697a2f5534064528c6ff84c2f7c2fc7f"}, - {file = "pytest_mock-3.11.1-py3-none-any.whl", hash = "sha256:21c279fff83d70763b05f8874cc9cfb3fcacd6d354247a976f9529d19f9acf39"}, + {file = "pytest-mock-3.12.0.tar.gz", hash = "sha256:31a40f038c22cad32287bb43932054451ff5583ff094bca6f675df2f8bc1a6e9"}, + {file = "pytest_mock-3.12.0-py3-none-any.whl", hash = "sha256:0972719a7263072da3a21c7f4773069bcc7486027d7e8e1f81d98a47e701bc4f"}, ] [package.dependencies] @@ -1586,13 +1586,13 @@ files = [ [[package]] name = "shellingham" -version = "1.5.3" +version = "1.5.4" description = "Tool to Detect Surrounding Shell" optional = false python-versions = ">=3.7" files = [ - {file = "shellingham-1.5.3-py2.py3-none-any.whl", hash = "sha256:419c6a164770c9c7cfcaeddfacb3d31ac7a8db0b0f3e9c1287679359734107e9"}, - {file = "shellingham-1.5.3.tar.gz", hash = "sha256:cb4a6fec583535bc6da17b647dd2330cf7ef30239e05d547d99ae3705fd0f7f8"}, + {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"}, + {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, ] [[package]] @@ -1619,13 +1619,13 @@ files = [ [[package]] name = "tomlkit" -version = "0.12.1" +version = "0.12.2" description = "Style preserving TOML library" optional = false python-versions = ">=3.7" files = [ - {file = "tomlkit-0.12.1-py3-none-any.whl", hash = "sha256:712cbd236609acc6a3e2e97253dfc52d4c2082982a88f61b640ecf0817eab899"}, - {file = "tomlkit-0.12.1.tar.gz", hash = "sha256:38e1ff8edb991273ec9f6181244a6a391ac30e9f5098e7535640ea6be97a7c86"}, + {file = "tomlkit-0.12.2-py3-none-any.whl", hash = "sha256:eeea7ac7563faeab0a1ed8fe12c2e5a51c61f933f2502f7e9db0241a65163ad0"}, + {file = "tomlkit-0.12.2.tar.gz", hash = "sha256:df32fab589a81f0d7dc525a4267b6d7a64ee99619cbd1eeb0fae32c1dd426977"}, ] [[package]]