From 301e66c846fda9641b15aa50a96c704f53bad681 Mon Sep 17 00:00:00 2001 From: Mikhail Yohman Date: Sun, 21 Feb 2021 08:17:43 -0700 Subject: [PATCH] Remove references to NetBox (#26) --- .gitignore | 2 +- .travis.yml | 48 +- CHANGELOG.rst | 511 ++-------------- CONTRIBUTING.md | 347 ----------- LICENSE | 201 +++++++ NOTICE | 6 + README.md | 16 +- ansible.cfg | 2 +- changelogs/changelog.yaml | 558 ++++-------------- changelogs/config.yaml | 2 +- docs/_extensions/pygments_lexer.py | 6 +- docs/conf.py | 25 +- .../contributing/modules/architecture.rst | 119 ++-- .../contributing/modules/new_module.rst | 132 ++--- .../contributing/modules/update_module.rst | 62 +- docs/getting_started/how-to-use/advanced.rst | 106 ++-- docs/getting_started/how-to-use/inventory.rst | 8 +- docs/getting_started/how-to-use/modules.rst | 64 +- docs/getting_started/installation.rst | 16 +- docs/index.rst | 7 +- docs/module_utils/circuits/index.rst | 13 + docs/module_utils/dcim/index.rst | 40 ++ .../{netbox_extras => extras}/index.rst | 4 +- docs/module_utils/ipam/index.rst | 18 + docs/module_utils/netbox_circuits/index.rst | 13 - docs/module_utils/netbox_dcim/index.rst | 40 -- docs/module_utils/netbox_ipam/index.rst | 18 - docs/module_utils/netbox_secrets/index.rst | 10 - docs/module_utils/netbox_tenancy/index.rst | 11 - docs/module_utils/netbox_utils/index.rst | 20 - .../netbox_virtualization/index.rst | 14 - docs/module_utils/tenancy/index.rst | 11 + docs/module_utils/utils/index.rst | 20 + docs/module_utils/virtualization/index.rst | 14 + ...regate_module.rst => aggregate_module.rst} | 108 ++-- ...tbox_cable_module.rst => cable_module.rst} | 104 ++-- ..._circuit_module.rst => circuit_module.rst} | 108 ++-- ...ule.rst => circuit_termination_module.rst} | 106 ++-- ...ype_module.rst => circuit_type_module.rst} | 102 ++-- ...up_module.rst => cluster_group_module.rst} | 102 ++-- ..._cluster_module.rst => cluster_module.rst} | 112 ++-- ...ype_module.rst => cluster_type_module.rst} | 102 ++-- ...ort_module.rst => console_port_module.rst} | 104 ++-- ...e.rst => console_port_template_module.rst} | 104 ++-- ...ule.rst => console_server_port_module.rst} | 104 ++-- ...> console_server_port_template_module.rst} | 104 ++-- ...e_bay_module.rst => device_bay_module.rst} | 108 ++-- ...ule.rst => device_bay_template_module.rst} | 98 +-- ...module.rst => device_interface_module.rst} | 126 ++-- ...t => device_interface_template_module.rst} | 98 +-- ...ox_device_module.rst => device_module.rst} | 122 ++-- ...role_module.rst => device_role_module.rst} | 118 ++-- ...type_module.rst => device_type_module.rst} | 110 ++-- ..._port_module.rst => front_port_module.rst} | 104 ++-- ...ule.rst => front_port_template_module.rst} | 104 ++-- docs/plugins/index.rst | 121 ++-- ..._inventory.rst => inventory_inventory.rst} | 97 +-- ...m_module.rst => inventory_item_module.rst} | 110 ++-- ...dress_module.rst => ip_address_module.rst} | 150 ++--- ...m_role_module.rst => ipam_role_module.rst} | 102 ++-- ...nb_lookup_lookup.rst => lookup_lookup.rst} | 52 +- ...rer_module.rst => manufacturer_module.rst} | 102 ++-- ...latform_module.rst => platform_module.rst} | 126 ++-- ..._feed_module.rst => power_feed_module.rst} | 106 ++-- ...let_module.rst => power_outlet_module.rst} | 104 ++-- ...e.rst => power_outlet_template_module.rst} | 104 ++-- ...anel_module.rst => power_panel_module.rst} | 104 ++-- ..._port_module.rst => power_port_module.rst} | 104 ++-- ...ule.rst => power_port_template_module.rst} | 104 ++-- ...ox_prefix_module.rst => prefix_module.rst} | 140 ++--- ...rovider_module.rst => provider_module.rst} | 108 ++-- ...group_module.rst => rack_group_module.rst} | 102 ++-- ...netbox_rack_module.rst => rack_module.rst} | 102 ++-- ...k_role_module.rst => rack_role_module.rst} | 102 ++-- ...r_port_module.rst => rear_port_module.rst} | 104 ++-- ...dule.rst => rear_port_template_module.rst} | 104 ++-- ...ox_region_module.rst => region_module.rst} | 102 ++-- .../{netbox_rir_module.rst => rir_module.rst} | 108 ++-- ...get_module.rst => route_target_module.rst} | 102 ++-- ..._service_module.rst => service_module.rst} | 100 ++-- ...netbox_site_module.rst => site_module.rst} | 108 ++-- docs/plugins/status_module.rst | 356 +++++++++++ .../{netbox_tag_module.rst => tag_module.rst} | 94 +-- ...oup_module.rst => tenant_group_module.rst} | 100 ++-- ...ox_tenant_module.rst => tenant_module.rst} | 106 ++-- ..._module.rst => virtual_chassis_module.rst} | 104 ++-- ..._module.rst => virtual_machine_module.rst} | 112 ++-- ...group_module.rst => vlan_group_module.rst} | 102 ++-- ...netbox_vlan_module.rst => vlan_module.rst} | 108 ++-- ...ace_module.rst => vm_interface_module.rst} | 104 ++-- .../{netbox_vrf_module.rst => vrf_module.rst} | 112 ++-- galaxy.yml | 10 +- hacking/build.sh | 5 +- hacking/local-test.sh | 4 +- hacking/make-docs.sh | 4 +- .../pynautobot-1.0.0-py2.py3-none-any.whl | Bin 0 -> 28294 bytes hacking/packages/pynautobot-1.0.0.tar.gz | Bin 0 -> 20970 bytes hacking/update_test_inventories.sh | 7 +- meta/runtime.yml | 4 - pb.test.status.yml | 15 - plugins/inventory/inventory.py | 44 +- plugins/lookup/lookup.py | 175 +++--- plugins/module_utils/circuits.py | 4 +- plugins/module_utils/dcim.py | 5 +- plugins/module_utils/extras.py | 4 +- plugins/module_utils/ipam.py | 16 +- plugins/module_utils/secrets.py | 58 -- plugins/module_utils/tenancy.py | 4 +- plugins/module_utils/utils.py | 46 +- plugins/module_utils/virtualization.py | 15 +- plugins/modules/aggregate.py | 25 +- plugins/modules/cable.py | 23 +- plugins/modules/circuit.py | 25 +- plugins/modules/circuit_termination.py | 25 +- plugins/modules/circuit_type.py | 21 +- plugins/modules/cluster.py | 27 +- plugins/modules/cluster_group.py | 21 +- plugins/modules/cluster_type.py | 21 +- plugins/modules/console_port.py | 23 +- plugins/modules/console_port_template.py | 23 +- plugins/modules/console_server_port.py | 23 +- .../modules/console_server_port_template.py | 23 +- plugins/modules/device.py | 34 +- plugins/modules/device_bay.py | 25 +- plugins/modules/device_bay_template.py | 19 +- plugins/modules/device_interface.py | 47 +- plugins/modules/device_interface_template.py | 19 +- plugins/modules/device_role.py | 21 +- plugins/modules/device_type.py | 25 +- plugins/modules/front_port.py | 23 +- plugins/modules/front_port_template.py | 23 +- plugins/modules/inventory_item.py | 25 +- plugins/modules/ip_address.py | 48 +- plugins/modules/ipam_role.py | 21 +- plugins/modules/manufacturer.py | 21 +- plugins/modules/platform.py | 25 +- plugins/modules/power_feed.py | 23 +- plugins/modules/power_outlet.py | 23 +- plugins/modules/power_outlet_template.py | 23 +- plugins/modules/power_panel.py | 23 +- plugins/modules/power_port.py | 23 +- plugins/modules/power_port_template.py | 23 +- plugins/modules/prefix.py | 40 +- plugins/modules/provider.py | 24 +- plugins/modules/rack.py | 21 +- plugins/modules/rack_group.py | 21 +- plugins/modules/rack_role.py | 21 +- plugins/modules/rear_port.py | 23 +- plugins/modules/rear_port_template.py | 23 +- plugins/modules/region.py | 21 +- plugins/modules/rir.py | 25 +- plugins/modules/route_target.py | 17 +- plugins/modules/service.py | 35 +- plugins/modules/site.py | 24 +- plugins/modules/status.py | 17 +- plugins/modules/tag.py | 17 +- plugins/modules/tenant.py | 23 +- plugins/modules/tenant_group.py | 21 +- plugins/modules/virtual_chassis.py | 23 +- plugins/modules/virtual_machine.py | 27 +- plugins/modules/vlan.py | 25 +- plugins/modules/vlan_group.py | 21 +- plugins/modules/vm_interface.py | 23 +- plugins/modules/vrf.py | 29 +- poetry.lock | 175 +++--- pyproject.toml | 7 +- ...{netbox-deploy.py => nautobot-populate.py} | 111 ++-- .../compare_inventory_json.py | 25 +- .../files/test-inventory-options-flatten.yml | 2 +- .../files/test-inventory-options.yml | 2 +- .../files/test-inventory-plurals.yml | 2 +- .../targets/inventory-latest/runme.sh | 6 - .../inventory-latest/runme_config.template | 4 +- .../inventory-v2.9/compare_inventory_json.py | 25 +- .../files/test-inventory-options-flatten.yml | 2 +- .../files/test-inventory-options.yml | 2 +- .../files/test-inventory-plurals.yml | 2 +- .../targets/inventory-v2.9/runme.sh | 6 - .../inventory-v2.9/runme_config.template | 4 +- .../targets/latest/tasks/aggregate.yml | 2 +- .../targets/latest/tasks/cable.yml | 2 +- .../targets/latest/tasks/circuit.yml | 18 +- .../latest/tasks/circuit_termination.yml | 22 +- .../targets/latest/tasks/circuit_type.yml | 2 +- .../targets/latest/tasks/cluster.yml | 2 +- .../targets/latest/tasks/cluster_group.yml | 2 +- .../targets/latest/tasks/cluster_type.yml | 2 +- .../targets/latest/tasks/console_port.yml | 2 +- .../latest/tasks/console_port_template.yml | 2 +- .../latest/tasks/console_server_port.yml | 2 +- .../tasks/console_server_port_template.yml | 2 +- .../targets/latest/tasks/device.yml | 2 +- .../targets/latest/tasks/device_bay.yml | 2 +- .../latest/tasks/device_bay_template.yml | 2 +- .../targets/latest/tasks/device_interface.yml | 2 +- .../tasks/device_interface_template.yml | 2 +- .../targets/latest/tasks/device_role.yml | 2 +- .../targets/latest/tasks/device_type.yml | 2 +- .../targets/latest/tasks/front_port.yml | 2 +- .../latest/tasks/front_port_template.yml | 2 +- .../targets/latest/tasks/inventory_item.yml | 2 +- .../targets/latest/tasks/ip_address.yml | 4 +- .../targets/latest/tasks/ipam_role.yml | 2 +- .../targets/latest/tasks/lookup.yml | 22 +- .../integration/targets/latest/tasks/main.yml | 108 ++-- .../targets/latest/tasks/manufacturer.yml | 2 +- .../targets/latest/tasks/platform.yml | 2 +- .../targets/latest/tasks/power_feed.yml | 2 +- .../targets/latest/tasks/power_outlet.yml | 2 +- .../latest/tasks/power_outlet_template.yml | 2 +- .../targets/latest/tasks/power_panel.yml | 2 +- .../targets/latest/tasks/power_port.yml | 2 +- .../latest/tasks/power_port_template.yml | 2 +- .../targets/latest/tasks/prefix.yml | 16 +- .../targets/latest/tasks/provider.yml | 18 +- .../integration/targets/latest/tasks/rack.yml | 2 +- .../targets/latest/tasks/rack_group.yml | 2 +- .../targets/latest/tasks/rack_role.yml | 2 +- .../targets/latest/tasks/rear_port.yml | 2 +- .../latest/tasks/rear_port_template.yml | 2 +- .../targets/latest/tasks/region.yml | 2 +- .../integration/targets/latest/tasks/rir.yml | 2 +- .../targets/latest/tasks/route_target.yml | 36 +- .../targets/latest/tasks/service.yml | 34 +- .../integration/targets/latest/tasks/site.yml | 10 +- .../integration/targets/latest/tasks/tag.yml | 2 +- .../targets/latest/tasks/tenant.yml | 2 +- .../targets/latest/tasks/tenant_group.yml | 2 +- .../targets/latest/tasks/virtual_chassis.yml | 2 +- .../targets/latest/tasks/virtual_machine.yml | 2 +- .../integration/targets/latest/tasks/vlan.yml | 2 +- .../targets/latest/tasks/vlan_group.yml | 2 +- .../targets/latest/tasks/vm_interface.yml | 22 +- .../integration/targets/latest/tasks/vrf.yml | 2 +- .../targets/regression-latest/tasks/main.yml | 22 +- .../targets/regression-v2.9/tasks/main.yml | 6 +- .../targets/v2.9/tasks/aggregate.yml | 2 +- .../integration/targets/v2.9/tasks/cable.yml | 2 +- .../targets/v2.9/tasks/circuit.yml | 18 +- .../v2.9/tasks/circuit_termination.yml | 22 +- .../targets/v2.9/tasks/circuit_type.yml | 2 +- .../targets/v2.9/tasks/cluster.yml | 2 +- .../targets/v2.9/tasks/cluster_group.yml | 2 +- .../targets/v2.9/tasks/cluster_type.yml | 2 +- .../targets/v2.9/tasks/console_port.yml | 2 +- .../v2.9/tasks/console_port_template.yml | 2 +- .../v2.9/tasks/console_server_port.yml | 2 +- .../tasks/console_server_port_template.yml | 2 +- .../integration/targets/v2.9/tasks/device.yml | 2 +- .../targets/v2.9/tasks/device_bay.yml | 2 +- .../v2.9/tasks/device_bay_template.yml | 2 +- .../targets/v2.9/tasks/device_interface.yml | 2 +- .../v2.9/tasks/device_interface_template.yml | 2 +- .../targets/v2.9/tasks/device_role.yml | 2 +- .../targets/v2.9/tasks/device_type.yml | 2 +- .../targets/v2.9/tasks/front_port.yml | 2 +- .../v2.9/tasks/front_port_template.yml | 2 +- .../targets/v2.9/tasks/inventory_item.yml | 2 +- .../targets/v2.9/tasks/ip_address.yml | 4 +- .../targets/v2.9/tasks/ipam_role.yml | 2 +- .../integration/targets/v2.9/tasks/lookup.yml | 22 +- tests/integration/targets/v2.9/tasks/main.yml | 106 ++-- .../targets/v2.9/tasks/manufacturer.yml | 2 +- .../targets/v2.9/tasks/platform.yml | 2 +- .../targets/v2.9/tasks/power_feed.yml | 2 +- .../targets/v2.9/tasks/power_outlet.yml | 2 +- .../v2.9/tasks/power_outlet_template.yml | 2 +- .../targets/v2.9/tasks/power_panel.yml | 2 +- .../targets/v2.9/tasks/power_port.yml | 2 +- .../v2.9/tasks/power_port_template.yml | 2 +- .../integration/targets/v2.9/tasks/prefix.yml | 16 +- .../targets/v2.9/tasks/provider.yml | 18 +- tests/integration/targets/v2.9/tasks/rack.yml | 2 +- .../targets/v2.9/tasks/rack_group.yml | 2 +- .../targets/v2.9/tasks/rack_role.yml | 2 +- .../targets/v2.9/tasks/rear_port.yml | 2 +- .../targets/v2.9/tasks/rear_port_template.yml | 2 +- .../integration/targets/v2.9/tasks/region.yml | 2 +- tests/integration/targets/v2.9/tasks/rir.yml | 2 +- .../targets/v2.9/tasks/service.yml | 34 +- tests/integration/targets/v2.9/tasks/site.yml | 10 +- tests/integration/targets/v2.9/tasks/tag.yml | 2 +- .../integration/targets/v2.9/tasks/tenant.yml | 2 +- .../targets/v2.9/tasks/tenant_group.yml | 2 +- .../targets/v2.9/tasks/virtual_chassis.yml | 2 +- .../targets/v2.9/tasks/virtual_machine.yml | 2 +- tests/integration/targets/v2.9/tasks/vlan.yml | 2 +- .../targets/v2.9/tasks/vlan_group.yml | 2 +- .../targets/v2.9/tasks/vm_interface.yml | 22 +- tests/integration/targets/v2.9/tasks/vrf.yml | 2 +- tests/sanity/ignore-2.10.txt | 62 +- tests/test_data.py | 4 +- .../get_resource_list_chunked/data.json | 124 ++-- .../inventory/test_data/refresh_url/data.json | 348 +++++------ tests/unit/inventory/test_nb_inventory.py | 8 +- .../module_utils/test_nautobot_base_class.py | 17 +- 296 files changed, 5766 insertions(+), 6491 deletions(-) delete mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 NOTICE create mode 100644 docs/module_utils/circuits/index.rst create mode 100644 docs/module_utils/dcim/index.rst rename docs/module_utils/{netbox_extras => extras}/index.rst (54%) create mode 100644 docs/module_utils/ipam/index.rst delete mode 100644 docs/module_utils/netbox_circuits/index.rst delete mode 100644 docs/module_utils/netbox_dcim/index.rst delete mode 100644 docs/module_utils/netbox_ipam/index.rst delete mode 100644 docs/module_utils/netbox_secrets/index.rst delete mode 100644 docs/module_utils/netbox_tenancy/index.rst delete mode 100644 docs/module_utils/netbox_utils/index.rst delete mode 100644 docs/module_utils/netbox_virtualization/index.rst create mode 100644 docs/module_utils/tenancy/index.rst create mode 100644 docs/module_utils/utils/index.rst create mode 100644 docs/module_utils/virtualization/index.rst rename docs/plugins/{netbox_aggregate_module.rst => aggregate_module.rst} (91%) rename docs/plugins/{netbox_cable_module.rst => cable_module.rst} (95%) rename docs/plugins/{netbox_circuit_module.rst => circuit_module.rst} (93%) rename docs/plugins/{netbox_circuit_termination_module.rst => circuit_termination_module.rst} (92%) rename docs/plugins/{netbox_circuit_type_module.rst => circuit_type_module.rst} (89%) rename docs/plugins/{netbox_cluster_group_module.rst => cluster_group_module.rst} (89%) rename docs/plugins/{netbox_cluster_module.rst => cluster_module.rst} (92%) rename docs/plugins/{netbox_cluster_type_module.rst => cluster_type_module.rst} (89%) rename docs/plugins/{netbox_console_port_module.rst => console_port_module.rst} (92%) rename docs/plugins/{netbox_console_port_template_module.rst => console_port_template_module.rst} (91%) rename docs/plugins/{netbox_console_server_port_module.rst => console_server_port_module.rst} (92%) rename docs/plugins/{netbox_console_server_port_template_module.rst => console_server_port_template_module.rst} (91%) rename docs/plugins/{netbox_device_bay_module.rst => device_bay_module.rst} (91%) rename docs/plugins/{netbox_device_bay_template_module.rst => device_bay_template_module.rst} (89%) rename docs/plugins/{netbox_device_interface_module.rst => device_interface_module.rst} (94%) rename docs/plugins/{netbox_device_interface_template_module.rst => device_interface_template_module.rst} (91%) rename docs/plugins/{netbox_device_module.rst => device_module.rst} (95%) rename docs/plugins/{netbox_device_role_module.rst => device_role_module.rst} (85%) rename docs/plugins/{netbox_device_type_module.rst => device_type_module.rst} (93%) rename docs/plugins/{netbox_front_port_module.rst => front_port_module.rst} (93%) rename docs/plugins/{netbox_front_port_template_module.rst => front_port_template_module.rst} (92%) rename docs/plugins/{nb_inventory_inventory.rst => inventory_inventory.rst} (93%) rename docs/plugins/{netbox_inventory_item_module.rst => inventory_item_module.rst} (92%) rename docs/plugins/{netbox_ip_address_module.rst => ip_address_module.rst} (93%) rename docs/plugins/{netbox_ipam_role_module.rst => ipam_role_module.rst} (90%) rename docs/plugins/{nb_lookup_lookup.rst => lookup_lookup.rst} (88%) rename docs/plugins/{netbox_manufacturer_module.rst => manufacturer_module.rst} (89%) rename docs/plugins/{netbox_platform_module.rst => platform_module.rst} (85%) rename docs/plugins/{netbox_power_feed_module.rst => power_feed_module.rst} (94%) rename docs/plugins/{netbox_power_outlet_module.rst => power_outlet_module.rst} (95%) rename docs/plugins/{netbox_power_outlet_template_module.rst => power_outlet_template_module.rst} (94%) rename docs/plugins/{netbox_power_panel_module.rst => power_panel_module.rst} (90%) rename docs/plugins/{netbox_power_port_module.rst => power_port_module.rst} (95%) rename docs/plugins/{netbox_power_port_template_module.rst => power_port_template_module.rst} (94%) rename docs/plugins/{netbox_prefix_module.rst => prefix_module.rst} (92%) rename docs/plugins/{netbox_provider_module.rst => provider_module.rst} (93%) rename docs/plugins/{netbox_rack_group_module.rst => rack_group_module.rst} (90%) rename docs/plugins/{netbox_rack_module.rst => rack_module.rst} (96%) rename docs/plugins/{netbox_rack_role_module.rst => rack_role_module.rst} (90%) rename docs/plugins/{netbox_rear_port_module.rst => rear_port_module.rst} (93%) rename docs/plugins/{netbox_rear_port_template_module.rst => rear_port_template_module.rst} (91%) rename docs/plugins/{netbox_region_module.rst => region_module.rst} (90%) rename docs/plugins/{netbox_rir_module.rst => rir_module.rst} (90%) rename docs/plugins/{netbox_route_target_module.rst => route_target_module.rst} (92%) rename docs/plugins/{netbox_service_module.rst => service_module.rst} (94%) rename docs/plugins/{netbox_site_module.rst => site_module.rst} (95%) create mode 100644 docs/plugins/status_module.rst rename docs/plugins/{netbox_tag_module.rst => tag_module.rst} (92%) rename docs/plugins/{netbox_tenant_group_module.rst => tenant_group_module.rst} (89%) rename docs/plugins/{netbox_tenant_module.rst => tenant_module.rst} (92%) rename docs/plugins/{netbox_virtual_chassis_module.rst => virtual_chassis_module.rst} (90%) rename docs/plugins/{netbox_virtual_machine_module.rst => virtual_machine_module.rst} (94%) rename docs/plugins/{netbox_vlan_group_module.rst => vlan_group_module.rst} (90%) rename docs/plugins/{netbox_vlan_module.rst => vlan_module.rst} (93%) rename docs/plugins/{netbox_vm_interface_module.rst => vm_interface_module.rst} (93%) rename docs/plugins/{netbox_vrf_module.rst => vrf_module.rst} (93%) create mode 100644 hacking/packages/pynautobot-1.0.0-py2.py3-none-any.whl create mode 100644 hacking/packages/pynautobot-1.0.0.tar.gz delete mode 100644 pb.test.status.yml delete mode 100644 plugins/module_utils/secrets.py rename tests/integration/{netbox-deploy.py => nautobot-populate.py} (77%) diff --git a/.gitignore b/.gitignore index 87cae87c..4c3d04e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -*.tar.gz +networktocode-nautobot*.tar.gz __pycache__/ *.pyc tests/output/* diff --git a/.travis.yml b/.travis.yml index de234d8c..d62d5d30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,37 +10,22 @@ env: global: - COLLECTION_NAMESPACE: "networktocode" - COLLECTION_NAME: "nautobot" - #- COLLECTION_VERSION: "1.0.0" + - COLLECTION_VERSION: "1.0.0" - secure: "tE6GtwrRU+Kjobx/94xqR2MqM20pHCnrLcHgPzIHA3npdwuA+GjCBiBLTkEEQM4fUWIfzUTyjSr9bZErm1PTI1GcIRdniTgJ3ZzSSkE7tgeYALB/7xsusB57SlmbBQm2SGwU558uWZ3NHEsi0WTgD8GKZo77OpGX72FZKsVXOz6k2wve51sOtoSVjgCsvWTmZHx4ynGdiA5wFkZfaEcjXECahKtunW+MlB5kpJzkVeLRUEXFMhWlsIYiA5nj8OI/X3Nk9ugh1ribENX9LrjpgrqQ9YariZ8G6py1ONuKZIn2g7xs5kNQ3qL6HL6N7SoUxiwH16CfSyugFaYiMfaxQ4NUVGGRHS4vSGbNIf+gLHcYvP40miI1f/+pntCzqygZMhW73FX2o+KH2OGv09khOl8k1nDg2/XvW0kCc/FU6l+Jp5wCC8H9X2uiULtQpRqts5TzIonlPEzGIpfGFgJ5m54Emhv9gjG1Z5OOyL/qae1Wr+L/uhiFafcglZYh8NHEMWCUCkeqFqR2kDmUMtdgYLD7Q7NdwlL/PSVVs1l7UPiQHlnecQKEHN7CvR3eKByTEmkCKafRYh/JQ9rBt9sZc7aAPVu+w3wWUwbHS4o4vVnmyXvJb1PeJSiuynF7CBo4Qd6qj4YwX8gLK6PylGyaMOp169u6xw1mo5/CX0pJ3x4=" jobs: include: - - name: "Python 3.6 - Netbox 2.10 - Latest PyPi Ansible" + - name: "Python 3.6 - Nautobot - Latest PyPi Ansible" python: 3.6 env: - - PYTHON_VER=3.6 VERSION=latest INTEGRATION_TESTS=latest + - PYTHON_VER=3.6 install: - - cd .. - # Setup netbox container for integration testing - - git clone https://github.com/netbox-community/netbox-docker.git - - cd netbox-docker - - sed -i 's/SKIP_STARTUP_SCRIPTS=false/SKIP_STARTUP_SCRIPTS=true/' env/netbox.env - - docker-compose pull - - docker-compose up -d - - docker image ls - - docker container ls - - cd .. - pip install -U pip - - pip install -U pytest - - pip install -U pip "setuptools>=46.1.3" - - pip install pytest-mock pytest-xdist jinja2 PyYAML black==19.10b0 "coverage<5" - - pip install pynetbox cryptography codecov jmespath jsondiff ansible + - pip install poetry + - poetry config virtualenvs.create false && poetry install before_script: - mkdir -p ~/ansible_collections/$COLLECTION_NAMESPACE - #- cp -R grimlock-ansible ~/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME - #- cd ~/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME - - cd grimlock-ansible - ansible-galaxy collection build . - ansible-galaxy collection install $COLLECTION_NAMESPACE-$COLLECTION_NAME*.tar.gz -p /home/travis/.ansible/collections @@ -48,16 +33,6 @@ before_script: # Required to resolve imports of other collections - cd /home/travis/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME - # Set runme.sh execute permissions stripped by ansible-galaxy. Should be fixed in Ansible 2.10 - # https://github.com/ansible/ansible/issues/68415 - - chmod +x tests/integration/targets/inventory-$INTEGRATION_TESTS/runme.sh - - chmod +x tests/integration/targets/inventory-$INTEGRATION_TESTS/compare_inventory_json.py - - chmod +x tests/integration/render_config.sh - - # Run render_config.sh to pass environment variables to integration tests - # https://www.ansible.com/blog/adding-integration-tests-to-ansible-content-collections - - tests/integration/render_config.sh tests/integration/targets/inventory/runme_config.template > tests/integration/targets/inventory-$INTEGRATION_TESTS/runme_config - script: # Check python syntax - black . --check --diff @@ -69,19 +44,6 @@ script: # Unit tests, with code coverage - ansible-test units -v --coverage --python $PYTHON_VER - - # Wait for Netbox containers to be running - - timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:32768)" != "200" ]]; do echo "waiting for Netbox"; sleep 5; done' || false - - # Prepare data in Netbox - - ./tests/integration/netbox-deploy.py - - # Run regression and integration tests - # Run the inventory test first, in case any of the other tests modify the data. - - ansible-test integration -v --coverage --python $PYTHON_VER inventory-$INTEGRATION_TESTS - - ansible-test integration -v --coverage --python $PYTHON_VER regression-$INTEGRATION_TESTS - - ansible-test integration -v --coverage --python $PYTHON_VER $INTEGRATION_TESTS - # Report code coverage - ansible-test coverage report --all --omit "tests/*,hacking/*,docs/*" --show-missing diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 484ed98b..ef7f06d7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,462 +1,81 @@ -=========================== -Netbox.Netbox Release Notes -=========================== +==================================== +networktocode.nautobot Release Notes +==================================== .. contents:: Topics -v2.1.0 -====== - -Minor Changes -------------- - -- Inventory - Added ansible_host_dns_name to set ansible_host to dns_name -- netbox_device_role - Added description option -- netbox_platform - Added description option - -Bugfixes --------- - -- netbox_ip_address - Added assigned_object to ALLOWED_QUERY_PARAMS - -v2.0.0 -====== - -Minor Changes -------------- - -- Added ``import_targets`` and ``export_targets`` options to ``netbox_vrf`` - -Bugfixes --------- - -- netbox_site - Changed latitude/longitude type from float to str [#418](https://github.com/netbox-community/ansible_modules/pull/418) -- netbox_utils - If query_dict is None, fail and provide meaningful error [#419](https://github.com/netbox-community/ansible_modules/pull/419) -- netbox_utils - Remove manual manipulation for building query params for netbox_ip_address and assigned object [#421](https://github.com/netbox-community/ansible_modules/pull/421) - -New Modules ------------ - -- netbox.netbox.netbox_route_target - Creates or removes route targets from Netbox - -v1.2.1 -====== - -Bugfixes --------- - -- Allow IDs to be passed into objects that accept a list (https://github.com/netbox-community/ansible_modules/issues/407) - -v1.2.0 -====== - -Major Changes -------------- - -- nb_inventory - Add ``dns_name`` option that adds ``dns_name`` to the host when ``True`` and device has a primary IP address. (#394) -- nb_inventory - Add ``status`` as a ``group_by`` option. (398) -- nb_inventory - Move around ``extracted_primary_ip`` to allow for ``config_context`` or ``custom_field`` to overwite. (#377) -- nb_inventory - Services are now a list of integers due to NetBox 2.10 changes. (#396) -- nb_lookup - Allow ID to be passed in and use ``.get`` instead of ``.filter``. (#376) -- nb_lookup - Allow ``api_endpoint`` and ``token`` to be found via env. (#391) - -Minor Changes -------------- - -- nb_inventory - Added ``status`` as host_var. (359) -- nb_inventory - Added documentation for using ``keyed_groups``. (#361) -- nb_inventory - Allow to use virtual chassis name instead of device name. (#383) -- nb_lookup - Allow lookup of plugin endpoints. (#360) -- nb_lookup - Documentation update to show Fully Qualified Collection Name (FQCN). (#355) -- netbox_service - Add ``ports`` option for NetBox 2.10+ and convert ``port`` to ``ports`` if NetBox 2.9 or lower. (#396) -- netbox_virtual_machine - Added ``comments`` option. (#380) -- netbox_virtual_machine - Added ``local_context_data`` option. (#357) - -Bugfixes --------- - -- Version checks were failing due to converting "2.10" to a float made it an integer of 2.1 which broke version related logic. (#396) -- netbox_device_interface - Fixed copy pasta in documentation. (#371) -- netbox_ip_address - Updated documentation to show that ``family`` option has been deprecated. (#388) -- netbox_utils - Fixed typo for ``circuits.circuittermination`` searches. (#367) -- netbox_utils - Skip all modifications to ``query_params`` when ``user_query_params`` is defined. (#389) -- netbox_vlan - Fixed uniqueness for vlan searches to add ``group``. (#386) - -New Modules ------------ - -- netbox.netbox.netbox_tag - Creates or removes tags from Netbox - -v1.1.0 -====== - -Minor Changes -------------- - -- Add ``follow_redirects`` option to inventory plugin (https://github.com/netbox-community/ansible_modules/pull/323) - -Bugfixes --------- - -- Prevent inventory plugin from failing on 403 and print warning message (https://github.com/netbox-community/ansible_modules/pull/354) -- Update ``netbox_ip_address`` module to accept ``assigned_object`` to work with NetBox 2.9 (https://github.com/netbox-community/ansible_modules/pull/345) -- Update inventory plugin to properly associate IP address to interfaces with NetBox 2.9 (https://github.com/netbox-community/ansible_modules/pull/334) -- Update inventory plugin to work with tags with NetBox 2.9 (https://github.com/netbox-community/ansible_modules/pull/340) -- Update modules to be able to properly update tags to work with NetBox 2.9 (https://github.com/netbox-community/ansible_modules/pull/345) - -v1.0.2 -====== - -Bugfixes --------- - -- Add ``virtual_machine_role=slug`` to ``QUERY_TYPES`` to properly search for Virtual Machine roles and not use the default ``q`` search (https://github.com/netbox-community/ansible_modules/pull/327) -- Remove ``device`` being ``required`` and implemented ``required_one_of`` to allow either ``device`` or ``virtual_machine`` to be specified for ``netbox_service`` (https://github.com/netbox-community/ansible_modules/pull/326) -- When tags specified, it prevents other data from being updated on the object. (https://github.com/netbox-community/ansible_modules/pull/325) - -v1.0.1 -====== - -Minor Changes -------------- - -- Inventory - Add group_by option ``rack_role`` and ``rack_group`` -- Inventory - Add group_by option ``services`` (https://github.com/netbox-community/ansible_modules/pull/286) - -Bugfixes --------- - -- Fix ``nb_inventory`` cache for ip addresses (https://github.com/netbox-community/ansible_modules/issues/276) -- Return HTTPError body output when encountering HTTP errors (https://github.com/netbox-community/ansible_modules/issues/294) - v1.0.0 ====== -Bugfixes --------- - -- Fix query_dict for device_bay/interface_template to use ``devicetype_id`` (https://github.com/netbox-community/ansible_modules/issues/282) -- This expands the fix to all `_template` modules to use `devicetype_id` for the query_dict when attempting to resolve the search (https://github.com/netbox-community/ansible_modules/pull/300) - -v0.3.1 -====== - -Bugfixes --------- - -- Default ``validate_certs`` to ``True`` (https://github.com/netbox-community/ansible_modules/issues/273) - -v0.3.0 -====== - -Minor Changes -------------- - -- Add ``local_context_data`` and ``flatten_local_context_data`` option to ``nb_inventory`` (https://github.com/netbox-community/ansible_modules/pull/258) -- Add ``local_context_data`` option to ``netbox_device`` (https://github.com/netbox-community/ansible_modules/pull/258) -- Add ``virtual_chassis``, ``vc_position``, ``vc_priority`` to ``netbox_device`` options (https://github.com/netbox-community/ansible_modules/pull/251) - -Breaking Changes / Porting Guide --------------------------------- - -- To pass in integers via Ansible Jinja filters for a key in ``data`` that - requires querying an endpoint is now done by making it a dictionary with - an ``id`` key. The previous behavior was to just pass in an integer and - it was converted when normalizing the data, but some people may have names - that are all integers and those were being converted erroneously so we made - the decision to change the method to convert to an integer for the NetBox - API. +Release Summary +--------------- - :: +This is the first official release of an Ansible Collection for Nautobot. +This project is forked from the ``netbox.netbox`` Ansible Collection. - tasks: - - name: Create device within NetBox with only required information - netbox_device: - netbox_url: http://netbox-demo.org:32768 - netbox_token: 0123456789abcdef0123456789abcdef01234567 - data: - name: Test66 - device_type: - id: "{{ some_jinja_variable }}" - device_role: Core Switch - site: Test Site - status: Staged - state: present -- ``pynetbox`` changed to using ``requests.Session()`` to manage the HTTP session - which broke passing in ``ssl_verify`` when building the NetBox API client. - This PR makes ``pynetbox 5.0.4+`` the new required version of `pynetbox` for - the Ansible modules and lookup plugin. (https://github.com/netbox-community/ansible_modules/pull/269) - -Bugfixes --------- - -- Allows OR operations in API fitlers for ``nb_lookup`` plugin (https://github.com/netbox-community/ansible_modules/issues/246) -- Build the ``rear_port`` and ``rear_port_template`` query_params to properly find rear port (https://github.com/netbox-community/ansible_modules/issues/262) -- Compares tags as a set to prevent issues with order difference between user supplied tags and NetBox API (https://github.com/netbox-community/ansible_modules/issues/242) -- Fixes typo for ``CONVERT_TO_ID`` mapping in ``netbox_utils`` for ``dcim.powerport`` and ``dcim.poweroutlet`` (https://github.com/netbox-community/ansible_modules/pull/265) -- Fixes typo for ``CONVERT_TO_ID`` mapping in ``netbox_utils`` for ``dcim.rearport`` (https://github.com/netbox-community/ansible_modules/pull/261) -- Normalize ``mac_address`` to upper case (https://github.com/netbox-community/ansible_modules/issues/254) -- Normalize descriptions to remove any extra whitespace (https://github.com/netbox-community/ansible_modules/issues/243) - -New Modules +New Plugins ----------- -- netbox.netbox.netbox_cable - Create, update or delete cables within Netbox -- netbox.netbox.netbox_device_bay_template - Create, update or delete device bay templates within Netbox -- netbox.netbox.netbox_device_interface_template - Creates or removes interfaces on devices from Netbox -- netbox.netbox.netbox_virtual_chassis - Create, update or delete virtual chassis within Netbox - -v0.2.3 -====== - -Minor Changes -------------- - -- Adds ``discovered`` field to ``netbox_inventory_item`` (https://github.com/netbox-community/ansible_modules/issues/187) -- Adds ``query_params`` to all modules to allow users to define the ``query_params`` (https://github.com/netbox-community/ansible_modules/issues/215) -- Adds ``tenant`` field to ``netbox_cluster`` (https://github.com/netbox-community/ansible_modules/pull/219) -- Allows private key to be passed in to ``validate_certs`` within modules (https://github.com/netbox-community/ansible_modules/issues/216) -- Better error handling if read-only token is provided for modules. Updated README as well to say that a ``write-enabled`` token is required (https://github.com/netbox-community/ansible_modules/pull/238) - -Bugfixes --------- - -- Fixes bug in ``netbox_prefix`` failing when using ``check_mode`` (https://github.com/netbox-community/ansible_modules/issues/228) -- Fixes bug in inventory plugin that fails if there are either no virtual machines, but devices defined in NetBox or vice versa from failing when ``fetch_all`` is set to ``False`` (https://github.com/netbox-community/ansible_modules/issues/214) -- Normalize any string values that are passed in via Jinja into an integer within the `_normalize_data` method (https://github.com/netbox-community/ansible_modules/issues/231) - -New Modules ------------ - -- netbox.netbox.netbox_console_port - Create, update or delete console ports within Netbox -- netbox.netbox.netbox_console_port_template - Create, update or delete console port templates within Netbox -- netbox.netbox.netbox_console_server_port - Create, update or delete console server ports within Netbox -- netbox.netbox.netbox_console_server_port_template - Create, update or delete console server port templates within Netbox -- netbox.netbox.netbox_front_port - Create, update or delete front ports within Netbox -- netbox.netbox.netbox_front_port_template - Create, update or delete front port templates within Netbox -- netbox.netbox.netbox_power_feed - Create, update or delete power feeds within Netbox -- netbox.netbox.netbox_power_outlet - Create, update or delete power outlets within Netbox -- netbox.netbox.netbox_power_outlet_template - Create, update or delete power outlet templates within Netbox -- netbox.netbox.netbox_power_panel - Create, update or delete power panels within Netbox -- netbox.netbox.netbox_power_port - Create, update or delete power ports within Netbox -- netbox.netbox.netbox_power_port_template - Create, update or delete power port templates within Netbox -- netbox.netbox.netbox_rear_port - Create, update or delete rear ports within Netbox -- netbox.netbox.netbox_rear_port_template - Create, update or delete rear port templates within Netbox - -v0.2.2 -====== - -Minor Changes -------------- - -- Changed ``validate_certs`` to ``raw`` to allow private keys to be passed in (https://github.com/netbox-community/ansible_modules/issues/211) - -Bugfixes --------- - -- Added ``interfaces`` to ``ALLOWED_QUERY_PARAMS`` for ip addresses searches (https://github.com/netbox-community/ansible_modules/issues/201) -- Added ``type`` to ``ALLOWED_QUERY_PARAMS`` for interface searches (https://github.com/netbox-community/ansible_modules/issues/208) -- Remove ``rack`` as a choice when creating virtual machines (https://github.com/netbox-community/ansible_modules/pull/221) - -v0.2.1 -====== - -Minor Changes -------------- - -- Added 21" width to netbox_rack (https://github.com/netbox-community/ansible_modules/pull/190) -- Added cluster, cluster_type, and cluster_group to group_by option in inventory plugin (https://github.com/netbox-community/ansible_modules/issues/188) -- Added option to change host_vars to singular rather than having single element lists (https://github.com/netbox-community/ansible_modules/issues/141) -- Added option to flatten ``config_context`` and ``custom_fields`` (https://github.com/netbox-community/ansible_modules/issues/193) - -Bugfixes --------- - -- Added ``type`` to ``netbox_device_interface`` and deprecation notice for ``form_factor`` (https://github.com/netbox-community/ansible_modules/issues/193) -- Fixes inventory performance issues, properly shows virtual chassis masters. (https://github.com/netbox-community/ansible_modules/pull/202) - -v0.2.0 -====== - -Minor Changes -------------- - -- Add ``custom_fields`` to ``netbox_virtual_machine`` (https://github.com/netbox-community/ansible_modules/issues/170) -- Add ``device_query_filters`` and ``vm_query_filters`` to allow users to specify query filters for the specific type (https://github.com/netbox-community/ansible_modules/issues/140) -- Added ``group_names_raw`` option to the netbox inventory to allow users have the group names be the slug rather than prepending the group name with the type (https://github.com/netbox-community/ansible_modules/issues/138) -- Added ``raw_output`` option to netbox lookup plugin to return the exact output from the API with no doctoring (https://github.com/netbox-community/ansible_modules/pull/136) -- Added ``services`` option to the netbox inventory to allow users to toggle whether services are included or not (https://github.com/netbox-community/ansible_modules/pull/143) -- Added ``update_vc_child`` option to netbox_device_interface to allow child interfaces to be updated if device specified is the master device within the virtual chassis (https://github.com/netbox-community/ansible_modules/issues/105) -- Remove token from being required for nb_inventory as some NetBox setups don't require authorization for GET functions (https://github.com/netbox-community/ansible_modules/issues/177) -- Remove token from being required for nb_lookup as some NetBox setups don't require authorization for GET functions (https://github.com/netbox-community/ansible_modules/issues/183) - -Breaking Changes / Porting Guide --------------------------------- - -- Change ``ip-addresses`` key in netbox inventory plugin to ``ip_addresses`` (https://github.com/netbox-community/ansible_modules/issues/139) - -Bugfixes --------- - -- Allow integers to be passed in via Jinja string to properly convert back to integer (https://github.com/netbox-community/ansible_modules/issues/45) -- Allow services to be created with a different protocol (https://github.com/netbox-community/ansible_modules/issues/174) -- Properly find LAG if defined just as a string rather than dictionary with the relevant data (https://github.com/netbox-community/ansible_modules/issues/166) -- Removed choices within argument_spec for ``mode`` in ``netbox_device_interface`` and ``netbox_vm_interface``. This allows the API to return any error if an invalid choice is selected for ``mode`` (https://github.com/netbox-community/ansible_modules/issues/151) -- Updated rack width choices for latest NetBox version (https://github.com/netbox-community/ansible_modules/issues/167) - -v0.1.10 -======= - -Bugfixes --------- - -- Updated inventory plugin name from netbox.netbox.netbox to netbox.netbox.nb_inventory (https://github.com/netbox-community/ansible_modules/pull/129) - -v0.1.9 -====== - -Breaking Changes / Porting Guide --------------------------------- - -- This version has a few breaking changes due to new namespace and collection name. I felt it necessary to change the name of the lookup plugin and inventory plugin just not to have a non descriptive namespace call to use them. Below is an example: - ``netbox.netbox.netbox`` would be used for both inventory plugin and lookup plugin, but in different contexts so no collision will arise, but confusion will. - I renamed the lookup plugin to ``nb_lookup`` so it will be used with the FQCN ``netbox.netbox.nb_lookup``. - The inventory plugin will now be called within an inventory file by ``netbox.netbox.nb_inventory`` - -Bugfixes --------- - -- Update ``netbox_tenant`` and ``netbox_tenant_group`` to use slugs for searching (available since NetBox 2.6). Added slug options to netbox_site, netbox_tenant, netbox_tenant_group (https://github.com/netbox-community/ansible_modules/pull/120) - -v0.1.8 -====== - -Bugfixes --------- - -- If interface existed already, caused traceback and crashed playbook (https://github.com/netbox-community/ansible_modules/issues/114) - -v0.1.7 -====== - -Minor Changes -------------- - -- Added fetching services for devices in Netbox Inventory Plugin (https://github.com/netbox-community/ansible_modules/issues/58) -- Added option for interfaces and IP addresses of interfaces to be fetched via inventory plugin (https://github.com/netbox-community/ansible_modules/issues/60) -- Change lookups to property for subclassing of inventory plugin (https://github.com/netbox-community/ansible_modules/issues/62) - -Bugfixes --------- - -- Assigning to parent log now finds LAG interface type dynamically rather than set statically in code (https://github.com/netbox-community/ansible_modules/issues/106) -- Create device with empty string to assign the device a UUID (https://github.com/netbox-community/ansible_modules/issues/107) -- If query_filters supplied are not allowed for either device or VM lookups, or no valid query filters, it will not attempt to fetch from devices or VMs. This should prevent devices or VMs from being fetched that do not meet the query_filters specified. (https://github.com/netbox-community/ansible_modules/issues/63) -- Properly create interface on correct device when in a VC (https://github.com/netbox-community/ansible_modules/issues/105) -- Updated _to_slug to follow same constructs NetBox uses (https://github.com/netbox-community/ansible_modules/issues/95) - -v0.1.6 -====== - -Minor Changes -------------- - -- Add dns_name to netbox_ip_address (https://github.com/netbox-community/ansible_modules/issues/84) -- Add region and region_id to query_filter for Netbox Inventory plugin (https://github.com/netbox-community/ansible_modules/issues/83) - -Bugfixes --------- - -- Fixed vlan searching with vlan_group for netbox_prefix (https://github.com/netbox-community/ansible_modules/issues/85) -- Removed static choices from netbox_utils and now pulls the choices for each endpoint from the Netbox API at call time (https://github.com/netbox-community/ansible_modules/issues/67) - -v0.1.5 -====== - -Bugfixes --------- - -- Add argument specs for every module to validate data passed in. Fixes some idempotency issues. POSSIBLE BREAKING CHANGE (https://github.com/netbox-community/ansible_modules/issues/68) -- Allow name updates to manufacturers (https://github.com/netbox-community/ansible_modules/issues/76) -- Builds slug for netbox_device_type from model which is now required and slug is optional. Model will be slugified if slug is not provided BREAKING CHANGE (https://github.com/netbox-community/ansible_modules/issues/77) -- Fail module with proper exception when connection to Netbox API cannot be established (https://github.com/netbox-community/ansible_modules/issues/80) -- netbox_device_interface Lag no longer has to be a dictionary and the value of the key can be the name of the LAG (https://github.com/netbox-community/ansible_modules/issues/81) -- netbox_ip_address If no address has no CIDR notation, it will convert it into a /32 and pass to Netbox. Fixes idempotency cidr notation is not provided (https://github.com/netbox-community/ansible_modules/issues/78) - -New Modules ------------ - -- netbox.netbox.netbox_service - Creates or removes service from Netbox - -v0.1.3 -====== - -Bugfixes --------- - -- Add error handling for invalid key_file for lookup plugin (https://github.com/netbox-community/ansible_modules/issues/52) - -v0.1.2 -====== - -Bugfixes --------- - -- Allow endpoint choices to be an integer of the choice rather than attempting to dynamically determine the choice ID (https://github.com/netbox-community/ansible_modules/issues/47) - -v0.1.1 -====== - -Bugfixes --------- - -- Fixed issue with netbox_vm_interface where it would fail if different virtual machine had the same interface name (https://github.com/netbox-community/ansible_modules/issues/40) -- Updated netbox_ip_address to find interfaces on virtual machines correctly (https://github.com/netbox-community/ansible_modules/issues/40) - -v0.1.0 -====== - -Minor Changes -------------- - -- Add ``primary_ip4/6`` to ``netbox_ip_address`` (https://github.com/netbox-community/ansible_modules/issues/10) - -Breaking Changes / Porting Guide --------------------------------- +Lookup +~~~~~~ -- Changed ``group`` to ``tenant_group`` in ``netbox_tenant.py`` (https://github.com/netbox-community/ansible_modules/issues/9) -- Changed ``role`` to ``prefix_role`` in ``netbox_prefix.py`` (https://github.com/netbox-community/ansible_modules/issues/9) -- Module failures when required fields arent provided (https://github.com/netbox-community/ansible_modules/issues/24) -- Renamed ``netbox_interface`` to ``netbox_device_interface`` (https://github.com/netbox-community/ansible_modules/issues/9) +- networktocode.nautobot.lookup - Queries and returns elements from Nautobot New Modules ----------- -- netbox.netbox.netbox_aggregate - Creates or removes aggregates from Netbox -- netbox.netbox.netbox_circuit - Create, update or delete circuits within Netbox -- netbox.netbox.netbox_circuit_termination - Create, update or delete circuit terminations within Netbox -- netbox.netbox.netbox_circuit_type - Create, update or delete circuit types within Netbox -- netbox.netbox.netbox_cluster - Create, update or delete clusters within Netbox -- netbox.netbox.netbox_cluster_group - Create, update or delete cluster groups within Netbox -- netbox.netbox.netbox_cluster_type - Create, update or delete cluster types within Netbox -- netbox.netbox.netbox_device_bay - Create, update or delete device bays within Netbox -- netbox.netbox.netbox_device_role - Create, update or delete devices roles within Netbox -- netbox.netbox.netbox_device_type - Create, update or delete device types within Netbox -- netbox.netbox.netbox_inventory_item - Creates or removes inventory items from Netbox -- netbox.netbox.netbox_ipam_role - Creates or removes ipam roles from Netbox -- netbox.netbox.netbox_manufacturer - Create or delete manufacturers within Netbox -- netbox.netbox.netbox_platform - Create or delete platforms within Netbox -- netbox.netbox.netbox_provider - Create, update or delete providers within Netbox -- netbox.netbox.netbox_rack - Create, update or delete racks within Netbox -- netbox.netbox.netbox_rack_group - Create, update or delete racks groups within Netbox -- netbox.netbox.netbox_rack_role - Create, update or delete racks roles within Netbox -- netbox.netbox.netbox_region - Creates or removes regions from Netbox -- netbox.netbox.netbox_rir - Create, update or delete RIRs within Netbox -- netbox.netbox.netbox_tenant - Creates or removes tenants from Netbox -- netbox.netbox.netbox_tenant_group - Creates or removes tenant groups from Netbox -- netbox.netbox.netbox_virtual_machine - Create, update or delete virtual_machines within Netbox -- netbox.netbox.netbox_vlan - Create, update or delete vlans within Netbox -- netbox.netbox.netbox_vlan_group - Create, update or delete vlans groups within Netbox -- netbox.netbox.netbox_vm_interface - Creates or removes interfaces from virtual machines in Netbox -- netbox.netbox.netbox_vrf - Create, update or delete vrfs within Netbox +- networktocode.nautobot.aggregate - Creates or removes aggregates from Nautobot +- networktocode.nautobot.cable - Create, update or delete cables within Nautobot +- networktocode.nautobot.circuit - Create, update or delete circuits within Nautobot +- networktocode.nautobot.circuit_termination - Create, update or delete circuit terminations within Nautobot +- networktocode.nautobot.circuit_type - Create, update or delete circuit types within Nautobot +- networktocode.nautobot.cluster - Create, update or delete clusters within Nautobot +- networktocode.nautobot.cluster_group - Create, update or delete cluster groups within Nautobot +- networktocode.nautobot.cluster_type - Create, update or delete cluster types within Nautobot +- networktocode.nautobot.console_port - Create, update or delete console ports within Nautobot +- networktocode.nautobot.console_port_template - Create, update or delete console port templates within Nautobot +- networktocode.nautobot.console_server_port - Create, update or delete console server ports within Nautobot +- networktocode.nautobot.console_server_port_template - Create, update or delete console server port templates within Nautobot +- networktocode.nautobot.device - Create, update or delete devices within Nautobot +- networktocode.nautobot.device_bay - Create, update or delete device bays within Nautobot +- networktocode.nautobot.device_bay_template - Create, update or delete device bay templates within Nautobot +- networktocode.nautobot.device_interface - Creates or removes interfaces on devices from Nautobot +- networktocode.nautobot.device_interface_template - Creates or removes interfaces on devices from Nautobot +- networktocode.nautobot.device_role - Create, update or delete devices roles within Nautobot +- networktocode.nautobot.device_type - Create, update or delete device types within Nautobot +- networktocode.nautobot.front_port - Create, update or delete front ports within Nautobot +- networktocode.nautobot.front_port_template - Create, update or delete front port templates within Nautobot +- networktocode.nautobot.inventory_item - Creates or removes inventory items from Nautobot +- networktocode.nautobot.ip_address - Creates or removes IP addresses from Nautobot +- networktocode.nautobot.ipam_role - Creates or removes ipam roles from Nautobot +- networktocode.nautobot.manufacturer - Create or delete manufacturers within Nautobot +- networktocode.nautobot.platform - Create or delete platforms within Nautobot +- networktocode.nautobot.power_feed - Create, update or delete power feeds within Nautobot +- networktocode.nautobot.power_outlet - Create, update or delete power outlets within Nautobot +- networktocode.nautobot.power_outlet_template - Create, update or delete power outlet templates within Nautobot +- networktocode.nautobot.power_panel - Create, update or delete power panels within Nautobot +- networktocode.nautobot.power_port - Create, update or delete power ports within Nautobot +- networktocode.nautobot.power_port_template - Create, update or delete power port templates within Nautobot +- networktocode.nautobot.prefix - Creates or removes prefixes from Nautobot +- networktocode.nautobot.provider - Create, update or delete providers within Nautobot +- networktocode.nautobot.rack - Create, update or delete racks within Nautobot +- networktocode.nautobot.rack_group - Create, update or delete racks groups within Nautobot +- networktocode.nautobot.rack_role - Create, update or delete racks roles within Nautobot +- networktocode.nautobot.rear_port - Create, update or delete rear ports within Nautobot +- networktocode.nautobot.rear_port_template - Create, update or delete rear port templates within Nautobot +- networktocode.nautobot.region - Creates or removes regions from Nautobot +- networktocode.nautobot.rir - Create, update or delete RIRs within Nautobot +- networktocode.nautobot.route_target - Creates or removes route targets from Nautobot +- networktocode.nautobot.service - Creates or removes service from Nautobot +- networktocode.nautobot.site - Creates or removes sites from Nautobot +- networktocode.nautobot.status - Creates or removes status from Nautobot +- networktocode.nautobot.tag - Creates or removes tags from Nautobot +- networktocode.nautobot.tenant - Creates or removes tenants from Nautobot +- networktocode.nautobot.tenant_group - Creates or removes tenant groups from Nautobot +- networktocode.nautobot.virtual_chassis - Create, update or delete virtual chassis within Nautobot +- networktocode.nautobot.virtual_machine - Create, update or delete virtual_machines within Nautobot +- networktocode.nautobot.vlan - Create, update or delete vlans within Nautobot +- networktocode.nautobot.vlan_group - Create, update or delete vlans groups within Nautobot +- networktocode.nautobot.vm_interface - Creates or removes interfaces from virtual machines in Nautobot +- networktocode.nautobot.vrf - Create, update or delete vrfs within Nautobot diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 3943742d..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,347 +0,0 @@ -# Contributing - -## Modules - -The structure of the Netbox modules attempts to follow the layout of the Netbox API by having a module_util for each application (`dcim, ipam, tenancy, etc`) that inherits from a base module (`NetboxModule - netbox_utils.py`) and then implements the specific endpoints within the correct application module. - -e.g. Add logic for adding devices under netbox_dcim.py or ip addresses under netbox_ipam.py - -In turn when creating the actual modules, we're just calling a single function and passing in the Ansible Module and the endpoint. This means all the logic is within the specific application's module_util module and a lot of the logic should be the same for most endpoints since it is a basic operation of using the desired state of the endpoint and then either making sure it exists, updating it if it does exist, or removing it. There may be some special logic for other endpoints, but it should be minimal. - -(Ansible Module) netbox_{{ endpoint }} -> (Module Util) netbox_{{ application }} -> (Module Util) netbox_utils - -These modules are built using the pynetbox Python library which allows you to interact with Netbox using objects. Most of this is abstracted away when creating more modules, but something to be aware of. The reasoning for using underscores within the endpoint names is so the endpoints work with pynetbox. - -An example of connecting to a Netbox instance and then choosing the application, endpoint, and operation: - -```python -import pynetbox - -nb = pynetbox.api("http://localhost:32768", "0123456789abcdef0123456789abcdef01234567") - -# applications -nb.circuits -nb.dcim -nb.extras -nb.ipam -nb.secrets -nb.tenancy -nb.virtualization - -# endpoints (small sample) -nb.circuits.providers -nb.dcim.devices -nb.dcim.device_types -nb.ipam.vrfs -nb.ipam.ip_addresses -nb.tenancy.tenant_groups - -# operations -## Grabs a list of all endpoints -nb.dcim.devices.**all** -## Can pass a list of dicts to create multiple of the endpoints or just a dict to create a single endpoint -nb.dcim.devices.**create** -## Can filter to grab a name of the endpoint being filtered, not an object (Uses the same search criteria as the API) -nb.dcim.devices.**filter** -e.g. nb.dcim.devices.filter(name="test") -## Will retrieve the actual object that can be manipulated (updated, etc.) (Uses the same search criteria as the API) -nb.dcim.devices.**get** -e.g. nb.dcim.devices.get(name="test") - -# Manipulate object after using .get -## Now you can manipulate the object the same as a Python object -device = nb.dcim.devices.get(name="test") -device.description = "Test Description" -## Patch operation (patches the data to the API) -device.save() - -## If you were to just update the data in a fell swoop -serial = {"serial": "FXS10001", "description": "Test Description"} -## this operation will update the device and use the .save() method behind the scenes -device.update(serial) -``` - -## Adding an Endpoint - -### Updating Variables within Module Utils - -First thing is to setup several variables within **netbox_utils** and **netbox_application** module utils: - -Check the following variable to make sure the endpoint is within the correct application within **netbox_utils**: - -```python -API_APPS_ENDPOINTS = dict( - circuits=[], - dcim=[ - "devices", - "device_roles", - "device_types", - "interfaces", - "manufacturers", - "platforms", - "racks", - "rack_groups", - "rack_roles", - "regions", - "sites", - ], - extras=[], - ipam=["ip_addresses", "prefixes", "roles", "vlans", "vlan_groups", "vrfs"], - secrets=[], - tenancy=["tenants", "tenant_groups"], - virtualization=["clusters"], -) -``` - -Create a new variable in the **netbox_application** module until that matches the endpoint with any spaces being converted to underscores and all lowercase: - -```python -NB_DEVICE_TYPES = "device_types" -``` - -Add the endpoint to the **run** method of supported endpoints: - -```python -class NetboxDcimModule(NetboxModule): - def __init__(self, module, endpoint): - super().__init__(module, endpoint) - - def run(self): - """ - This function should have all necessary code for endpoints within the application - to create/update/delete the endpoint objects - Supported endpoints: - - device_types -``` - -Add the endpoint to the **ENDPOINT_NAME_MAPPING** variable within the **netbox_utils** module util. - -```python -ENDPOINT_NAME_MAPPING = { - "device_types": "device_type", -} -``` - -Log into your Netbox instance and navigate to `/api/docs` and searching for the **POST** documents for the given endpoint you're looking to create. -![POST Results](docs/media/postresults.PNG) -The module should implement all available fields that are not the **id** or **readOnly** such as the **created, last_updated, device_count** in the example above. - -Add the endpoint to the **ALLOWED_QUERY_PARAMS** variable within the **netbox_utils** module util. This should be something unique for the endpoint and will be used within the **_build_query_params** method to dynamically build query params. - -```python -ALLOWED_QUERY_PARAMS = { - "device_type": set(["slug"]), -} -``` - -If the endpoint has a key that uses an **Array**, you will need to add the endpoint to **REQUIRED_ID_FIND** and the key that will need to be converted. The lookup is done from the endpoint and pulls the choices from the API. - -```python -REQUIRED_ID_FIND = { - "circuits": set(["status"]), - "devices": set(["status", "face"]), - "device_types": set(["subdevice_role"]), - "interfaces": set(["form_factor", "mode"]), - "ip_addresses": set(["status", "role"]), - "prefixes": set(["status"]), - "racks": set(["status", "outer_unit", "type"]), - "services": set(["protocol"]), - "sites": set(["status"]), - "virtual_machines": set(["status", "face"]), - "vlans": set(["status"]), -} -# This is the method that uses the REQUIRED_ID_FIND variable (no change should be required within the method) - def _fetch_choice_value(self, search, endpoint): - app = self._find_app(endpoint) - nb_app = getattr(self.nb, app) - nb_endpoint = getattr(nb_app, endpoint) - endpoint_choices = nb_endpoint.choices() - - choices = [x for x in chain.from_iterable(endpoint_choices.values())] - - for item in choices: - if item["display_name"].lower() == search.lower(): - return item["value"] - elif item["value"] == search.lower(): - return item["value"] - self._handle_errors( - msg="%s was not found as a valid choice for %s" % (search, endpoint) - ) - - def _change_choices_id(self, endpoint, data): - """Used to change data that is static and under _choices for the application. - ex. DEVICE_STATUS - :returns data (dict): Returns the user defined data back with updated fields for _choices - :params endpoint (str): The endpoint that will be used for mapping to required _choices - :params data (dict): User defined data passed into the module - """ - if REQUIRED_ID_FIND.get(endpoint): - required_choices = REQUIRED_ID_FIND[endpoint] - for choice in required_choices: - if data.get(choice): - if isinstance(data[choice], int): - continue - choice_value = self._fetch_choice_value(data[choice], endpoint) - data[choice] = choice_value - - return data -``` - -If the key is something that pertains to a different endpoint such as **manufacturer** it will need to be added to a few variables within **netbox_utils**. - -```python -CONVERT_TO_ID = dict( - manufacturer="manufacturers", -) -QUERY_TYPES = dict( - manufacturer="slug", -) -``` - -If **slug** and **name** is required, we should leave **slug** out as an option within the module docs and generate it dynamically. Add the endpoint to **SLUG_REQUIRED** within **netbox_utils** module util. - -```python -SLUG_REQUIRED = { - "device_roles", - "ipam_roles", - "rack_groups", - "rack_roles", - "roles", - "manufacturers", - "platforms", - "vlan_groups", -} -``` - -Add code to the **netbox_application** module util to convert name to **slug**" - -```python -if self.endpoint in SLUG_REQUIRED: - if not data.get("slug"): - data["slug"] = self._to_slug(name) -``` - -If either **role** or **group** are within the acceptable keys to POST to the endpoint, we should prefix it with the endpoint name. This is to prevent the code from trying to fetch an ID from the wrong endpoint. -Add the new key to **CONVERT_KEYS** within **netbox_utils** module util. - -```python -CONVERT_KEYS = { - "prefix_role": "role", - "rack_group": "group", - "rack_role": "role", - "tenant_group": "group", - "vlan_role": "role", - "vlan_group": "group", -} - -# Adding the method that uses this code (no change should be required within the method) -def _convert_identical_keys(self, data): - """ - Used to change non-clashing keys for each module into identical keys that are required - to be passed to pynetbox - ex. rack_role back into role to pass to Netbox - Returns data - :params data (dict): Data dictionary after _find_ids method ran - """ - for key in data: - if key in CONVERT_KEYS: - new_key = CONVERT_KEYS[key] - value = data.pop(key) - data[new_key] = value - - return data -``` - -#### Creating **netbox_endpoint** Module - -Copying an existing module that has close to the same options is typically the path to least resistence and then updating portions of it to fit the new module. - -- Change the author: `Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) ` -- Update the **DOCUMENTATION**/**EXAMPLES**/**RETURN** string with the necessary information - - Main things are module, descriptions, author, version and the sub options under data - - The **RETURN** should return the singular of the endpoint name (done dynamically, but needs to be documented correctly) -- Update the module_util, module, and endpoint variable for the endpoint - - ```python - from ansible_collections.netbox.netbox.plugins.module_utils.netbox_dcim import ( - NetboxDcimModule, - NB_DEVICE_ROLES, - ) - ``` - -- Update the **main()** as necessary: - - ```python - # Add if name is required or change to match required fields - if not module.params["data"].get("name"): - module.fail_json(msg="missing name") - # Make sure the objects are endpoint name and the correct class and variable are being called for the endpoint - netbox_device_role = NetboxDcimModule(module, NB_DEVICE_ROLES) - netbox_device_role.run() - ``` - -#### Testing - -- Please update any associated data within the `tests/unit/module_utils/test_data/` folders for the specified tests. This will most likely be needed as there are a few unit tests that test the data of **ALLOWED_QUERY_PARAMS**, etc. - - ```python - def test_normalize_data_returns_correct_data() - def test_find_app_returns_valid_app() - def test_change_choices_id() - def test_build_query_params_no_child() - def test_build_query_params_child() - ``` - -- Check each test above to see which `test_data` it uses and edit the corresponding data.json file -- Please add or update an existing play to test the new Netbox module for integration testing within `tests/integration/integration-tests.yml`. Make sure to test creation, duplicate, update (if possible), and deletion along with any other conditions that may want to be tested. -- Run `pytest -vv` to make sure all unit tests pass -- Run `black .` within the base directory for black formatting as it's required for tests to pass -- Run `ansible-lint integration-tests.yml` it's required for tests to pass -- Check necessary dependencies defined within `.travis.yml` for now if you're wanting to test locally - - -## Inventory - -Integration tests are run by comparing `ansible-inventory --list` against known output, for a few different inventory files with different options. - -When the inventory plugin is updated in a way that changes this output (or `netbox-deploy.py` is changed), the test data used for comparison will need to be updated. There is a script `./hacking/update_test_inventories.sh` to do this. - -Run from the root project working directory, and make sure you have a clean test instance of Netbox set up with test data loaded into it from `./tests/integration/netbox-deploy.py` - -``` -./hacking/update_test_inventories.sh -``` - -After running the script, to prevent introducing a regression you'll need to manually read through the diff to verify it looks correct. - - -# Setting up a local dev/test environment - -You can see the specific details of what happens in CI in `.travis.yml`. An overview of what you need to do is: - -* Run a test instance of Netbox on port 32768. The `netbox-docker` project makes this easy. - -``` -git clone git@github.com:netbox-community/netbox-docker.git -cd netbox-docker -export VERSION=snapshot -docker-compose pull -docker-compose up -d -``` - -* Check out this repo to a directory named `netbox` in a directory tree `ansible_collections/netbox/netbox` - running some `ansible-test` commands will complain if there's no `ansible_collections` in the current directory path, so you'd have to build/install the collection every time you want to run tests. - -``` -git clone git@github.com:netbox-community/ansible_modules.git ansible_collections/netbox/netbox -``` - -* Recommended - set up a Python virtualenv, in a directory above the collection. If you create a virtualenv inside the `ansible_modules` working directory `ansible-galaxy collection build` will include it as part of the build (until Ansible 2.10 where `build_ignore` is supported) - -``` -cd ../../.. -python3 -m venv venv -source venv/bin/activate -cd ansible_collections/netbox/netbox -``` - -* Install required python packages - see `.travis.yml` for the latest `pip install` list in different environments. diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..3d332846 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..4c7787b8 --- /dev/null +++ b/NOTICE @@ -0,0 +1,6 @@ +Nautobot Ansible Collection +Copyright 2021 Network to Code, LLC + +This product includes software copyrighted and licensed under GPLv3 by Mikhail Yohman. + +The Initial Developers of some parts of this product, which are copied from, derived from, or inspired by NetBox Ansible Collection, are Mikhail Yohman and the NetBox Ansible Collection open source community (https://github.com/netbox-community/ansible_modules) and licensed under GPLv3. \ No newline at end of file diff --git a/README.md b/README.md index 682f90c3..ad58e2ac 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,17 @@ -![Devel CI Status](https://github.com/netbox-community/ansible_modules/workflows/All%20CI%20related%20tasks/badge.svg?branch=devel) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) -![Release](https://img.shields.io/github/v/release/netbox-community/ansible_modules) -# NetBox modules for Ansible using Ansible Collections +# Nautobot modules for Ansible using Ansible Collections -We have moved this collection to a different namespace and collection name on Ansible Galaxy. The new versions will be at `netbox.netbox`. - -To keep the code simple, we only officially support the two latest releases of NetBox and don't guarantee backwards compatibility beyond that. We do try and keep these breaking changes to a minimum, but sometimes changes to NetBox's API cause us to have to make breaking changes. +To keep the code simple, we only officially support the two latest releases of Nautobot and don't guarantee backwards compatibility beyond that. ## Requirements -- NetBox 2.6+ or the two latest NetBox releases +- Nautobot 1.0.0+ or the two latest Nautobot releases - Python 3.6+ -- Python modules: **pynetbox 5.0.4+** +- Python modules: **pynautobot 1.0.0+** - Ansible 2.9+ -- NetBox write-enabled token when using modules or read-only token for `nb_lookup/nb_inventory` +- Nautobot write-enabled token when using modules or read-only token for `lookup/inventory` -We have a new docs site live that can be found [here](https://netbox-ansible-collection.readthedocs.io/en/latest/). +We have a new docs site live that can be found [here](https://nautobot-ansible.readthedocs.io/en/latest/). > This is a fork of the netbox.netbox Ansible Galaxy collection found at [https://github.com/netbox-community/ansible_modules](https://github.com/netbox-community/ansible_modules) in February, 2021 \ No newline at end of file diff --git a/ansible.cfg b/ansible.cfg index 4501b1d8..57239e45 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -2,4 +2,4 @@ force_valid_group_names = always [inventory] -enable_plugins = netbox.netbox.nb_inventory, auto, host_list, yaml, ini, toml, script +enable_plugins = networktocode.nautobot.inventory, auto, host_list, yaml, ini, toml, script diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index c14516a6..cc89f8bb 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1,483 +1,179 @@ ancestor: null releases: - 0.1.0: + 1.0.0: changes: - breaking_changes: - - Changed ``group`` to ``tenant_group`` in ``netbox_tenant.py`` (https://github.com/netbox-community/ansible_modules/issues/9) - - Changed ``role`` to ``prefix_role`` in ``netbox_prefix.py`` (https://github.com/netbox-community/ansible_modules/issues/9) - - Module failures when required fields arent provided (https://github.com/netbox-community/ansible_modules/issues/24) - - Renamed ``netbox_interface`` to ``netbox_device_interface`` (https://github.com/netbox-community/ansible_modules/issues/9) - minor_changes: - - Add ``primary_ip4/6`` to ``netbox_ip_address`` (https://github.com/netbox-community/ansible_modules/issues/10) + release_summary: 'This is the first official release of an Ansible Collection + for Nautobot. + + This project is forked from the ``netbox.netbox`` Ansible Collection.' + fragments: + - release-v1.0.0.yml modules: - - description: Creates or removes aggregates from Netbox - name: netbox_aggregate + - description: Creates or removes aggregates from Nautobot + name: aggregate namespace: '' - - description: Create, update or delete circuits within Netbox - name: netbox_circuit + - description: Create, update or delete cables within Nautobot + name: cable namespace: '' - - description: Create, update or delete circuit terminations within Netbox - name: netbox_circuit_termination + - description: Create, update or delete circuits within Nautobot + name: circuit namespace: '' - - description: Create, update or delete circuit types within Netbox - name: netbox_circuit_type + - description: Create, update or delete circuit terminations within Nautobot + name: circuit_termination namespace: '' - - description: Create, update or delete clusters within Netbox - name: netbox_cluster + - description: Create, update or delete circuit types within Nautobot + name: circuit_type namespace: '' - - description: Create, update or delete cluster groups within Netbox - name: netbox_cluster_group + - description: Create, update or delete clusters within Nautobot + name: cluster namespace: '' - - description: Create, update or delete cluster types within Netbox - name: netbox_cluster_type + - description: Create, update or delete cluster groups within Nautobot + name: cluster_group namespace: '' - - description: Create, update or delete device bays within Netbox - name: netbox_device_bay + - description: Create, update or delete cluster types within Nautobot + name: cluster_type namespace: '' - - description: Create, update or delete devices roles within Netbox - name: netbox_device_role + - description: Create, update or delete console ports within Nautobot + name: console_port namespace: '' - - description: Create, update or delete device types within Netbox - name: netbox_device_type + - description: Create, update or delete console port templates within Nautobot + name: console_port_template namespace: '' - - description: Creates or removes inventory items from Netbox - name: netbox_inventory_item + - description: Create, update or delete console server ports within Nautobot + name: console_server_port namespace: '' - - description: Creates or removes ipam roles from Netbox - name: netbox_ipam_role + - description: Create, update or delete console server port templates within Nautobot + name: console_server_port_template namespace: '' - - description: Create or delete manufacturers within Netbox - name: netbox_manufacturer + - description: Create, update or delete devices within Nautobot + name: device namespace: '' - - description: Create or delete platforms within Netbox - name: netbox_platform + - description: Create, update or delete device bays within Nautobot + name: device_bay namespace: '' - - description: Create, update or delete providers within Netbox - name: netbox_provider + - description: Create, update or delete device bay templates within Nautobot + name: device_bay_template namespace: '' - - description: Create, update or delete racks within Netbox - name: netbox_rack + - description: Creates or removes interfaces on devices from Nautobot + name: device_interface namespace: '' - - description: Create, update or delete racks groups within Netbox - name: netbox_rack_group + - description: Creates or removes interfaces on devices from Nautobot + name: device_interface_template namespace: '' - - description: Create, update or delete racks roles within Netbox - name: netbox_rack_role + - description: Create, update or delete devices roles within Nautobot + name: device_role namespace: '' - - description: Creates or removes regions from Netbox - name: netbox_region + - description: Create, update or delete device types within Nautobot + name: device_type namespace: '' - - description: Create, update or delete RIRs within Netbox - name: netbox_rir + - description: Create, update or delete front ports within Nautobot + name: front_port namespace: '' - - description: Creates or removes tenants from Netbox - name: netbox_tenant + - description: Create, update or delete front port templates within Nautobot + name: front_port_template namespace: '' - - description: Creates or removes tenant groups from Netbox - name: netbox_tenant_group + - description: Creates or removes inventory items from Nautobot + name: inventory_item namespace: '' - - description: Create, update or delete virtual_machines within Netbox - name: netbox_virtual_machine + - description: Creates or removes IP addresses from Nautobot + name: ip_address namespace: '' - - description: Create, update or delete vlans within Netbox - name: netbox_vlan + - description: Creates or removes ipam roles from Nautobot + name: ipam_role namespace: '' - - description: Create, update or delete vlans groups within Netbox - name: netbox_vlan_group + - description: Create or delete manufacturers within Nautobot + name: manufacturer namespace: '' - - description: Creates or removes interfaces from virtual machines in Netbox - name: netbox_vm_interface + - description: Create or delete platforms within Nautobot + name: platform namespace: '' - - description: Create, update or delete vrfs within Netbox - name: netbox_vrf + - description: Create, update or delete power feeds within Nautobot + name: power_feed namespace: '' - 0.1.1: - changes: - bugfixes: - - Fixed issue with netbox_vm_interface where it would fail if different virtual - machine had the same interface name (https://github.com/netbox-community/ansible_modules/issues/40) - - Updated netbox_ip_address to find interfaces on virtual machines correctly - (https://github.com/netbox-community/ansible_modules/issues/40) - 0.1.10: - changes: - bugfixes: - - Updated inventory plugin name from netbox.netbox.netbox to netbox.netbox.nb_inventory - (https://github.com/netbox-community/ansible_modules/pull/129) - 0.1.2: - changes: - bugfixes: - - Allow endpoint choices to be an integer of the choice rather than attempting - to dynamically determine the choice ID (https://github.com/netbox-community/ansible_modules/issues/47) - 0.1.3: - changes: - bugfixes: - - Add error handling for invalid key_file for lookup plugin (https://github.com/netbox-community/ansible_modules/issues/52) - 0.1.5: - changes: - bugfixes: - - Add argument specs for every module to validate data passed in. Fixes some - idempotency issues. POSSIBLE BREAKING CHANGE (https://github.com/netbox-community/ansible_modules/issues/68) - - Allow name updates to manufacturers (https://github.com/netbox-community/ansible_modules/issues/76) - - Builds slug for netbox_device_type from model which is now required and slug - is optional. Model will be slugified if slug is not provided BREAKING CHANGE - (https://github.com/netbox-community/ansible_modules/issues/77) - - Fail module with proper exception when connection to Netbox API cannot be - established (https://github.com/netbox-community/ansible_modules/issues/80) - - netbox_device_interface Lag no longer has to be a dictionary and the value - of the key can be the name of the LAG (https://github.com/netbox-community/ansible_modules/issues/81) - - netbox_ip_address If no address has no CIDR notation, it will convert it into - a /32 and pass to Netbox. Fixes idempotency cidr notation is not provided - (https://github.com/netbox-community/ansible_modules/issues/78) - modules: - - description: Creates or removes service from Netbox - name: netbox_service + - description: Create, update or delete power outlets within Nautobot + name: power_outlet namespace: '' - 0.1.6: - changes: - bugfixes: - - Fixed vlan searching with vlan_group for netbox_prefix (https://github.com/netbox-community/ansible_modules/issues/85) - - Removed static choices from netbox_utils and now pulls the choices for each - endpoint from the Netbox API at call time (https://github.com/netbox-community/ansible_modules/issues/67) - minor_changes: - - Add dns_name to netbox_ip_address (https://github.com/netbox-community/ansible_modules/issues/84) - - Add region and region_id to query_filter for Netbox Inventory plugin (https://github.com/netbox-community/ansible_modules/issues/83) - 0.1.7: - changes: - bugfixes: - - Assigning to parent log now finds LAG interface type dynamically rather than - set statically in code (https://github.com/netbox-community/ansible_modules/issues/106) - - Create device with empty string to assign the device a UUID (https://github.com/netbox-community/ansible_modules/issues/107) - - If query_filters supplied are not allowed for either device or VM lookups, - or no valid query filters, it will not attempt to fetch from devices or VMs. - This should prevent devices or VMs from being fetched that do not meet the - query_filters specified. (https://github.com/netbox-community/ansible_modules/issues/63) - - Properly create interface on correct device when in a VC (https://github.com/netbox-community/ansible_modules/issues/105) - - Updated _to_slug to follow same constructs NetBox uses (https://github.com/netbox-community/ansible_modules/issues/95) - minor_changes: - - Added fetching services for devices in Netbox Inventory Plugin (https://github.com/netbox-community/ansible_modules/issues/58) - - Added option for interfaces and IP addresses of interfaces to be fetched via - inventory plugin (https://github.com/netbox-community/ansible_modules/issues/60) - - Change lookups to property for subclassing of inventory plugin (https://github.com/netbox-community/ansible_modules/issues/62) - 0.1.8: - changes: - bugfixes: - - If interface existed already, caused traceback and crashed playbook (https://github.com/netbox-community/ansible_modules/issues/114) - 0.1.9: - changes: - breaking_changes: - - 'This version has a few breaking changes due to new namespace and collection - name. I felt it necessary to change the name of the lookup plugin and inventory - plugin just not to have a non descriptive namespace call to use them. Below - is an example: - - ``netbox.netbox.netbox`` would be used for both inventory plugin and lookup - plugin, but in different contexts so no collision will arise, but confusion - will. - - I renamed the lookup plugin to ``nb_lookup`` so it will be used with the FQCN - ``netbox.netbox.nb_lookup``. - - The inventory plugin will now be called within an inventory file by ``netbox.netbox.nb_inventory`` - - ' - bugfixes: - - Update ``netbox_tenant`` and ``netbox_tenant_group`` to use slugs for searching - (available since NetBox 2.6). Added slug options to netbox_site, netbox_tenant, - netbox_tenant_group (https://github.com/netbox-community/ansible_modules/pull/120) - 0.2.0: - changes: - breaking_changes: - - Change ``ip-addresses`` key in netbox inventory plugin to ``ip_addresses`` - (https://github.com/netbox-community/ansible_modules/issues/139) - bugfixes: - - Allow integers to be passed in via Jinja string to properly convert back to - integer (https://github.com/netbox-community/ansible_modules/issues/45) - - Allow services to be created with a different protocol (https://github.com/netbox-community/ansible_modules/issues/174) - - Properly find LAG if defined just as a string rather than dictionary with - the relevant data (https://github.com/netbox-community/ansible_modules/issues/166) - - Removed choices within argument_spec for ``mode`` in ``netbox_device_interface`` - and ``netbox_vm_interface``. This allows the API to return any error if an - invalid choice is selected for ``mode`` (https://github.com/netbox-community/ansible_modules/issues/151) - - Updated rack width choices for latest NetBox version (https://github.com/netbox-community/ansible_modules/issues/167) - minor_changes: - - Add ``custom_fields`` to ``netbox_virtual_machine`` (https://github.com/netbox-community/ansible_modules/issues/170) - - Add ``device_query_filters`` and ``vm_query_filters`` to allow users to specify - query filters for the specific type (https://github.com/netbox-community/ansible_modules/issues/140) - - Added ``group_names_raw`` option to the netbox inventory to allow users have - the group names be the slug rather than prepending the group name with the - type (https://github.com/netbox-community/ansible_modules/issues/138) - - Added ``raw_output`` option to netbox lookup plugin to return the exact output - from the API with no doctoring (https://github.com/netbox-community/ansible_modules/pull/136) - - Added ``services`` option to the netbox inventory to allow users to toggle - whether services are included or not (https://github.com/netbox-community/ansible_modules/pull/143) - - Added ``update_vc_child`` option to netbox_device_interface to allow child - interfaces to be updated if device specified is the master device within the - virtual chassis (https://github.com/netbox-community/ansible_modules/issues/105) - - Remove token from being required for nb_inventory as some NetBox setups don't - require authorization for GET functions (https://github.com/netbox-community/ansible_modules/issues/177) - - Remove token from being required for nb_lookup as some NetBox setups don't - require authorization for GET functions (https://github.com/netbox-community/ansible_modules/issues/183) - 0.2.1: - changes: - bugfixes: - - Added ``type`` to ``netbox_device_interface`` and deprecation notice for ``form_factor`` - (https://github.com/netbox-community/ansible_modules/issues/193) - - Fixes inventory performance issues, properly shows virtual chassis masters. - (https://github.com/netbox-community/ansible_modules/pull/202) - minor_changes: - - Added 21" width to netbox_rack (https://github.com/netbox-community/ansible_modules/pull/190) - - Added cluster, cluster_type, and cluster_group to group_by option in inventory - plugin (https://github.com/netbox-community/ansible_modules/issues/188) - - Added option to change host_vars to singular rather than having single element - lists (https://github.com/netbox-community/ansible_modules/issues/141) - - Added option to flatten ``config_context`` and ``custom_fields`` (https://github.com/netbox-community/ansible_modules/issues/193) - 0.2.2: - changes: - bugfixes: - - Added ``interfaces`` to ``ALLOWED_QUERY_PARAMS`` for ip addresses searches - (https://github.com/netbox-community/ansible_modules/issues/201) - - Added ``type`` to ``ALLOWED_QUERY_PARAMS`` for interface searches (https://github.com/netbox-community/ansible_modules/issues/208) - - Remove ``rack`` as a choice when creating virtual machines (https://github.com/netbox-community/ansible_modules/pull/221) - minor_changes: - - Changed ``validate_certs`` to ``raw`` to allow private keys to be passed in - (https://github.com/netbox-community/ansible_modules/issues/211) - 0.2.3: - changes: - bugfixes: - - Fixes bug in ``netbox_prefix`` failing when using ``check_mode`` (https://github.com/netbox-community/ansible_modules/issues/228) - - Fixes bug in inventory plugin that fails if there are either no virtual machines, - but devices defined in NetBox or vice versa from failing when ``fetch_all`` - is set to ``False`` (https://github.com/netbox-community/ansible_modules/issues/214) - - Normalize any string values that are passed in via Jinja into an integer within - the `_normalize_data` method (https://github.com/netbox-community/ansible_modules/issues/231) - minor_changes: - - Adds ``discovered`` field to ``netbox_inventory_item`` (https://github.com/netbox-community/ansible_modules/issues/187) - - Adds ``query_params`` to all modules to allow users to define the ``query_params`` - (https://github.com/netbox-community/ansible_modules/issues/215) - - Adds ``tenant`` field to ``netbox_cluster`` (https://github.com/netbox-community/ansible_modules/pull/219) - - Allows private key to be passed in to ``validate_certs`` within modules (https://github.com/netbox-community/ansible_modules/issues/216) - - Better error handling if read-only token is provided for modules. Updated - README as well to say that a ``write-enabled`` token is required (https://github.com/netbox-community/ansible_modules/pull/238) - modules: - - description: Create, update or delete console ports within Netbox - name: netbox_console_port + - description: Create, update or delete power outlet templates within Nautobot + name: power_outlet_template namespace: '' - - description: Create, update or delete console port templates within Netbox - name: netbox_console_port_template + - description: Create, update or delete power panels within Nautobot + name: power_panel namespace: '' - - description: Create, update or delete console server ports within Netbox - name: netbox_console_server_port + - description: Create, update or delete power ports within Nautobot + name: power_port namespace: '' - - description: Create, update or delete console server port templates within Netbox - name: netbox_console_server_port_template + - description: Create, update or delete power port templates within Nautobot + name: power_port_template namespace: '' - - description: Create, update or delete front ports within Netbox - name: netbox_front_port + - description: Creates or removes prefixes from Nautobot + name: prefix namespace: '' - - description: Create, update or delete front port templates within Netbox - name: netbox_front_port_template + - description: Create, update or delete providers within Nautobot + name: provider namespace: '' - - description: Create, update or delete power feeds within Netbox - name: netbox_power_feed + - description: Create, update or delete racks within Nautobot + name: rack namespace: '' - - description: Create, update or delete power outlets within Netbox - name: netbox_power_outlet + - description: Create, update or delete racks groups within Nautobot + name: rack_group namespace: '' - - description: Create, update or delete power outlet templates within Netbox - name: netbox_power_outlet_template + - description: Create, update or delete racks roles within Nautobot + name: rack_role namespace: '' - - description: Create, update or delete power panels within Netbox - name: netbox_power_panel + - description: Create, update or delete rear ports within Nautobot + name: rear_port namespace: '' - - description: Create, update or delete power ports within Netbox - name: netbox_power_port + - description: Create, update or delete rear port templates within Nautobot + name: rear_port_template namespace: '' - - description: Create, update or delete power port templates within Netbox - name: netbox_power_port_template + - description: Creates or removes regions from Nautobot + name: region namespace: '' - - description: Create, update or delete rear ports within Netbox - name: netbox_rear_port + - description: Create, update or delete RIRs within Nautobot + name: rir namespace: '' - - description: Create, update or delete rear port templates within Netbox - name: netbox_rear_port_template + - description: Creates or removes route targets from Nautobot + name: route_target namespace: '' - 0.3.0: - changes: - breaking_changes: - - "To pass in integers via Ansible Jinja filters for a key in ``data`` that\n\ - requires querying an endpoint is now done by making it a dictionary with\n\ - an ``id`` key. The previous behavior was to just pass in an integer and\n\ - it was converted when normalizing the data, but some people may have names\n\ - that are all integers and those were being converted erroneously so we made\n\ - the decision to change the method to convert to an integer for the NetBox\n\ - API.\n\n::\n\n tasks:\n - name: Create device within NetBox with only\ - \ required information\n netbox_device:\n netbox_url: http://netbox-demo.org:32768\n\ - \ netbox_token: 0123456789abcdef0123456789abcdef01234567\n data:\n\ - \ name: Test66\n device_type:\n id: \"{{ some_jinja_variable\ - \ }}\"\n device_role: Core Switch\n site: Test Site\n \ - \ status: Staged\n state: present\n" - - '``pynetbox`` changed to using ``requests.Session()`` to manage the HTTP session - - which broke passing in ``ssl_verify`` when building the NetBox API client. - - This PR makes ``pynetbox 5.0.4+`` the new required version of `pynetbox` for - - the Ansible modules and lookup plugin. (https://github.com/netbox-community/ansible_modules/pull/269) - - ' - bugfixes: - - Allows OR operations in API fitlers for ``nb_lookup`` plugin (https://github.com/netbox-community/ansible_modules/issues/246) - - Build the ``rear_port`` and ``rear_port_template`` query_params to properly - find rear port (https://github.com/netbox-community/ansible_modules/issues/262) - - Compares tags as a set to prevent issues with order difference between user - supplied tags and NetBox API (https://github.com/netbox-community/ansible_modules/issues/242) - - Fixes typo for ``CONVERT_TO_ID`` mapping in ``netbox_utils`` for ``dcim.powerport`` - and ``dcim.poweroutlet`` (https://github.com/netbox-community/ansible_modules/pull/265) - - Fixes typo for ``CONVERT_TO_ID`` mapping in ``netbox_utils`` for ``dcim.rearport`` - (https://github.com/netbox-community/ansible_modules/pull/261) - - Normalize ``mac_address`` to upper case (https://github.com/netbox-community/ansible_modules/issues/254) - - Normalize descriptions to remove any extra whitespace (https://github.com/netbox-community/ansible_modules/issues/243) - minor_changes: - - Add ``local_context_data`` and ``flatten_local_context_data`` option to ``nb_inventory`` - (https://github.com/netbox-community/ansible_modules/pull/258) - - Add ``local_context_data`` option to ``netbox_device`` (https://github.com/netbox-community/ansible_modules/pull/258) - - Add ``virtual_chassis``, ``vc_position``, ``vc_priority`` to ``netbox_device`` - options (https://github.com/netbox-community/ansible_modules/pull/251) - modules: - - description: Create, update or delete cables within Netbox - name: netbox_cable + - description: Creates or removes service from Nautobot + name: service namespace: '' - - description: Create, update or delete device bay templates within Netbox - name: netbox_device_bay_template + - description: Creates or removes sites from Nautobot + name: site namespace: '' - - description: Creates or removes interfaces on devices from Netbox - name: netbox_device_interface_template + - description: Creates or removes status from Nautobot + name: status namespace: '' - - description: Create, update or delete virtual chassis within Netbox - name: netbox_virtual_chassis + - description: Creates or removes tags from Nautobot + name: tag namespace: '' - 0.3.1: - changes: - bugfixes: - - Default ``validate_certs`` to ``True`` (https://github.com/netbox-community/ansible_modules/issues/273) - 1.0.0: - changes: - bugfixes: - - Fix query_dict for device_bay/interface_template to use ``devicetype_id`` - (https://github.com/netbox-community/ansible_modules/issues/282) - - This expands the fix to all `_template` modules to use `devicetype_id` for - the query_dict when attempting to resolve the search (https://github.com/netbox-community/ansible_modules/pull/300) - 1.0.1: - changes: - bugfixes: - - Fix ``nb_inventory`` cache for ip addresses (https://github.com/netbox-community/ansible_modules/issues/276) - - Return HTTPError body output when encountering HTTP errors (https://github.com/netbox-community/ansible_modules/issues/294) - minor_changes: - - Inventory - Add group_by option ``rack_role`` and ``rack_group`` - - Inventory - Add group_by option ``services`` (https://github.com/netbox-community/ansible_modules/pull/286) - 1.0.2: - changes: - bugfixes: - - Add ``virtual_machine_role=slug`` to ``QUERY_TYPES`` to properly search for - Virtual Machine roles and not use the default ``q`` search (https://github.com/netbox-community/ansible_modules/pull/327) - - Remove ``device`` being ``required`` and implemented ``required_one_of`` to - allow either ``device`` or ``virtual_machine`` to be specified for ``netbox_service`` - (https://github.com/netbox-community/ansible_modules/pull/326) - - When tags specified, it prevents other data from being updated on the object. - (https://github.com/netbox-community/ansible_modules/pull/325) - fragments: - - fix_service.yml - - fix_tags.yml - - fix_vm_role.yml - release_date: '2020-08-29' - 1.1.0: - changes: - bugfixes: - - Prevent inventory plugin from failing on 403 and print warning message (https://github.com/netbox-community/ansible_modules/pull/354) - - Update ``netbox_ip_address`` module to accept ``assigned_object`` to work - with NetBox 2.9 (https://github.com/netbox-community/ansible_modules/pull/345) - - Update inventory plugin to properly associate IP address to interfaces with - NetBox 2.9 (https://github.com/netbox-community/ansible_modules/pull/334) - - Update inventory plugin to work with tags with NetBox 2.9 (https://github.com/netbox-community/ansible_modules/pull/340) - - Update modules to be able to properly update tags to work with NetBox 2.9 - (https://github.com/netbox-community/ansible_modules/pull/345) - minor_changes: - - Add ``follow_redirects`` option to inventory plugin (https://github.com/netbox-community/ansible_modules/pull/323) - fragments: - - release-1.1.0.yml - release_date: '2020-10-06' - 1.2.0: - changes: - bugfixes: - - Version checks were failing due to converting "2.10" to a float made it an - integer of 2.1 which broke version related logic. (#396) - - netbox_device_interface - Fixed copy pasta in documentation. (#371) - - netbox_ip_address - Updated documentation to show that ``family`` option has - been deprecated. (#388) - - netbox_utils - Fixed typo for ``circuits.circuittermination`` searches. (#367) - - netbox_utils - Skip all modifications to ``query_params`` when ``user_query_params`` - is defined. (#389) - - netbox_vlan - Fixed uniqueness for vlan searches to add ``group``. (#386) - major_changes: - - nb_inventory - Add ``dns_name`` option that adds ``dns_name`` to the host - when ``True`` and device has a primary IP address. (#394) - - nb_inventory - Add ``status`` as a ``group_by`` option. (398) - - nb_inventory - Move around ``extracted_primary_ip`` to allow for ``config_context`` - or ``custom_field`` to overwite. (#377) - - nb_inventory - Services are now a list of integers due to NetBox 2.10 changes. - (#396) - - nb_lookup - Allow ID to be passed in and use ``.get`` instead of ``.filter``. - (#376) - - nb_lookup - Allow ``api_endpoint`` and ``token`` to be found via env. (#391) - minor_changes: - - nb_inventory - Added ``status`` as host_var. (359) - - nb_inventory - Added documentation for using ``keyed_groups``. (#361) - - nb_inventory - Allow to use virtual chassis name instead of device name. (#383) - - nb_lookup - Allow lookup of plugin endpoints. (#360) - - nb_lookup - Documentation update to show Fully Qualified Collection Name (FQCN). - (#355) - - netbox_service - Add ``ports`` option for NetBox 2.10+ and convert ``port`` - to ``ports`` if NetBox 2.9 or lower. (#396) - - netbox_virtual_machine - Added ``comments`` option. (#380) - - netbox_virtual_machine - Added ``local_context_data`` option. (#357) - fragments: - - release1.2.0.yml - modules: - - description: Creates or removes tags from Netbox - name: netbox_tag + - description: Creates or removes tenants from Nautobot + name: tenant namespace: '' - release_date: '2020-12-27' - 1.2.1: - changes: - bugfixes: - - Allow IDs to be passed into objects that accept a list (https://github.com/netbox-community/ansible_modules/issues/407) - fragments: - - tags.yml - release_date: '2021-01-10' - 2.0.0: - changes: - bugfixes: - - netbox_site - Changed latitude/longitude type from float to str [#418](https://github.com/netbox-community/ansible_modules/pull/418) - - netbox_utils - If query_dict is None, fail and provide meaningful error [#419](https://github.com/netbox-community/ansible_modules/pull/419) - - netbox_utils - Remove manual manipulation for building query params for netbox_ip_address - and assigned object [#421](https://github.com/netbox-community/ansible_modules/pull/421) - minor_changes: - - Added ``import_targets`` and ``export_targets`` options to ``netbox_vrf`` - fragments: - - 2.0.0.yml - modules: - - description: Creates or removes route targets from Netbox - name: netbox_route_target + - description: Creates or removes tenant groups from Nautobot + name: tenant_group namespace: '' - release_date: '2021-01-20' - 2.1.0: - changes: - bugfixes: - - netbox_ip_address - Added assigned_object to ALLOWED_QUERY_PARAMS - minor_changes: - - Inventory - Added ansible_host_dns_name to set ansible_host to dns_name - - netbox_device_role - Added description option - - netbox_platform - Added description option - fragments: - - 2.1.0.yml - release_date: '2021-02-15' + - description: Create, update or delete virtual chassis within Nautobot + name: virtual_chassis + namespace: '' + - description: Create, update or delete virtual_machines within Nautobot + name: virtual_machine + namespace: '' + - description: Create, update or delete vlans within Nautobot + name: vlan + namespace: '' + - description: Create, update or delete vlans groups within Nautobot + name: vlan_group + namespace: '' + - description: Creates or removes interfaces from virtual machines in Nautobot + name: vm_interface + namespace: '' + - description: Create, update or delete vrfs within Nautobot + name: vrf + namespace: '' + plugins: + lookup: + - description: Queries and returns elements from Nautobot + name: lookup + namespace: null + release_date: '2021-02-20' diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 90d6f2d9..5dffc17d 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -26,6 +26,6 @@ sections: - Bugfixes - - known_issues - Known Issues -title: Netbox.Netbox +title: networktocode.nautobot trivial_section_name: trivial use_fqcn: true diff --git a/docs/_extensions/pygments_lexer.py b/docs/_extensions/pygments_lexer.py index d5990993..9a776a26 100644 --- a/docs/_extensions/pygments_lexer.py +++ b/docs/_extensions/pygments_lexer.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- # pylint: disable=no-self-argument # -# Copyright 2006-2017 by the Pygments team, see AUTHORS at + # https://bitbucket.org/birkenfeld/pygments-main/raw/7941677dc77d4f2bf0bbd6140ade85a9454b8b80/AUTHORS -# Copyright by Norman Richards (original author of JSON lexer). + # # Licensed under BSD license: # -# Copyright (c) 2006-2017 by the respective authors (see AUTHORS file). + # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/docs/conf.py b/docs/conf.py index 802ddf29..f10da4d6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,12 +22,12 @@ # -- Project information ----------------------------------------------------- -project = "ansible_modules" -copyright = "2020, Mikhail Yohman" -author = "Mikhail Yohman <@FragmentedPacket>" +project = "Nautobot Ansible Modules" +copyright = "2021, Network to Code" +author = "Network to Code " # The full version, including alpha/beta/rc tags -release = "2.0.0" +release = "1.0.0" # -- General configuration --------------------------------------------------- @@ -84,10 +84,7 @@ def create_antsibull_docs(files, plugin_type=None): """ for f in files: file_name = re.search(r"(?:.+\/)(\S+)\.py", str(f)).group(1) - if file_name in ["netbox_interface"]: - continue - print(file_name) if plugin_type is not None: file_path = Path(f"plugins/{plugin_type}/{file_name}/") else: @@ -96,9 +93,9 @@ def create_antsibull_docs(files, plugin_type=None): file_path.mkdir(mode=744, exist_ok=True) if plugin_type is not None: - args_string = f"junk plugin --dest-dir {file_path} --plugin-type {plugin_type} netbox.netbox.{file_name}" + args_string = f"junk plugin --dest-dir {file_path} --plugin-type {plugin_type} networktocode.nautobot.{file_name}" else: - args_string = f"junk plugin --dest-dir {file_path} --plugin-type module netbox.netbox.{file_name}" + args_string = f"junk plugin --dest-dir {file_path} --plugin-type module networktocode.nautobot.{file_name}" args = args_string.split(" ") try: antsibull_docs.run(args) @@ -142,10 +139,12 @@ def build_ansible_docs(app): ########################################### -# NOT IN USE AND SHOULD BE MANUALLY BUILT +# NOT IN USE AND SHOULD BE MANUALLY BUILT via antsibull docs +# Run from the root of the repo +# antsibull-docs collection --dest-dir docs/plugins --use-current --squash-hierarchy networktocode.nautobot ################ # def setup(app): -# app.connect("builder-inited", build_ansible_docs) - - +# app.connect("builder-inited", build_ansible_docs) +# +# # build_ansible_docs(None) diff --git a/docs/getting_started/contributing/modules/architecture.rst b/docs/getting_started/contributing/modules/architecture.rst index 5fe22315..611ae570 100644 --- a/docs/getting_started/contributing/modules/architecture.rst +++ b/docs/getting_started/contributing/modules/architecture.rst @@ -2,10 +2,10 @@ Module Architecture ========================== -Overview ----------------------- +Module Architecture Overview +------------------------------ -NetBox uses Django apps to break up each data domain within NetBox. An example of this is **circuits**, **dcim**, **ipam**, **tenancy**, etc. Each application then implements endpoints that fit under the parent application. +Nautobot uses Django apps to break up each data domain within Nautobot. An example of this is **circuits**, **dcim**, **ipam**, **tenancy**, etc. Each application then implements endpoints that fit under the parent application. An example of an endpoint is **devices** living under the **dcim** app and **ip addresses** living under the **ipam** app. This collection takes the same approach with organizing the module utils for each application and then the endpoints are implemented as the Ansible modules. Let's take a look at the output of the ``tree`` command within the ``plugins/`` directory. @@ -15,47 +15,47 @@ Let's take a look at the output of the ``tree`` command within the ``plugins/`` ├── plugins │ ... omitted │ ├── module_utils - │ │ ├── netbox_circuits.py - │ │ ├── netbox_dcim.py - │ │ ├── netbox_extras.py - │ │ ├── netbox_ipam.py - │ │ ├── netbox_secrets.py - │ │ ├── netbox_tenancy.py - │ │ ├── netbox_utils.py - │ │ └── netbox_virtualization.py + │ │ ├── circuits.py + │ │ ├── dcim.py + │ │ ├── extras.py + │ │ ├── ipam.py + │ │ ├── secrets.py + │ │ ├── tenancy.py + │ │ ├── utils.py + │ │ └── virtualization.py │ └── modules │ ... omitted - │ ├── netbox_device.py + │ ├── device.py │ ... omitted - │ └── netbox_vrf.py + │ └── vrf.py 128 directories, 357 files -As you can see, we have a handful of ``module_utils`` that correspond to each application in **NetBox** as well as a ``netbox_utils`` module that provides a common interface for the collection. +As you can see, we have a handful of ``module_utils`` that correspond to each application in **Nautobot** as well as a ``utils`` module that provides a common interface for the collection. Let's start by taking a look at the specifics of what each application module util is accomplishing. Module Util Apps (dcim, etc.) ++++++++++++++++++++++++++++++ -These utility modules contain most of the logic when it comes to interacting with the NetBox API. There is a lot of overlap between what the modules need to do to interact with the NetBox API. Therefore, it's wise -to try and reduce the boiler plate as much as possible. Within each application module, there is similar code for finding the object within NetBox, but different options depending on some of the module +These utility modules contain most of the logic when it comes to interacting with the Nautobot API. There is a lot of overlap between what the modules need to do to interact with the Nautobot API. Therefore, it's wise +to try and reduce the boiler plate as much as possible. Within each application module, there is similar code for finding the object within Nautobot, but different options depending on some of the module arguments provided to the user and what fields are available on any given endpoint. -Let's take a look at some of the code within ``netbox_dcim.py``. +Let's take a look at some of the code within ``dcim.py``. .. code-block:: python # -*- coding: utf-8 -*- - # Copyright: (c) 2018, Mikhail Yohman (@fragmentedpacket) - # Copyright: (c) 2020, Nokia, Tobias Groß (@toerb) - # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + + + from __future__ import absolute_import, division, print_function __metaclass__ = type - from ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils import ( - NetboxModule, + from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( + NautobotModule, ENDPOINT_NAME_MAPPING, SLUG_REQUIRED, ) @@ -65,22 +65,22 @@ Let's take a look at some of the code within ``netbox_dcim.py``. NB_CONSOLE_PORT_TEMPLATES = "console_port_templates" ... -The top of the code is importing the ``NetboxModule`` class, ``ENDPOINT_NAME_MAPPING``, and ``SLUG_REQUIRED`` from ``netbox_utils.py``. +The top of the code is importing the ``NautobotModule`` class, ``ENDPOINT_NAME_MAPPING``, and ``SLUG_REQUIRED`` from ``utils.py``. -After the imports, we define constants to define the endpoints that are supported as well as these being passed into the initialization of ``NetboxModule``. We'll see these within the actual modules themselves when we take a look later. +After the imports, we define constants to define the endpoints that are supported as well as these being passed into the initialization of ``NautobotModule``. We'll see these within the actual modules themselves when we take a look later. Now let's take a look at the class definition. .. code-block:: python - class NetboxDcimModule(NetboxModule): + class NautobotDcimModule(NautobotModule): def __init__(self, module, endpoint): super().__init__(module, endpoint) def run(self): ... -We see that we're subclassing the ``NetboxModule`` here for ``NetboxDcimModule`` and then defining our own ``__init__`` method and then calling the ``__init__`` method of the parent class (``NetboxModule``). We'll +We see that we're subclassing the ``NautobotModule`` here for ``NautobotDcimModule`` and then defining our own ``__init__`` method and then calling the ``__init__`` method of the parent class (``NautobotModule``). We'll cover the parent ``__init__`` class in a below section. .. note:: This is not necessarily required, but provides flexibility in the future if we need to perform any operations prior to the parent ``__init__``. @@ -112,7 +112,7 @@ We take the value of the constant that was passed in and assigned to ``self.endp ... } -Now we move onto setting ``application`` and this is where we start to use methods that are available on the ``NetboxModule`` class. As you can see, we pass in the ``self.endpoint`` again +Now we move onto setting ``application`` and this is where we start to use methods that are available on the ``NautobotModule`` class. As you can see, we pass in the ``self.endpoint`` again to this method. Let's take a look at the method. .. code-block:: python @@ -127,7 +127,7 @@ to this method. Let's take a look at the method. ] ) ... - class NetboxModule(object): + class NautobotModule(object): ... def _find_app(self, endpoint): """Dynamically finds application of endpoint passed in using the @@ -142,9 +142,9 @@ to this method. Let's take a look at the method. This will determine which app the endpoint is part of dynamically and is reused throughout the collection. -We can see that **devices** is part of the **dcim** application. We then use that the set grab the **application** attribute from ``pynetbox`` and then follow that down to the endpoint level. +We can see that **devices** is part of the **dcim** application. We then use that the set grab the **application** attribute from ``pynautobot`` and then follow that down to the endpoint level. -``nb_endpoint`` is set to ``self.nb.dcim.devices`` which provides several methods to **get**, **filter**, etc. on the endpoint to figure out if the user defined object already exists within NetBox. +``nb_endpoint`` is set to ``self.nb.dcim.devices`` which provides several methods to **get**, **filter**, etc. on the endpoint to figure out if the user defined object already exists within Nautobot. After that, ``user_query_params`` is set and that will be either a list of user defined query params or ``None``. This topic is covered more in :ref:`Using query_params Module Argument`. @@ -168,9 +168,9 @@ Let's take a look at the next block of code. ... We then assign the data instance to ``data`` that will be used throughout the end of the ``run`` method. Next wee need to assign the name variable for future use when attempting -to obtain the object from NetBox and this can live under several different fields which is the logic you see above. +to obtain the object from Nautobot and this can live under several different fields which is the logic you see above. -Now we move onto some more data manipulation to prepare the payload for NetBox. +Now we move onto some more data manipulation to prepare the payload for Nautobot. .. code-block:: python @@ -184,8 +184,8 @@ Now we move onto some more data manipulation to prepare the payload for NetBox. if data.get("color"): data["color"] = data["color"].lower() -We're using the ``SLUG_REQUIRED`` constant that we imported above from ``netbox_utils`` to determine if the endpoint requires a slug when creating it. If the endpoint requires a **slug** and the user has not provided -a slug then we set it for the user by using the ``_to_slug`` method on ``NetboxModule`` that uses the same logic NetBox does. We also make sure that **color** is lowercase if provided. +We're using the ``SLUG_REQUIRED`` constant that we imported above from ``utils`` to determine if the endpoint requires a slug when creating it. If the endpoint requires a **slug** and the user has not provided +a slug then we set it for the user by using the ``_to_slug`` method on ``NautobotModule`` that uses the same logic Nautobot does. We also make sure that **color** is lowercase if provided. Here is some more endpoint specific logic that we aren't going to cover, but provides a good example of what some modules may implement when the normal flow does not work for the endpoint. @@ -216,9 +216,9 @@ Here is some more endpoint specific logic that we aren't going to cover, but pro nb_endpoint, object_query_params, name ) -The code after ``else:`` is what we're interested in and how most modules will determine if the object currently exists within NetBox or not. The query parameters are dynamically built +The code after ``else:`` is what we're interested in and how most modules will determine if the object currently exists within Nautobot or not. The query parameters are dynamically built by providing the ``endpoint_name``, ``data`` passed in by the user, and the ``user_query_params`` if provided by the user. Once the query parameters are built, we then attempt to fetch the -object from NetBox. +object from Nautobot. .. code-block:: python @@ -244,20 +244,20 @@ the object before updating the ``self.result`` object and then exiting the modul Most of the app module utils will have the same pattern, but can either have more or less code within it depending on the complexity of the endpoints implemented. -NetboxModule (__init__) +NautobotModule (__init__) +++++++++++++++++++++++++++++ -The ``NetboxModule`` is the cornerstone of this collection and contains most of the methods required to build a module, but we're going to focus on what happens within the ``__init__`` method. +The ``NautobotModule`` is the cornerstone of this collection and contains most of the methods required to build a module, but we're going to focus on what happens within the ``__init__`` method. .. code-block:: python - class NetboxModule(object): + class NautobotModule(object): """ - Initialize connection to Netbox, sets AnsibleModule passed in to + Initialize connection to Nautobot, sets AnsibleModule passed in to self.module to be used throughout the class :params module (obj): Ansible Module object :params endpoint (str): Used to tell class which endpoint the logic needs to follow - :params nb_client (obj): pynetbox.api object passed in (not required) + :params nb_client (obj): pynautobot.api object passed in (not required) """ def __init__(self, module, endpoint, nb_client=None): @@ -267,40 +267,37 @@ The ``NetboxModule`` is the cornerstone of this collection and contains most of self.endpoint = endpoint query_params = self.module.params.get("query_params") - if not HAS_PYNETBOX: + if not HAS_PYNAUTOBOT: self.module.fail_json( - msg=missing_required_lib("pynetbox"), exception=PYNETBOX_IMP_ERR + msg=missing_required_lib("pynautobot"), exception=PYNAUTOBOT_IMP_ERR ) -The ``__init__`` method requires an `~ansible.module_utils.basic.AnsibleModule` instance and the endpoint name to be provided with a `~pynetbox.api` client being optional. +The ``__init__`` method requires an `~ansible.module_utils.basic.AnsibleModule` instance and the endpoint name to be provided with a `~pynautobot.api` client being optional. -We set several instance attributes that are used within other methods throughout the life of the instance. After that, we check to make sure the user has ``pynetbox`` installed and fail if not. +We set several instance attributes that are used within other methods throughout the life of the instance. After that, we check to make sure the user has ``pynautobot`` installed and fail if not. .. code-block:: python - class NetboxModule(object): + class NautobotModule(object): ... - # These should not be required after making connection to Netbox - url = self.module.params["netbox_url"] - token = self.module.params["netbox_token"] + # These should not be required after making connection to Nautobot + url = self.module.params["url"] + token = self.module.params["token"] ssl_verify = self.module.params["validate_certs"] - # Attempt to initiate connection to Netbox + # Attempt to initiate connection to Nautobot if nb_client is None: - self.nb = self._connect_netbox_api(url, token, ssl_verify) + self.nb = self._connect_api(url, token, ssl_verify) else: self.nb = nb_client - try: - self.version = self.nb.version - except AttributeError: - self.module.fail_json(msg="Must have pynetbox >=4.1.0") + self.version = self.nb.version -Next we set variables to be used to instantiate the ``pynetbox`` client if one was not passed in. After instantiated, it will set the NetBox version that helps determine how -specific portions of the code should act depending on the NetBox version. +Next we set variables to be used to instantiate the ``pynautobot`` client if one was not passed in. After instantiated, it will set the Nautobot version that helps determine how +specific portions of the code should act depending on the Nautobot version. .. code-block:: python - class NetboxModule(object): + class NautobotModule(object): ... # These methods will normalize the regular data cleaned_data = self._remove_arg_spec_default(module.params["data"]) @@ -309,12 +306,12 @@ specific portions of the code should act depending on the NetBox version. data = self._find_ids(choices_data, query_params) self.data = self._convert_identical_keys(data) -The next few lines manipulate the data and prepare it for sending to NetBox. +The next few lines manipulate the data and prepare it for sending to Nautobot. - Removes argument spec defaults that Ansible sets if an option is not specified (``None``) - Normalizes data depending on the type of search it will use for the field -- Changes choice for any fields that have choices provided by NetBox (e.g. status, type, etc.) -- Find IDs of any child objects that need exist in NetBox before creating parent object (e.g. Device role) +- Changes choice for any fields that have choices provided by Nautobot (e.g. status, type, etc.) +- Find IDs of any child objects that need exist in Nautobot before creating parent object (e.g. Device role) - Converts any fields that are namespaced to prevent conflicts when searching for them (e.g. device_role, ipam_role, rack_group, etc.) If all those pass, it sets the manipulated data to ``self.data`` that is used in the module util apps. \ No newline at end of file diff --git a/docs/getting_started/contributing/modules/new_module.rst b/docs/getting_started/contributing/modules/new_module.rst index f2799b8c..4974b51d 100644 --- a/docs/getting_started/contributing/modules/new_module.rst +++ b/docs/getting_started/contributing/modules/new_module.rst @@ -2,7 +2,7 @@ Contributing a New Module ========================== -We'll go through the build a module for NetBox's new **route-targets** endpoint under the **IPAM** app. +We'll go through the build a module for Nautobot's new **route-targets** endpoint under the **IPAM** app. Research API Spec to find necessary module arguments ------------------------------------------------------- @@ -12,7 +12,7 @@ We'll need to look at the API spec for **route-target** to understand what argum .. image:: ./media/post_rt.png This module is light, but we can will cover most of the changes required for any module to function properly. We can see that the only required argument is going to be **name**. The next -argument will be **tenant** that which is another object within NetBox, but fortunately we have already implemented the necessary changes to find a **tenant**. **Description** is only text field +argument will be **tenant** that which is another object within Nautobot, but fortunately we have already implemented the necessary changes to find a **tenant**. **Description** is only text field so there won't be any changes necessary for this argument. **Tags** is handled the same way as **tenant** and no additional code will be required for that. **Custom fields** is similar, but doesn't require any necessary search for an object, but the custom field must exist on the endpoint. @@ -25,7 +25,7 @@ require any necessary search for an object, but the custom field must exist on t Update App Module Util ---------------------------------- -Open ``plugins/module_utils/netbox_ipam.py`` file and update the following. +Open ``plugins/module_utils/ipam.py`` file and update the following. .. code-block:: python @@ -33,7 +33,7 @@ Open ``plugins/module_utils/netbox_ipam.py`` file and update the following. NB_ROUTE_TARGETS = "route_targets" ... - class NetboxIpamModule(NetboxModule): + class NautobotIpamModule(NautobotModule): ... def run(self): """ @@ -44,10 +44,10 @@ Open ``plugins/module_utils/netbox_ipam.py`` file and update the following. These should be all the changes we need within this file for the time being. -Update Netbox Utils +Update Nautobot Utils ------------------------------- -Open ``plugins/module_utils/netbox_utils.py`` and update the following. +Open ``plugins/module_utils/utils.py`` and update the following. .. code-block:: python @@ -104,25 +104,25 @@ Copy an existing module file from ``plugins/modules`` and name it ``versa_route_ Now we need to update the ``DOCUMENTATION`` variable to match the module we're creating. .. note:: - There are builtin options that you shouldn't have to change such as ``netbox_url``, ``netbox_token``, ``state``, + There are builtin options that you shouldn't have to change such as ``url``, ``token``, ``state``, ``query_params``, and ``validate_certs``. .. code-block:: python DOCUMENTATION = r""" --- - module: netbox_route_target - short_description: Creates or removes route targets from Netbox + module: route_target + short_description: Creates or removes route targets from Nautobot description: - - Creates or removes route targets from Netbox + - Creates or removes route targets from Nautobot notes: - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@fragmentedpacket) + - Network to Code requirements: - - pynetbox - version_added: "2.0.0" + - pynautobot + version_added: "1.0.0" options: ... data: @@ -152,7 +152,7 @@ Now we need to update the ``DOCUMENTATION`` variable to match the module we're c type: list custom_fields: description: - - must exist in Netbox + - must exist in Nautobot required: false type: dict required: true @@ -169,7 +169,7 @@ Update the following: - options -> data (All the necessary information from what we found from the API docs) Just a few things to note here are the types that are defined for the documentation. The should mostly follow the API such as a string, integer, list, etc. -In the case of arguments that resolve to objects within NetBox, typically **raw** is used so the user can specify either a string or a dictionary with other +In the case of arguments that resolve to objects within Nautobot, typically **raw** is used so the user can specify either a string or a dictionary with other fields that will help search for the object within the API. The next step is to update the ``EXAMPLES`` variable. @@ -183,9 +183,9 @@ The next step is to update the ``EXAMPLES`` variable. gather_facts: False tasks: - name: Create Route Targets - netbox.netbox.netbox_route_target: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.route_target: + url: http://nautobot.local + token: thisIsMyToken data: name: "{{ item.name }}" tenant: "Test Tenant" @@ -196,9 +196,9 @@ The next step is to update the ``EXAMPLES`` variable. - { name: "65000:65002", description: "tunnel" } - name: Update Description on Route Targets - netbox.netbox.netbox_route_target: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.route_target: + url: http://nautobot.local + token: thisIsMyToken data: name: "{{ item.name }}" tenant: "Test Tenant" @@ -210,9 +210,9 @@ The next step is to update the ``EXAMPLES`` variable. - { name: "65000:65002", description: "tunnel" } - name: Delete Route Targets - netbox.netbox.netbox_route_target: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.route_target: + url: http://nautobot.local + token: thisIsMyToken data: name: "{{ item }}" state: absent @@ -229,7 +229,7 @@ The only update to the ``RETURN`` variable should be the name of the object retu RETURN = r""" route_targets: - description: Serialized object as created/existent/updated/deleted within Netbox + description: Serialized object as created/existent/updated/deleted within Nautobot returned: always type: dict msg: @@ -242,23 +242,23 @@ Now we import the necessary components from the collection that make up the meat .. code-block:: python - from ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils import ( - NetboxAnsibleModule, - NETBOX_ARG_SPEC, + from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( + NautobotAnsibleModule, + NAUTOBOT_ARG_SPEC, ) - from ansible_collections.netbox.netbox.plugins.module_utils.netbox_ipam import ( - NetboxIpamModule, + from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( + NautobotIpamModule, NB_ROUTE_TARGETS, ) from copy import deepcopy -We import our custom ``NetboxAnsibleModule`` to properly validate our data and our base argument spec (``NETBOX_ARG_SPEC``) that all modules should implement. +We import our custom ``NautobotAnsibleModule`` to properly validate our data and our base argument spec (``NAUTOBOT_ARG_SPEC``) that all modules should implement. .. code-block:: python - NETBOX_ARG_SPEC = dict( - netbox_url=dict(type="str", required=True), - netbox_token=dict(type="str", required=True, no_log=True), + NAUTOBOT_ARG_SPEC = dict( + url=dict(type="str", required=True), + token=dict(type="str", required=True, no_log=True), state=dict(required=False, default="present", choices=["present", "absent"]), query_params=dict(required=False, type="list", elements="str"), validate_certs=dict(type="raw", default=True), @@ -272,7 +272,7 @@ Let's move onto the ``main()`` function in the module and take a look at the req """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( @@ -296,26 +296,26 @@ the sanity tests that will run when a PR is submitted to the project and both th def main(): ... - module = NetboxAnsibleModule(argument_spec=argument_spec, supports_check_mode=True) + module = NautobotAnsibleModule(argument_spec=argument_spec, supports_check_mode=True) - netbox_route_target = NetboxIpamModule(module, NB_ROUTE_TARGETS) - netbox_route_target.run() + route_target = NautobotIpamModule(module, NB_ROUTE_TARGETS) + route_target.run() -We then initialize our custom ``NetboxAnsibleModule`` that will be passed into our custom ``NetboxIpamModule`` and then execute the ``run`` method. +We then initialize our custom ``NautobotAnsibleModule`` that will be passed into our custom ``NautobotIpamModule`` and then execute the ``run`` method. That is all that our module needs to implement at this point. We can test this locally by installing the collection locally and testing this within a playbook by following the directions :ref:`here`. -Here is the output of the a playbook I created using the examples we documented with the only changes being the ``netbox_url`` and ``netbox_token``. +Here is the output of the a playbook I created using the examples we documented with the only changes being the ``url`` and ``token``. .. code-block:: bash ❯ ansible-playbook pb.test-rt.yml -vv ansible-playbook 2.10.4 - config file = /Users/myohman/cloned-repos/ansible_modules/ansible.cfg + config file = /Users/myohman/cloned-repos/nautobot-ansible/ansible.cfg configured module search path = ['/Users/myohman/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/myohman/.virtualenvs/main3.8/lib/python3.8/site-packages/ansible executable location = /Users/myohman/.virtualenvs/main3.8/bin/ansible-playbook python version = 3.8.6 (default, Nov 17 2020, 18:43:06) [Clang 12.0.0 (clang-1200.0.32.27)] - Using /Users/myohman/cloned-repos/ansible_modules/ansible.cfg as config file + Using /Users/myohman/cloned-repos/nautobot-ansible/ansible.cfg as config file [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' Skipping callback 'default', as we already have a stdout callback. @@ -329,17 +329,17 @@ Here is the output of the a playbook I created using the examples we documented META: ran handlers TASK [Create Route Targets] ****************************************************************************************************************************************************************************************************************************************************************************************** - task path: /Users/myohman/cloned-repos/ansible_modules/pb.test-rt.yml:7 + task path: /Users/myohman/cloned-repos/nautobot-ansible/pb.test-rt.yml:7 changed: [localhost] => (item={'name': '65000:65001', 'description': 'management'}) => {"ansible_loop_var": "item", "changed": true, "item": {"description": "management", "name": "65000:65001"}, "msg": "route_target 65000:65001 updated", "route_target": {"created": "2021-01-13", "custom_fields": {}, "description": "", "id": 1, "last_updated": "2021-01-13T23:06:40.211082Z", "name": "65000:65001", "tags": [4], "tenant": 1, "url": "http://192.168.50.10:8000/api/ipam/route-targets/1/"}} changed: [localhost] => (item={'name': '65000:65002', 'description': 'tunnel'}) => {"ansible_loop_var": "item", "changed": true, "item": {"description": "tunnel", "name": "65000:65002"}, "msg": "route_target 65000:65002 created", "route_target": {"created": "2021-01-13", "custom_fields": {}, "description": "", "id": 2, "last_updated": "2021-01-13T23:59:29.946943Z", "name": "65000:65002", "tags": [4], "tenant": 1, "url": "http://192.168.50.10:8000/api/ipam/route-targets/2/"}} TASK [Update Description on Route Targets] *************************************************************************************************************************************************************************************************************************************************************************** - task path: /Users/myohman/cloned-repos/ansible_modules/pb.test-rt.yml:20 + task path: /Users/myohman/cloned-repos/nautobot-ansible/pb.test-rt.yml:20 changed: [localhost] => (item={'name': '65000:65001', 'description': 'management'}) => {"ansible_loop_var": "item", "changed": true, "item": {"description": "management", "name": "65000:65001"}, "msg": "route_target 65000:65001 updated", "route_target": {"created": "2021-01-13", "custom_fields": {}, "description": "management", "id": 1, "last_updated": "2021-01-13T23:59:29.146435Z", "name": "65000:65001", "tags": [4], "tenant": 1, "url": "http://192.168.50.10:8000/api/ipam/route-targets/1/"}} changed: [localhost] => (item={'name': '65000:65002', 'description': 'tunnel'}) => {"ansible_loop_var": "item", "changed": true, "item": {"description": "tunnel", "name": "65000:65002"}, "msg": "route_target 65000:65002 updated", "route_target": {"created": "2021-01-13", "custom_fields": {}, "description": "tunnel", "id": 2, "last_updated": "2021-01-13T23:59:29.946943Z", "name": "65000:65002", "tags": [4], "tenant": 1, "url": "http://192.168.50.10:8000/api/ipam/route-targets/2/"}} TASK [Delete Route Targets] ****************************************************************************************************************************************************************************************************************************************************************************************** - task path: /Users/myohman/cloned-repos/ansible_modules/pb.test-rt.yml:34 + task path: /Users/myohman/cloned-repos/nautobot-ansible/pb.test-rt.yml:34 changed: [localhost] => (item=65000:65001) => {"ansible_loop_var": "item", "changed": true, "item": "65000:65001", "msg": "route_target 65000:65001 deleted", "route_target": {"created": "2021-01-13", "custom_fields": {}, "description": "management", "id": 1, "last_updated": "2021-01-13T23:59:30.829004Z", "name": "65000:65001", "tags": [4], "tenant": 1, "url": "http://192.168.50.10:8000/api/ipam/route-targets/1/"}} changed: [localhost] => (item=65000:65002) => {"ansible_loop_var": "item", "changed": true, "item": "65000:65002", "msg": "route_target 65000:65002 deleted", "route_target": {"created": "2021-01-13", "custom_fields": {}, "description": "tunnel", "id": 2, "last_updated": "2021-01-13T23:59:31.748181Z", "name": "65000:65002", "tags": [4], "tenant": 1, "url": "http://192.168.50.10:8000/api/ipam/route-targets/2/"}} META: ran handlers @@ -371,14 +371,14 @@ They're stored in ``tests/integration/targets`` and each target corresponds with ❯ tree tests/integration tests/integration ├── integration.cfg - ├── netbox-deploy.py + ├── nautobot-deploy.py ├── render_config.sh └── targets ├── latest │ └── tasks │ ├── main.yml - │ ├── netbox_aggregate.yml - │ ├── netbox_cable.yml + │ ├── aggregate.yml + │ ├── cable.yml ├── regression-latest │ └── tasks │ └── main.yml @@ -388,11 +388,11 @@ They're stored in ``tests/integration/targets`` and each target corresponds with └── v2.9 └── tasks ├── main.yml - ├── netbox_aggregate.yml - ├── netbox_cable.yml + ├── aggregate.yml + ├── cable.yml -This isn't all the directories or files, but since we only support the two latest NetBox releases, we have a folder for the **latest** and the second latest version of NetBox, in this case v2.9. -We also have a **regression** targets for tests that cover found bugs. With the ``netbox_route_target`` module, since it's a **2.10** feature, we only have to worry about adding integration tests to the +This isn't all the directories or files, but since we only support the two latest Nautobot releases, we have a folder for the **latest** and the second latest version of Nautobot, in this case v2.9. +We also have a **regression** targets for tests that cover found bugs. With the ``route_target`` module, since it's a **2.10** feature, we only have to worry about adding integration tests to the **latest** target folder. .. note:: If functionality exists in both supported versions, you can complete the steps below and then just copy over the tasks file we create below. @@ -406,10 +406,10 @@ Let's start by adding to ``tests/integration/targets/latest/main.yml``. --- ... - - name: "NETBOX_ROUTE_TARGET_TESTS" - include_tasks: "netbox_route_target.yml" + - name: "NAUTOBOT_ROUTE_TARGET_TESTS" + include_tasks: "route_target.yml" -Next we'll create a new file named ``tests/integration/targets/latest/netbox_route_target.yml`` that will include our integration tests. Below is the pattern we'll follow. +Next we'll create a new file named ``tests/integration/targets/latest/route_target.yml`` that will include our integration tests. Below is the pattern we'll follow. - **Add** (check mode) - **Add** @@ -432,30 +432,30 @@ After all tests pass, let's generate our new documents. From the root of the col ❯ ./hacking/make-docs.sh rm: tests/output: No such file or directory rm: .pytest_cache: No such file or directory - Using /Users/myohman/cloned-repos/ansible_modules/ansible.cfg as config file - Created collection for netbox.netbox at /Users/myohman/cloned-repos/ansible_modules/netbox-netbox-2.0.0.tar.gz + Using /Users/myohman/cloned-repos/nautobot-ansible/ansible.cfg as config file + Created collection for networktocode.nautobot at /Users/myohman/cloned-repos/nautobot-ansible/networktocode.nautobot-1.1.0.tar.gz Starting galaxy collection install process - [WARNING]: The specified collections path '/Users/myohman/cloned-repos/ansible_modules' is not part of the configured Ansible collections paths + [WARNING]: The specified collections path '/Users/myohman/cloned-repos/nautobot-ansible' is not part of the configured Ansible collections paths '/Users/myohman/.ansible/collections:/usr/share/ansible/collections'. The installed collection won't be picked up in an Ansible run. Process install dependency map Starting collection install process - Installing 'netbox.netbox:2.0.0' to '/Users/myohman/cloned-repos/ansible_modules/ansible_collections/netbox/netbox' - netbox.netbox (2.0.0) was installed successfully - Installing 'ansible.netcommon:1.4.1' to '/Users/myohman/cloned-repos/ansible_modules/ansible_collections/ansible/netcommon' + Installing 'networktocode.nautobot:1.1.0' to '/Users/myohman/cloned-repos/nautobot-ansible/ansible_collections/networktocode.nautobot' + networktocode.nautobot (1.1.0) was installed successfully + Installing 'ansible.netcommon:1.4.1' to '/Users/myohman/cloned-repos/nautobot-ansible/ansible_collections/ansible/netcommon' Downloading https://galaxy.ansible.com/download/ansible-netcommon-1.4.1.tar.gz to /Users/myohman/.ansible/tmp/ansible-local-4390k59zwzli/tmp5871aum5 ansible.netcommon (1.4.1) was installed successfully - Installing 'community.general:1.3.4' to '/Users/myohman/cloned-repos/ansible_modules/ansible_collections/community/general' + Installing 'community.general:1.3.4' to '/Users/myohman/cloned-repos/nautobot-ansible/ansible_collections/community/general' Downloading https://galaxy.ansible.com/download/community-general-1.3.4.tar.gz to /Users/myohman/.ansible/tmp/ansible-local-4390k59zwzli/tmp5871aum5 community.general (1.3.4) was installed successfully - Installing 'google.cloud:1.0.1' to '/Users/myohman/cloned-repos/ansible_modules/ansible_collections/google/cloud' + Installing 'google.cloud:1.0.1' to '/Users/myohman/cloned-repos/nautobot-ansible/ansible_collections/google/cloud' Downloading https://galaxy.ansible.com/download/google-cloud-1.0.1.tar.gz to /Users/myohman/.ansible/tmp/ansible-local-4390k59zwzli/tmp5871aum5 google.cloud (1.0.1) was installed successfully - Installing 'community.kubernetes:1.1.1' to '/Users/myohman/cloned-repos/ansible_modules/ansible_collections/community/kubernetes' + Installing 'community.kubernetes:1.1.1' to '/Users/myohman/cloned-repos/nautobot-ansible/ansible_collections/community/kubernetes' Downloading https://galaxy.ansible.com/download/community-kubernetes-1.1.1.tar.gz to /Users/myohman/.ansible/tmp/ansible-local-4390k59zwzli/tmp5871aum5 community.kubernetes (1.1.1) was installed successfully - ERROR:antsibull:error=Cannot find plugin:func=get_ansible_plugin_info:mod=antsibull.docs_parsing.ansible_internal:plugin_name=netbox.netbox.netbox_interface:plugin_type=module|Error while extracting documentation. Will not document this plugin. + ERROR:antsibull:error=Cannot find plugin:func=get_ansible_plugin_info:mod=antsibull.docs_parsing.ansible_internal:plugin_name=networktocode.nautobot.interface:plugin_type=module|Error while extracting documentation. Will not document this plugin. -Let's move onto updating ``netbox_vrf`` module. This new model within NetBox is also tied to VRFs as ``import_targets`` and ``export_targets``. Here is a screenshot of the new options we will need to add to the :ref:`netbox_vrf module`. +Let's move onto updating ``vrf`` module. This new model within Nautobot is also tied to VRFs as ``import_targets`` and ``export_targets``. Here is a screenshot of the new options we will need to add to the :ref:`vrf module`. .. image:: ./media/vrf_options.png diff --git a/docs/getting_started/contributing/modules/update_module.rst b/docs/getting_started/contributing/modules/update_module.rst index 6f6568dd..05822765 100644 --- a/docs/getting_started/contributing/modules/update_module.rst +++ b/docs/getting_started/contributing/modules/update_module.rst @@ -5,10 +5,10 @@ Updating an Existing Module The main reason for updating an existing module is to either deprecate an option or add new options. We'll discuss the different methods for these options. -New Option - Doesn't correlate to different NetBox models +New Option - Doesn't correlate to different Nautobot models -------------------------------------------------------------- -There are times when you need to add a new option to a module that doesn't require resolving to other models within NetBox. An example is adding a new interface type to ``netbox_device_interface`` module and only requires a documentation and argument spec update. +There are times when you need to add a new option to a module that doesn't require resolving to other models within Nautobot. An example is adding a new interface type to ``device_interface`` module and only requires a documentation and argument spec update. Another example is adding a ``dns_name`` field that is just a text field. The only updates that need to be made are to the ``DOCUMENTATION``, ``EXAMPLES`` and ``argument_spec`` within the module. @@ -21,14 +21,14 @@ Steps: New Option - Must be resolved to a different model -------------------------------------------------------------- -When we add a new option that may point to a different model then we must make a few additional changes to both the module and the ``netbox_utils``. Let's stick with our previous example in :ref:`Contributing a New Module` for **route-targets**. -It turns out that this was implemented as a separate model, but has a relationship to VRFs to track both **import** and **export** targets. This means we will need to add those additional options to :ref:`netbox_vrf module`. +When we add a new option that may point to a different model then we must make a few additional changes to both the module and the ``utils``. Let's stick with our previous example in :ref:`Contributing a New Module` for **route-targets**. +It turns out that this was implemented as a separate model, but has a relationship to VRFs to track both **import** and **export** targets. This means we will need to add those additional options to :ref:`vrf module`. Here is a refresher for what we're looking to implement. .. image:: ./media/vrf_options.png -Let's start by updating :ref:`netbox_vrf` to specify both **import_targets** and **export_targets** as **lists** of **strings**. +Let's start by updating :ref:`vrf` to specify both **import_targets** and **export_targets** as **lists** of **strings**. We'll update the ``DOCUMENTATION`` first. @@ -41,14 +41,14 @@ We'll update the ``DOCUMENTATION`` first. required: false type: list elements: str - version_added: 2.0.0 + version_added: "1.0.0" export_targets: description: - Export targets tied to VRF required: false type: list elements: str - version_added: 2.0.0 + version_added: "1.0.0" ... Now that the ``DOCUMENTATION`` is updated, let's move onto updating the ``EXAMPLES``. @@ -56,9 +56,9 @@ Now that the ``DOCUMENTATION`` is updated, let's move onto updating the ``EXAMPL .. code-block:: yaml - name: Create vrf with all information - netbox_vrf: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + vrf: + url: http://nautobot.local + token: thisIsMyToken data: name: Test VRF rd: "65000:1" @@ -91,7 +91,7 @@ The final update we have to make to the module is updating the ``argument_spec`` ... ... -Now that we have that taken care of, let's move onto the ``netbox_utils``. +Now that we have that taken care of, let's move onto the ``utils``. .. code-block:: python @@ -115,10 +115,10 @@ Now that we have that taken care of, let's move onto the ``netbox_utils``. Overall the changes are minimal as you just want to make sure to add it to ``CONVERT_TO_ID`` to flag the values to be converted to an ID by resolving to the **route-targets** model. This variable is just telling the collection what endpoint to use to search. The ``QUERY_TYPE`` then specifies the query type to use when attempting to resolve the ID. -Now we need to make sure we test these new options within the integration tests. Since these require resolving to an existing model, we need to update our ``netbox-deploy.py`` script that bootstraps -NetBox and make sure we add **route targets** we will use within our integration testing. +Now we need to make sure we test these new options within the integration tests. Since these require resolving to an existing model, we need to update our ``nautobot-deploy.py`` script that bootstraps +Nautobot and make sure we add **route targets** we will use within our integration testing. -Edit ``tests/integration/netbox-deploy.py``. +Edit ``tests/integration/nautobot-deploy.py``. .. code-block:: python @@ -128,14 +128,14 @@ Edit ``tests/integration/netbox-deploy.py``. {"name": "5000:5000"}, {"name": "6000:6000"}, ] - created_route_targets = make_netbox_calls(nb.ipam.route_targets, route_targets) + created_route_targets = make_calls(nb.ipam.route_targets, route_targets) if ERRORS: sys.exit( "Errors have occurred when creating objects, and should have been printed out. Check previous output." ) -Next we'll update ``netbox_vrf.yml`` for the **latest** integration target. +Next we'll update ``vrf.yml`` for the **latest** integration target. .. code-block:: bash @@ -145,17 +145,17 @@ Next we'll update ``netbox_vrf.yml`` for the **latest** integration target. │ └── tasks │ ├── main.yml │ ├── ... - │ ├── netbox_vm_interface.yml - │ └── netbox_vrf.yml + │ ├── vm_interface.yml + │ └── vrf.yml 12 directories, 143 files .. code-block:: yaml - name: "VRF 4: ASSERT - Update" - netbox.netbox.netbox_vrf: - netbox_url: http://localhost:32768 - netbox_token: 0123456789abcdef0123456789abcdef01234567 + networktocode.nautobot.vrf: + url: http://localhost:32768 + token: 0123456789abcdef0123456789abcdef01234567 data: name: "Test VRF One" rd: "65001:1" @@ -201,27 +201,27 @@ Let's generate our new documents. From the root of the collection, run the follo ❯ ./hacking/make-docs.sh rm: tests/output: No such file or directory rm: .pytest_cache: No such file or directory - Using /Users/myohman/cloned-repos/ansible_modules/ansible.cfg as config file - Created collection for netbox.netbox at /Users/myohman/cloned-repos/ansible_modules/netbox-netbox-2.0.0.tar.gz + Using /Users/myohman/cloned-repos/nautobot-ansible/ansible.cfg as config file + Created collection for networktocode.nautobot at /Users/myohman/cloned-repos/nautobot-ansible/networktocode.nautobot-1.1.0.tar.gz Starting galaxy collection install process - [WARNING]: The specified collections path '/Users/myohman/cloned-repos/ansible_modules' is not part of the configured Ansible collections paths + [WARNING]: The specified collections path '/Users/myohman/cloned-repos/nautobot-ansible' is not part of the configured Ansible collections paths '/Users/myohman/.ansible/collections:/usr/share/ansible/collections'. The installed collection won't be picked up in an Ansible run. Process install dependency map Starting collection install process - Installing 'netbox.netbox:2.0.0' to '/Users/myohman/cloned-repos/ansible_modules/ansible_collections/netbox/netbox' - netbox.netbox (2.0.0) was installed successfully - Installing 'ansible.netcommon:1.4.1' to '/Users/myohman/cloned-repos/ansible_modules/ansible_collections/ansible/netcommon' + Installing 'networktocode.nautobot:1.1.0' to '/Users/myohman/cloned-repos/nautobot-ansible/ansible_collections/networktocode.nautobot' + networktocode.nautobot (1.1.0) was installed successfully + Installing 'ansible.netcommon:1.4.1' to '/Users/myohman/cloned-repos/nautobot-ansible/ansible_collections/ansible/netcommon' Downloading https://galaxy.ansible.com/download/ansible-netcommon-1.4.1.tar.gz to /Users/myohman/.ansible/tmp/ansible-local-4390k59zwzli/tmp5871aum5 ansible.netcommon (1.4.1) was installed successfully - Installing 'community.general:1.3.4' to '/Users/myohman/cloned-repos/ansible_modules/ansible_collections/community/general' + Installing 'community.general:1.3.4' to '/Users/myohman/cloned-repos/nautobot-ansible/ansible_collections/community/general' Downloading https://galaxy.ansible.com/download/community-general-1.3.4.tar.gz to /Users/myohman/.ansible/tmp/ansible-local-4390k59zwzli/tmp5871aum5 community.general (1.3.4) was installed successfully - Installing 'google.cloud:1.0.1' to '/Users/myohman/cloned-repos/ansible_modules/ansible_collections/google/cloud' + Installing 'google.cloud:1.0.1' to '/Users/myohman/cloned-repos/nautobot-ansible/ansible_collections/google/cloud' Downloading https://galaxy.ansible.com/download/google-cloud-1.0.1.tar.gz to /Users/myohman/.ansible/tmp/ansible-local-4390k59zwzli/tmp5871aum5 google.cloud (1.0.1) was installed successfully - Installing 'community.kubernetes:1.1.1' to '/Users/myohman/cloned-repos/ansible_modules/ansible_collections/community/kubernetes' + Installing 'community.kubernetes:1.1.1' to '/Users/myohman/cloned-repos/nautobot-ansible/ansible_collections/community/kubernetes' Downloading https://galaxy.ansible.com/download/community-kubernetes-1.1.1.tar.gz to /Users/myohman/.ansible/tmp/ansible-local-4390k59zwzli/tmp5871aum5 community.kubernetes (1.1.1) was installed successfully - ERROR:antsibull:error=Cannot find plugin:func=get_ansible_plugin_info:mod=antsibull.docs_parsing.ansible_internal:plugin_name=netbox.netbox.netbox_interface:plugin_type=module|Error while extracting documentation. Will not document this plugin. + ERROR:antsibull:error=Cannot find plugin:func=get_ansible_plugin_info:mod=antsibull.docs_parsing.ansible_internal:plugin_name=networktocode.nautobot.interface:plugin_type=module|Error while extracting documentation. Will not document this plugin. We'll push these up and let the CI/CD run and then these tests should pass and then we're good to submit a PR. \ No newline at end of file diff --git a/docs/getting_started/how-to-use/advanced.rst b/docs/getting_started/how-to-use/advanced.rst index e8e131c5..39007ce0 100644 --- a/docs/getting_started/how-to-use/advanced.rst +++ b/docs/getting_started/how-to-use/advanced.rst @@ -7,10 +7,10 @@ Now that we've gotten the basics out of the way. We can dive into a few more of Passing in Dictionaries ------------------------------- -There will be times that you need to specify more information to resolve the ID of an object tied to the main object due to the information not being unique enough to find a single object within NetBox. -A good example of this is specifying ``nat_inside`` when using the :ref:`netbox.netbox.netbox_ip_address` module. +There will be times that you need to specify more information to resolve the ID of an object tied to the main object due to the information not being unique enough to find a single object within Nautobot. +A good example of this is specifying ``nat_inside`` when using the :ref:`networktocode.nautobot.ip_address` module. -If your NetBox instance is using the default settings then ``ENFORCE_GLOBAL_UNIQUE`` will be set to ``False`` which means that the chances of having a duplicate IP is high and most likely intended. +If your Nautobot instance is using the default settings then ``ENFORCE_GLOBAL_UNIQUE`` will be set to ``False`` which means that the chances of having a duplicate IP is high and most likely intended. Let's take a look at specifying just the IP address in CIDR notation and see what results we get. @@ -19,10 +19,10 @@ Let's take a look at specifying just the IP address in CIDR notation and see wha --- ... tasks: - - name: "Add ip address to netbox" - netbox.netbox.netbox_ip_address: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + - name: "Add ip address to nautobot" + networktocode.nautobot.ip_address: + url: "http://nautobot.local" + token: "thisIsMyToken" data: address: "192.168.10.60/24" vrf: "Test VRF" @@ -31,18 +31,18 @@ Let's take a look at specifying just the IP address in CIDR notation and see wha .. code-block:: bash - ❯ ansible-playbook netbox-ip.yml -v + ❯ ansible-playbook nautobot-ip.yml -v No config file found; using defaults [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAY [localhost] ********************************************************************************************************************** - TASK [Add ip address to netbox] ******************************************************************************************************* + TASK [Add ip address to nautobot] ******************************************************************************************************* fatal: [localhost]: FAILED! => {"changed": false, "msg": "More than one result returned for nat_inside"} We can see from the error we get that we have more than a single result when attempting to resolve ``192.168.100.1/24``. -Let's check NetBox to see what additional information we can provide to grab the correct IP address. +Let's check Nautobot to see what additional information we can provide to grab the correct IP address. .. image:: ./media/advanced_dict.png :scale: 50 % @@ -54,10 +54,10 @@ We can see one of the IPs is assigned to the VRF that matches the VRF our new IP --- ... tasks: - - name: "Add ip address to netbox" - netbox.netbox.netbox_ip_address: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + - name: "Add ip address to nautobot" + networktocode.nautobot.ip_address: + url: "http://nautobot.local" + token: "thisIsMyToken" data: address: "192.168.10.60/24" vrf: "Test VRF" @@ -70,14 +70,14 @@ Since ``nat_inside`` is an IP address, we will specify the same arguments that w .. code-block:: bash - ❯ ansible-playbook netbox-ip.yml -v + ❯ ansible-playbook nautobot-ip.yml -v No config file found; using defaults [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAY [localhost] ********************************************************************************************************************** - TASK [Add ip address to netbox] ******************************************************************************************************* + TASK [Add ip address to nautobot] ******************************************************************************************************* changed: [localhost] => {"changed": true, "ip_address": {"address": "192.168.10.60/24", "assigned_object": null, "assigned_object_id": null, "assigned_object_type": null, "created": "2021-01-01", "custom_fields": {}, "description": "", "dns_name": "", "family": 4, "id": 11, "last_updated": "2021-01-01T17:19:18.999051Z", "nat_inside": 10, "nat_outside": null, "role": null, "status": "active", "tags": [], "tenant": null, "url": "http://192.168.50.10:8000/api/ipam/ip-addresses/11/", "vrf": 1}, "msg": "ip_address 192.168.10.60/24 created"} PLAY RECAP **************************************************************************************************************************** @@ -85,7 +85,7 @@ Since ``nat_inside`` is an IP address, we will specify the same arguments that w We can see that the task was successful and ``nat_inside`` resolved to ID ``10``. -Hopefully this helps you understand how you can provide more specific information for objects that need to be resolved before any ``POST/PUT/PATCH`` calls are made to NetBox. +Hopefully this helps you understand how you can provide more specific information for objects that need to be resolved before any ``POST/PUT/PATCH`` calls are made to Nautobot. Passing in IDs Manually ------------------------------- @@ -99,10 +99,10 @@ Let's take the same example and delete the IP address that was just created and --- ... tasks: - - name: "Add ip address to netbox" - netbox.netbox.netbox_ip_address: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + - name: "Add ip address to nautobot" + networktocode.nautobot.ip_address: + url: "http://nautobot.local" + token: "thisIsMyToken" data: address: "192.168.10.60/24" vrf: "Test VRF" @@ -113,14 +113,14 @@ Here are the results and they're identical to the when we specified a dictionary .. code-block:: bash - ❯ ansible-playbook netbox-ip.yml -v + ❯ ansible-playbook nautobot-ip.yml -v No config file found; using defaults [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAY [localhost] ********************************************************************************************************************** - TASK [Add ip address to netbox] ******************************************************************************************************* + TASK [Add ip address to nautobot] ******************************************************************************************************* changed: [localhost] => {"changed": true, "ip_address": {"address": "192.168.10.60/24", "assigned_object": null, "assigned_object_id": null, "assigned_object_type": null, "created": "2021-01-01", "custom_fields": {}, "description": "", "dns_name": "", "family": 4, "id": 12, "last_updated": "2021-01-01T17:28:29.770142Z", "nat_inside": 10, "nat_outside": null, "role": null, "status": "active", "tags": [], "tenant": null, "url": "http://192.168.50.10:8000/api/ipam/ip-addresses/12/", "vrf": 1}, "msg": "ip_address 192.168.10.60/24 created"} PLAY RECAP **************************************************************************************************************************** @@ -131,7 +131,7 @@ Using nb_lookup Plugin to Provide ID or Object There are two options to use the lookup plugin. -1. Pass in the object obtained by :ref:`nb_lookup`. +1. Pass in the object obtained by :ref:`nb_lookup`. 2. Pass in a dictionary with the key being ``id`` and the value of the lookup plugin after filtering to get the ID attribute. .. note:: The reason for the second option is due to the fact that the lookup plugin uses Jinja and will only cast as a string and not an integer. @@ -146,53 +146,53 @@ Let's go ahead and look at the first way by just passing in the complete object --- ... tasks: - - name: "Add ip address to netbox" - netbox.netbox.netbox_ip_address: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + - name: "Add ip address to nautobot" + networktocode.nautobot.ip_address: + url: "http://nautobot.local" + token: "thisIsMyToken" data: address: "192.168.10.60/24" vrf: "Test VRF" - nat_inside: "{{ lookup('netbox.netbox.nb_lookup', 'ip-addresses', api_filter='address=192.168.100.1/24 vrf=1:1', api_endpoint='http://netbox.local', token='thisIsMyToken', validate_certs=False, raw_data=True) }}" + nat_inside: "{{ lookup('networktocode.nautobot.lookup', 'ip-addresses', api_filter='address=192.168.100.1/24 vrf=1:1', api_endpoint='http://nautobot.local', token='thisIsMyToken', validate_certs=False, raw_data=True) }}" state: present .. code-block:: bash - ❯ ansible-playbook netbox-ip.yml -v + ❯ ansible-playbook nautobot-ip.yml -v No config file found; using defaults [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAY [localhost] ********************************************************************************************************************** - TASK [Add ip address to netbox] ******************************************************************************************************* + TASK [Add ip address to nautobot] ******************************************************************************************************* changed: [localhost] => {"changed": true, "ip_address": {"address": "192.168.10.60/24", "assigned_object": null, "assigned_object_id": null, "assigned_object_type": null, "created": "2021-01-01", "custom_fields": {}, "description": "", "dns_name": "", "family": 4, "id": 12, "last_updated": "2021-01-01T17:28:29.770142Z", "nat_inside": 10, "nat_outside": null, "role": null, "status": "active", "tags": [], "tenant": null, "url": "http://192.168.50.10:8000/api/ipam/ip-addresses/12/", "vrf": 1}, "msg": "ip_address 192.168.10.60/24 created"} PLAY RECAP **************************************************************************************************************************** localhost : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 -The lookup plugin grabs the object from NetBox, serializes it into a dictionary, and then passes it into the module. This is similar to the :ref:`Passing in Dictionaries`, but allows you to find the information yourself without relying on the internal +The lookup plugin grabs the object from Nautobot, serializes it into a dictionary, and then passes it into the module. This is similar to the :ref:`Passing in Dictionaries`, but allows you to find the information yourself without relying on the internal resolution methods used in the modules. Option 2: Lookup Plugin ID ++++++++++++++++++++++++++++++ -Let's take a look at option two. We'll delete the IP address from NetBox and then use the following task. +Let's take a look at option two. We'll delete the IP address from Nautobot and then use the following task. .. code-block:: yaml --- ... tasks: - - name: "Add ip address to netbox" - netbox.netbox.netbox_ip_address: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + - name: "Add ip address to nautobot" + networktocode.nautobot.ip_address: + url: "http://nautobot.local" + token: "thisIsMyToken" data: address: "192.168.10.60/24" vrf: "Test VRF" nat_inside: - id: "{{ query('netbox.netbox.nb_lookup', 'ip-addresses', api_filter='address=192.168.100.1/24 vrf=1:1', api_endpoint='http://netbox.local', token='thisIsMyToken', validate_certs=False, raw_data=True) | map(attribute='id') | first }}" + id: "{{ query('networktocode.nautobot.lookup', 'ip-addresses', api_filter='address=192.168.100.1/24 vrf=1:1', api_endpoint='http://nautobot.local', token='thisIsMyToken', validate_certs=False, raw_data=True) | map(attribute='id') | first }}" state: present There are a few differences between the two options since we use ``query`` rather than ``lookup`` since it returns a list that we can then use the ``map()`` Jinja filter to extract the ID field from the result @@ -202,14 +202,14 @@ The collection will actually convert the string it receives for the ``id`` and t .. code-block:: bash - ❯ ansible-playbook netbox-ip.yml -v + ❯ ansible-playbook nautobot-ip.yml -v No config file found; using defaults [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAY [localhost] ********************************************************************************************************************** - TASK [Add ip address to netbox] ******************************************************************************************************* + TASK [Add ip address to nautobot] ******************************************************************************************************* changed: [localhost] => {"changed": true, "ip_address": {"address": "192.168.10.60/24", "assigned_object": null, "assigned_object_id": null, "assigned_object_type": null, "created": "2021-01-01", "custom_fields": {}, "description": "", "dns_name": "", "family": 4, "id": 12, "last_updated": "2021-01-01T17:28:29.770142Z", "nat_inside": 10, "nat_outside": null, "role": null, "status": "active", "tags": [], "tenant": null, "url": "http://192.168.50.10:8000/api/ipam/ip-addresses/12/", "vrf": 1}, "msg": "ip_address 192.168.10.60/24 created"} PLAY RECAP **************************************************************************************************************************** @@ -223,8 +223,8 @@ There will be times when you want to override the builtin **ALLOWED_QUERY_PARAMS To make this possible, every module accepts the ``query_params`` argument. This argument allows you to specify a list of strings for the module arguments you want to use to search for the object. -Let's start with another example. We will continue to use :ref:`netbox.netbox.netbox_ip_address`. We created **192.168.100.1/24** as a duplicate IP address within -the global IP address space within NetBox. This task should fail saying there was more than result returned. +Let's start with another example. We will continue to use :ref:`networktocode.nautobot.ip_address`. We created **192.168.100.1/24** as a duplicate IP address within +the global IP address space within Nautobot. This task should fail saying there was more than result returned. .. code-block:: yaml @@ -232,16 +232,16 @@ the global IP address space within NetBox. This task should fail saying there wa ... tasks: - name: "Update non-unique IP address" - netbox.netbox.netbox_ip_address: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + networktocode.nautobot.ip_address: + url: "http://nautobot.local" + token: "thisIsMyToken" data: address: "192.168.100.1/24" .. code-block:: bash - ❯ ansible-playbook netbox-ip.yml -v + ❯ ansible-playbook nautobot-ip.yml -v No config file found; using defaults [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' @@ -270,12 +270,12 @@ IP address to be within **Test VRF 2**. ... tasks: - name: "Update non-unique IP address" - netbox.netbox.netbox_ip_address: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + networktocode.nautobot.ip_address: + url: "http://nautobot.local" + token: "thisIsMyToken" data: address: "192.168.100.1/24" - dns_name: "docs.netbox-modules.com" + dns_name: "docs.nautobot-modules.com" vrf: "Test VRF 2" query_params: - address @@ -283,7 +283,7 @@ IP address to be within **Test VRF 2**. .. code-block:: bash - ❯ ansible-playbook netbox-ip.yml -v + ❯ ansible-playbook nautobot-ip.yml -v No config file found; using defaults [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' @@ -291,11 +291,11 @@ IP address to be within **Test VRF 2**. PLAY [localhost] ********************************************************************************************************************** TASK [Update non-unique IP address] *************************************************************************************************** - changed: [localhost] => {"changed": true, "ip_address": {"address": "192.168.100.1/24", "assigned_object": null, "assigned_object_id": null, "assigned_object_type": null, "created": "2021-01-01", "custom_fields": {}, "description": "", "dns_name": "docs.netbox-modules.com", "family": 4, "id": 15, "last_updated": "2021-01-01T19:16:49.756265Z", "nat_inside": null, "nat_outside": null, "role": null, "status": "active", "tags": [], "tenant": null, "url": "http://192.168.50.10:8000/api/ipam/ip-addresses/15/", "vrf": 2}, "msg": "ip_address 192.168.100.1/24 updated"} + changed: [localhost] => {"changed": true, "ip_address": {"address": "192.168.100.1/24", "assigned_object": null, "assigned_object_id": null, "assigned_object_type": null, "created": "2021-01-01", "custom_fields": {}, "description": "", "dns_name": "docs.nautobot-modules.com", "family": 4, "id": 15, "last_updated": "2021-01-01T19:16:49.756265Z", "nat_inside": null, "nat_outside": null, "role": null, "status": "active", "tags": [], "tenant": null, "url": "http://192.168.50.10:8000/api/ipam/ip-addresses/15/", "vrf": 2}, "msg": "ip_address 192.168.100.1/24 updated"} PLAY RECAP **************************************************************************************************************************** localhost : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 We can now see that the IP address is now within VRF with ID 2. -Hopefully this shines some light on this useful feature to allow you, as the user, to define your specific needs for finding a unique object within your NetBox instance. \ No newline at end of file +Hopefully this shines some light on this useful feature to allow you, as the user, to define your specific needs for finding a unique object within your Nautobot instance. \ No newline at end of file diff --git a/docs/getting_started/how-to-use/inventory.rst b/docs/getting_started/how-to-use/inventory.rst index 8b6466ff..008999a3 100644 --- a/docs/getting_started/how-to-use/inventory.rst +++ b/docs/getting_started/how-to-use/inventory.rst @@ -4,7 +4,7 @@ Inventory This page will just have quick examples that people may have had questions about, but the normal plugin documentation should be referenced for normal usage. -The inventory plugin documentation can be found :ref:`here`. +The inventory plugin documentation can be found :ref:`here`. Using Compose to Set ansible_network_os to Platform Slug ------------------------------------------------------------------ @@ -12,7 +12,7 @@ Using Compose to Set ansible_network_os to Platform Slug .. code-block:: yaml --- - plugin: netbox.netbox.nb_inventory + plugin: networktocode.nautobot.inventory compose: ansible_network_os: platform.slug @@ -23,7 +23,7 @@ Using Keyed Groups to set ansible_network_os to Platform Slug .. code-block:: yaml --- - plugin: netbox.netbox.nb_inventory + plugin: networktocode.nautobot.inventory keyed_groups: - key: platform prefix: "network_os" @@ -36,7 +36,7 @@ Using Keyed Groups to set ansible_network_os to Platform Slug Using Inventory Plugin Within AWX/Tower ---------------------------------------- -This will cover the basic usage of the NetBox inventory plugin within this collection. +This will cover the basic usage of the Nautobot inventory plugin within this collection. 1. Define ``collections/requirements.yml`` within a Git project. 2. AWX/Tower will download the collection on each run. This can be handled differently or excluded if storing Ansible Collections on the AWX/Tower box. diff --git a/docs/getting_started/how-to-use/modules.rst b/docs/getting_started/how-to-use/modules.rst index cf42b270..d7555d96 100644 --- a/docs/getting_started/how-to-use/modules.rst +++ b/docs/getting_started/how-to-use/modules.rst @@ -6,7 +6,7 @@ Specifying Modules in a Playbook There are two methods when using a collection in a playbook (in preferred order): -1. Using the Fully Qualified Collection Name (FQCN) of the module, e.g. ``netbox.netbox.netbox_device`` at the task level. +1. Using the Fully Qualified Collection Name (FQCN) of the module, e.g. ``networktocode.nautobot.device`` at the task level. 2. Using the ``collections`` directive at the play level. @@ -16,8 +16,8 @@ There are two methods when using a collection in a playbook (in preferred order) - hosts: "localhost" tasks: - - name: "Configure a device in NetBox" - netbox.netbox.netbox_device: + - name: "Configure a device in Nautobot" + networktocode.nautobot.device: <.. omitted> @@ -26,11 +26,11 @@ There are two methods when using a collection in a playbook (in preferred order) --- - hosts: "localhost" collections: - - netbox.netbox + - networktocode.nautobot tasks: - - name: "Configure a device in NetBox" - netbox_device: + - name: "Configure a device in Nautobot" + device: <.. omitted> @@ -38,7 +38,7 @@ To validate that the playbook is using the collection modules and not the Ansibl .. code-block:: bash - Using module file /Users/netbox/.ansible/collections/ansible_collections/netbox/netbox/plugins/modules/netbox_device.py + Using module file /Users/nautobot/.ansible/collections/ansible_collections/networktocode.nautobot/plugins/modules/device.py You can find more information at the official Ansible docs_. @@ -60,21 +60,21 @@ Ansible provides several builtin methods when initializing the ``AnsibleModule`` - **required_if**: Allows logic to define that an argument is required if another argument and it's value meets the specified condition. - **required_one_of**: Specifies logic that at least one of the arguments specified is required. -Most modules will require the minimal amount of arguments to find a unique object in NetBox via the **argument_spec** that gets passed into ``AnsibleModule``. +Most modules will require the minimal amount of arguments to find a unique object in Nautobot via the **argument_spec** that gets passed into ``AnsibleModule``. .. _Module Development: https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#ansiblemodule .. note:: For more information, please view Ansible's documentation for Module Development_. -This does mean that the modules may make the call to NetBox to create an object and the API will reply back advising the user that required fields were missing for the specific operation and causes the module to fail. +This does mean that the modules may make the call to Nautobot to create an object and the API will reply back advising the user that required fields were missing for the specific operation and causes the module to fail. .. code-block:: bash failed: [localhost] (item={'unit': 2, 'type': 'nexus-child'}) => {"ansible_loop_var": "item", "changed": false, "item": {"type": "nexus-child", "unit": 2}, "msg": "{\"device_role\":[\"This field is required.\"]}"} -To expand further, our ``present`` state can either **create** or **update** an object. If the object does not exist within NetBox it will send a ``POST`` and create the object. -If the object already exists, the fetched object from NetBox is captured with ``pynetbox`` and will already have the required fields, which means the user only needs to provide the updated fields. -The next step is to then compare the object obtained from NetBox to the data passed in by the user into the module and only update the fields that are different. This is all handled behind the scenes within the modules. +To expand further, our ``present`` state can either **create** or **update** an object. If the object does not exist within Nautobot it will send a ``POST`` and create the object. +If the object already exists, the fetched object from Nautobot is captured with ``pynautobot`` and will already have the required fields, which means the user only needs to provide the updated fields. +The next step is to then compare the object obtained from Nautobot to the data passed in by the user into the module and only update the fields that are different. This is all handled behind the scenes within the modules. Hopefully this helps paint a picture as to why certain design decisions were made and how you can better consume this collection. Let's move onto some examples. @@ -94,7 +94,7 @@ The required fields are marked by ``*`` and we can see the following are fields - **device_role** - **site** -These same fields are required when creating a device via the :ref:`netbox_device ` module, but with the important addition of **name**. +These same fields are required when creating a device via the :ref:`device ` module, but with the important addition of **name**. .. code-block:: yaml @@ -102,9 +102,9 @@ These same fields are required when creating a device via the :ref:`netbox_devic ... tasks: - name: "Example for state: present" - netbox.netbox.netbox_device: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + networktocode.nautobot.device: + url: "http://nautobot.local" + token: "thisIsMyToken" data: name: "Test Device" device_type: "C9410R" @@ -112,14 +112,14 @@ These same fields are required when creating a device via the :ref:`netbox_devic site: "Main" state: present -The reasoning behind requiring **name** within the Ansible modules is to provide the module with the ability to distinguish between devices or objects within NetBox. The name helps make the device unique rather than attempting to only +The reasoning behind requiring **name** within the Ansible modules is to provide the module with the ability to distinguish between devices or objects within Nautobot. The name helps make the device unique rather than attempting to only search on ``device_type``, ``device_role``, and ``site`` as these do not make a device unique and makes it difficult to assume which device the user cares about. These modules are abstracting away the API interaction and some of the logic which means we require the users to provide a bit more information as to what they're intending to do. We're trying to keep the abstractions to a minimum, but that isn't always possible. -Along with forcing a user to provide some uniqueness to their objects in NetBox, we also try and mirror the module interaction with the GUI interaction where we can to prevent burdening the user. -For instance, the ``slug`` field is required when interacting with the API for the majority of models in NetBox, but constructing the ``slug`` is handled for the user within the GUI. To stay aligned with the GUI, -we abstract that away from the user by constructing the ``slug`` from the ``name`` using the same rules as the NetBox GUI. +Along with forcing a user to provide some uniqueness to their objects in Nautobot, we also try and mirror the module interaction with the GUI interaction where we can to prevent burdening the user. +For instance, the ``slug`` field is required when interacting with the API for the majority of models in Nautobot, but constructing the ``slug`` is handled for the user within the GUI. To stay aligned with the GUI, +we abstract that away from the user by constructing the ``slug`` from the ``name`` using the same rules as the Nautobot GUI. For reference, here is the code that **slugifies** the ``name`` argument when a user does not provide a ``slug``. @@ -153,16 +153,16 @@ Now that we have created our device (**Test Device**), let's update it by adding ... tasks: - name: "Example state: present - Update" - netbox.netbox.netbox_device: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + networktocode.nautobot.device: + url: "http://nautobot.local" + token: "thisIsMyToken" data: name: "Test Device" serial: "FXS110011" state: "present" We're only providing the **name** which makes the device unique and then the argument we want updated. As stated above, it will see that the device exist, and then update the ``serial`` field and then send a -``PATCH`` to the NetBox API. +``PATCH`` to the Nautobot API. .. note:: You can add the ``query_params`` argument to specify specific fields that make the object unique in your environment. @@ -183,9 +183,9 @@ The uniqueness of the device (**name** or user specified **query_params**) and t ... tasks: - name: "Example state: absent" - netbox.netbox.netbox_device: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + networktocode.nautobot.device: + url: "http://nautobot.local" + token: "thisIsMyToken" data: name: "Test Device" state: "absent" @@ -197,11 +197,11 @@ Not all models support tags, but several of them do so I wanted to talk a little applied the same irregardless of which module you're using. .. note:: - Tags changed significantly starting NetBox 2.10. + Tags changed significantly starting Nautobot 2.10. We will not be covering pre-2.10 tags within these docs. -Tags are now a model within NetBox and require being resolved like any other model such as ``device_type`` shown above. This requires the user to provide a list of dictionaries +Tags are now a model within Nautobot and require being resolved like any other model such as ``device_type`` shown above. This requires the user to provide a list of dictionaries that specify fields that are unique to each tag. Name can be used, but we always suggest that you use ``slug`` when available. .. code-block:: yaml @@ -210,9 +210,9 @@ that specify fields that are unique to each tag. Name can be used, but we always ... tasks: - name: "Example using tags" - netbox.netbox.netbox_device: - netbox_url: "http://netbox.local" - netbox_token: "thisIsMyToken" + networktocode.nautobot.device: + url: "http://nautobot.local" + token: "thisIsMyToken" data: name: "Test Device" tags: diff --git a/docs/getting_started/installation.rst b/docs/getting_started/installation.rst index de80fb48..7dae958f 100644 --- a/docs/getting_started/installation.rst +++ b/docs/getting_started/installation.rst @@ -5,8 +5,8 @@ Installation Ansible Galaxy --------------- -Run the following command to install the netbox.netbox collection: -``ansible-galaxy collection install netbox.netbox`` +Run the following command to install the networktocode.nautobot collection: +``ansible-galaxy collection install networktocode.nautobot`` .. _docs: https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#installing-collections @@ -20,22 +20,22 @@ Build From Source Follow these steps to install from source: -1. ``git clone git@github.com:netbox-community/ansible_modules.git`` -2. ``cd ansible_modules`` +1. ``git clone git@github.com:nautobot/nautobot-ansible.git`` +2. ``cd nautobot-ansible`` 3. ``ansible-galaxy collection build .`` -4. ``ansible-galaxy collection install netbox-netbox*.tar.gz`` +4. ``ansible-galaxy collection install networktocode.nautobot*.tar.gz`` Build From Source (Pull Request) ----------------------------------- This is useful to test code within PRs. -1. ``git clone git@github.com:netbox-community/ansible_modules.git`` -2. ``cd ansible_modules`` +1. ``git clone git@github.com:nautobot/nautobot-ansible.git`` +2. ``cd nautobot-ansible`` 3. ``git fetch origin pull//head:`` 4. ``git checkout `` 5. ``ansible-galaxy collection build .`` -6. ``ansible-galaxy collection install netbox-netbox*.tar.gz`` +6. ``ansible-galaxy collection install networktocode.nautobot*.tar.gz`` .. _GitHub: https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally .. note:: The following link provides detailed information on checking out pull requests locally: GitHub_ \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 85c1a68b..a2a2c61d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,11 +1,11 @@ -netbox.netbox Ansible Collection's documentation! +networktocode.nautobot Ansible Collection's documentation! ================================================================ Overview ======== -This is the documentation home of the **netbox.netbox** Ansible Collection. We will provide some examples of using all the different plugins included with this collection. +This is the documentation home of the **networktocode.nautobot** Ansible Collection. We will provide some examples of using all the different plugins included with this collection. Contents ======== @@ -15,11 +15,10 @@ Contents Home Getting Started - Advanced Usage Plugins Module Utils (Python) Docs Changelog .. note:: - This is a fork of the netbox.netbox Ansible Galaxy collection found at [https://github.com/netbox-community/ansible_modules](https://github.com/netbox-community/ansible_modules) in February, 2021 + This is a fork of the networktocode.nautobot Ansible Galaxy collection found at [https://github.com/nautobot/nautobot-ansible](https://github.com/nautobot/nautobot-ansible) in February, 2021 \ No newline at end of file diff --git a/docs/module_utils/circuits/index.rst b/docs/module_utils/circuits/index.rst new file mode 100644 index 00000000..75a86e59 --- /dev/null +++ b/docs/module_utils/circuits/index.rst @@ -0,0 +1,13 @@ +circuits +==================================== + +Constants +--------- +.. autodata:: plugins.module_utils.circuits.NB_PROVIDERS +.. autodata:: plugins.module_utils.circuits.NB_CIRCUIT_TYPES +.. autodata:: plugins.module_utils.circuits.NB_CIRCUIT_TERMINATIONS +.. autodata:: plugins.module_utils.circuits.NB_CIRCUITS + +Classes +------- +.. autoclass:: plugins.module_utils.circuits.NautobotCircuitsModule diff --git a/docs/module_utils/dcim/index.rst b/docs/module_utils/dcim/index.rst new file mode 100644 index 00000000..2f232226 --- /dev/null +++ b/docs/module_utils/dcim/index.rst @@ -0,0 +1,40 @@ +dcim +==================================== + +Constants +--------- +.. autodata:: plugins.module_utils.dcim.NB_CABLES +.. autodata:: plugins.module_utils.dcim.NB_CONSOLE_PORTS +.. autodata:: plugins.module_utils.dcim.NB_CONSOLE_PORT_TEMPLATES +.. autodata:: plugins.module_utils.dcim.NB_CONSOLE_SERVER_PORTS +.. autodata:: plugins.module_utils.dcim.NB_CONSOLE_SERVER_PORT_TEMPLATES +.. autodata:: plugins.module_utils.dcim.NB_DEVICE_BAYS +.. autodata:: plugins.module_utils.dcim.NB_DEVICE_BAY_TEMPLATES +.. autodata:: plugins.module_utils.dcim.NB_DEVICES +.. autodata:: plugins.module_utils.dcim.NB_DEVICE_ROLES +.. autodata:: plugins.module_utils.dcim.NB_DEVICE_TYPES +.. autodata:: plugins.module_utils.dcim.NB_FRONT_PORTS +.. autodata:: plugins.module_utils.dcim.NB_FRONT_PORT_TEMPLATES +.. autodata:: plugins.module_utils.dcim.NB_INTERFACES +.. autodata:: plugins.module_utils.dcim.NB_INTERFACE_TEMPLATES +.. autodata:: plugins.module_utils.dcim.NB_INVENTORY_ITEMS +.. autodata:: plugins.module_utils.dcim.NB_MANUFACTURERS +.. autodata:: plugins.module_utils.dcim.NB_PLATFORMS +.. autodata:: plugins.module_utils.dcim.NB_POWER_FEEDS +.. autodata:: plugins.module_utils.dcim.NB_POWER_OUTLETS +.. autodata:: plugins.module_utils.dcim.NB_POWER_OUTLET_TEMPLATES +.. autodata:: plugins.module_utils.dcim.NB_POWER_PANELS +.. autodata:: plugins.module_utils.dcim.NB_POWER_PORTS +.. autodata:: plugins.module_utils.dcim.NB_POWER_PORT_TEMPLATES +.. autodata:: plugins.module_utils.dcim.NB_RACKS +.. autodata:: plugins.module_utils.dcim.NB_RACK_ROLES +.. autodata:: plugins.module_utils.dcim.NB_RACK_GROUPS +.. autodata:: plugins.module_utils.dcim.NB_REAR_PORTS +.. autodata:: plugins.module_utils.dcim.NB_REAR_PORT_TEMPLATES +.. autodata:: plugins.module_utils.dcim.NB_REGIONS +.. autodata:: plugins.module_utils.dcim.NB_SITES +.. autodata:: plugins.module_utils.dcim.NB_VIRTUAL_CHASSIS + +Classes +------- +.. autoclass:: plugins.module_utils.dcim.NautobotDcimModule diff --git a/docs/module_utils/netbox_extras/index.rst b/docs/module_utils/extras/index.rst similarity index 54% rename from docs/module_utils/netbox_extras/index.rst rename to docs/module_utils/extras/index.rst index c8aadb12..c0a2ad8d 100644 --- a/docs/module_utils/netbox_extras/index.rst +++ b/docs/module_utils/extras/index.rst @@ -1,4 +1,4 @@ -netbox_extras +extras ==================================== Constants @@ -7,4 +7,4 @@ None exist at the moment. Classes ------- -.. autoclass:: plugins.module_utils.netbox_extras.NetboxExtrasModule +.. autoclass:: plugins.module_utils.extras.NautobotExtrasModule diff --git a/docs/module_utils/ipam/index.rst b/docs/module_utils/ipam/index.rst new file mode 100644 index 00000000..c62d1feb --- /dev/null +++ b/docs/module_utils/ipam/index.rst @@ -0,0 +1,18 @@ +ipam +==================================== + +Constants +--------- +.. autodata:: plugins.module_utils.ipam.NB_AGGREGATES +.. autodata:: plugins.module_utils.ipam.NB_IP_ADDRESSES +.. autodata:: plugins.module_utils.ipam.NB_PREFIXES +.. autodata:: plugins.module_utils.ipam.NB_IPAM_ROLES +.. autodata:: plugins.module_utils.ipam.NB_RIRS +.. autodata:: plugins.module_utils.ipam.NB_VLANS +.. autodata:: plugins.module_utils.ipam.NB_VLAN_GROUPS +.. autodata:: plugins.module_utils.ipam.NB_VRFS +.. autodata:: plugins.module_utils.ipam.NB_SERVICES + +Classes +------- +.. autoclass:: plugins.module_utils.ipam.NautobotIpamModule diff --git a/docs/module_utils/netbox_circuits/index.rst b/docs/module_utils/netbox_circuits/index.rst deleted file mode 100644 index 1ae679d4..00000000 --- a/docs/module_utils/netbox_circuits/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -netbox_circuits -==================================== - -Constants ---------- -.. autodata:: plugins.module_utils.netbox_circuits.NB_PROVIDERS -.. autodata:: plugins.module_utils.netbox_circuits.NB_CIRCUIT_TYPES -.. autodata:: plugins.module_utils.netbox_circuits.NB_CIRCUIT_TERMINATIONS -.. autodata:: plugins.module_utils.netbox_circuits.NB_CIRCUITS - -Classes -------- -.. autoclass:: plugins.module_utils.netbox_circuits.NetboxCircuitsModule diff --git a/docs/module_utils/netbox_dcim/index.rst b/docs/module_utils/netbox_dcim/index.rst deleted file mode 100644 index d4d93fed..00000000 --- a/docs/module_utils/netbox_dcim/index.rst +++ /dev/null @@ -1,40 +0,0 @@ -netbox_dcim -==================================== - -Constants ---------- -.. autodata:: plugins.module_utils.netbox_dcim.NB_CABLES -.. autodata:: plugins.module_utils.netbox_dcim.NB_CONSOLE_PORTS -.. autodata:: plugins.module_utils.netbox_dcim.NB_CONSOLE_PORT_TEMPLATES -.. autodata:: plugins.module_utils.netbox_dcim.NB_CONSOLE_SERVER_PORTS -.. autodata:: plugins.module_utils.netbox_dcim.NB_CONSOLE_SERVER_PORT_TEMPLATES -.. autodata:: plugins.module_utils.netbox_dcim.NB_DEVICE_BAYS -.. autodata:: plugins.module_utils.netbox_dcim.NB_DEVICE_BAY_TEMPLATES -.. autodata:: plugins.module_utils.netbox_dcim.NB_DEVICES -.. autodata:: plugins.module_utils.netbox_dcim.NB_DEVICE_ROLES -.. autodata:: plugins.module_utils.netbox_dcim.NB_DEVICE_TYPES -.. autodata:: plugins.module_utils.netbox_dcim.NB_FRONT_PORTS -.. autodata:: plugins.module_utils.netbox_dcim.NB_FRONT_PORT_TEMPLATES -.. autodata:: plugins.module_utils.netbox_dcim.NB_INTERFACES -.. autodata:: plugins.module_utils.netbox_dcim.NB_INTERFACE_TEMPLATES -.. autodata:: plugins.module_utils.netbox_dcim.NB_INVENTORY_ITEMS -.. autodata:: plugins.module_utils.netbox_dcim.NB_MANUFACTURERS -.. autodata:: plugins.module_utils.netbox_dcim.NB_PLATFORMS -.. autodata:: plugins.module_utils.netbox_dcim.NB_POWER_FEEDS -.. autodata:: plugins.module_utils.netbox_dcim.NB_POWER_OUTLETS -.. autodata:: plugins.module_utils.netbox_dcim.NB_POWER_OUTLET_TEMPLATES -.. autodata:: plugins.module_utils.netbox_dcim.NB_POWER_PANELS -.. autodata:: plugins.module_utils.netbox_dcim.NB_POWER_PORTS -.. autodata:: plugins.module_utils.netbox_dcim.NB_POWER_PORT_TEMPLATES -.. autodata:: plugins.module_utils.netbox_dcim.NB_RACKS -.. autodata:: plugins.module_utils.netbox_dcim.NB_RACK_ROLES -.. autodata:: plugins.module_utils.netbox_dcim.NB_RACK_GROUPS -.. autodata:: plugins.module_utils.netbox_dcim.NB_REAR_PORTS -.. autodata:: plugins.module_utils.netbox_dcim.NB_REAR_PORT_TEMPLATES -.. autodata:: plugins.module_utils.netbox_dcim.NB_REGIONS -.. autodata:: plugins.module_utils.netbox_dcim.NB_SITES -.. autodata:: plugins.module_utils.netbox_dcim.NB_VIRTUAL_CHASSIS - -Classes -------- -.. autoclass:: plugins.module_utils.netbox_dcim.NetboxDcimModule diff --git a/docs/module_utils/netbox_ipam/index.rst b/docs/module_utils/netbox_ipam/index.rst deleted file mode 100644 index 5bd409ac..00000000 --- a/docs/module_utils/netbox_ipam/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -netbox_ipam -==================================== - -Constants ---------- -.. autodata:: plugins.module_utils.netbox_ipam.NB_AGGREGATES -.. autodata:: plugins.module_utils.netbox_ipam.NB_IP_ADDRESSES -.. autodata:: plugins.module_utils.netbox_ipam.NB_PREFIXES -.. autodata:: plugins.module_utils.netbox_ipam.NB_IPAM_ROLES -.. autodata:: plugins.module_utils.netbox_ipam.NB_RIRS -.. autodata:: plugins.module_utils.netbox_ipam.NB_VLANS -.. autodata:: plugins.module_utils.netbox_ipam.NB_VLAN_GROUPS -.. autodata:: plugins.module_utils.netbox_ipam.NB_VRFS -.. autodata:: plugins.module_utils.netbox_ipam.NB_SERVICES - -Classes -------- -.. autoclass:: plugins.module_utils.netbox_ipam.NetboxIpamModule diff --git a/docs/module_utils/netbox_secrets/index.rst b/docs/module_utils/netbox_secrets/index.rst deleted file mode 100644 index b664048c..00000000 --- a/docs/module_utils/netbox_secrets/index.rst +++ /dev/null @@ -1,10 +0,0 @@ -netbox_secrets -==================================== - -Constants ---------- -None exist at the moment. - -Classes -------- -.. autoclass:: plugins.module_utils.netbox_secrets.NetboxSecretsModule diff --git a/docs/module_utils/netbox_tenancy/index.rst b/docs/module_utils/netbox_tenancy/index.rst deleted file mode 100644 index b53e2486..00000000 --- a/docs/module_utils/netbox_tenancy/index.rst +++ /dev/null @@ -1,11 +0,0 @@ -netbox_tenancy -==================================== - -Constants ---------- -.. autodata:: plugins.module_utils.netbox_tenancy.NB_TENANTS -.. autodata:: plugins.module_utils.netbox_tenancy.NB_TENANT_GROUPS - -Classes -------- -.. autoclass:: plugins.module_utils.netbox_tenancy.NetboxTenancyModule diff --git a/docs/module_utils/netbox_utils/index.rst b/docs/module_utils/netbox_utils/index.rst deleted file mode 100644 index 0f573271..00000000 --- a/docs/module_utils/netbox_utils/index.rst +++ /dev/null @@ -1,20 +0,0 @@ -netbox_utils -================================= - -Constants ---------- - -.. autodata:: plugins.module_utils.netbox_utils.API_APPS_ENDPOINTS -.. autodata:: plugins.module_utils.netbox_utils.QUERY_TYPES -.. autodata:: plugins.module_utils.netbox_utils.CONVERT_TO_ID -.. autodata:: plugins.module_utils.netbox_utils.ENDPOINT_NAME_MAPPING -.. autodata:: plugins.module_utils.netbox_utils.ALLOWED_QUERY_PARAMS -.. autodata:: plugins.module_utils.netbox_utils.QUERY_PARAMS_IDS -.. autodata:: plugins.module_utils.netbox_utils.REQUIRED_ID_FIND -.. autodata:: plugins.module_utils.netbox_utils.CONVERT_KEYS -.. autodata:: plugins.module_utils.netbox_utils.SLUG_REQUIRED -.. autodata:: plugins.module_utils.netbox_utils.NETBOX_ARG_SPEC - -Classes -------- -.. automodule:: plugins.module_utils.netbox_utils \ No newline at end of file diff --git a/docs/module_utils/netbox_virtualization/index.rst b/docs/module_utils/netbox_virtualization/index.rst deleted file mode 100644 index 45260658..00000000 --- a/docs/module_utils/netbox_virtualization/index.rst +++ /dev/null @@ -1,14 +0,0 @@ -netbox_virtualization -==================================== - -Constants ---------- -.. autodata:: plugins.module_utils.netbox_virtualization.NB_VIRTUAL_MACHINES -.. autodata:: plugins.module_utils.netbox_virtualization.NB_CLUSTERS -.. autodata:: plugins.module_utils.netbox_virtualization.NB_CLUSTER_GROUP -.. autodata:: plugins.module_utils.netbox_virtualization.NB_CLUSTER_TYPE -.. autodata:: plugins.module_utils.netbox_virtualization.NB_VM_INTERFACES - -Classes -------- -.. autoclass:: plugins.module_utils.netbox_virtualization.NetboxVirtualizationModule diff --git a/docs/module_utils/tenancy/index.rst b/docs/module_utils/tenancy/index.rst new file mode 100644 index 00000000..104f0dec --- /dev/null +++ b/docs/module_utils/tenancy/index.rst @@ -0,0 +1,11 @@ +tenancy +==================================== + +Constants +--------- +.. autodata:: plugins.module_utils.tenancy.NB_TENANTS +.. autodata:: plugins.module_utils.tenancy.NB_TENANT_GROUPS + +Classes +------- +.. autoclass:: plugins.module_utils.tenancy.NautobotTenancyModule diff --git a/docs/module_utils/utils/index.rst b/docs/module_utils/utils/index.rst new file mode 100644 index 00000000..61453cc8 --- /dev/null +++ b/docs/module_utils/utils/index.rst @@ -0,0 +1,20 @@ +utils +================================= + +Constants +--------- + +.. autodata:: plugins.module_utils.utils.API_APPS_ENDPOINTS +.. autodata:: plugins.module_utils.utils.QUERY_TYPES +.. autodata:: plugins.module_utils.utils.CONVERT_TO_ID +.. autodata:: plugins.module_utils.utils.ENDPOINT_NAME_MAPPING +.. autodata:: plugins.module_utils.utils.ALLOWED_QUERY_PARAMS +.. autodata:: plugins.module_utils.utils.QUERY_PARAMS_IDS +.. autodata:: plugins.module_utils.utils.REQUIRED_ID_FIND +.. autodata:: plugins.module_utils.utils.CONVERT_KEYS +.. autodata:: plugins.module_utils.utils.SLUG_REQUIRED +.. autodata:: plugins.module_utils.utils.NAUTOBOT_ARG_SPEC + +Classes +------- +.. automodule:: plugins.module_utils.utils \ No newline at end of file diff --git a/docs/module_utils/virtualization/index.rst b/docs/module_utils/virtualization/index.rst new file mode 100644 index 00000000..df983e06 --- /dev/null +++ b/docs/module_utils/virtualization/index.rst @@ -0,0 +1,14 @@ +virtualization +==================================== + +Constants +--------- +.. autodata:: plugins.module_utils.virtualization.NB_VIRTUAL_MACHINES +.. autodata:: plugins.module_utils.virtualization.NB_CLUSTERS +.. autodata:: plugins.module_utils.virtualization.NB_CLUSTER_GROUP +.. autodata:: plugins.module_utils.virtualization.NB_CLUSTER_TYPE +.. autodata:: plugins.module_utils.virtualization.NB_VM_INTERFACES + +Classes +------- +.. autoclass:: plugins.module_utils.virtualization.NautobotVirtualizationModule diff --git a/docs/plugins/netbox_aggregate_module.rst b/docs/plugins/aggregate_module.rst similarity index 91% rename from docs/plugins/netbox_aggregate_module.rst rename to docs/plugins/aggregate_module.rst index e0777f34..5db127db 100644 --- a/docs/plugins/netbox_aggregate_module.rst +++ b/docs/plugins/aggregate_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_aggregate_module: +.. _ansible_collections.networktocode.nautobot.aggregate_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_aggregate -- Creates or removes aggregates from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.aggregate -- Creates or removes aggregates from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_aggregate`. + To use it in a playbook, specify: :code:`networktocode.nautobot.aggregate`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes aggregates from Netbox +- Creates or removes aggregates from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -98,7 +98,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -184,68 +184,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • present ←
  • +
  • absent
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
The state of the aggregate
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • present ←
  • -
  • absent
  • -
- + -
The state of the aggregate
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -287,25 +287,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox aggregate module" + - name: "Test Nautobot aggregate module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create aggregate within Netbox with only required information - netbox_aggregate: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create aggregate within Nautobot with only required information + networktocode.nautobot.aggregate: + url: http://nautobot.local + token: thisIsMyToken data: prefix: 192.168.0.0/16 rir: Test RIR state: present - name: Create aggregate with several specified options - netbox_aggregate: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.aggregate: + url: http://nautobot.local + token: thisIsMyToken data: prefix: 192.168.0.0/16 rir: Test RIR @@ -315,10 +315,10 @@ Examples - Schnozzberry state: present - - name: Delete aggregate within netbox - netbox_aggregate: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete aggregate within nautobot + networktocode.nautobot.aggregate: + url: http://nautobot.local + token: thisIsMyToken data: prefix: 192.168.0.0/16 state: absent @@ -354,7 +354,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -384,7 +384,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_cable_module.rst b/docs/plugins/cable_module.rst similarity index 95% rename from docs/plugins/netbox_cable_module.rst rename to docs/plugins/cable_module.rst index a642acc9..77050182 100644 --- a/docs/plugins/netbox_cable_module.rst +++ b/docs/plugins/cable_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_cable_module: +.. _ansible_collections.networktocode.nautobot.cable_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_cable -- Create, update or delete cables within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.cable -- Create, update or delete cables within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_cable`. + To use it in a playbook, specify: :code:`networktocode.nautobot.cable`. .. version_added -.. versionadded:: 0.3.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes cables from Netbox +- Creates, updates or removes cables from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -303,68 +303,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -406,16 +406,16 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create cable within Netbox with only required information - netbox_cable: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create cable within Nautobot with only required information + networktocode.nautobot.cable: + url: http://nautobot.local + token: thisIsMyToken data: termination_a_type: dcim.interface termination_a: @@ -428,9 +428,9 @@ Examples state: present - name: Update cable with other fields - netbox_cable: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.cable: + url: http://nautobot.local + token: thisIsMyToken data: termination_a_type: dcim.interface termination_a: @@ -448,10 +448,10 @@ Examples length_unit: m state: present - - name: Delete cable within netbox - netbox_cable: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete cable within nautobot + networktocode.nautobot.cable: + url: http://nautobot.local + token: thisIsMyToken data: termination_a_type: dcim.interface termination_a: @@ -494,7 +494,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_circuit_module.rst b/docs/plugins/circuit_module.rst similarity index 93% rename from docs/plugins/netbox_circuit_module.rst rename to docs/plugins/circuit_module.rst index 8635074d..e16575ab 100644 --- a/docs/plugins/netbox_circuit_module.rst +++ b/docs/plugins/circuit_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_circuit_module: +.. _ansible_collections.networktocode.nautobot.circuit_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_circuit -- Create, update or delete circuits within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.circuit -- Create, update or delete circuits within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_circuit`. + To use it in a playbook, specify: :code:`networktocode.nautobot.circuit`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes circuits from Netbox +- Creates, updates or removes circuits from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -162,7 +162,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -264,68 +264,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -367,16 +367,16 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create circuit within Netbox with only required information - netbox_circuit: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create circuit within Nautobot with only required information + networktocode.nautobot.circuit: + url: http://nautobot.local + token: thisIsMyToken data: cid: Test Circuit provider: Test Provider @@ -384,9 +384,9 @@ Examples state: present - name: Update circuit with other fields - netbox_circuit: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.circuit: + url: http://nautobot.local + token: thisIsMyToken data: cid: Test-Circuit-1000 provider: Test Provider @@ -399,10 +399,10 @@ Examples comments: "FAST CIRCUIT" state: present - - name: Delete circuit within netbox - netbox_circuit: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete circuit within nautobot + networktocode.nautobot.circuit: + url: http://nautobot.local + token: thisIsMyToken data: cid: Test-Circuit-1000 state: absent @@ -438,7 +438,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -468,7 +468,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_circuit_termination_module.rst b/docs/plugins/circuit_termination_module.rst similarity index 92% rename from docs/plugins/netbox_circuit_termination_module.rst rename to docs/plugins/circuit_termination_module.rst index b2aa09e6..82dfe6af 100644 --- a/docs/plugins/netbox_circuit_termination_module.rst +++ b/docs/plugins/circuit_termination_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_circuit_termination_module: +.. _ansible_collections.networktocode.nautobot.circuit_termination_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_circuit_termination -- Create, update or delete circuit terminations within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.circuit_termination -- Create, update or delete circuit terminations within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_circuit_termination`. + To use it in a playbook, specify: :code:`networktocode.nautobot.circuit_termination`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes circuit terminations from Netbox +- Creates, updates or removes circuit terminations from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -220,68 +220,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -323,16 +323,16 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create circuit termination within Netbox with only required information - netbox_circuit_termination: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create circuit termination within Nautobot with only required information + networktocode.nautobot.circuit_termination: + url: http://nautobot.local + token: thisIsMyToken data: circuit: Test Circuit term_side: A @@ -341,9 +341,9 @@ Examples state: present - name: Update circuit termination with other fields - netbox_circuit_termination: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.circuit_termination: + url: http://nautobot.local + token: thisIsMyToken data: circuit: Test Circuit term_side: A @@ -353,10 +353,10 @@ Examples description: "Test description" state: present - - name: Delete circuit termination within netbox - netbox_circuit_termination: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete circuit termination within nautobot + networktocode.nautobot.circuit_termination: + url: http://nautobot.local + token: thisIsMyToken data: circuit: Test Circuit term_side: A @@ -393,7 +393,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -423,7 +423,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_circuit_type_module.rst b/docs/plugins/circuit_type_module.rst similarity index 89% rename from docs/plugins/netbox_circuit_type_module.rst rename to docs/plugins/circuit_type_module.rst index 504ea574..11083d0b 100644 --- a/docs/plugins/netbox_circuit_type_module.rst +++ b/docs/plugins/circuit_type_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_circuit_type_module: +.. _ansible_collections.networktocode.nautobot.circuit_type_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_circuit_type -- Create, update or delete circuit types within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.circuit_type -- Create, update or delete circuit types within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_circuit_type`. + To use it in a playbook, specify: :code:`networktocode.nautobot.circuit_type`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes circuit types from Netbox +- Creates, updates or removes circuit types from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -115,74 +115,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -224,24 +224,24 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create type within Netbox with only required information - netbox_circuit_type: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create type within Nautobot with only required information + networktocode.nautobot.circuit_type: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Circuit Type state: present - - name: Delete circuit type within netbox - netbox_circuit_type: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete circuit type within nautobot + networktocode.nautobot.circuit_type: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Circuit Type state: absent @@ -277,7 +277,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -307,7 +307,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_cluster_group_module.rst b/docs/plugins/cluster_group_module.rst similarity index 89% rename from docs/plugins/netbox_cluster_group_module.rst rename to docs/plugins/cluster_group_module.rst index 66a7385a..86fe3e8b 100644 --- a/docs/plugins/netbox_cluster_group_module.rst +++ b/docs/plugins/cluster_group_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_cluster_group_module: +.. _ansible_collections.networktocode.nautobot.cluster_group_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_cluster_group -- Create, update or delete cluster groups within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.cluster_group -- Create, update or delete cluster groups within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_cluster_group`. + To use it in a playbook, specify: :code:`networktocode.nautobot.cluster_group`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes cluster groups from Netbox +- Creates, updates or removes cluster groups from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -115,74 +115,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -224,24 +224,24 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create cluster group within Netbox with only required information - netbox_cluster_group: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create cluster group within Nautobot with only required information + networktocode.nautobot.cluster_group: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Cluster Group state: present - - name: Delete cluster within netbox - netbox_cluster_group: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete cluster within nautobot + networktocode.nautobot.cluster_group: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Cluster Group state: absent @@ -277,7 +277,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -307,7 +307,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_cluster_module.rst b/docs/plugins/cluster_module.rst similarity index 92% rename from docs/plugins/netbox_cluster_module.rst rename to docs/plugins/cluster_module.rst index 096b29f2..26131042 100644 --- a/docs/plugins/netbox_cluster_module.rst +++ b/docs/plugins/cluster_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_cluster_module: +.. _ansible_collections.networktocode.nautobot.cluster_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_cluster -- Create, update or delete clusters within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.cluster -- Create, update or delete clusters within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_cluster`. + To use it in a playbook, specify: :code:`networktocode.nautobot.cluster`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes clusters from Netbox +- Creates, updates or removes clusters from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -146,7 +146,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -216,68 +216,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -319,33 +319,33 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create cluster within Netbox with only required information - netbox_cluster: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create cluster within Nautobot with only required information + networktocode.nautobot.cluster: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Cluster cluster_type: libvirt state: present - - name: Delete cluster within netbox - netbox_cluster: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete cluster within nautobot + networktocode.nautobot.cluster: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Cluster state: absent - name: Create cluster with tags - netbox_cluster: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.cluster: + url: http://nautobot.local + token: thisIsMyToken data: name: Another Test Cluster cluster_type: libvirt @@ -354,9 +354,9 @@ Examples state: present - name: Update the group and site of an existing cluster - netbox_cluster: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.cluster: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Cluster cluster_type: qemu @@ -395,7 +395,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_cluster_type_module.rst b/docs/plugins/cluster_type_module.rst similarity index 89% rename from docs/plugins/netbox_cluster_type_module.rst rename to docs/plugins/cluster_type_module.rst index 6b1e11a9..f9b3b91c 100644 --- a/docs/plugins/netbox_cluster_type_module.rst +++ b/docs/plugins/cluster_type_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_cluster_type_module: +.. _ansible_collections.networktocode.nautobot.cluster_type_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_cluster_type -- Create, update or delete cluster types within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.cluster_type -- Create, update or delete cluster types within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_cluster_type`. + To use it in a playbook, specify: :code:`networktocode.nautobot.cluster_type`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes cluster types from Netbox +- Creates, updates or removes cluster types from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -115,74 +115,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -224,24 +224,24 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create cluster type within Netbox with only required information - netbox_cluster_type: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create cluster type within Nautobot with only required information + networktocode.nautobot.cluster_type: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Cluster Type state: present - - name: Delete cluster within netbox - netbox_cluster_type: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete cluster within nautobot + networktocode.nautobot.cluster_type: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Cluster Type state: absent @@ -277,7 +277,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -307,7 +307,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_console_port_module.rst b/docs/plugins/console_port_module.rst similarity index 92% rename from docs/plugins/netbox_console_port_module.rst rename to docs/plugins/console_port_module.rst index 412860ff..c6be4aee 100644 --- a/docs/plugins/netbox_console_port_module.rst +++ b/docs/plugins/console_port_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_console_port_module: +.. _ansible_collections.networktocode.nautobot.console_port_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_console_port -- Create, update or delete console ports within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.console_port -- Create, update or delete console ports within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_console_port`. + To use it in a playbook, specify: :code:`networktocode.nautobot.console_port`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes console ports from Netbox +- Creates, updates or removes console ports from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -183,68 +183,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -286,25 +286,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create console port within Netbox with only required information - netbox_console_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create console port within Nautobot with only required information + networktocode.nautobot.console_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Port device: Test Device state: present - name: Update console port with other fields - netbox_console_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.console_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Port device: Test Device @@ -312,10 +312,10 @@ Examples description: console port description state: present - - name: Delete console port within netbox - netbox_console_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete console port within nautobot + networktocode.nautobot.console_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Port device: Test Device @@ -352,7 +352,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_console_port_template_module.rst b/docs/plugins/console_port_template_module.rst similarity index 91% rename from docs/plugins/netbox_console_port_template_module.rst rename to docs/plugins/console_port_template_module.rst index ceae7c69..2715c5f9 100644 --- a/docs/plugins/netbox_console_port_template_module.rst +++ b/docs/plugins/console_port_template_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_console_port_template_module: +.. _ansible_collections.networktocode.nautobot.console_port_template_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_console_port_template -- Create, update or delete console port templates within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.console_port_template -- Create, update or delete console port templates within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_console_port_template`. + To use it in a playbook, specify: :code:`networktocode.nautobot.console_port_template`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes console port templates from Netbox +- Creates, updates or removes console port templates from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -151,68 +151,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -254,35 +254,35 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create console port template within Netbox with only required information - netbox_console_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create console port template within Nautobot with only required information + networktocode.nautobot.console_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Port Template device_type: Test Device Type state: present - name: Update console port template with other fields - netbox_console_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.console_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Port Template device_type: Test Device Type type: iec-60320-c6 state: present - - name: Delete console port template within netbox - netbox_console_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete console port template within nautobot + networktocode.nautobot.console_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Port Template device_type: Test Device Type @@ -319,7 +319,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_console_server_port_module.rst b/docs/plugins/console_server_port_module.rst similarity index 92% rename from docs/plugins/netbox_console_server_port_module.rst rename to docs/plugins/console_server_port_module.rst index 7d3e05eb..1fa3c99d 100644 --- a/docs/plugins/netbox_console_server_port_module.rst +++ b/docs/plugins/console_server_port_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_console_server_port_module: +.. _ansible_collections.networktocode.nautobot.console_server_port_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_console_server_port -- Create, update or delete console server ports within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.console_server_port -- Create, update or delete console server ports within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_console_server_port`. + To use it in a playbook, specify: :code:`networktocode.nautobot.console_server_port`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes console server ports from Netbox +- Creates, updates or removes console server ports from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -183,68 +183,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -286,25 +286,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create console server port within Netbox with only required information - netbox_console_server_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create console server port within Nautobot with only required information + networktocode.nautobot.console_server_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Server Port device: Test Device state: present - name: Update console server port with other fields - netbox_console_server_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.console_server_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Server Port device: Test Device @@ -312,10 +312,10 @@ Examples description: console server port description state: present - - name: Delete console server port within netbox - netbox_console_server_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete console server port within nautobot + networktocode.nautobot.console_server_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Server Port device: Test Device @@ -352,7 +352,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_console_server_port_template_module.rst b/docs/plugins/console_server_port_template_module.rst similarity index 91% rename from docs/plugins/netbox_console_server_port_template_module.rst rename to docs/plugins/console_server_port_template_module.rst index 8fe64a7d..ce000d8b 100644 --- a/docs/plugins/netbox_console_server_port_template_module.rst +++ b/docs/plugins/console_server_port_template_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_console_server_port_template_module: +.. _ansible_collections.networktocode.nautobot.console_server_port_template_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_console_server_port_template -- Create, update or delete console server port templates within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.console_server_port_template -- Create, update or delete console server port templates within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_console_server_port_template`. + To use it in a playbook, specify: :code:`networktocode.nautobot.console_server_port_template`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes console server port templates from Netbox +- Creates, updates or removes console server port templates from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -151,68 +151,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -254,35 +254,35 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create console server port template within Netbox with only required information - netbox_console_server_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create console server port template within Nautobot with only required information + networktocode.nautobot.console_server_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Server Port Template device_type: Test Device Type state: present - name: Update console server port template with other fields - netbox_console_server_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.console_server_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Server Port Template device_type: Test Device Type type: iec-60320-c6 state: present - - name: Delete console server port template within netbox - netbox_console_server_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete console server port template within nautobot + networktocode.nautobot.console_server_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Console Server Port Template device_type: Test Device Type @@ -319,7 +319,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_device_bay_module.rst b/docs/plugins/device_bay_module.rst similarity index 91% rename from docs/plugins/netbox_device_bay_module.rst rename to docs/plugins/device_bay_module.rst index 4721c47d..3115d3b3 100644 --- a/docs/plugins/netbox_device_bay_module.rst +++ b/docs/plugins/device_bay_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_device_bay_module: +.. _ansible_collections.networktocode.nautobot.device_bay_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_device_bay -- Create, update or delete device bays within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.device_bay -- Create, update or delete device bays within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_device_bay`. + To use it in a playbook, specify: :code:`networktocode.nautobot.device_bay`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes device bays from Netbox +- Creates, updates or removes device bays from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -98,7 +98,7 @@ Parameters -
The description of the device bay. This is supported on v2.6+ of Netbox
+
The description of the device bay. This is supported on v2.6+ of Nautobot
@@ -168,68 +168,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -271,25 +271,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create device bay within Netbox with only required information - netbox_device_bay: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create device bay within Nautobot with only required information + networktocode.nautobot.device_bay: + url: http://nautobot.local + token: thisIsMyToken data: device: Test Nexus One name: "Device Bay One" state: present - name: Add device into device bay - netbox_device_bay: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.device_bay: + url: http://nautobot.local + token: thisIsMyToken data: device: Test Nexus One name: "Device Bay One" @@ -297,10 +297,10 @@ Examples installed_device: Test Nexus Child One state: absent - - name: Delete device bay within netbox - netbox_device_bay: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete device bay within nautobot + networktocode.nautobot.device_bay: + url: http://nautobot.local + token: thisIsMyToken data: name: Device Bay One state: absent @@ -337,7 +337,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -367,7 +367,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_device_bay_template_module.rst b/docs/plugins/device_bay_template_module.rst similarity index 89% rename from docs/plugins/netbox_device_bay_template_module.rst rename to docs/plugins/device_bay_template_module.rst index b7d127f3..cca67266 100644 --- a/docs/plugins/netbox_device_bay_template_module.rst +++ b/docs/plugins/device_bay_template_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_device_bay_template_module: +.. _ansible_collections.networktocode.nautobot.device_bay_template_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_device_bay_template -- Create, update or delete device bay templates within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.device_bay_template -- Create, update or delete device bay templates within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_device_bay_template`. + To use it in a playbook, specify: :code:`networktocode.nautobot.device_bay_template`. .. version_added -.. versionadded:: 0.3.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes device bay templates from Netbox +- Creates, updates or removes device bay templates from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -120,68 +120,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -223,25 +223,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create device bay template within Netbox with only required information - netbox_device_bay_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create device bay template within Nautobot with only required information + networktocode.nautobot.device_bay_template: + url: http://nautobot.local + token: thisIsMyToken data: name: device bay template One device_type: Device Type One state: present - - name: Delete device bay template within netbox - netbox_device_bay_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete device bay template within nautobot + networktocode.nautobot.device_bay_template: + url: http://nautobot.local + token: thisIsMyToken data: name: device bay template One device_type: Device Type One @@ -279,7 +279,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_device_interface_module.rst b/docs/plugins/device_interface_module.rst similarity index 94% rename from docs/plugins/netbox_device_interface_module.rst rename to docs/plugins/device_interface_module.rst index 6b1c8457..89f8f9ef 100644 --- a/docs/plugins/netbox_device_interface_module.rst +++ b/docs/plugins/device_interface_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_device_interface_module: +.. _ansible_collections.networktocode.nautobot.device_interface_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_device_interface -- Creates or removes interfaces on devices from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.device_interface -- Creates or removes interfaces on devices from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_device_interface`. + To use it in a playbook, specify: :code:`networktocode.nautobot.device_interface`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes interfaces from Netbox +- Creates or removes interfaces from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -322,36 +322,6 @@ Parameters - - -
- netbox_token - -
- string - / required
- - - - -
The token created within Netbox to authorize API access
- - - - -
- netbox_url - -
- string - / required
- - - - -
URL of the Netbox instance resolvable by Ansible control host
- -
@@ -365,7 +335,7 @@ Parameters
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
+
in plugins/module_utils/utils.py and provides control to users on what may make
an object unique in their environment.
@@ -387,6 +357,21 @@ Parameters
Use present or absent for adding or removing.
+ + + +
+ token + +
+ string + / required
+ + + + +
The token created within Nautobot to authorize API access
+ @@ -407,6 +392,21 @@ Parameters
Use when master device is specified for device and the specified interface exists on a child device and needs updated
+ + + +
+ url + +
+ string + / required
+ + + + +
URL of the Nautobot instance resolvable by Ansible control host
+ @@ -448,31 +448,31 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox interface module" + - name: "Test Nautobot interface module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create interface within Netbox with only required information - netbox_device_interface: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create interface within Nautobot with only required information + networktocode.nautobot.device_interface: + url: http://nautobot.local + token: thisIsMyToken data: device: test100 name: GigabitEthernet1 state: present - - name: Delete interface within netbox - netbox_device_interface: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete interface within nautobot + networktocode.nautobot.device_interface: + url: http://nautobot.local + token: thisIsMyToken data: device: test100 name: GigabitEthernet1 state: absent - name: Create LAG with several specified options - netbox_device_interface: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.device_interface: + url: http://nautobot.local + token: thisIsMyToken data: device: test100 name: port-channel1 @@ -482,9 +482,9 @@ Examples mode: Access state: present - name: Create interface and assign it to parent LAG - netbox_device_interface: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.device_interface: + url: http://nautobot.local + token: thisIsMyToken data: device: test100 name: GigabitEthernet1 @@ -497,9 +497,9 @@ Examples mode: Access state: present - name: Create interface as a trunk port - netbox_device_interface: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.device_interface: + url: http://nautobot.local + token: thisIsMyToken data: device: test100 name: GigabitEthernet25 @@ -518,9 +518,9 @@ Examples mode: Tagged state: present - name: Update interface on child device on virtual chassis - netbox_device_interface: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.device_interface: + url: http://nautobot.local + token: thisIsMyToken data: device: test100 name: GigabitEthernet2/0/1 @@ -558,7 +558,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -588,7 +588,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_device_interface_template_module.rst b/docs/plugins/device_interface_template_module.rst similarity index 91% rename from docs/plugins/netbox_device_interface_template_module.rst rename to docs/plugins/device_interface_template_module.rst index 98f4069d..f6467010 100644 --- a/docs/plugins/netbox_device_interface_template_module.rst +++ b/docs/plugins/device_interface_template_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_device_interface_template_module: +.. _ansible_collections.networktocode.nautobot.device_interface_template_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_device_interface_template -- Creates or removes interfaces on devices from Netbox -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.device_interface_template -- Creates or removes interfaces on devices from Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_device_interface_template`. + To use it in a playbook, specify: :code:`networktocode.nautobot.device_interface_template`. .. version_added -.. versionadded:: 0.3.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes interfaces from Netbox +- Creates or removes interfaces from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -158,68 +158,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -262,24 +262,24 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox interface template module" + - name: "Test Nautobot interface template module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create interface template within Netbox with only required information - netbox_device_interface_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create interface template within Nautobot with only required information + networktocode.nautobot.device_interface_template: + url: http://nautobot.local + token: thisIsMyToken data: device_type: Arista Test name: 10GBASE-T (10GE) type: 10gbase-t state: present - - name: Delete interface template within netbox - netbox_device_interface_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete interface template within nautobot + networktocode.nautobot.device_interface_template: + url: http://nautobot.local + token: thisIsMyToken data: device_type: Arista Test name: 10GBASE-T (10GE) @@ -317,7 +317,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_device_module.rst b/docs/plugins/device_module.rst similarity index 95% rename from docs/plugins/netbox_device_module.rst rename to docs/plugins/device_module.rst index 4ca56b1a..44f3e451 100644 --- a/docs/plugins/netbox_device_module.rst +++ b/docs/plugins/device_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_device_module: +.. _ansible_collections.networktocode.nautobot.device_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_device -- Create, update or delete devices within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.device -- Create, update or delete devices within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_device`. + To use it in a playbook, specify: :code:`networktocode.nautobot.device`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes devices from Netbox +- Creates, updates or removes devices from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -146,7 +146,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -446,68 +446,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -549,16 +549,16 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create device within Netbox with only required information - netbox_device: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create device within Nautobot with only required information + networktocode.nautobot.device: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Device device_type: C9410R @@ -566,10 +566,10 @@ Examples site: Main state: present - - name: Create device within Netbox with empty string name to generate UUID - netbox_device: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create device within Nautobot with empty string name to generate UUID + networktocode.nautobot.device: + url: http://nautobot.local + token: thisIsMyToken data: name: "" device_type: C9410R @@ -577,18 +577,18 @@ Examples site: Main state: present - - name: Delete device within netbox - netbox_device: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete device within nautobot + networktocode.nautobot.device: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Device state: absent - name: Create device with tags - netbox_device: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.device: + url: http://nautobot.local + token: thisIsMyToken data: name: Another Test Device device_type: C9410R @@ -601,9 +601,9 @@ Examples state: present - name: Update the rack and position of an existing device - netbox_device: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.device: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Device rack: Test Rack @@ -642,7 +642,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -672,7 +672,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) - David Gomez (@amb1s1) diff --git a/docs/plugins/netbox_device_role_module.rst b/docs/plugins/device_role_module.rst similarity index 85% rename from docs/plugins/netbox_device_role_module.rst rename to docs/plugins/device_role_module.rst index 14cdd906..586a9bd0 100644 --- a/docs/plugins/netbox_device_role_module.rst +++ b/docs/plugins/device_role_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_device_role_module: +.. _ansible_collections.networktocode.nautobot.device_role_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_device_role -- Create, update or delete devices roles within Netbox -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.device_role -- Create, update or delete devices roles within Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_device_role`. + To use it in a playbook, specify: :code:`networktocode.nautobot.device_role`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes devices roles from Netbox +- Creates, updates or removes devices roles from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -100,6 +100,22 @@ Parameters
Hexidecimal code for a color, ex. FFFFFF
+ + + + +
+ description + +
+ string +
+ + + + +
The description of the device role
+ @@ -131,7 +147,7 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
@@ -157,68 +173,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -260,25 +276,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create device role within Netbox with only required information - netbox_device_role: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create device role within Nautobot with only required information + networktocode.nautobot.device_role: + url: http://nautobot.local + token: thisIsMyToken data: name: Test device role color: FFFFFF state: present - - name: Delete device role within netbox - netbox_device_role: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete device role within nautobot + networktocode.nautobot.device_role: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Rack role state: absent @@ -314,7 +330,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -344,7 +360,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_device_type_module.rst b/docs/plugins/device_type_module.rst similarity index 93% rename from docs/plugins/netbox_device_type_module.rst rename to docs/plugins/device_type_module.rst index 41cae86c..8024da30 100644 --- a/docs/plugins/netbox_device_type_module.rst +++ b/docs/plugins/device_type_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_device_type_module: +.. _ansible_collections.networktocode.nautobot.device_type_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_device_type -- Create, update or delete device types within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.device_type -- Create, update or delete device types within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_device_type`. + To use it in a playbook, specify: :code:`networktocode.nautobot.device_type`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes device types from Netbox +- Creates, updates or removes device types from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -114,7 +114,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -260,68 +260,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -363,26 +363,26 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create device type within Netbox with only required information - netbox_device_type: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create device type within Nautobot with only required information + networktocode.nautobot.device_type: + url: http://nautobot.local + token: thisIsMyToken data: slug: test-device-type model: ws-test-3750 manufacturer: Test Manufacturer state: present - - name: Create device type within Netbox with only required information - netbox_device_type: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create device type within Nautobot with only required information + networktocode.nautobot.device_type: + url: http://nautobot.local + token: thisIsMyToken data: slug: test-device-type model: ws-test-3750 @@ -393,10 +393,10 @@ Examples subdevice_role: parent state: present - - name: Delete device type within netbox - netbox_device_type: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete device type within nautobot + networktocode.nautobot.device_type: + url: http://nautobot.local + token: thisIsMyToken data: slug: test-device-type state: absent @@ -432,7 +432,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -462,7 +462,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_front_port_module.rst b/docs/plugins/front_port_module.rst similarity index 93% rename from docs/plugins/netbox_front_port_module.rst rename to docs/plugins/front_port_module.rst index 6436b6a3..8abee0ee 100644 --- a/docs/plugins/netbox_front_port_module.rst +++ b/docs/plugins/front_port_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_front_port_module: +.. _ansible_collections.networktocode.nautobot.front_port_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_front_port -- Create, update or delete front ports within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.front_port -- Create, update or delete front ports within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_front_port`. + To use it in a playbook, specify: :code:`networktocode.nautobot.front_port`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes front ports from Netbox +- Creates, updates or removes front ports from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -216,68 +216,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -319,16 +319,16 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create front port within Netbox with only required information - netbox_front_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create front port within Nautobot with only required information + networktocode.nautobot.front_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Front Port device: Test Device @@ -337,9 +337,9 @@ Examples state: present - name: Update front port with other fields - netbox_front_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.front_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Front Port device: Test Device @@ -349,10 +349,10 @@ Examples description: front port description state: present - - name: Delete front port within netbox - netbox_front_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete front port within nautobot + networktocode.nautobot.front_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Front Port device: Test Device @@ -391,7 +391,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_front_port_template_module.rst b/docs/plugins/front_port_template_module.rst similarity index 92% rename from docs/plugins/netbox_front_port_template_module.rst rename to docs/plugins/front_port_template_module.rst index 8173b9bc..66d56cee 100644 --- a/docs/plugins/netbox_front_port_template_module.rst +++ b/docs/plugins/front_port_template_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_front_port_template_module: +.. _ansible_collections.networktocode.nautobot.front_port_template_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_front_port_template -- Create, update or delete front port templates within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.front_port_template -- Create, update or delete front port templates within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_front_port_template`. + To use it in a playbook, specify: :code:`networktocode.nautobot.front_port_template`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes front port templates from Netbox +- Creates, updates or removes front port templates from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -184,68 +184,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -287,16 +287,16 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create front port template within Netbox with only required information - netbox_front_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create front port template within Nautobot with only required information + networktocode.nautobot.front_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Front Port Template device_type: Test Device Type @@ -305,9 +305,9 @@ Examples state: present - name: Update front port template with other fields - netbox_front_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.front_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Front Port Template device_type: Test Device Type @@ -316,10 +316,10 @@ Examples rear_port_template_position: 5 state: present - - name: Delete front port template within netbox - netbox_front_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete front port template within nautobot + networktocode.nautobot.front_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Front Port Template device_type: Test Device Type @@ -358,7 +358,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/index.rst b/docs/plugins/index.rst index f7be4e7a..f7aec870 100644 --- a/docs/plugins/index.rst +++ b/docs/plugins/index.rst @@ -1,11 +1,11 @@ :orphan: -.. _plugins_in_netbox.netbox: +.. _plugins_in_networktocode.nautobot: -Netbox.Netbox -============= +Networktocode.Nautobot +====================== -Collection version 2.0.0 +Collection version 1.0.0 .. toctree:: :maxdepth: 1 @@ -13,75 +13,76 @@ Collection version 2.0.0 Plugin Index ------------ -These are the plugins in the netbox.netbox collection +These are the plugins in the networktocode.nautobot collection Inventory Plugins ~~~~~~~~~~~~~~~~~ -* :ref:`nb_inventory ` -- NetBox inventory source +* :ref:`inventory ` -- Nautobot inventory source Lookup Plugins ~~~~~~~~~~~~~~ -* :ref:`nb_lookup ` -- Queries and returns elements from Netbox +* :ref:`lookup ` -- Queries and returns elements from Nautobot Modules ~~~~~~~ -* :ref:`netbox_aggregate ` -- Creates or removes aggregates from Netbox -* :ref:`netbox_cable ` -- Create, update or delete cables within Netbox -* :ref:`netbox_circuit ` -- Create, update or delete circuits within Netbox -* :ref:`netbox_circuit_termination ` -- Create, update or delete circuit terminations within Netbox -* :ref:`netbox_circuit_type ` -- Create, update or delete circuit types within Netbox -* :ref:`netbox_cluster ` -- Create, update or delete clusters within Netbox -* :ref:`netbox_cluster_group ` -- Create, update or delete cluster groups within Netbox -* :ref:`netbox_cluster_type ` -- Create, update or delete cluster types within Netbox -* :ref:`netbox_console_port ` -- Create, update or delete console ports within Netbox -* :ref:`netbox_console_port_template ` -- Create, update or delete console port templates within Netbox -* :ref:`netbox_console_server_port ` -- Create, update or delete console server ports within Netbox -* :ref:`netbox_console_server_port_template ` -- Create, update or delete console server port templates within Netbox -* :ref:`netbox_device ` -- Create, update or delete devices within Netbox -* :ref:`netbox_device_bay ` -- Create, update or delete device bays within Netbox -* :ref:`netbox_device_bay_template ` -- Create, update or delete device bay templates within Netbox -* :ref:`netbox_device_interface ` -- Creates or removes interfaces on devices from Netbox -* :ref:`netbox_device_interface_template ` -- Creates or removes interfaces on devices from Netbox -* :ref:`netbox_device_role ` -- Create, update or delete devices roles within Netbox -* :ref:`netbox_device_type ` -- Create, update or delete device types within Netbox -* :ref:`netbox_front_port ` -- Create, update or delete front ports within Netbox -* :ref:`netbox_front_port_template ` -- Create, update or delete front port templates within Netbox -* :ref:`netbox_inventory_item ` -- Creates or removes inventory items from Netbox -* :ref:`netbox_ip_address ` -- Creates or removes IP addresses from Netbox -* :ref:`netbox_ipam_role ` -- Creates or removes ipam roles from Netbox -* :ref:`netbox_manufacturer ` -- Create or delete manufacturers within Netbox -* :ref:`netbox_platform ` -- Create or delete platforms within Netbox -* :ref:`netbox_power_feed ` -- Create, update or delete power feeds within Netbox -* :ref:`netbox_power_outlet ` -- Create, update or delete power outlets within Netbox -* :ref:`netbox_power_outlet_template ` -- Create, update or delete power outlet templates within Netbox -* :ref:`netbox_power_panel ` -- Create, update or delete power panels within Netbox -* :ref:`netbox_power_port ` -- Create, update or delete power ports within Netbox -* :ref:`netbox_power_port_template ` -- Create, update or delete power port templates within Netbox -* :ref:`netbox_prefix ` -- Creates or removes prefixes from Netbox -* :ref:`netbox_provider ` -- Create, update or delete providers within Netbox -* :ref:`netbox_rack ` -- Create, update or delete racks within Netbox -* :ref:`netbox_rack_group ` -- Create, update or delete racks groups within Netbox -* :ref:`netbox_rack_role ` -- Create, update or delete racks roles within Netbox -* :ref:`netbox_rear_port ` -- Create, update or delete rear ports within Netbox -* :ref:`netbox_rear_port_template ` -- Create, update or delete rear port templates within Netbox -* :ref:`netbox_region ` -- Creates or removes regions from Netbox -* :ref:`netbox_rir ` -- Create, update or delete RIRs within Netbox -* :ref:`netbox_route_target ` -- Creates or removes route targets from Netbox -* :ref:`netbox_service ` -- Creates or removes service from Netbox -* :ref:`netbox_site ` -- Creates or removes sites from Netbox -* :ref:`netbox_tag ` -- Creates or removes tags from Netbox -* :ref:`netbox_tenant ` -- Creates or removes tenants from Netbox -* :ref:`netbox_tenant_group ` -- Creates or removes tenant groups from Netbox -* :ref:`netbox_virtual_chassis ` -- Create, update or delete virtual chassis within Netbox -* :ref:`netbox_virtual_machine ` -- Create, update or delete virtual_machines within Netbox -* :ref:`netbox_vlan ` -- Create, update or delete vlans within Netbox -* :ref:`netbox_vlan_group ` -- Create, update or delete vlans groups within Netbox -* :ref:`netbox_vm_interface ` -- Creates or removes interfaces from virtual machines in Netbox -* :ref:`netbox_vrf ` -- Create, update or delete vrfs within Netbox +* :ref:`aggregate ` -- Creates or removes aggregates from Nautobot +* :ref:`cable ` -- Create, update or delete cables within Nautobot +* :ref:`circuit ` -- Create, update or delete circuits within Nautobot +* :ref:`circuit_termination ` -- Create, update or delete circuit terminations within Nautobot +* :ref:`circuit_type ` -- Create, update or delete circuit types within Nautobot +* :ref:`cluster ` -- Create, update or delete clusters within Nautobot +* :ref:`cluster_group ` -- Create, update or delete cluster groups within Nautobot +* :ref:`cluster_type ` -- Create, update or delete cluster types within Nautobot +* :ref:`console_port ` -- Create, update or delete console ports within Nautobot +* :ref:`console_port_template ` -- Create, update or delete console port templates within Nautobot +* :ref:`console_server_port ` -- Create, update or delete console server ports within Nautobot +* :ref:`console_server_port_template ` -- Create, update or delete console server port templates within Nautobot +* :ref:`device ` -- Create, update or delete devices within Nautobot +* :ref:`device_bay ` -- Create, update or delete device bays within Nautobot +* :ref:`device_bay_template ` -- Create, update or delete device bay templates within Nautobot +* :ref:`device_interface ` -- Creates or removes interfaces on devices from Nautobot +* :ref:`device_interface_template ` -- Creates or removes interfaces on devices from Nautobot +* :ref:`device_role ` -- Create, update or delete devices roles within Nautobot +* :ref:`device_type ` -- Create, update or delete device types within Nautobot +* :ref:`front_port ` -- Create, update or delete front ports within Nautobot +* :ref:`front_port_template ` -- Create, update or delete front port templates within Nautobot +* :ref:`inventory_item ` -- Creates or removes inventory items from Nautobot +* :ref:`ip_address ` -- Creates or removes IP addresses from Nautobot +* :ref:`ipam_role ` -- Creates or removes ipam roles from Nautobot +* :ref:`manufacturer ` -- Create or delete manufacturers within Nautobot +* :ref:`platform ` -- Create or delete platforms within Nautobot +* :ref:`power_feed ` -- Create, update or delete power feeds within Nautobot +* :ref:`power_outlet ` -- Create, update or delete power outlets within Nautobot +* :ref:`power_outlet_template ` -- Create, update or delete power outlet templates within Nautobot +* :ref:`power_panel ` -- Create, update or delete power panels within Nautobot +* :ref:`power_port ` -- Create, update or delete power ports within Nautobot +* :ref:`power_port_template ` -- Create, update or delete power port templates within Nautobot +* :ref:`prefix ` -- Creates or removes prefixes from Nautobot +* :ref:`provider ` -- Create, update or delete providers within Nautobot +* :ref:`rack ` -- Create, update or delete racks within Nautobot +* :ref:`rack_group ` -- Create, update or delete racks groups within Nautobot +* :ref:`rack_role ` -- Create, update or delete racks roles within Nautobot +* :ref:`rear_port ` -- Create, update or delete rear ports within Nautobot +* :ref:`rear_port_template ` -- Create, update or delete rear port templates within Nautobot +* :ref:`region ` -- Creates or removes regions from Nautobot +* :ref:`rir ` -- Create, update or delete RIRs within Nautobot +* :ref:`route_target ` -- Creates or removes route targets from Nautobot +* :ref:`service ` -- Creates or removes service from Nautobot +* :ref:`site ` -- Creates or removes sites from Nautobot +* :ref:`status ` -- Creates or removes status from Nautobot +* :ref:`tag ` -- Creates or removes tags from Nautobot +* :ref:`tenant ` -- Creates or removes tenants from Nautobot +* :ref:`tenant_group ` -- Creates or removes tenant groups from Nautobot +* :ref:`virtual_chassis ` -- Create, update or delete virtual chassis within Nautobot +* :ref:`virtual_machine ` -- Create, update or delete virtual_machines within Nautobot +* :ref:`vlan ` -- Create, update or delete vlans within Nautobot +* :ref:`vlan_group ` -- Create, update or delete vlans groups within Nautobot +* :ref:`vm_interface ` -- Creates or removes interfaces from virtual machines in Nautobot +* :ref:`vrf ` -- Create, update or delete vrfs within Nautobot .. seealso:: diff --git a/docs/plugins/nb_inventory_inventory.rst b/docs/plugins/inventory_inventory.rst similarity index 93% rename from docs/plugins/nb_inventory_inventory.rst rename to docs/plugins/inventory_inventory.rst index b78317fd..c19e9e36 100644 --- a/docs/plugins/nb_inventory_inventory.rst +++ b/docs/plugins/inventory_inventory.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.nb_inventory_inventory: +.. _ansible_collections.networktocode.nautobot.inventory_inventory: .. Anchors: short name for ansible.builtin @@ -14,17 +14,17 @@ .. Title -netbox.netbox.nb_inventory -- NetBox inventory source -+++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.inventory -- Nautobot inventory source ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.nb_inventory`. + To use it in a playbook, specify: :code:`networktocode.nautobot.inventory`. .. version_added @@ -41,7 +41,7 @@ Synopsis .. Description -- Get inventory hosts from NetBox +- Get inventory hosts from Nautobot .. Aliases @@ -66,6 +66,27 @@ Parameters +
+ ansible_host_dns_name + +
+ boolean +
+ + +
    Choices: +
  • no ←
  • +
  • yes
  • +
+ + + + +
If True, sets DNS Name (fetched from primary_ip) to be used in ansible_host variable, instead of IP Address.
+ + + +
api_endpoint @@ -77,11 +98,11 @@ Parameters
- env:NETBOX_API + env:NAUTOBOT_API
-
Endpoint of the NetBox API
+
Endpoint of the Nautobot API
@@ -255,7 +276,7 @@ Parameters -
List of custom ansible host vars to create from the device object fetched from NetBox
+
List of custom ansible host vars to create from the device object fetched from Nautobot
@@ -277,7 +298,7 @@ Parameters
If True, it adds config_context in host vars.
-
Config-context enables the association of arbitrary data to devices and virtual machines grouped by region, site, role, platform, and/or tenant. Please check official netbox docs for more info.
+
Config-context enables the association of arbitrary data to devices and virtual machines grouped by region, site, role, platform, and/or tenant. Please check official nautobot docs for more info.
@@ -329,7 +350,7 @@ Parameters boolean
- added in 0.2.1 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -341,9 +362,9 @@ Parameters -
By default, fetching interfaces and services will get all of the contents of NetBox regardless of query_filters applied to devices and VMs.
+
By default, fetching interfaces and services will get all of the contents of Nautobot regardless of query_filters applied to devices and VMs.
When set to False, separate requests will be made fetching interfaces, services, and IP addresses for each device_id and virtual_machine_id.
-
If you are using the various query_filters options to reduce the number of devices, you may find querying Netbox faster with fetch_all set to False.
+
If you are using the various query_filters options to reduce the number of devices, you may find querying Nautobot faster with fetch_all set to False.
For efficiency, when False, these requests will be batched, for example /api/dcim/interfaces?limit=0&device_id=1&device_id=2&device_id=3
These GET request URIs can become quite large for a large number of devices. If you run into HTTP 414 errors, you can adjust the max_uri_length option to suit your web server.
@@ -357,7 +378,7 @@ Parameters boolean
- added in 0.2.1 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -382,7 +403,7 @@ Parameters boolean
- added in 0.2.1 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -407,7 +428,7 @@ Parameters boolean
- added in 0.3.0 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -502,7 +523,7 @@ Parameters boolean
- added in 0.2.0 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -544,7 +565,7 @@ Parameters boolean
- added in 0.1.7 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -586,7 +607,7 @@ Parameters integer
- added in 0.2.1 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -595,7 +616,7 @@ Parameters -
When fetch_all is False, GET requests to NetBox may become quite long and return a HTTP 414 (URI Too Long).
+
When fetch_all is False, GET requests to Nautobot may become quite long and return a HTTP 414 (URI Too Long).
You can adjust this option to be smaller to avoid 414 errors, or larger for a reduced number of requests.
@@ -610,13 +631,13 @@ Parameters
    Choices: -
  • netbox.netbox.nb_inventory
  • +
  • networktocode.nautobot.inventory
-
token that ensures this is a source file for the 'netbox' plugin.
+
token that ensures this is a source file for the 'nautobot' plugin.
@@ -628,7 +649,7 @@ Parameters boolean
- added in 0.2.1 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -672,7 +693,7 @@ Parameters boolean
- added in 0.2.0 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -724,7 +745,7 @@ Parameters -
Timeout for Netbox requests in seconds
+
Timeout for Nautobot requests in seconds
@@ -740,15 +761,15 @@ Parameters
- env:NETBOX_TOKEN + env:NAUTOBOT_TOKEN
- env:NETBOX_API_KEY + env:NAUTOBOT_API_KEY
-
NetBox API token to be able to read against NetBox.
-
This may not be required depending on the NetBox setup.
+
Nautobot API token to be able to read against Nautobot.
+
This may not be required depending on the Nautobot setup.
@@ -829,10 +850,10 @@ Examples .. code-block:: yaml+jinja - # netbox_inventory.yml file in YAML format - # Example command line: ansible-inventory -v --list -i netbox_inventory.yml + # inventory.yml file in YAML format + # Example command line: ansible-inventory -v --list -i inventory.yml - plugin: netbox.netbox.nb_inventory + plugin: networktocode.nautobot.inventory api_endpoint: http://localhost:8000 validate_certs: True config_context: False @@ -853,18 +874,18 @@ Examples - tag: web - tag: production - # See the NetBox documentation at https://netbox.readthedocs.io/en/latest/api/overview/ + # See the Nautobot documentation at https://nautobot.readthedocs.io/en/latest/api/overview/ # the query_filters work as a logical **OR** # - # Prefix any custom fields with cf_ and pass the field value with the regular NetBox query string + # Prefix any custom fields with cf_ and pass the field value with the regular Nautobot query string query_filters: - cf_foo: bar - # NetBox inventory plugin also supports Constructable semantics + # Nautobot inventory plugin also supports Constructable semantics # You can fill your hosts vars using the compose option: - plugin: netbox.netbox.nb_inventory + plugin: networktocode.nautobot.inventory compose: foo: last_updated bar: display_name @@ -872,7 +893,7 @@ Examples # You can use keyed_groups to group on properties of devices or VMs. # NOTE: It's only possible to key off direct items on the device/VM objects. - plugin: netbox.netbox.nb_inventory + plugin: networktocode.nautobot.inventory keyed_groups: - prefix: status key: status.value diff --git a/docs/plugins/netbox_inventory_item_module.rst b/docs/plugins/inventory_item_module.rst similarity index 92% rename from docs/plugins/netbox_inventory_item_module.rst rename to docs/plugins/inventory_item_module.rst index 5b49a9ff..a8f72670 100644 --- a/docs/plugins/netbox_inventory_item_module.rst +++ b/docs/plugins/inventory_item_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_inventory_item_module: +.. _ansible_collections.networktocode.nautobot.inventory_item_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_inventory_item -- Creates or removes inventory items from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.inventory_item -- Creates or removes inventory items from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_inventory_item`. + To use it in a playbook, specify: :code:`networktocode.nautobot.inventory_item`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes inventory items from Netbox +- Creates or removes inventory items from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -144,8 +144,8 @@ Parameters -
    Choices: -
  • no
  • +
      Choices: +
    • no ←
    • yes
    @@ -236,68 +236,68 @@ Parameters -
    - netbox_token - +
    + query_params +
    - string - / required
    + list + / elements=string -
    The token created within Netbox to authorize API access
    +
    This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
    +
    in plugins/module_utils/utils.py and provides control to users on what may make
    +
    an object unique in their environment.
    -
    - netbox_url - +
    + state +
    string - / required
    + - +
      Choices: +
    • absent
    • +
    • present ←
    • +
    + -
    URL of the Netbox instance resolvable by Ansible control host
    +
    Use present or absent for adding or removing.
    -
    - query_params - +
    + token +
    - list - / elements=string
    + string + / required -
    This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
    -
    in plugins/module_utils/netbox_utils.py and provides control to users on what may make
    -
    an object unique in their environment.
    +
    The token created within Nautobot to authorize API access
    -
    - state - +
    + url +
    string -
    + / required -
      Choices: -
    • absent
    • -
    • present ←
    • -
    - + -
    Use present or absent for adding or removing.
    +
    URL of the Nautobot instance resolvable by Ansible control host
    @@ -340,24 +340,24 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox inventory_item module" + - name: "Test Nautobot inventory_item module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create inventory item within Netbox with only required information - netbox_inventory_item: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create inventory item within Nautobot with only required information + networktocode.nautobot.inventory_item: + url: http://nautobot.local + token: thisIsMyToken data: device: test100 name: "10G-SFP+" state: present - name: Update inventory item - netbox_inventory_item: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.inventory_item: + url: http://nautobot.local + token: thisIsMyToken data: device: test100 name: "10G-SFP+" @@ -368,10 +368,10 @@ Examples description: "New SFP" state: present - - name: Delete inventory item within netbox - netbox_inventory_item: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete inventory item within nautobot + networktocode.nautobot.inventory_item: + url: http://nautobot.local + token: thisIsMyToken data: device: test100 name: "10G-SFP+" @@ -408,7 +408,7 @@ Common return values are documented :ref:`here `, the foll on creation -
    Serialized object as created or already existent within Netbox
    +
    Serialized object as created or already existent within Nautobot

    @@ -438,7 +438,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_ip_address_module.rst b/docs/plugins/ip_address_module.rst similarity index 93% rename from docs/plugins/netbox_ip_address_module.rst rename to docs/plugins/ip_address_module.rst index 29ce46f5..cbd3f81f 100644 --- a/docs/plugins/netbox_ip_address_module.rst +++ b/docs/plugins/ip_address_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_ip_address_module: +.. _ansible_collections.networktocode.nautobot.ip_address_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_ip_address -- Creates or removes IP addresses from Netbox -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.ip_address -- Creates or removes IP addresses from Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_ip_address`. + To use it in a playbook, specify: :code:`networktocode.nautobot.ip_address`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes IP addresses from Netbox +- Creates or removes IP addresses from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -182,7 +182,7 @@ Parameters -
    must exist in Netbox
    +
    must exist in Nautobot
    @@ -234,7 +234,7 @@ Parameters
-
(DEPRECATED) - NetBox now handles determining the IP family natively.
+
(DEPRECATED) - Nautobot now handles determining the IP family natively.
Specifies with address family the IP address belongs to
@@ -386,36 +386,6 @@ Parameters - - -
- netbox_token - -
- string - / required
- - - - -
The token created within Netbox to authorize API access
- - - - -
- netbox_url - -
- string - / required
- - - - -
URL of the Netbox instance resolvable by Ansible control host
- -
@@ -429,7 +399,7 @@ Parameters
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
+
in plugins/module_utils/utils.py and provides control to users on what may make
an object unique in their environment.
@@ -455,6 +425,36 @@ Parameters true. new will force to create it anyway (useful for anycasts, for example). + + + +
+ token + +
+ string + / required
+ + + + +
The token created within Nautobot to authorize API access
+ + + + +
+ url + +
+ string + / required
+ + + + +
URL of the Nautobot instance resolvable by Ansible control host
+ @@ -495,44 +495,44 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox IP address module" + - name: "Test Nautobot IP address module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create IP address within Netbox with only required information - netbox_ip_address: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create IP address within Nautobot with only required information + networktocode.nautobot.ip_address: + url: http://nautobot.local + token: thisIsMyToken data: address: 192.168.1.10 state: present - name: Force to create (even if it already exists) the IP - netbox_ip_address: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.ip_address: + url: http://nautobot.local + token: thisIsMyToken data: address: 192.168.1.10 state: new - name: Get a new available IP inside 192.168.1.0/24 - netbox_ip_address: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.ip_address: + url: http://nautobot.local + token: thisIsMyToken data: prefix: 192.168.1.0/24 state: new - - name: Delete IP address within netbox - netbox_ip_address: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete IP address within nautobot + networktocode.nautobot.ip_address: + url: http://nautobot.local + token: thisIsMyToken data: address: 192.168.1.10 state: absent - name: Create IP address with several specified options - netbox_ip_address: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.ip_address: + url: http://nautobot.local + token: thisIsMyToken data: family: 4 address: 192.168.1.20 @@ -545,9 +545,9 @@ Examples - Schnozzberry state: present - name: Create IP address and assign a nat_inside IP - netbox_ip_address: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.ip_address: + url: http://nautobot.local + token: thisIsMyToken data: family: 4 address: 192.168.1.30 @@ -559,9 +559,9 @@ Examples name: GigabitEthernet1 device: test100 - name: Ensure that an IP inside 192.168.1.0/24 is attached to GigabitEthernet1 - netbox_ip_address: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.ip_address: + url: http://nautobot.local + token: thisIsMyToken data: prefix: 192.168.1.0/24 vrf: Test @@ -570,9 +570,9 @@ Examples device: test100 state: present - name: Attach a new available IP of 192.168.1.0/24 to GigabitEthernet1 - netbox_ip_address: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.ip_address: + url: http://nautobot.local + token: thisIsMyToken data: prefix: 192.168.1.0/24 vrf: Test @@ -580,10 +580,10 @@ Examples name: GigabitEthernet1 device: test100 state: new - - name: Attach a new available IP of 192.168.1.0/24 to GigabitEthernet1 (NetBox 2.9+) - netbox_ip_address: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Attach a new available IP of 192.168.1.0/24 to GigabitEthernet1 (Nautobot 2.9+) + networktocode.nautobot.ip_address: + url: http://nautobot.local + token: thisIsMyToken data: prefix: 192.168.1.0/24 vrf: Test @@ -623,7 +623,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -653,7 +653,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) - Anthony Ruhier (@Anthony25) diff --git a/docs/plugins/netbox_ipam_role_module.rst b/docs/plugins/ipam_role_module.rst similarity index 90% rename from docs/plugins/netbox_ipam_role_module.rst rename to docs/plugins/ipam_role_module.rst index 66a2d430..f62b5005 100644 --- a/docs/plugins/netbox_ipam_role_module.rst +++ b/docs/plugins/ipam_role_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_ipam_role_module: +.. _ansible_collections.networktocode.nautobot.ipam_role_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_ipam_role -- Creates or removes ipam roles from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.ipam_role -- Creates or removes ipam roles from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_ipam_role`. + To use it in a playbook, specify: :code:`networktocode.nautobot.ipam_role`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes ipam roles from Netbox +- Creates or removes ipam roles from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -115,7 +115,7 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
@@ -137,68 +137,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -241,23 +241,23 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox module" + - name: "Test Nautobot module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create ipam role within Netbox with only required information - netbox_ipam_role: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create ipam role within Nautobot with only required information + networktocode.nautobot.ipam_role: + url: http://nautobot.local + token: thisIsMyToken data: name: Test IPAM Role state: present - - name: Delete ipam role within netbox - netbox_ipam_role: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete ipam role within nautobot + networktocode.nautobot.ipam_role: + url: http://nautobot.local + token: thisIsMyToken data: name: Test IPAM Role state: absent @@ -308,7 +308,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -323,7 +323,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/nb_lookup_lookup.rst b/docs/plugins/lookup_lookup.rst similarity index 88% rename from docs/plugins/nb_lookup_lookup.rst rename to docs/plugins/lookup_lookup.rst index fad2e1e3..0bfe56de 100644 --- a/docs/plugins/nb_lookup_lookup.rst +++ b/docs/plugins/lookup_lookup.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.nb_lookup_lookup: +.. _ansible_collections.networktocode.nautobot.lookup_lookup: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.nb_lookup -- Queries and returns elements from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.lookup -- Queries and returns elements from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.nb_lookup`. + To use it in a playbook, specify: :code:`networktocode.nautobot.lookup`. .. version_added -.. versionadded:: 2.9 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Queries Netbox via its API to return virtually any information capable of being held in Netbox. +- Queries Nautobot via its API to return virtually any information capable of being held in Nautobot. - If wanting to obtain the plaintext attribute of a secret, key_file must be provided. @@ -55,7 +55,7 @@ Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. -- pynetbox +- pynautobot .. Options @@ -86,7 +86,7 @@ Parameters -
The Netbox object type to query
+
The Nautobot object type to query
@@ -102,14 +102,14 @@ Parameters
- env:NETBOX_API + env:NAUTOBOT_API
- env:NETBOX_URL + env:NAUTOBOT_URL
-
The URL to the Netbox instance to query
+
The URL to the Nautobot instance to query
@@ -160,7 +160,7 @@ Parameters -
The Netbox plugin to query
+
The Nautobot plugin to query
@@ -193,15 +193,15 @@ Parameters
- env:NETBOX_TOKEN + env:NAUTOBOT_TOKEN
- env:NETBOX_API_TOKEN + env:NAUTOBOT_API_TOKEN
-
The API token created through Netbox
-
This may not be required depending on the Netbox setup.
+
The API token created through Nautobot
+
This may not be required depending on the Nautobot setup.
@@ -219,7 +219,7 @@ Parameters -
Whether or not to validate SSL of the NetBox instance
+
Whether or not to validate SSL of the Nautobot instance
@@ -241,12 +241,12 @@ Examples tasks: # query a list of devices - - name: Obtain list of devices from Netbox + - name: Obtain list of devices from Nautobot debug: msg: > "Device {{ item.value.display_name }} (ID: {{ item.key }}) was manufactured by {{ item.value.device_type.manufacturer.name }}" - loop: "{{ query('netbox.netbox.nb_lookup', 'devices', + loop: "{{ query('networktocode.nautobot.lookup', 'devices', api_endpoint='http://localhost/', token='') }}" @@ -254,12 +254,12 @@ Examples tasks: # query a list of devices - - name: Obtain list of devices from Netbox + - name: Obtain list of devices from Nautobot debug: msg: > "Device {{ item.value.display_name }} (ID: {{ item.key }}) was manufactured by {{ item.value.device_type.manufacturer.name }}" - loop: "{{ query('netbox.netbox.nb_lookup', 'devices', + loop: "{{ query('networktocode.nautobot.lookup', 'devices', api_endpoint='http://localhost/', api_filter='role=management tag=Dell'), token='') }}" @@ -268,19 +268,19 @@ Examples tasks: - name: "Obtain secrets for R1-Device" debug: - msg: "{{ query('netbox.netbox.nb_lookup', 'secrets', api_filter='device=R1-Device', api_endpoint='http://localhost/', token='', key_file='~/.ssh/id_rsa') }}" + msg: "{{ query('networktocode.nautobot.lookup', 'secrets', api_filter='device=R1-Device', api_endpoint='http://localhost/', token='', key_file='~/.ssh/id_rsa') }}" # Fetch bgp sessions for R1-device tasks: - name: "Obtain bgp sessions for R1-Device" debug: - msg: "{{ query('netbox.netbox.nb_lookup', 'bgp_sessions', + msg: "{{ query('networktocode.nautobot.lookup', 'bgp_sessions', api_filter='device=R1-Device', api_endpoint='http://localhost/', token='', plugin='mycustomstuff') }}" - msg: "{{ query('netbox.netbox.nb_lookup', 'secrets', api_filter='device=R1-Device', api_endpoint='http://localhost/', token='', key_file='~/.ssh/id_rsa') }}" + msg: "{{ query('networktocode.nautobot.lookup', 'secrets', api_filter='device=R1-Device', api_endpoint='http://localhost/', token='', key_file='~/.ssh/id_rsa') }}" diff --git a/docs/plugins/netbox_manufacturer_module.rst b/docs/plugins/manufacturer_module.rst similarity index 89% rename from docs/plugins/netbox_manufacturer_module.rst rename to docs/plugins/manufacturer_module.rst index 0e7f7a13..c6278acf 100644 --- a/docs/plugins/netbox_manufacturer_module.rst +++ b/docs/plugins/manufacturer_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_manufacturer_module: +.. _ansible_collections.networktocode.nautobot.manufacturer_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_manufacturer -- Create or delete manufacturers within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.manufacturer -- Create or delete manufacturers within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_manufacturer`. + To use it in a playbook, specify: :code:`networktocode.nautobot.manufacturer`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes manufacturers from Netbox +- Creates or removes manufacturers from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -115,74 +115,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -224,24 +224,24 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create manufacturer within Netbox with only required information - netbox_manufacturer: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create manufacturer within Nautobot with only required information + networktocode.nautobot.manufacturer: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Manufacturer state: present - - name: Delete manufacturer within netbox - netbox_manufacturer: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete manufacturer within nautobot + networktocode.nautobot.manufacturer: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Manufacturer state: absent @@ -277,7 +277,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -307,7 +307,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_platform_module.rst b/docs/plugins/platform_module.rst similarity index 85% rename from docs/plugins/netbox_platform_module.rst rename to docs/plugins/platform_module.rst index 5416e1fb..c7ba3161 100644 --- a/docs/plugins/netbox_platform_module.rst +++ b/docs/plugins/platform_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_platform_module: +.. _ansible_collections.networktocode.nautobot.platform_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_platform -- Create or delete platforms within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.platform -- Create or delete platforms within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_platform`. + To use it in a playbook, specify: :code:`networktocode.nautobot.platform`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes platforms from Netbox +- Creates or removes platforms from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -88,6 +88,22 @@ Parameters +
+ description + +
+ string +
+ + + + +
The description of the platform
+ + + + +
manufacturer @@ -163,74 +179,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -272,24 +288,24 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create platform within Netbox with only required information - netbox_platform: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create platform within Nautobot with only required information + networktocode.nautobot.platform: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Platform state: present - - name: Create platform within Netbox with only required information - netbox_platform: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create platform within Nautobot with only required information + networktocode.nautobot.platform: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Platform All manufacturer: Test Manufacturer @@ -298,10 +314,10 @@ Examples global_delay_factor: 2 state: present - - name: Delete platform within netbox - netbox_platform: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete platform within nautobot + networktocode.nautobot.platform: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Platform state: absent @@ -352,7 +368,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -367,7 +383,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_power_feed_module.rst b/docs/plugins/power_feed_module.rst similarity index 94% rename from docs/plugins/netbox_power_feed_module.rst rename to docs/plugins/power_feed_module.rst index 3998aa33..2d20f808 100644 --- a/docs/plugins/netbox_power_feed_module.rst +++ b/docs/plugins/power_feed_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_power_feed_module: +.. _ansible_collections.networktocode.nautobot.power_feed_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_power_feed -- Create, update or delete power feeds within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.power_feed -- Create, update or delete power feeds within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_power_feed`. + To use it in a playbook, specify: :code:`networktocode.nautobot.power_feed`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes power feeds from Netbox +- Creates, updates or removes power feeds from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -130,7 +130,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -314,68 +314,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -417,25 +417,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create power feed within Netbox with only required information - netbox_power_feed: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create power feed within Nautobot with only required information + networktocode.nautobot.power_feed: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Feed power_panel: Test Power Panel state: present - name: Update power feed with other fields - netbox_power_feed: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.power_feed: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Feed power_panel: Test Power Panel @@ -449,10 +449,10 @@ Examples comments: normal power feed state: present - - name: Delete power feed within netbox - netbox_power_feed: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete power feed within nautobot + networktocode.nautobot.power_feed: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Feed power_panel: Test Power Panel @@ -504,7 +504,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_power_outlet_module.rst b/docs/plugins/power_outlet_module.rst similarity index 95% rename from docs/plugins/netbox_power_outlet_module.rst rename to docs/plugins/power_outlet_module.rst index 5eb45faa..b295d889 100644 --- a/docs/plugins/netbox_power_outlet_module.rst +++ b/docs/plugins/power_outlet_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_power_outlet_module: +.. _ansible_collections.networktocode.nautobot.power_outlet_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_power_outlet -- Create, update or delete power outlets within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.power_outlet -- Create, update or delete power outlets within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_power_outlet`. + To use it in a playbook, specify: :code:`networktocode.nautobot.power_outlet`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes power outlets from Netbox +- Creates, updates or removes power outlets from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -261,68 +261,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -364,25 +364,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create power port within Netbox with only required information - netbox_power_outlet: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create power port within Nautobot with only required information + networktocode.nautobot.power_outlet: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Outlet device: Test Device state: present - name: Update power port with other fields - netbox_power_outlet: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.power_outlet: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Outlet device: Test Device @@ -392,10 +392,10 @@ Examples description: power port description state: present - - name: Delete power port within netbox - netbox_power_outlet: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete power port within nautobot + networktocode.nautobot.power_outlet: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Outlet device: Test Device @@ -447,7 +447,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_power_outlet_template_module.rst b/docs/plugins/power_outlet_template_module.rst similarity index 94% rename from docs/plugins/netbox_power_outlet_template_module.rst rename to docs/plugins/power_outlet_template_module.rst index faeb3617..a439c963 100644 --- a/docs/plugins/netbox_power_outlet_template_module.rst +++ b/docs/plugins/power_outlet_template_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_power_outlet_template_module: +.. _ansible_collections.networktocode.nautobot.power_outlet_template_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_power_outlet_template -- Create, update or delete power outlet templates within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.power_outlet_template -- Create, update or delete power outlet templates within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_power_outlet_template`. + To use it in a playbook, specify: :code:`networktocode.nautobot.power_outlet_template`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes power outlet templates from Netbox +- Creates, updates or removes power outlet templates from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -229,68 +229,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -332,25 +332,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create power port within Netbox with only required information - netbox_power_outlet_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create power port within Nautobot with only required information + networktocode.nautobot.power_outlet_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Outlet device_type: Test Device Type state: present - name: Update power port with other fields - netbox_power_outlet_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.power_outlet_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Outlet device_type: Test Device Type @@ -359,10 +359,10 @@ Examples feed_leg: A state: present - - name: Delete power port within netbox - netbox_power_outlet_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete power port within nautobot + networktocode.nautobot.power_outlet_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Outlet device_type: Test Device Type @@ -414,7 +414,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_power_panel_module.rst b/docs/plugins/power_panel_module.rst similarity index 90% rename from docs/plugins/netbox_power_panel_module.rst rename to docs/plugins/power_panel_module.rst index 5ca5f106..70b0a569 100644 --- a/docs/plugins/netbox_power_panel_module.rst +++ b/docs/plugins/power_panel_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_power_panel_module: +.. _ansible_collections.networktocode.nautobot.power_panel_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_power_panel -- Create, update or delete power panels within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.power_panel -- Create, update or delete power panels within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_power_panel`. + To use it in a playbook, specify: :code:`networktocode.nautobot.power_panel`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes power panels from Netbox +- Creates, updates or removes power panels from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -136,68 +136,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -239,35 +239,35 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create power panel within Netbox with only required information - netbox_power_panel: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create power panel within Nautobot with only required information + networktocode.nautobot.power_panel: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Panel site: Test Site state: present - name: Update power panel with other fields - netbox_power_panel: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.power_panel: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Panel site: Test Site rack_group: Test Rack Group state: present - - name: Delete power panel within netbox - netbox_power_panel: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete power panel within nautobot + networktocode.nautobot.power_panel: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Panel site: Test Site @@ -319,7 +319,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_power_port_module.rst b/docs/plugins/power_port_module.rst similarity index 95% rename from docs/plugins/netbox_power_port_module.rst rename to docs/plugins/power_port_module.rst index 237786ad..7f2f5369 100644 --- a/docs/plugins/netbox_power_port_module.rst +++ b/docs/plugins/power_port_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_power_port_module: +.. _ansible_collections.networktocode.nautobot.power_port_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_power_port -- Create, update or delete power ports within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.power_port -- Create, update or delete power ports within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_power_port`. + To use it in a playbook, specify: :code:`networktocode.nautobot.power_port`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes power ports from Netbox +- Creates, updates or removes power ports from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -256,68 +256,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -359,25 +359,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create power port within Netbox with only required information - netbox_power_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create power port within Nautobot with only required information + networktocode.nautobot.power_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Port device: Test Device state: present - name: Update power port with other fields - netbox_power_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.power_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Port device: Test Device @@ -387,10 +387,10 @@ Examples description: power port description state: present - - name: Delete power port within netbox - netbox_power_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete power port within nautobot + networktocode.nautobot.power_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Port device: Test Device @@ -442,7 +442,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_power_port_template_module.rst b/docs/plugins/power_port_template_module.rst similarity index 94% rename from docs/plugins/netbox_power_port_template_module.rst rename to docs/plugins/power_port_template_module.rst index 2d2c2889..44a0f129 100644 --- a/docs/plugins/netbox_power_port_template_module.rst +++ b/docs/plugins/power_port_template_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_power_port_template_module: +.. _ansible_collections.networktocode.nautobot.power_port_template_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_power_port_template -- Create, update or delete power port templates within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.power_port_template -- Create, update or delete power port templates within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_power_port_template`. + To use it in a playbook, specify: :code:`networktocode.nautobot.power_port_template`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes power port templates from Netbox +- Creates, updates or removes power port templates from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -224,68 +224,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -327,25 +327,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create power port within Netbox with only required information - netbox_power_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create power port within Nautobot with only required information + networktocode.nautobot.power_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Port Template device_type: Test Device Type state: present - name: Update power port with other fields - netbox_power_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.power_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Port Template device_type: Test Device Type @@ -354,10 +354,10 @@ Examples maximum_draw: 80 state: present - - name: Delete power port within netbox - netbox_power_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete power port within nautobot + networktocode.nautobot.power_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Power Port Template device_type: Test Device Type @@ -409,7 +409,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_prefix_module.rst b/docs/plugins/prefix_module.rst similarity index 92% rename from docs/plugins/netbox_prefix_module.rst rename to docs/plugins/prefix_module.rst index a4202a89..bd594080 100644 --- a/docs/plugins/netbox_prefix_module.rst +++ b/docs/plugins/prefix_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_prefix_module: +.. _ansible_collections.networktocode.nautobot.prefix_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_prefix -- Creates or removes prefixes from Netbox -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.prefix -- Creates or removes prefixes from Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_prefix`. + To use it in a playbook, specify: :code:`networktocode.nautobot.prefix`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes prefixes from Netbox +- Creates or removes prefixes from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -98,7 +98,7 @@ Parameters -
Must exist in Netbox and in key/value format
+
Must exist in Nautobot and in key/value format
@@ -336,68 +336,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -439,32 +439,32 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox prefix module" + - name: "Test Nautobot prefix module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create prefix within Netbox with only required information - netbox_prefix: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create prefix within Nautobot with only required information + networktocode.nautobot.prefix: + url: http://nautobot.local + token: thisIsMyToken data: prefix: 10.156.0.0/19 state: present - - name: Delete prefix within netbox - netbox_prefix: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete prefix within nautobot + networktocode.nautobot.prefix: + url: http://nautobot.local + token: thisIsMyToken data: prefix: 10.156.0.0/19 state: absent - name: Create prefix with several specified options - netbox_prefix: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.prefix: + url: http://nautobot.local + token: thisIsMyToken data: family: 4 prefix: 10.156.32.0/19 @@ -484,38 +484,38 @@ Examples - Schnozzberry state: present - - name: Get a new /24 inside 10.156.0.0/19 within Netbox - Parent doesn't exist - netbox_prefix: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Get a new /24 inside 10.156.0.0/19 within Nautobot - Parent doesn't exist + networktocode.nautobot.prefix: + url: http://nautobot.local + token: thisIsMyToken data: parent: 10.156.0.0/19 prefix_length: 24 state: present first_available: yes - - name: Create prefix within Netbox with only required information - netbox_prefix: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create prefix within Nautobot with only required information + networktocode.nautobot.prefix: + url: http://nautobot.local + token: thisIsMyToken data: prefix: 10.156.0.0/19 state: present - - name: Get a new /24 inside 10.156.0.0/19 within Netbox - netbox_prefix: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Get a new /24 inside 10.156.0.0/19 within Nautobot + networktocode.nautobot.prefix: + url: http://nautobot.local + token: thisIsMyToken data: parent: 10.156.0.0/19 prefix_length: 24 state: present first_available: yes - - name: Get a new /24 inside 10.157.0.0/19 within Netbox with additional values - netbox_prefix: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Get a new /24 inside 10.157.0.0/19 within Nautobot with additional values + networktocode.nautobot.prefix: + url: http://nautobot.local + token: thisIsMyToken data: parent: 10.157.0.0/19 prefix_length: 24 @@ -570,7 +570,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -585,7 +585,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) - Anthony Ruhier (@Anthony25) diff --git a/docs/plugins/netbox_provider_module.rst b/docs/plugins/provider_module.rst similarity index 93% rename from docs/plugins/netbox_provider_module.rst rename to docs/plugins/provider_module.rst index c8797552..8a0814c5 100644 --- a/docs/plugins/netbox_provider_module.rst +++ b/docs/plugins/provider_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_provider_module: +.. _ansible_collections.networktocode.nautobot.provider_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_provider -- Create, update or delete providers within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.provider -- Create, update or delete providers within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_provider`. + To use it in a playbook, specify: :code:`networktocode.nautobot.provider`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes providers from Netbox +- Creates, updates or removes providers from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -162,7 +162,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -232,68 +232,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -335,24 +335,24 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create provider within Netbox with only required information - netbox_provider: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create provider within Nautobot with only required information + networktocode.nautobot.provider: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Provider state: present - name: Update provider with other fields - netbox_provider: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.provider: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Provider asn: 65001 @@ -363,10 +363,10 @@ Examples comments: "BAD PROVIDER" state: present - - name: Delete provider within netbox - netbox_provider: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete provider within nautobot + networktocode.nautobot.provider: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Provider state: absent @@ -417,7 +417,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -432,7 +432,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_rack_group_module.rst b/docs/plugins/rack_group_module.rst similarity index 90% rename from docs/plugins/netbox_rack_group_module.rst rename to docs/plugins/rack_group_module.rst index dd4f8c2a..47bc23cf 100644 --- a/docs/plugins/netbox_rack_group_module.rst +++ b/docs/plugins/rack_group_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_rack_group_module: +.. _ansible_collections.networktocode.nautobot.rack_group_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_rack_group -- Create, update or delete racks groups within Netbox -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.rack_group -- Create, update or delete racks groups within Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_rack_group`. + To use it in a playbook, specify: :code:`networktocode.nautobot.rack_group`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes racks groups from Netbox +- Creates, updates or removes racks groups from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -131,74 +131,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -240,25 +240,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create rack group within Netbox with only required information - netbox_rack_group: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create rack group within Nautobot with only required information + networktocode.nautobot.rack_group: + url: http://nautobot.local + token: thisIsMyToken data: name: Test rack group site: Test Site state: present - - name: Delete rack group within netbox - netbox_rack_group: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete rack group within nautobot + networktocode.nautobot.rack_group: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Rack group site: Test Site @@ -310,7 +310,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -325,7 +325,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_rack_module.rst b/docs/plugins/rack_module.rst similarity index 96% rename from docs/plugins/netbox_rack_module.rst rename to docs/plugins/rack_module.rst index 687d08be..616c9a4a 100644 --- a/docs/plugins/netbox_rack_module.rst +++ b/docs/plugins/rack_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_rack_module: +.. _ansible_collections.networktocode.nautobot.rack_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_rack -- Create, update or delete racks within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.rack -- Create, update or delete racks within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_rack`. + To use it in a playbook, specify: :code:`networktocode.nautobot.rack`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes racks from Netbox +- Creates, updates or removes racks from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -130,7 +130,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -413,68 +413,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -516,25 +516,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create rack within Netbox with only required information - netbox_rack: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create rack within Nautobot with only required information + networktocode.nautobot.rack: + url: http://nautobot.local + token: thisIsMyToken data: name: Test rack site: Test Site state: present - - name: Delete rack within netbox - netbox_rack: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete rack within nautobot + networktocode.nautobot.rack: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Rack state: absent @@ -585,7 +585,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -600,7 +600,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_rack_role_module.rst b/docs/plugins/rack_role_module.rst similarity index 90% rename from docs/plugins/netbox_rack_role_module.rst rename to docs/plugins/rack_role_module.rst index afc72929..136c678d 100644 --- a/docs/plugins/netbox_rack_role_module.rst +++ b/docs/plugins/rack_role_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_rack_role_module: +.. _ansible_collections.networktocode.nautobot.rack_role_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_rack_role -- Create, update or delete racks roles within Netbox -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.rack_role -- Create, update or delete racks roles within Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_rack_role`. + To use it in a playbook, specify: :code:`networktocode.nautobot.rack_role`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes racks roles from Netbox +- Creates, updates or removes racks roles from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -131,74 +131,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -240,25 +240,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create rack role within Netbox with only required information - netbox_rack_role: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create rack role within Nautobot with only required information + networktocode.nautobot.rack_role: + url: http://nautobot.local + token: thisIsMyToken data: name: Test rack role color: FFFFFF state: present - - name: Delete rack role within netbox - netbox_rack_role: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete rack role within nautobot + networktocode.nautobot.rack_role: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Rack role state: absent @@ -309,7 +309,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -324,7 +324,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_rear_port_module.rst b/docs/plugins/rear_port_module.rst similarity index 93% rename from docs/plugins/netbox_rear_port_module.rst rename to docs/plugins/rear_port_module.rst index c1f7b250..bd4d1f4a 100644 --- a/docs/plugins/netbox_rear_port_module.rst +++ b/docs/plugins/rear_port_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_rear_port_module: +.. _ansible_collections.networktocode.nautobot.rear_port_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_rear_port -- Create, update or delete rear ports within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.rear_port -- Create, update or delete rear ports within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_rear_port`. + To use it in a playbook, specify: :code:`networktocode.nautobot.rear_port`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes rear ports from Netbox +- Creates, updates or removes rear ports from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -200,68 +200,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -303,16 +303,16 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create rear port within Netbox with only required information - netbox_rear_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create rear port within Nautobot with only required information + networktocode.nautobot.rear_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Rear Port device: Test Device @@ -320,9 +320,9 @@ Examples state: present - name: Update rear port with other fields - netbox_rear_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.rear_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Rear Port device: Test Device @@ -331,10 +331,10 @@ Examples description: rear port description state: present - - name: Delete rear port within netbox - netbox_rear_port: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete rear port within nautobot + networktocode.nautobot.rear_port: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Rear Port device: Test Device @@ -387,7 +387,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_rear_port_template_module.rst b/docs/plugins/rear_port_template_module.rst similarity index 91% rename from docs/plugins/netbox_rear_port_template_module.rst rename to docs/plugins/rear_port_template_module.rst index 7179f4aa..2d50f381 100644 --- a/docs/plugins/netbox_rear_port_template_module.rst +++ b/docs/plugins/rear_port_template_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_rear_port_template_module: +.. _ansible_collections.networktocode.nautobot.rear_port_template_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_rear_port_template -- Create, update or delete rear port templates within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.rear_port_template -- Create, update or delete rear port templates within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_rear_port_template`. + To use it in a playbook, specify: :code:`networktocode.nautobot.rear_port_template`. .. version_added -.. versionadded:: 0.2.3 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes rear port templates from Netbox +- Creates, updates or removes rear port templates from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -168,68 +168,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -271,16 +271,16 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create rear port template within Netbox with only required information - netbox_rear_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create rear port template within Nautobot with only required information + networktocode.nautobot.rear_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Rear Port Template device_type: Test Device Type @@ -288,9 +288,9 @@ Examples state: present - name: Update rear port template with other fields - netbox_rear_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.rear_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Rear Port Template device_type: Test Device Type @@ -298,10 +298,10 @@ Examples positions: 5 state: present - - name: Delete rear port template within netbox - netbox_rear_port_template: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete rear port template within nautobot + networktocode.nautobot.rear_port_template: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Rear Port Template device_type: Test Device Type @@ -354,7 +354,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_region_module.rst b/docs/plugins/region_module.rst similarity index 90% rename from docs/plugins/netbox_region_module.rst rename to docs/plugins/region_module.rst index df9e1b3b..89cc295c 100644 --- a/docs/plugins/netbox_region_module.rst +++ b/docs/plugins/region_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_region_module: +.. _ansible_collections.networktocode.nautobot.region_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_region -- Creates or removes regions from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.region -- Creates or removes regions from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_region`. + To use it in a playbook, specify: :code:`networktocode.nautobot.region`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes regions from Netbox +- Creates or removes regions from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -131,74 +131,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -241,23 +241,23 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox region module" + - name: "Test Nautobot region module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create tenant within Netbox with only required information - netbox_region: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create tenant within Nautobot with only required information + networktocode.nautobot.region: + url: http://nautobot.local + token: thisIsMyToken data: name: "Test Region One" state: present - - name: Delete tenant within netbox - netbox_region: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete tenant within nautobot + networktocode.nautobot.region: + url: http://nautobot.local + token: thisIsMyToken data: name: Tenant Group ABC state: absent @@ -308,7 +308,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -323,7 +323,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_rir_module.rst b/docs/plugins/rir_module.rst similarity index 90% rename from docs/plugins/netbox_rir_module.rst rename to docs/plugins/rir_module.rst index fef53769..ed22b7ef 100644 --- a/docs/plugins/netbox_rir_module.rst +++ b/docs/plugins/rir_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_rir_module: +.. _ansible_collections.networktocode.nautobot.rir_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_rir -- Create, update or delete RIRs within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.rir -- Create, update or delete RIRs within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_rir`. + To use it in a playbook, specify: :code:`networktocode.nautobot.rir`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes RIRs from Netbox +- Creates, updates or removes RIRs from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -135,74 +135,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -244,33 +244,33 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create RIR within Netbox with only required information - netbox_rir: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create RIR within Nautobot with only required information + networktocode.nautobot.rir: + url: http://nautobot.local + token: thisIsMyToken data: name: Test RIR One state: present - name: Update Test RIR One - netbox_rir: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.rir: + url: http://nautobot.local + token: thisIsMyToken data: name: Test RIR One is_private: True state: present - - name: Delete RIR within netbox - netbox_rir: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete RIR within nautobot + networktocode.nautobot.rir: + url: http://nautobot.local + token: thisIsMyToken data: name: Test RIR One state: absent @@ -321,7 +321,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -336,7 +336,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_route_target_module.rst b/docs/plugins/route_target_module.rst similarity index 92% rename from docs/plugins/netbox_route_target_module.rst rename to docs/plugins/route_target_module.rst index abc6c4d6..f4f06287 100644 --- a/docs/plugins/netbox_route_target_module.rst +++ b/docs/plugins/route_target_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_route_target_module: +.. _ansible_collections.networktocode.nautobot.route_target_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_route_target -- Creates or removes route targets from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.route_target -- Creates or removes route targets from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_route_target`. + To use it in a playbook, specify: :code:`networktocode.nautobot.route_target`. .. version_added -.. versionadded:: 2.0.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes route targets from Netbox +- Creates or removes route targets from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -98,7 +98,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -168,68 +168,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -278,9 +278,9 @@ Examples gather_facts: False tasks: - name: Create Route Targets - netbox.netbox.netbox_route_target: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.route_target: + url: http://nautobot.local + token: thisIsMyToken data: name: "{{ item.name }}" tenant: "Test Tenant" @@ -291,9 +291,9 @@ Examples - { name: "65000:65002", description: "tunnel" } - name: Update Description on Route Targets - netbox.netbox.netbox_route_target: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.route_target: + url: http://nautobot.local + token: thisIsMyToken data: name: "{{ item.name }}" tenant: "Test Tenant" @@ -305,9 +305,9 @@ Examples - { name: "65000:65002", description: "tunnel" } - name: Delete Route Targets - netbox.netbox.netbox_route_target: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.route_target: + url: http://nautobot.local + token: thisIsMyToken data: name: "{{ item }}" state: absent @@ -361,7 +361,7 @@ Common return values are documented :ref:`here `, the foll always -
Serialized object as created/existent/updated/deleted within Netbox
+
Serialized object as created/existent/updated/deleted within Nautobot

@@ -376,7 +376,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@fragmentedpacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_service_module.rst b/docs/plugins/service_module.rst similarity index 94% rename from docs/plugins/netbox_service_module.rst rename to docs/plugins/service_module.rst index 23fc5967..c479903c 100644 --- a/docs/plugins/netbox_service_module.rst +++ b/docs/plugins/service_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_service_module: +.. _ansible_collections.networktocode.nautobot.service_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_service -- Creates or removes service from Netbox -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.service -- Creates or removes service from Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_service`. + To use it in a playbook, specify: :code:`networktocode.nautobot.service`. .. version_added -.. versionadded:: 0.1.5 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes service from Netbox +- Creates or removes service from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -98,7 +98,7 @@ Parameters -
Must exist in Netbox and in key/value format
+
Must exist in Nautobot and in key/value format
@@ -194,7 +194,7 @@ Parameters -
Specifies which ports used by service (NetBox 2.10 and newer)
+
Specifies which ports used by service (Nautobot 2.10 and newer)
@@ -248,68 +248,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -350,16 +350,16 @@ Examples .. code-block:: yaml+jinja - - name: "Create netbox service" + - name: "Create nautobot service" connection: local hosts: all gather_facts: False tasks: - name: Create service - netbox_service: - netbox_url: netbox_url - netbox_token: netbox_token + networktocode.nautobot.service: + url: url + token: token data: device: Test666 name: node-exporter @@ -371,20 +371,20 @@ Examples - prometheus state: present - - name: "Delete netbox service" + - name: "Delete nautobot service" connection: local hosts: all gather_facts: False tasks: - name: Delete service - netbox_service: - netbox_url: netbox_url - netbox_token: netbox_token + networktocode.nautobot.service: + url: url + token: token data: device: Test666 name: node-exporter - port: 9100 + ports: 9100 protocol: TCP state: absent diff --git a/docs/plugins/netbox_site_module.rst b/docs/plugins/site_module.rst similarity index 95% rename from docs/plugins/netbox_site_module.rst rename to docs/plugins/site_module.rst index 7430501b..875bb5e3 100644 --- a/docs/plugins/netbox_site_module.rst +++ b/docs/plugins/site_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_site_module: +.. _ansible_collections.networktocode.nautobot.site_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_site -- Creates or removes sites from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.site -- Creates or removes sites from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_site`. + To use it in a playbook, specify: :code:`networktocode.nautobot.site`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes sites from Netbox +- Creates or removes sites from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -178,7 +178,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -392,68 +392,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -496,31 +496,31 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox site module" + - name: "Test Nautobot site module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create site within Netbox with only required information - netbox_site: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create site within Nautobot with only required information + networktocode.nautobot.site: + url: http://nautobot.local + token: thisIsMyToken data: name: Test - Colorado state: present - - name: Delete site within netbox - netbox_site: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete site within nautobot + networktocode.nautobot.site: + url: http://nautobot.local + token: thisIsMyToken data: name: Test - Colorado state: absent - name: Create site with all parameters - netbox_site: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.site: + url: http://nautobot.local + token: thisIsMyToken data: name: Test - California status: Planned @@ -587,7 +587,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -602,7 +602,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/status_module.rst b/docs/plugins/status_module.rst new file mode 100644 index 00000000..5ac3009c --- /dev/null +++ b/docs/plugins/status_module.rst @@ -0,0 +1,356 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.networktocode.nautobot.status_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +networktocode.nautobot.status -- Creates or removes status from Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). + + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. + + To use it in a playbook, specify: :code:`networktocode.nautobot.status`. + +.. version_added + +.. versionadded:: 1.0.0 of networktocode.nautobot + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Creates or removes status from Nautobot + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- pynautobot + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ data + +
+ dictionary + / required
+
+ +
Defines the tag configuration
+
+
+ color + +
+ string +
+
+ +
Status color
+
+
+ content_types + +
+ list + / elements=string
+
+
    Choices: +
  • dcim.device
  • +
+
+
Status content type(s), required if state=present
+
+
+ name + +
+ string + / required
+
+ +
Status name
+
+
+ slug + +
+ string +
+
+ +
The slugified version of the name or custom slug.
+
This is auto-generated following Nautobot rules if not provided
+
+
+ query_params + +
+ list + / elements=string
+
+ +
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • absent
  • +
  • present ←
  • +
+
+
Use present or absent for adding or removing.
+
+
+ token + +
+ string + / required
+
+ +
The token created within Nautobot to authorize API access
+
+
+ url + +
+ string + / required
+
+ +
URL of the Nautobot instance resolvable by Ansible control host
+
+
+ validate_certs + +
+ raw +
+
+ Default:
"yes"
+
+
If no, SSL certificates will not be validated. + This should only be used on personally controlled sites using self-signed certificates.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Status should be defined as a YAML list + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: "Test status creation/deletion" + connection: local + hosts: localhost + gather_facts: False + tasks: + - name: Create status + networktocode.nautobot.status: + url: http://nautobot.local + token: thisIsMyToken + data: + name: "{{ item.name }}" + content_types: + - dcim.device + color: 01bea3 + + - name: Delete status + networktocode.nautobot.status: + url: http://nautobot.local + token: thisIsMyToken + data: + name: "ansible_status" + content_types: + - dcim.device + color: 01bea3 + state: absent + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ msg + +
+ string +
+
always +
Message indicating failure or info about what has been achieved
+
+
+
+ statuses + +
+ dictionary +
+
always +
Serialized object as created/existent/updated/deleted within Nautobot
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Network to Code, LLC (@networktocode) +- Network to Code (@networktocode) +- Josh VanDeraa (@jvanaderaa) + + + +.. Parsing errors + diff --git a/docs/plugins/netbox_tag_module.rst b/docs/plugins/tag_module.rst similarity index 92% rename from docs/plugins/netbox_tag_module.rst rename to docs/plugins/tag_module.rst index 213813ff..3cc3005e 100644 --- a/docs/plugins/netbox_tag_module.rst +++ b/docs/plugins/tag_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_tag_module: +.. _ansible_collections.networktocode.nautobot.tag_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_tag -- Creates or removes tags from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.tag -- Creates or removes tags from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_tag`. + To use it in a playbook, specify: :code:`networktocode.nautobot.tag`. .. version_added -.. versionadded:: 1.2.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes tags from Netbox +- Creates or removes tags from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -147,74 +147,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -263,9 +263,9 @@ Examples gather_facts: False tasks: - name: Create tags - netbox_tag: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.tag: + url: http://nautobot.local + token: thisIsMyToken data: name: "{{ item.name }}" description: "{{ item.description }}" @@ -274,9 +274,9 @@ Examples - { name: tun, description: "tunnel" } - name: Delete tags - netbox_tag: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.tag: + url: http://nautobot.local + token: thisIsMyToken data: name: "{{ item }}" state: absent @@ -330,7 +330,7 @@ Common return values are documented :ref:`here `, the foll always -
Serialized object as created/existent/updated/deleted within Netbox
+
Serialized object as created/existent/updated/deleted within Nautobot

diff --git a/docs/plugins/netbox_tenant_group_module.rst b/docs/plugins/tenant_group_module.rst similarity index 89% rename from docs/plugins/netbox_tenant_group_module.rst rename to docs/plugins/tenant_group_module.rst index 33421a45..a488de49 100644 --- a/docs/plugins/netbox_tenant_group_module.rst +++ b/docs/plugins/tenant_group_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_tenant_group_module: +.. _ansible_collections.networktocode.nautobot.tenant_group_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_tenant_group -- Creates or removes tenant groups from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.tenant_group -- Creates or removes tenant groups from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_tenant_group`. + To use it in a playbook, specify: :code:`networktocode.nautobot.tenant_group`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes tenant groups from Netbox +- Creates or removes tenant groups from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -120,68 +120,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -224,24 +224,24 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox tenant group module" + - name: "Test Nautobot tenant group module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create tenant within Netbox with only required information - netbox_tenant_group: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create tenant within Nautobot with only required information + networktocode.nautobot.tenant_group: + url: http://nautobot.local + token: thisIsMyToken data: name: Tenant Group ABC slug: "tenant_group_abc" state: present - - name: Delete tenant within netbox - netbox_tenant_group: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete tenant within nautobot + networktocode.nautobot.tenant_group: + url: http://nautobot.local + token: thisIsMyToken data: name: Tenant ABC state: absent @@ -293,7 +293,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -308,7 +308,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_tenant_module.rst b/docs/plugins/tenant_module.rst similarity index 92% rename from docs/plugins/netbox_tenant_module.rst rename to docs/plugins/tenant_module.rst index 2c03c790..0cfe51c8 100644 --- a/docs/plugins/netbox_tenant_module.rst +++ b/docs/plugins/tenant_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_tenant_module: +.. _ansible_collections.networktocode.nautobot.tenant_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_tenant -- Creates or removes tenants from Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.tenant -- Creates or removes tenants from Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_tenant`. + To use it in a playbook, specify: :code:`networktocode.nautobot.tenant`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes tenants from Netbox +- Creates or removes tenants from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -114,7 +114,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -200,68 +200,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -304,31 +304,31 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox module" + - name: "Test Nautobot module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create tenant within Netbox with only required information - netbox_tenant: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create tenant within Nautobot with only required information + networktocode.nautobot.tenant: + url: http://nautobot.local + token: thisIsMyToken data: name: Tenant ABC state: present - - name: Delete tenant within netbox - netbox_tenant: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete tenant within nautobot + networktocode.nautobot.tenant: + url: http://nautobot.local + token: thisIsMyToken data: name: Tenant ABC state: absent - name: Create tenant with all parameters - netbox_tenant: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.tenant: + url: http://nautobot.local + token: thisIsMyToken data: name: Tenant ABC group: Very Special Tenants @@ -387,7 +387,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_virtual_chassis_module.rst b/docs/plugins/virtual_chassis_module.rst similarity index 90% rename from docs/plugins/netbox_virtual_chassis_module.rst rename to docs/plugins/virtual_chassis_module.rst index db72c9d5..88272ff2 100644 --- a/docs/plugins/netbox_virtual_chassis_module.rst +++ b/docs/plugins/virtual_chassis_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_virtual_chassis_module: +.. _ansible_collections.networktocode.nautobot.virtual_chassis_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_virtual_chassis -- Create, update or delete virtual chassis within Netbox -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.virtual_chassis -- Create, update or delete virtual chassis within Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_virtual_chassis`. + To use it in a playbook, specify: :code:`networktocode.nautobot.virtual_chassis`. .. version_added -.. versionadded:: 0.3.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes virtual chassis from Netbox +- Creates, updates or removes virtual chassis from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -152,68 +152,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -255,34 +255,34 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create virtual chassis within Netbox with only required information - netbox_virtual_chassis: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create virtual chassis within Nautobot with only required information + networktocode.nautobot.virtual_chassis: + url: http://nautobot.local + token: thisIsMyToken data: name: "Virtual Chassis 1" master: Test Device state: present - name: Update virtual chassis with other fields - netbox_virtual_chassis: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.virtual_chassis: + url: http://nautobot.local + token: thisIsMyToken data: master: Test Device domain: Domain Text state: present - - name: Delete virtual chassis within netbox - netbox_virtual_chassis: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete virtual chassis within nautobot + networktocode.nautobot.virtual_chassis: + url: http://nautobot.local + token: thisIsMyToken data: master: Test Device state: absent @@ -333,7 +333,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_virtual_machine_module.rst b/docs/plugins/virtual_machine_module.rst similarity index 94% rename from docs/plugins/netbox_virtual_machine_module.rst rename to docs/plugins/virtual_machine_module.rst index 50ddc363..07f63f21 100644 --- a/docs/plugins/netbox_virtual_machine_module.rst +++ b/docs/plugins/virtual_machine_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_virtual_machine_module: +.. _ansible_collections.networktocode.nautobot.virtual_machine_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_virtual_machine -- Create, update or delete virtual_machines within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.virtual_machine -- Create, update or delete virtual_machines within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_virtual_machine`. + To use it in a playbook, specify: :code:`networktocode.nautobot.virtual_machine`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes virtual_machines from Netbox +- Creates, updates or removes virtual_machines from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -130,7 +130,7 @@ Parameters -
Must exist in Netbox
+
Must exist in Nautobot
@@ -344,68 +344,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -447,32 +447,32 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create virtual machine within Netbox with only required information - netbox_virtual_machine: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create virtual machine within Nautobot with only required information + networktocode.nautobot.virtual_machine: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Virtual Machine cluster: test cluster state: present - - name: Delete virtual machine within netbox - netbox_virtual_machine: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete virtual machine within nautobot + networktocode.nautobot.virtual_machine: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Virtual Machine state: absent - name: Create virtual machine with tags - netbox_virtual_machine: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.virtual_machine: + url: http://nautobot.local + token: thisIsMyToken data: name: Another Test Virtual Machine cluster: test cluster @@ -482,9 +482,9 @@ Examples state: present - name: Update vcpus, memory and disk of an existing virtual machine - netbox_virtual_machine: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.virtual_machine: + url: http://nautobot.local + token: thisIsMyToken data: name: Test Virtual Machine cluster: test cluster @@ -539,7 +539,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_vlan_group_module.rst b/docs/plugins/vlan_group_module.rst similarity index 90% rename from docs/plugins/netbox_vlan_group_module.rst rename to docs/plugins/vlan_group_module.rst index d8f8002c..5cdee894 100644 --- a/docs/plugins/netbox_vlan_group_module.rst +++ b/docs/plugins/vlan_group_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_vlan_group_module: +.. _ansible_collections.networktocode.nautobot.vlan_group_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_vlan_group -- Create, update or delete vlans groups within Netbox -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.vlan_group -- Create, update or delete vlans groups within Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_vlan_group`. + To use it in a playbook, specify: :code:`networktocode.nautobot.vlan_group`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes vlans groups from Netbox +- Creates, updates or removes vlans groups from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -131,74 +131,74 @@ Parameters
The slugified version of the name or custom slug.
-
This is auto-generated following NetBox rules if not provided
+
This is auto-generated following Nautobot rules if not provided
-
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -240,25 +240,25 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create vlan group within Netbox with only required information - netbox_vlan_group: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create vlan group within Nautobot with only required information + networktocode.nautobot.vlan_group: + url: http://nautobot.local + token: thisIsMyToken data: name: Test vlan group site: Test Site state: present - - name: Delete vlan group within netbox - netbox_vlan_group: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete vlan group within nautobot + networktocode.nautobot.vlan_group: + url: http://nautobot.local + token: thisIsMyToken data: name: Test vlan group state: absent @@ -309,7 +309,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -324,7 +324,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_vlan_module.rst b/docs/plugins/vlan_module.rst similarity index 93% rename from docs/plugins/netbox_vlan_module.rst rename to docs/plugins/vlan_module.rst index c5242d47..c1f2b492 100644 --- a/docs/plugins/netbox_vlan_module.rst +++ b/docs/plugins/vlan_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_vlan_module: +.. _ansible_collections.networktocode.nautobot.vlan_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_vlan -- Create, update or delete vlans within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.vlan -- Create, update or delete vlans within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_vlan`. + To use it in a playbook, specify: :code:`networktocode.nautobot.vlan`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes vlans from Netbox +- Creates, updates or removes vlans from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -98,7 +98,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -248,68 +248,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -351,34 +351,34 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create vlan within Netbox with only required information - netbox_vlan: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create vlan within Nautobot with only required information + networktocode.nautobot.vlan: + url: http://nautobot.local + token: thisIsMyToken data: name: Test VLAN vid: 400 state: present - - name: Delete vlan within netbox - netbox_vlan: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete vlan within nautobot + networktocode.nautobot.vlan: + url: http://nautobot.local + token: thisIsMyToken data: name: Test VLAN vid: 400 state: absent - name: Create vlan with all information - netbox_vlan: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.vlan: + url: http://nautobot.local + token: thisIsMyToken data: name: Test VLAN vid: 400 @@ -438,7 +438,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -453,7 +453,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/docs/plugins/netbox_vm_interface_module.rst b/docs/plugins/vm_interface_module.rst similarity index 93% rename from docs/plugins/netbox_vm_interface_module.rst rename to docs/plugins/vm_interface_module.rst index 91724e53..9bff8c6e 100644 --- a/docs/plugins/netbox_vm_interface_module.rst +++ b/docs/plugins/vm_interface_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_vm_interface_module: +.. _ansible_collections.networktocode.nautobot.vm_interface_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_vm_interface -- Creates or removes interfaces from virtual machines in Netbox -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.vm_interface -- Creates or removes interfaces from virtual machines in Nautobot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_vm_interface`. + To use it in a playbook, specify: :code:`networktocode.nautobot.vm_interface`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates or removes interfaces from virtual machines in Netbox +- Creates or removes interfaces from virtual machines in Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -252,68 +252,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -356,33 +356,33 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox interface module" + - name: "Test Nautobot interface module" connection: local hosts: localhost gather_facts: False tasks: - - name: Create interface within Netbox with only required information - netbox_vm_interface: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create interface within Nautobot with only required information + networktocode.nautobot.vm_interface: + url: http://nautobot.local + token: thisIsMyToken data: virtual_machine: test100 name: GigabitEthernet1 state: present - - name: Delete interface within netbox - netbox_vm_interface: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete interface within nautobot + networktocode.nautobot.vm_interface: + url: http://nautobot.local + token: thisIsMyToken data: virtual_machine: test100 name: GigabitEthernet1 state: absent - name: Create interface as a trunk port - netbox_vm_interface: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.vm_interface: + url: http://nautobot.local + token: thisIsMyToken data: virtual_machine: test100 name: GigabitEthernet25 @@ -430,7 +430,7 @@ Common return values are documented :ref:`here `, the foll on creation -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

diff --git a/docs/plugins/netbox_vrf_module.rst b/docs/plugins/vrf_module.rst similarity index 93% rename from docs/plugins/netbox_vrf_module.rst rename to docs/plugins/vrf_module.rst index b6955fc8..d2beadbf 100644 --- a/docs/plugins/netbox_vrf_module.rst +++ b/docs/plugins/vrf_module.rst @@ -4,7 +4,7 @@ .. Anchors -.. _ansible_collections.netbox.netbox.netbox_vrf_module: +.. _ansible_collections.networktocode.nautobot.vrf_module: .. Anchors: short name for ansible.builtin @@ -14,21 +14,21 @@ .. Title -netbox.netbox.netbox_vrf -- Create, update or delete vrfs within Netbox -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +networktocode.nautobot.vrf -- Create, update or delete vrfs within Nautobot ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This plugin is part of the `netbox.netbox collection `_ (version 2.0.0). + This plugin is part of the `networktocode.nautobot collection `_ (version 1.0.0). - To install it use: :code:`ansible-galaxy collection install netbox.netbox`. + To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`. - To use it in a playbook, specify: :code:`netbox.netbox.netbox_vrf`. + To use it in a playbook, specify: :code:`networktocode.nautobot.vrf`. .. version_added -.. versionadded:: 0.1.0 of netbox.netbox +.. versionadded:: 1.0.0 of networktocode.nautobot .. contents:: :local: @@ -42,7 +42,7 @@ Synopsis .. Description -- Creates, updates or removes vrfs from Netbox +- Creates, updates or removes vrfs from Nautobot .. Aliases @@ -54,7 +54,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- pynetbox +- pynautobot .. Options @@ -98,7 +98,7 @@ Parameters -
must exist in Netbox
+
must exist in Nautobot
@@ -147,7 +147,7 @@ Parameters list / elements=string
- added in 2.0.0 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -166,7 +166,7 @@ Parameters list / elements=string
- added in 2.0.0 of netbox.netbox + added in 1.0.0 of networktocode.nautobot
@@ -242,68 +242,68 @@ Parameters -
- netbox_token - +
+ query_params +
- string - / required
+ list + / elements=string -
The token created within Netbox to authorize API access
+
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
+
in plugins/module_utils/utils.py and provides control to users on what may make
+
an object unique in their environment.
-
- netbox_url - +
+ state +
string - / required
+ - +
    Choices: +
  • absent
  • +
  • present ←
  • +
+ -
URL of the Netbox instance resolvable by Ansible control host
+
Use present or absent for adding or removing.
-
- query_params - +
+ token +
- list - / elements=string
+ string + / required -
This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
-
in plugins/module_utils/netbox_utils.py and provides control to users on what may make
-
an object unique in their environment.
+
The token created within Nautobot to authorize API access
-
- state - +
+ url +
string -
+ / required -
    Choices: -
  • absent
  • -
  • present ←
  • -
- + -
Use present or absent for adding or removing.
+
URL of the Nautobot instance resolvable by Ansible control host
@@ -345,32 +345,32 @@ Examples .. code-block:: yaml+jinja - - name: "Test Netbox modules" + - name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - - name: Create vrf within Netbox with only required information - netbox_vrf: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Create vrf within Nautobot with only required information + networktocode.nautobot.vrf: + url: http://nautobot.local + token: thisIsMyToken data: name: Test VRF state: present - - name: Delete vrf within netbox - netbox_vrf: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + - name: Delete vrf within nautobot + networktocode.nautobot.vrf: + url: http://nautobot.local + token: thisIsMyToken data: name: Test VRF state: absent - name: Create vrf with all information - netbox_vrf: - netbox_url: http://netbox.local - netbox_token: thisIsMyToken + networktocode.nautobot.vrf: + url: http://nautobot.local + token: thisIsMyToken data: name: Test VRF rd: "65000:1" @@ -431,7 +431,7 @@ Common return values are documented :ref:`here `, the foll success (when state=present) -
Serialized object as created or already existent within Netbox
+
Serialized object as created or already existent within Nautobot

@@ -446,7 +446,7 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ -- Mikhail Yohman (@FragmentedPacket) +- Network to Code (@networktocode) diff --git a/galaxy.yml b/galaxy.yml index 3cde194f..f2e630c4 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -27,7 +27,6 @@ description: This is a collection of Nautobot Ansible modules # Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only # accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' #license: -# - GPL-3.0-or-later # The path to the license file for the collection. This path is relative to the root of the collection. This key is # mutually exclusive with 'license' @@ -40,6 +39,7 @@ tags: - system - ipam - networking + - circuits # Collections that this collection requires to be installed for it to be usable. The key of the dict is the # collection label 'namespace.name'. The value is a version range @@ -53,16 +53,16 @@ dependencies: community.general: ">=1.0.0" # The URL of the originating SCM repository -repository: https://github.com/netbox-community/ansible_modules +repository: https://github.com/nautobot/nautobot-ansible # The URL to any online docs -documentation: https://netbox-ansible-collection.readthedocs.io/en/latest/ +documentation: https://nautobot-ansible.readthedocs.io/en/latest/ # The URL to the homepage of the collection/project -homepage: +homepage: https://nautobot-ansible.readthedocs.io/en/latest/ # The URL to the collection issue tracker -issues: https://github.com/netbox-community/ansible_modules/issues +issues: https://github.com/nautobot/nautobot-ansible/issues # Files to ignore when building collection. Only supported when building with Ansible 2.10 # https://github.com/ansible/ansible/issues/67543 diff --git a/hacking/build.sh b/hacking/build.sh index c77c7a24..f78aa614 100755 --- a/hacking/build.sh +++ b/hacking/build.sh @@ -8,13 +8,10 @@ rm -r ansible_collections # Remove old built versions -rm netbox-netbox-*.tar.gz +rm networktocode-nautobot-*.tar.gz # Remove test output rm -r tests/output rm -r .pytest_cache ansible-galaxy collection build --force --verbose . - -# To verify what files have been included in the build: -# tar --gunzip --list --file netbox-netbox-*.tar.gz diff --git a/hacking/local-test.sh b/hacking/local-test.sh index 2d9d2b14..af7ddb6e 100755 --- a/hacking/local-test.sh +++ b/hacking/local-test.sh @@ -6,8 +6,8 @@ ./hacking/build.sh # Install new built version -ansible-galaxy collection install netbox-netbox-*.tar.gz -p . +ansible-galaxy collection install networktocode-nautobot-*.tar.gz -p . # You can now cd into the installed version and run tests -(cd ansible_collections/netbox/netbox/ && ansible-test units -v --python 3.6 && ansible-test sanity --requirements -v --python 3.6 --skip-test pep8 plugins/) +(cd ansible_collections/networktocode/nautobot/ && ansible-test units -v --python 3.8 && ansible-test sanity --requirements -v --python 3.8 --skip-test pep8 plugins/) rm -rf ansible_collections diff --git a/hacking/make-docs.sh b/hacking/make-docs.sh index ee796f1a..75594a9f 100755 --- a/hacking/make-docs.sh +++ b/hacking/make-docs.sh @@ -6,7 +6,7 @@ ./hacking/build.sh # Install new built version -ansible-galaxy collection install netbox-netbox-*.tar.gz -f +ansible-galaxy collection install networktocode-nautobot-*.tar.gz -f # Run antisbull-docs now -antsibull-docs collection --use-current --squash-hierarchy --dest-dir docs/plugins/ netbox.netbox \ No newline at end of file +antsibull-docs collection --use-current --squash-hierarchy --dest-dir docs/plugins/ networktocode.nautobot \ No newline at end of file diff --git a/hacking/packages/pynautobot-1.0.0-py2.py3-none-any.whl b/hacking/packages/pynautobot-1.0.0-py2.py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..091da67de33ed3420af81403f268affda6a25d67 GIT binary patch literal 28294 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
    mtcP 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 literal 0 HcmV?d00001 diff --git a/hacking/update_test_inventories.sh b/hacking/update_test_inventories.sh index f0301ba7..4b63c46a 100755 --- a/hacking/update_test_inventories.sh +++ b/hacking/update_test_inventories.sh @@ -3,9 +3,8 @@ # Stop on failure - if unit tests fail the inventory will not be updated set -e -# Usage overview (see Contributing.md for more detail): -# - Run netbox with the netbox-docker project -# - Fill with test data, run ./tests/integration/netbox-deploy.py +# - Build Nautobot via development environment +# - Fill with test data, run ./tests/integration/nautobot-populate.py # - Run ./hacking/update_test_inventories.sh # - Manually verify the diff of new JSON is correct, to prevent introducing a regression. @@ -14,7 +13,7 @@ export ANSIBLE_COLLECTIONS_PATHS=. export OUTPUT_INVENTORY_JSON=tests/integration/targets/inventory/files # Remove local cache -rm -rf /tmp/inventory_netbox/ +rm -rf /tmp/inventory_nautobot/ # Clean and install the built collection ./hacking/local-test.sh diff --git a/meta/runtime.yml b/meta/runtime.yml index 5b48a851..460bbaf8 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,6 +1,2 @@ --- requires_ansible: ">=2.9.10" -plugin_routing: - modules: - netbox_interface: - redirect: netbox.netbox.plugins.modules.netbox_device_interface diff --git a/pb.test.status.yml b/pb.test.status.yml deleted file mode 100644 index 4953774c..00000000 --- a/pb.test.status.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- hosts: localhost - gather_facts: no - connection: local - - tasks: - - name: "Test status module" - networktocode.nautobot.status: - url: "http://localhost:8000" - token: "0123456789abcdef0123456789abcdef01234567" - data: - name: "Awesome" - content_types: - - "dcim.device" - state: "present" diff --git a/plugins/inventory/inventory.py b/plugins/inventory/inventory.py index 2baa1ba3..312749ae 100644 --- a/plugins/inventory/inventory.py +++ b/plugins/inventory/inventory.py @@ -1,6 +1,3 @@ -# Copyright (c) 2018 Remy Leone -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - from __future__ import absolute_import, division, print_function __metaclass__ = type @@ -22,14 +19,14 @@ - inventory_cache options: plugin: - description: token that ensures this is a source file for the 'netbox' plugin. + description: token that ensures this is a source file for the 'nautobot' plugin. required: True choices: ['networktocode.nautobot.inventory'] api_endpoint: description: Endpoint of the Nautobot API required: True env: - - name: NETBOX_API + - name: NAUTOBOT_API validate_certs: description: - Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted. @@ -45,7 +42,7 @@ description: - If True, it adds config_context in host vars. - Config-context enables the association of arbitrary data to devices and virtual machines grouped by - region, site, role, platform, and/or tenant. Please check official netbox docs for more info. + region, site, role, platform, and/or tenant. Please check official nautobot docs for more info. default: False type: boolean flatten_config_context: @@ -54,21 +51,21 @@ - If flatten_config_context is set to True, the config context variables will be added directly to the host instead. default: False type: boolean - version_added: "0.2.1" + version_added: "1.0.0" flatten_local_context_data: description: - If I(local_context_data) is enabled, by default it's added as a host var named local_context_data. - If flatten_local_context_data is set to True, the config context variables will be added directly to the host instead. default: False type: boolean - version_added: "0.3.0" + version_added: "1.0.0" flatten_custom_fields: description: - By default, host custom fields are added as a dictionary host var named custom_fields. - If flatten_custom_fields is set to True, the fields will be added directly to the host instead. default: False type: boolean - version_added: "0.2.1" + version_added: "1.0.0" token: required: False description: @@ -76,8 +73,8 @@ - This may not be required depending on the Nautobot setup. env: # in order of precedence - - name: NETBOX_TOKEN - - name: NETBOX_API_KEY + - name: NAUTOBOT_TOKEN + - name: NAUTOBOT_API_KEY plurals: description: - If True, all host vars are contained inside single-element arrays for legacy compatibility with old versions of this plugin. @@ -85,19 +82,19 @@ - The choices of I(group_by) will be changed by this option. default: True type: boolean - version_added: "0.2.1" + version_added: "1.0.0" interfaces: description: - If True, it adds the device or virtual machine interface information in host vars. default: False type: boolean - version_added: "0.1.7" + version_added: "1.0.0" services: description: - If True, it adds the device or virtual machine services information in host vars. default: True type: boolean - version_added: "0.2.0" + version_added: "1.0.0" fetch_all: description: - By default, fetching interfaces and services will get all of the contents of Nautobot regardless of query_filters applied to devices and VMs. @@ -107,7 +104,7 @@ - These GET request URIs can become quite large for a large number of devices. If you run into HTTP 414 errors, you can adjust the max_uri_length option to suit your web server. default: True type: boolean - version_added: "0.2.1" + version_added: "1.0.0" group_by: description: Keys used to create groups. The I(plurals) option controls which of these are valid. type: list @@ -142,7 +139,7 @@ description: Will not add the group_by choice name to the group names default: False type: boolean - version_added: "0.2.0" + version_added: "1.0.0" query_filters: description: List of parameters passed to the query string for both devices and VMs (Multiple values may be separated by commas) type: list @@ -165,7 +162,7 @@ - You can adjust this option to be smaller to avoid 414 errors, or larger for a reduced number of requests. type: int default: 4000 - version_added: "0.2.1" + version_added: "1.0.0" virtual_chassis_name: description: - When a device is part of a virtual chassis, use the virtual chassis name as the Ansible inventory hostname. @@ -214,7 +211,7 @@ - tag: web - tag: production -# See the Nautobot documentation at https://netbox.readthedocs.io/en/latest/api/overview/ +# See the Nautobot documentation at https://nautobot.readthedocs.io/en/latest/api/overview/ # the query_filters work as a logical **OR** # # Prefix any custom fields with cf_ and pass the field value with the regular Nautobot query string @@ -334,9 +331,9 @@ def _fetch_information(self, url): return results def get_resource_list(self, api_url): - """Retrieves resource list from netbox API. + """Retrieves resource list from nautobot API. Returns: - A list of all resource from netbox API. + A list of all resource from nautobot API. """ if not api_url: raise AnsibleError("Please check API URL in script configuration file.") @@ -371,13 +368,6 @@ def query_string(value, separator="&"): if chunk_size < 1: chunk_size = 1 - if self.api_version == "2.6": - # Issue netbox-community/netbox#3507 was fixed in v2.7.5 - # If using Nautobot v2.7.0-v2.7.4 will have to manually set max_uri_length to 0, - # but it's probably faster to keep fetch_all: True - # (You should really just upgrade your Nautobot install) - chunk_size = 1 - resources = [] for i in range(0, len(query_values), chunk_size): diff --git a/plugins/lookup/lookup.py b/plugins/lookup/lookup.py index ec6e06cd..dd090642 100644 --- a/plugins/lookup/lookup.py +++ b/plugins/lookup/lookup.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019. Chris Mills -# GNU General Public License v3.0+ + # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ -netbox.py +nautobot.py A lookup function designed to return data from the Nautobot application """ @@ -28,7 +27,7 @@ DOCUMENTATION = """ lookup: lookup author: Chris Mills (@cpmills1975) - version_added: "2.9" + version_added: "1.0.0" short_description: Queries and returns elements from Nautobot description: - Queries Nautobot via its API to return virtually any information @@ -44,8 +43,8 @@ - The URL to the Nautobot instance to query env: # in order of precendence - - name: NETBOX_API - - name: NETBOX_URL + - name: NAUTOBOT_API + - name: NAUTOBOT_URL required: True api_filter: description: @@ -61,8 +60,8 @@ - This may not be required depending on the Nautobot setup. env: # in order of precendence - - name: NETBOX_TOKEN - - name: NETBOX_API_TOKEN + - name: NAUTOBOT_TOKEN + - name: NAUTOBOT_API_TOKEN required: False validate_certs: description: @@ -134,80 +133,80 @@ """ -def get_endpoint(netbox, term): +def get_endpoint(nautobot, term): """ - get_endpoint(netbox, term) - netbox: a predefined pynautobot.api() pointing to a valid instance + get_endpoint(nautobot, term) + nautobot: a predefined pynautobot.api() pointing to a valid instance of Nautobot term: the term passed to the lookup function upon which the api call will be identified """ endpoint_map = { - "aggregates": {"endpoint": netbox.ipam.aggregates}, - "circuit-terminations": {"endpoint": netbox.circuits.circuit_terminations}, - "circuit-types": {"endpoint": netbox.circuits.circuit_types}, - "circuits": {"endpoint": netbox.circuits.circuits}, - "circuit-providers": {"endpoint": netbox.circuits.providers}, - "cables": {"endpoint": netbox.dcim.cables}, - "cluster-groups": {"endpoint": netbox.virtualization.cluster_groups}, - "cluster-types": {"endpoint": netbox.virtualization.cluster_types}, - "clusters": {"endpoint": netbox.virtualization.clusters}, - "config-contexts": {"endpoint": netbox.extras.config_contexts}, - "console-connections": {"endpoint": netbox.dcim.console_connections}, - "console-ports": {"endpoint": netbox.dcim.console_ports}, + "aggregates": {"endpoint": nautobot.ipam.aggregates}, + "circuit-terminations": {"endpoint": nautobot.circuits.circuit_terminations}, + "circuit-types": {"endpoint": nautobot.circuits.circuit_types}, + "circuits": {"endpoint": nautobot.circuits.circuits}, + "circuit-providers": {"endpoint": nautobot.circuits.providers}, + "cables": {"endpoint": nautobot.dcim.cables}, + "cluster-groups": {"endpoint": nautobot.virtualization.cluster_groups}, + "cluster-types": {"endpoint": nautobot.virtualization.cluster_types}, + "clusters": {"endpoint": nautobot.virtualization.clusters}, + "config-contexts": {"endpoint": nautobot.extras.config_contexts}, + "console-connections": {"endpoint": nautobot.dcim.console_connections}, + "console-ports": {"endpoint": nautobot.dcim.console_ports}, "console-server-port-templates": { - "endpoint": netbox.dcim.console_server_port_templates + "endpoint": nautobot.dcim.console_server_port_templates }, - "console-server-ports": {"endpoint": netbox.dcim.console_server_ports}, - "device-bay-templates": {"endpoint": netbox.dcim.device_bay_templates}, - "device-bays": {"endpoint": netbox.dcim.device_bays}, - "device-roles": {"endpoint": netbox.dcim.device_roles}, - "device-types": {"endpoint": netbox.dcim.device_types}, - "devices": {"endpoint": netbox.dcim.devices}, - "export-templates": {"endpoint": netbox.dcim.export_templates}, - "front-port-templates": {"endpoint": netbox.dcim.front_port_templates}, - "front-ports": {"endpoint": netbox.dcim.front_ports}, - "graphs": {"endpoint": netbox.extras.graphs}, - "image-attachments": {"endpoint": netbox.extras.image_attachments}, - "interface-connections": {"endpoint": netbox.dcim.interface_connections}, - "interface-templates": {"endpoint": netbox.dcim.interface_templates}, - "interfaces": {"endpoint": netbox.dcim.interfaces}, - "inventory-items": {"endpoint": netbox.dcim.inventory_items}, - "ip-addresses": {"endpoint": netbox.ipam.ip_addresses}, - "manufacturers": {"endpoint": netbox.dcim.manufacturers}, - "object-changes": {"endpoint": netbox.extras.object_changes}, - "platforms": {"endpoint": netbox.dcim.platforms}, - "power-connections": {"endpoint": netbox.dcim.power_connections}, - "power-outlet-templates": {"endpoint": netbox.dcim.power_outlet_templates}, - "power-outlets": {"endpoint": netbox.dcim.power_outlets}, - "power-port-templates": {"endpoint": netbox.dcim.power_port_templates}, - "power-ports": {"endpoint": netbox.dcim.power_ports}, - "prefixes": {"endpoint": netbox.ipam.prefixes}, - "rack-groups": {"endpoint": netbox.dcim.rack_groups}, - "rack-reservations": {"endpoint": netbox.dcim.rack_reservations}, - "rack-roles": {"endpoint": netbox.dcim.rack_roles}, - "racks": {"endpoint": netbox.dcim.racks}, - "rear-port-templates": {"endpoint": netbox.dcim.rear_port_templates}, - "rear-ports": {"endpoint": netbox.dcim.rear_ports}, - "regions": {"endpoint": netbox.dcim.regions}, - "reports": {"endpoint": netbox.extras.reports}, - "rirs": {"endpoint": netbox.ipam.rirs}, - "roles": {"endpoint": netbox.ipam.roles}, - "secret-roles": {"endpoint": netbox.secrets.secret_roles}, - "secrets": {"endpoint": netbox.secrets.secrets}, - "services": {"endpoint": netbox.ipam.services}, - "sites": {"endpoint": netbox.dcim.sites}, - "tags": {"endpoint": netbox.extras.tags}, - "tenant-groups": {"endpoint": netbox.tenancy.tenant_groups}, - "tenants": {"endpoint": netbox.tenancy.tenants}, - "topology-maps": {"endpoint": netbox.extras.topology_maps}, - "virtual-chassis": {"endpoint": netbox.dcim.virtual_chassis}, - "virtual-machines": {"endpoint": netbox.virtualization.virtual_machines}, - "virtualization-interfaces": {"endpoint": netbox.virtualization.interfaces}, - "vlan-groups": {"endpoint": netbox.ipam.vlan_groups}, - "vlans": {"endpoint": netbox.ipam.vlans}, - "vrfs": {"endpoint": netbox.ipam.vrfs}, + "console-server-ports": {"endpoint": nautobot.dcim.console_server_ports}, + "device-bay-templates": {"endpoint": nautobot.dcim.device_bay_templates}, + "device-bays": {"endpoint": nautobot.dcim.device_bays}, + "device-roles": {"endpoint": nautobot.dcim.device_roles}, + "device-types": {"endpoint": nautobot.dcim.device_types}, + "devices": {"endpoint": nautobot.dcim.devices}, + "export-templates": {"endpoint": nautobot.dcim.export_templates}, + "front-port-templates": {"endpoint": nautobot.dcim.front_port_templates}, + "front-ports": {"endpoint": nautobot.dcim.front_ports}, + "graphs": {"endpoint": nautobot.extras.graphs}, + "image-attachments": {"endpoint": nautobot.extras.image_attachments}, + "interface-connections": {"endpoint": nautobot.dcim.interface_connections}, + "interface-templates": {"endpoint": nautobot.dcim.interface_templates}, + "interfaces": {"endpoint": nautobot.dcim.interfaces}, + "inventory-items": {"endpoint": nautobot.dcim.inventory_items}, + "ip-addresses": {"endpoint": nautobot.ipam.ip_addresses}, + "manufacturers": {"endpoint": nautobot.dcim.manufacturers}, + "object-changes": {"endpoint": nautobot.extras.object_changes}, + "platforms": {"endpoint": nautobot.dcim.platforms}, + "power-connections": {"endpoint": nautobot.dcim.power_connections}, + "power-outlet-templates": {"endpoint": nautobot.dcim.power_outlet_templates}, + "power-outlets": {"endpoint": nautobot.dcim.power_outlets}, + "power-port-templates": {"endpoint": nautobot.dcim.power_port_templates}, + "power-ports": {"endpoint": nautobot.dcim.power_ports}, + "prefixes": {"endpoint": nautobot.ipam.prefixes}, + "rack-groups": {"endpoint": nautobot.dcim.rack_groups}, + "rack-reservations": {"endpoint": nautobot.dcim.rack_reservations}, + "rack-roles": {"endpoint": nautobot.dcim.rack_roles}, + "racks": {"endpoint": nautobot.dcim.racks}, + "rear-port-templates": {"endpoint": nautobot.dcim.rear_port_templates}, + "rear-ports": {"endpoint": nautobot.dcim.rear_ports}, + "regions": {"endpoint": nautobot.dcim.regions}, + "reports": {"endpoint": nautobot.extras.reports}, + "rirs": {"endpoint": nautobot.ipam.rirs}, + "roles": {"endpoint": nautobot.ipam.roles}, + "secret-roles": {"endpoint": nautobot.secrets.secret_roles}, + "secrets": {"endpoint": nautobot.secrets.secrets}, + "services": {"endpoint": nautobot.ipam.services}, + "sites": {"endpoint": nautobot.dcim.sites}, + "tags": {"endpoint": nautobot.extras.tags}, + "tenant-groups": {"endpoint": nautobot.tenancy.tenant_groups}, + "tenants": {"endpoint": nautobot.tenancy.tenants}, + "topology-maps": {"endpoint": nautobot.extras.topology_maps}, + "virtual-chassis": {"endpoint": nautobot.dcim.virtual_chassis}, + "virtual-machines": {"endpoint": nautobot.virtualization.virtual_machines}, + "virtualization-interfaces": {"endpoint": nautobot.virtualization.interfaces}, + "vlan-groups": {"endpoint": nautobot.ipam.vlan_groups}, + "vlans": {"endpoint": nautobot.ipam.vlans}, + "vrfs": {"endpoint": nautobot.ipam.vrfs}, } return endpoint_map[term]["endpoint"] @@ -237,10 +236,10 @@ def build_filters(filters): return filter -def get_plugin_endpoint(netbox, plugin, term): +def get_plugin_endpoint(nautobot, plugin, term): """ - get_plugin_endpoint(netbox, plugin, term) - netbox: a predefined pynautobot.api() pointing to a valid instance + get_plugin_endpoint(nautobot, plugin, term) + nautobot: a predefined pynautobot.api() pointing to a valid instance of Nautobot plugin: a string referencing the plugin name term: the term passed to the lookup function upon which the api @@ -248,10 +247,10 @@ def get_plugin_endpoint(netbox, plugin, term): """ attr = "plugins.%s.%s" % (plugin, term) - def _getattr(netbox, attr): - return getattr(netbox, attr) + def _getattr(nautobot, attr): + return getattr(nautobot, attr) - return functools.reduce(_getattr, [netbox] + attr.split(".")) + return functools.reduce(_getattr, [nautobot] + attr.split(".")) def make_call(endpoint, filters=None): @@ -262,7 +261,7 @@ def make_call(endpoint, filters=None): endpoint (object): The Nautobot endpoint object to make calls. Returns: - results (object): Pynetbox result. + results (object): Pynautobot result. Raises: AnsibleError: Ansible Error containing an error message. @@ -294,13 +293,13 @@ def run(self, terms, variables=None, **kwargs): api_token = ( kwargs.get("token") - or os.getenv("NETBOX_TOKEN") - or os.getenv("NETBOX_API_TOKEN") + or os.getenv("NAUTOBOT_TOKEN") + or os.getenv("NAUTOBOT_API_TOKEN") ) api_endpoint = ( kwargs.get("api_endpoint") - or os.getenv("NETBOX_API") - or os.getenv("NETBOX_URL") + or os.getenv("NAUTOBOT_API") + or os.getenv("NAUTOBOT_URL") ) ssl_verify = kwargs.get("validate_certs", True) private_key_file = kwargs.get("key_file") @@ -315,12 +314,12 @@ def run(self, terms, variables=None, **kwargs): session = requests.Session() session.verify = ssl_verify - netbox = pynautobot.api( + nautobot = pynautobot.api( api_endpoint, token=api_token if api_token else None, private_key_file=private_key_file, ) - netbox.http_session = session + nautobot.http_session = session except FileNotFoundError: raise AnsibleError( "%s cannot be found. Please make sure file exists." % private_key_file @@ -329,10 +328,10 @@ def run(self, terms, variables=None, **kwargs): results = [] for term in terms: if plugin: - endpoint = get_plugin_endpoint(netbox, plugin, term) + endpoint = get_plugin_endpoint(nautobot, plugin, term) else: try: - endpoint = get_endpoint(netbox, term) + endpoint = get_endpoint(nautobot, term) except KeyError: raise AnsibleError( "Unrecognised term %s. Check documentation" % term diff --git a/plugins/module_utils/circuits.py b/plugins/module_utils/circuits.py index 0109b5d4..35226823 100644 --- a/plugins/module_utils/circuits.py +++ b/plugins/module_utils/circuits.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@fragmentedpacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + + from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/dcim.py b/plugins/module_utils/dcim.py index 8c405a95..0970a7f0 100644 --- a/plugins/module_utils/dcim.py +++ b/plugins/module_utils/dcim.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@fragmentedpacket) -# Copyright: (c) 2020, Nokia, Tobias Groß (@toerb) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + + from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/extras.py b/plugins/module_utils/extras.py index bb73ff7c..89c04726 100644 --- a/plugins/module_utils/extras.py +++ b/plugins/module_utils/extras.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@fragmentedpacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + + from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/ipam.py b/plugins/module_utils/ipam.py index 1bae7cd7..d36b124b 100644 --- a/plugins/module_utils/ipam.py +++ b/plugins/module_utils/ipam.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@fragmentedpacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + + from __future__ import absolute_import, division, print_function __metaclass__ = type @@ -58,15 +58,9 @@ def _ensure_ip_in_prefix_present_on_netif( "parent": data["prefix"], } - if not self._version_check_greater(self.version, "2.9", greater_or_equal=True): - if not data.get("interface") or not data.get("prefix"): - self._handle_errors("A prefix and interface is required") - data_intf_key = "interface" - - else: - if not data.get("assigned_object_id") or not data.get("prefix"): - self._handle_errors("A prefix and assigned_object is required") - data_intf_key = "assigned_object_id" + if not data.get("assigned_object_id") or not data.get("prefix"): + self._handle_errors("A prefix and assigned_object is required") + data_intf_key = "assigned_object_id" intf_obj_type = data.get("assigned_object_type", "dcim.interface") if intf_obj_type == "virtualization.vminterface": diff --git a/plugins/module_utils/secrets.py b/plugins/module_utils/secrets.py deleted file mode 100644 index 7dcad5ec..00000000 --- a/plugins/module_utils/secrets.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@fragmentedpacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import absolute_import, division, print_function - -__metaclass__ = type - -from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( - NautobotModule, - ENDPOINT_NAME_MAPPING, -) - - -class NautobotSecretsModule(NautobotModule): - def __init__(self, module, endpoint): - super().__init__(module, endpoint) - - def run(self): - """ - This function should have all necessary code for endpoints within the application - to create/update/delete the endpoint objects - Supported endpoints: - """ - # Used to dynamically set key when returning results - endpoint_name = ENDPOINT_NAME_MAPPING[self.endpoint] - - self.result = {"changed": False} - - application = self._find_app(self.endpoint) - nb_app = getattr(self.nb, application) - nb_endpoint = getattr(nb_app, self.endpoint) - user_query_params = self.module.params.get("query_params") - - data = self.data - - # Used for msg output - name = data.get("name") - - data["slug"] = self._to_slug(name) - - object_query_params = self._build_query_params( - endpoint_name, data, user_query_params - ) - self.nb_object = self._nb_endpoint_get(nb_endpoint, object_query_params, name) - - if self.state == "present": - self._ensure_object_exists(nb_endpoint, endpoint_name, name, data) - elif self.state == "absent": - self._ensure_object_absent(endpoint_name, name) - - try: - serialized_object = self.nb_object.serialize() - except AttributeError: - serialized_object = self.nb_object - - self.result.update({endpoint_name: serialized_object}) - - self.module.exit_json(**self.result) diff --git a/plugins/module_utils/tenancy.py b/plugins/module_utils/tenancy.py index 81600db4..0114e245 100644 --- a/plugins/module_utils/tenancy.py +++ b/plugins/module_utils/tenancy.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@fragmentedpacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + + from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/utils.py b/plugins/module_utils/utils.py index 83f3bead..5602e341 100644 --- a/plugins/module_utils/utils.py +++ b/plugins/module_utils/utils.py @@ -1,8 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@fragmentedpacket) -# Copyright: (c) 2018, David Gomez (@amb1s1) -# Copyright: (c) 2020, Nokia, Tobias Groß (@toerb) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -24,15 +21,15 @@ from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.urls import open_url -PYNETBOX_IMP_ERR = None +PYNAUTOBOT_IMP_ERR = None try: - import pynetbox + import pynautobot import requests - HAS_PYNETBOX = True + HAS_PYNAUTOBOT = True except ImportError: - PYNETBOX_IMP_ERR = traceback.format_exc() - HAS_PYNETBOX = False + PYNAUTOBOT_IMP_ERR = traceback.format_exc() + HAS_PYNAUTOBOT = False # Used to map endpoints to applications dynamically API_APPS_ENDPOINTS = dict( @@ -428,7 +425,7 @@ "vlan_groups", } -NETBOX_ARG_SPEC = dict( +NAUTOBOT_ARG_SPEC = dict( url=dict(type="str", required=True), token=dict(type="str", required=True, no_log=True), state=dict(required=False, default="present", choices=["present", "absent"]), @@ -453,9 +450,9 @@ def __init__(self, module, endpoint, client=None): self.endpoint = endpoint query_params = self.module.params.get("query_params") - if not HAS_PYNETBOX: + if not HAS_PYNAUTOBOT: self.module.fail_json( - msg=missing_required_lib("pynetbox"), exception=PYNETBOX_IMP_ERR + msg=missing_required_lib("pynautobot"), exception=PYNAUTOBOT_IMP_ERR ) # These should not be required after making connection to Nautobot url = self.module.params["url"] @@ -467,10 +464,7 @@ def __init__(self, module, endpoint, client=None): self.nb = self._connect_api(url, token, ssl_verify) else: self.nb = client - try: - self.version = self.nb.version - except AttributeError: - self.module.fail_json(msg="Must have pynautobot >=4.1.0") + self.version = self.nb.version # if self.module.params.get("query_params"): # self._validate_query_params(self.module.params["query_params"]) @@ -511,7 +505,7 @@ def _connect_api(self, url, token, ssl_verify): try: session = requests.Session() session.verify = ssl_verify - nb = pynetbox.api(url, token=token) + nb = pynautobot.api(url, token=token) nb.http_session = session try: self.version = nb.version @@ -526,7 +520,7 @@ def _connect_api(self, url, token, ssl_verify): def _nb_endpoint_get(self, nb_endpoint, query_params, search_item): try: response = nb_endpoint.get(**query_params) - except pynetbox.RequestError as e: + except pynautobot.RequestError as e: self._handle_errors(msg=e.error) except ValueError: self._handle_errors( @@ -596,9 +590,6 @@ def _convert_identical_keys(self, data): :params data (dict): Data dictionary after _find_ids method ran """ temp_dict = dict() - if self._version_check_greater(self.version, "2.7", greater_or_equal=True): - if data.get("form_factor"): - temp_dict["type"] = data.pop("form_factor") for key in data: if self.endpoint == "power_panels" and key == "rack_group": temp_dict[key] = data[key] @@ -702,7 +693,7 @@ def _build_query_params( intf_type = self._fetch_choice_value( "Link Aggregation Group (LAG)", "interfaces" ) - query_dict.update({"form_factor": intf_type}) + query_dict.update({"type": intf_type}) if isinstance(module_data["device"], int): query_dict.update({"device_id": module_data["device"]}) else: @@ -824,13 +815,6 @@ def _find_ids(self, data, user_query_params): """ for k, v in data.items(): if k in CONVERT_TO_ID: - if ( - not self._version_check_greater( - self.version, "2.9", greater_or_equal=True - ) - and k == "tags" - ): - continue if k == "termination_a": endpoint = CONVERT_TO_ID[data.get("termination_a_type")] elif k == "termination_b": @@ -961,7 +945,7 @@ def _create_object(self, nb_endpoint, data): else: try: nb_obj = nb_endpoint.create(data) - except pynetbox.RequestError as e: + except pynautobot.RequestError as e: self._handle_errors(msg=e.error) diff = self._build_diff(before={"state": "absent"}, after={"state": "present"}) @@ -974,7 +958,7 @@ def _delete_object(self): if not self.check_mode: try: self.nb_object.delete() - except pynetbox.RequestError as e: + except pynautobot.RequestError as e: self._handle_errors(msg=e.error) diff = self._build_diff(before={"state": "present"}, after={"state": "absent"}) diff --git a/plugins/module_utils/virtualization.py b/plugins/module_utils/virtualization.py index f7132f31..18c4790f 100644 --- a/plugins/module_utils/virtualization.py +++ b/plugins/module_utils/virtualization.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@fragmentedpacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function __metaclass__ = type @@ -28,12 +27,12 @@ def run(self): This function should have all necessary code for endpoints within the application to create/update/delete the endpoint objects Supported endpoints: - - clusters - - cluster_groups - - cluster_types - - interfaces - - virtual_machines - - cluster + - clusters + - cluster_groups + - cluster_types + - interfaces + - virtual_machines + - cluster """ # Used to dynamically set key when returning results endpoint_name = ENDPOINT_NAME_MAPPING[self.endpoint] diff --git a/plugins/modules/aggregate.py b/plugins/modules/aggregate.py index f992eb9a..4cc9b4ee 100644 --- a/plugins/modules/aggregate.py +++ b/plugins/modules/aggregate.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -103,8 +102,8 @@ tasks: - name: Create aggregate within Nautobot with only required information - aggregate: - url: http://netbox.local + networktocode.nautobot.aggregate: + url: http://nautobot.local token: thisIsMyToken data: prefix: 192.168.0.0/16 @@ -112,8 +111,8 @@ state: present - name: Create aggregate with several specified options - aggregate: - url: http://netbox.local + networktocode.nautobot.aggregate: + url: http://nautobot.local token: thisIsMyToken data: prefix: 192.168.0.0/16 @@ -124,9 +123,9 @@ - Schnozzberry state: present - - name: Delete aggregate within netbox - aggregate: - url: http://netbox.local + - name: Delete aggregate within nautobot + networktocode.nautobot.aggregate: + url: http://nautobot.local token: thisIsMyToken data: prefix: 192.168.0.0/16 @@ -146,7 +145,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( NautobotIpamModule, @@ -159,7 +158,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/cable.py b/plugins/modules/cable.py index 0d3edd57..da939809 100644 --- a/plugins/modules/cable.py +++ b/plugins/modules/cable.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.3.0' +version_added: "1.0.0" options: url: description: @@ -174,8 +171,8 @@ tasks: - name: Create cable within Nautobot with only required information - cable: - url: http://netbox.local + networktocode.nautobot.cable: + url: http://nautobot.local token: thisIsMyToken data: termination_a_type: dcim.interface @@ -189,8 +186,8 @@ state: present - name: Update cable with other fields - cable: - url: http://netbox.local + networktocode.nautobot.cable: + url: http://nautobot.local token: thisIsMyToken data: termination_a_type: dcim.interface @@ -209,9 +206,9 @@ length_unit: m state: present - - name: Delete cable within netbox - cable: - url: http://netbox.local + - name: Delete cable within nautobot + networktocode.nautobot.cable: + url: http://nautobot.local token: thisIsMyToken data: termination_a_type: dcim.interface @@ -238,7 +235,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -251,7 +248,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/circuit.py b/plugins/modules/circuit.py index c41cb00a..6b56e64f 100644 --- a/plugins/modules/circuit.py +++ b/plugins/modules/circuit.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -128,8 +127,8 @@ tasks: - name: Create circuit within Nautobot with only required information - circuit: - url: http://netbox.local + networktocode.nautobot.circuit: + url: http://nautobot.local token: thisIsMyToken data: cid: Test Circuit @@ -138,8 +137,8 @@ state: present - name: Update circuit with other fields - circuit: - url: http://netbox.local + networktocode.nautobot.circuit: + url: http://nautobot.local token: thisIsMyToken data: cid: Test-Circuit-1000 @@ -153,9 +152,9 @@ comments: "FAST CIRCUIT" state: present - - name: Delete circuit within netbox - circuit: - url: http://netbox.local + - name: Delete circuit within nautobot + networktocode.nautobot.circuit: + url: http://nautobot.local token: thisIsMyToken data: cid: Test-Circuit-1000 @@ -175,7 +174,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.circuits import ( NautobotCircuitsModule, @@ -188,7 +187,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/circuit_termination.py b/plugins/modules/circuit_termination.py index ae23944e..d28f18f2 100644 --- a/plugins/modules/circuit_termination.py +++ b/plugins/modules/circuit_termination.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -116,8 +115,8 @@ tasks: - name: Create circuit termination within Nautobot with only required information - circuit_termination: - url: http://netbox.local + networktocode.nautobot.circuit_termination: + url: http://nautobot.local token: thisIsMyToken data: circuit: Test Circuit @@ -127,8 +126,8 @@ state: present - name: Update circuit termination with other fields - circuit_termination: - url: http://netbox.local + networktocode.nautobot.circuit_termination: + url: http://nautobot.local token: thisIsMyToken data: circuit: Test Circuit @@ -139,9 +138,9 @@ description: "Test description" state: present - - name: Delete circuit termination within netbox - circuit_termination: - url: http://netbox.local + - name: Delete circuit termination within nautobot + networktocode.nautobot.circuit_termination: + url: http://nautobot.local token: thisIsMyToken data: circuit: Test Circuit @@ -162,7 +161,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.circuits import ( NautobotCircuitsModule, @@ -175,7 +174,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/circuit_type.py b/plugins/modules/circuit_type.py index 6aa97fb9..6a58cef4 100644 --- a/plugins/modules/circuit_type.py +++ b/plugins/modules/circuit_type.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -84,16 +83,16 @@ tasks: - name: Create type within Nautobot with only required information - circuit_type: - url: http://netbox.local + networktocode.nautobot.circuit_type: + url: http://nautobot.local token: thisIsMyToken data: name: Test Circuit Type state: present - - name: Delete circuit type within netbox - circuit_type: - url: http://netbox.local + - name: Delete circuit type within nautobot + networktocode.nautobot.circuit_type: + url: http://nautobot.local token: thisIsMyToken data: name: Test Circuit Type @@ -113,7 +112,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.circuits import ( NautobotCircuitsModule, @@ -126,7 +125,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/cluster.py b/plugins/modules/cluster.py index 01a09856..298cca12 100644 --- a/plugins/modules/cluster.py +++ b/plugins/modules/cluster.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Gaelle Mangin (@gmangin) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -26,7 +25,7 @@ - Gaelle MANGIN (@gmangin) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -113,25 +112,25 @@ tasks: - name: Create cluster within Nautobot with only required information - cluster: - url: http://netbox.local + networktocode.nautobot.cluster: + url: http://nautobot.local token: thisIsMyToken data: name: Test Cluster cluster_type: libvirt state: present - - name: Delete cluster within netbox - cluster: - url: http://netbox.local + - name: Delete cluster within nautobot + networktocode.nautobot.cluster: + url: http://nautobot.local token: thisIsMyToken data: name: Test Cluster state: absent - name: Create cluster with tags - cluster: - url: http://netbox.local + networktocode.nautobot.cluster: + url: http://nautobot.local token: thisIsMyToken data: name: Another Test Cluster @@ -141,8 +140,8 @@ state: present - name: Update the group and site of an existing cluster - cluster: - url: http://netbox.local + networktocode.nautobot.cluster: + url: http://nautobot.local token: thisIsMyToken data: name: Test Cluster @@ -165,7 +164,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.virtualization import ( NautobotVirtualizationModule, @@ -178,7 +177,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/cluster_group.py b/plugins/modules/cluster_group.py index 08e197d6..7ef9a563 100644 --- a/plugins/modules/cluster_group.py +++ b/plugins/modules/cluster_group.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -84,16 +83,16 @@ tasks: - name: Create cluster group within Nautobot with only required information - cluster_group: - url: http://netbox.local + networktocode.nautobot.cluster_group: + url: http://nautobot.local token: thisIsMyToken data: name: Test Cluster Group state: present - - name: Delete cluster within netbox - cluster_group: - url: http://netbox.local + - name: Delete cluster within nautobot + networktocode.nautobot.cluster_group: + url: http://nautobot.local token: thisIsMyToken data: name: Test Cluster Group @@ -113,7 +112,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.virtualization import ( NautobotVirtualizationModule, @@ -126,7 +125,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/cluster_type.py b/plugins/modules/cluster_type.py index 39152a6b..91dec3ec 100644 --- a/plugins/modules/cluster_type.py +++ b/plugins/modules/cluster_type.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -84,16 +83,16 @@ tasks: - name: Create cluster type within Nautobot with only required information - cluster_type: - url: http://netbox.local + networktocode.nautobot.cluster_type: + url: http://nautobot.local token: thisIsMyToken data: name: Test Cluster Type state: present - - name: Delete cluster within netbox - cluster_type: - url: http://netbox.local + - name: Delete cluster within nautobot + networktocode.nautobot.cluster_type: + url: http://nautobot.local token: thisIsMyToken data: name: Test Cluster Type @@ -113,7 +112,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.virtualization import ( NautobotVirtualizationModule, @@ -126,7 +125,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/console_port.py b/plugins/modules/console_port.py index 1ba14bd7..ee430f59 100644 --- a/plugins/modules/console_port.py +++ b/plugins/modules/console_port.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -113,8 +110,8 @@ tasks: - name: Create console port within Nautobot with only required information - console_port: - url: http://netbox.local + networktocode.nautobot.console_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Port @@ -122,8 +119,8 @@ state: present - name: Update console port with other fields - console_port: - url: http://netbox.local + networktocode.nautobot.console_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Port @@ -132,9 +129,9 @@ description: console port description state: present - - name: Delete console port within netbox - console_port: - url: http://netbox.local + - name: Delete console port within nautobot + networktocode.nautobot.console_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Port @@ -155,7 +152,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -168,7 +165,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/console_port_template.py b/plugins/modules/console_port_template.py index 349bfc45..f866917e 100644 --- a/plugins/modules/console_port_template.py +++ b/plugins/modules/console_port_template.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -103,8 +100,8 @@ tasks: - name: Create console port template within Nautobot with only required information - console_port_template: - url: http://netbox.local + networktocode.nautobot.console_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Port Template @@ -112,8 +109,8 @@ state: present - name: Update console port template with other fields - console_port_template: - url: http://netbox.local + networktocode.nautobot.console_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Port Template @@ -121,9 +118,9 @@ type: iec-60320-c6 state: present - - name: Delete console port template within netbox - console_port_template: - url: http://netbox.local + - name: Delete console port template within nautobot + networktocode.nautobot.console_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Port Template @@ -144,7 +141,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -157,7 +154,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/console_server_port.py b/plugins/modules/console_server_port.py index 4caf213c..5b4b3a06 100644 --- a/plugins/modules/console_server_port.py +++ b/plugins/modules/console_server_port.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -113,8 +110,8 @@ tasks: - name: Create console server port within Nautobot with only required information - console_server_port: - url: http://netbox.local + networktocode.nautobot.console_server_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Server Port @@ -122,8 +119,8 @@ state: present - name: Update console server port with other fields - console_server_port: - url: http://netbox.local + networktocode.nautobot.console_server_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Server Port @@ -132,9 +129,9 @@ description: console server port description state: present - - name: Delete console server port within netbox - console_server_port: - url: http://netbox.local + - name: Delete console server port within nautobot + networktocode.nautobot.console_server_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Server Port @@ -155,7 +152,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -168,7 +165,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/console_server_port_template.py b/plugins/modules/console_server_port_template.py index c5ec727b..dffdff36 100644 --- a/plugins/modules/console_server_port_template.py +++ b/plugins/modules/console_server_port_template.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -103,8 +100,8 @@ tasks: - name: Create console server port template within Nautobot with only required information - console_server_port_template: - url: http://netbox.local + networktocode.nautobot.console_server_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Server Port Template @@ -112,8 +109,8 @@ state: present - name: Update console server port template with other fields - console_server_port_template: - url: http://netbox.local + networktocode.nautobot.console_server_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Server Port Template @@ -121,9 +118,9 @@ type: iec-60320-c6 state: present - - name: Delete console server port template within netbox - console_server_port_template: - url: http://netbox.local + - name: Delete console server port template within nautobot + networktocode.nautobot.console_server_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Console Server Port Template @@ -144,7 +141,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -157,7 +154,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/device.py b/plugins/modules/device.py index 2105186a..0750b658 100644 --- a/plugins/modules/device.py +++ b/plugins/modules/device.py @@ -1,8 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# Copyright: (c) 2018, David Gomez (@amb1s1) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -24,11 +22,11 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) - David Gomez (@amb1s1) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -190,8 +188,8 @@ tasks: - name: Create device within Nautobot with only required information - device: - url: http://netbox.local + networktocode.nautobot.device: + url: http://nautobot.local token: thisIsMyToken data: name: Test Device @@ -201,8 +199,8 @@ state: present - name: Create device within Nautobot with empty string name to generate UUID - device: - url: http://netbox.local + networktocode.nautobot.device: + url: http://nautobot.local token: thisIsMyToken data: name: "" @@ -211,17 +209,17 @@ site: Main state: present - - name: Delete device within netbox - device: - url: http://netbox.local + - name: Delete device within nautobot + networktocode.nautobot.device: + url: http://nautobot.local token: thisIsMyToken data: name: Test Device state: absent - name: Create device with tags - device: - url: http://netbox.local + networktocode.nautobot.device: + url: http://nautobot.local token: thisIsMyToken data: name: Another Test Device @@ -235,8 +233,8 @@ state: present - name: Update the rack and position of an existing device - device: - url: http://netbox.local + networktocode.nautobot.device: + url: http://nautobot.local token: thisIsMyToken data: name: Test Device @@ -259,7 +257,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -273,7 +271,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/device_bay.py b/plugins/modules/device_bay.py index 4de63fb7..17e95b6b 100644 --- a/plugins/modules/device_bay.py +++ b/plugins/modules/device_bay.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -98,8 +97,8 @@ tasks: - name: Create device bay within Nautobot with only required information - device_bay: - url: http://netbox.local + networktocode.nautobot.device_bay: + url: http://nautobot.local token: thisIsMyToken data: device: Test Nexus One @@ -107,8 +106,8 @@ state: present - name: Add device into device bay - device_bay: - url: http://netbox.local + networktocode.nautobot.device_bay: + url: http://nautobot.local token: thisIsMyToken data: device: Test Nexus One @@ -117,9 +116,9 @@ installed_device: Test Nexus Child One state: absent - - name: Delete device bay within netbox - device_bay: - url: http://netbox.local + - name: Delete device bay within nautobot + networktocode.nautobot.device_bay: + url: http://nautobot.local token: thisIsMyToken data: name: Device Bay One @@ -140,7 +139,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -153,7 +152,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/device_bay_template.py b/plugins/modules/device_bay_template.py index bef80de1..5cba4dee 100644 --- a/plugins/modules/device_bay_template.py +++ b/plugins/modules/device_bay_template.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.3.0' +version_added: "1.0.0" options: url: description: @@ -84,17 +81,17 @@ tasks: - name: Create device bay template within Nautobot with only required information - device_bay_template: - url: http://netbox.local + networktocode.nautobot.device_bay_template: + url: http://nautobot.local token: thisIsMyToken data: name: device bay template One device_type: Device Type One state: present - - name: Delete device bay template within netbox - device_bay_template: - url: http://netbox.local + - name: Delete device bay template within nautobot + networktocode.nautobot.device_bay_template: + url: http://nautobot.local token: thisIsMyToken data: name: device bay template One @@ -116,7 +113,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -129,7 +126,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/device_interface.py b/plugins/modules/device_interface.py index 6115ba11..03aab6b6 100644 --- a/plugins/modules/device_interface.py +++ b/plugins/modules/device_interface.py @@ -1,8 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function @@ -24,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: "0.1.0" +version_added: "1.0.0" options: url: description: @@ -53,14 +51,6 @@ - Name of the interface to be created required: true type: str - form_factor: - description: - - | - Form factor of the interface: - ex. 1000Base-T (1GE), Virtual, 10GBASE-T (10GE) - This has to be specified exactly as what is found within UI - required: false - type: raw type: description: - | @@ -158,24 +148,24 @@ gather_facts: False tasks: - name: Create interface within Nautobot with only required information - device_interface: - url: http://netbox.local + networktocode.nautobot.device_interface: + url: http://nautobot.local token: thisIsMyToken data: device: test100 name: GigabitEthernet1 state: present - - name: Delete interface within netbox - device_interface: - url: http://netbox.local + - name: Delete interface within nautobot + networktocode.nautobot.device_interface: + url: http://nautobot.local token: thisIsMyToken data: device: test100 name: GigabitEthernet1 state: absent - name: Create LAG with several specified options - device_interface: - url: http://netbox.local + networktocode.nautobot.device_interface: + url: http://nautobot.local token: thisIsMyToken data: device: test100 @@ -186,8 +176,8 @@ mode: Access state: present - name: Create interface and assign it to parent LAG - device_interface: - url: http://netbox.local + networktocode.nautobot.device_interface: + url: http://nautobot.local token: thisIsMyToken data: device: test100 @@ -201,8 +191,8 @@ mode: Access state: present - name: Create interface as a trunk port - device_interface: - url: http://netbox.local + networktocode.nautobot.device_interface: + url: http://nautobot.local token: thisIsMyToken data: device: test100 @@ -222,8 +212,8 @@ mode: Tagged state: present - name: Update interface on child device on virtual chassis - device_interface: - url: http://netbox.local + networktocode.nautobot.device_interface: + url: http://nautobot.local token: thisIsMyToken data: device: test100 @@ -245,7 +235,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -258,7 +248,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( update_vc_child=dict(type="bool", required=False, default=False), @@ -268,9 +258,6 @@ def main(): options=dict( device=dict(required=False, type="raw"), name=dict(required=True, type="str"), - form_factor=dict( - required=False, type="raw", removed_in_version="0.3.0" - ), type=dict(required=False, type="str"), enabled=dict(required=False, type="bool"), lag=dict(required=False, type="raw"), diff --git a/plugins/modules/device_interface_template.py b/plugins/modules/device_interface_template.py index 578e0111..ec8d74b2 100644 --- a/plugins/modules/device_interface_template.py +++ b/plugins/modules/device_interface_template.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: "0.3.0" +version_added: "1.0.0" options: url: description: @@ -98,17 +95,17 @@ gather_facts: False tasks: - name: Create interface template within Nautobot with only required information - device_interface_template: - url: http://netbox.local + networktocode.nautobot.device_interface_template: + url: http://nautobot.local token: thisIsMyToken data: device_type: Arista Test name: 10GBASE-T (10GE) type: 10gbase-t state: present - - name: Delete interface template within netbox - device_interface_template: - url: http://netbox.local + - name: Delete interface template within nautobot + networktocode.nautobot.device_interface_template: + url: http://nautobot.local token: thisIsMyToken data: device_type: Arista Test @@ -130,7 +127,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -143,7 +140,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/device_role.py b/plugins/modules/device_role.py index 1031417b..20823cc0 100644 --- a/plugins/modules/device_role.py +++ b/plugins/modules/device_role.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -98,17 +97,17 @@ tasks: - name: Create device role within Nautobot with only required information - device_role: - url: http://netbox.local + networktocode.nautobot.device_role: + url: http://nautobot.local token: thisIsMyToken data: name: Test device role color: FFFFFF state: present - - name: Delete device role within netbox - device_role: - url: http://netbox.local + - name: Delete device role within nautobot + networktocode.nautobot.device_role: + url: http://nautobot.local token: thisIsMyToken data: name: Test Rack role @@ -127,7 +126,7 @@ """ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -140,7 +139,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/device_type.py b/plugins/modules/device_type.py index 818e0833..77608c1c 100644 --- a/plugins/modules/device_type.py +++ b/plugins/modules/device_type.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -130,8 +129,8 @@ tasks: - name: Create device type within Nautobot with only required information - device_type: - url: http://netbox.local + networktocode.nautobot.device_type: + url: http://nautobot.local token: thisIsMyToken data: slug: test-device-type @@ -140,8 +139,8 @@ state: present - name: Create device type within Nautobot with only required information - device_type: - url: http://netbox.local + networktocode.nautobot.device_type: + url: http://nautobot.local token: thisIsMyToken data: slug: test-device-type @@ -153,9 +152,9 @@ subdevice_role: parent state: present - - name: Delete device type within netbox - device_type: - url: http://netbox.local + - name: Delete device type within nautobot + networktocode.nautobot.device_type: + url: http://nautobot.local token: thisIsMyToken data: slug: test-device-type @@ -175,7 +174,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -188,7 +187,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/front_port.py b/plugins/modules/front_port.py index 233f9e1a..e0e0ea02 100644 --- a/plugins/modules/front_port.py +++ b/plugins/modules/front_port.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -124,8 +121,8 @@ tasks: - name: Create front port within Nautobot with only required information - front_port: - url: http://netbox.local + networktocode.nautobot.front_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Front Port @@ -135,8 +132,8 @@ state: present - name: Update front port with other fields - front_port: - url: http://netbox.local + networktocode.nautobot.front_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Front Port @@ -147,9 +144,9 @@ description: front port description state: present - - name: Delete front port within netbox - front_port: - url: http://netbox.local + - name: Delete front port within nautobot + networktocode.nautobot.front_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Front Port @@ -172,7 +169,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -185,7 +182,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/front_port_template.py b/plugins/modules/front_port_template.py index d9d8b764..d29201ec 100644 --- a/plugins/modules/front_port_template.py +++ b/plugins/modules/front_port_template.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -114,8 +111,8 @@ tasks: - name: Create front port template within Nautobot with only required information - front_port_template: - url: http://netbox.local + networktocode.nautobot.front_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Front Port Template @@ -125,8 +122,8 @@ state: present - name: Update front port template with other fields - front_port_template: - url: http://netbox.local + networktocode.nautobot.front_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Front Port Template @@ -136,9 +133,9 @@ rear_port_template_position: 5 state: present - - name: Delete front port template within netbox - front_port_template: - url: http://netbox.local + - name: Delete front port template within nautobot + networktocode.nautobot.front_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Front Port Template @@ -161,7 +158,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -174,7 +171,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/inventory_item.py b/plugins/modules/inventory_item.py index d3a6cdb3..e65630ca 100644 --- a/plugins/modules/inventory_item.py +++ b/plugins/modules/inventory_item.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: "0.1.0" +version_added: "1.0.0" options: url: description: @@ -120,8 +119,8 @@ gather_facts: False tasks: - name: Create inventory item within Nautobot with only required information - inventory_item: - url: http://netbox.local + networktocode.nautobot.inventory_item: + url: http://nautobot.local token: thisIsMyToken data: device: test100 @@ -129,8 +128,8 @@ state: present - name: Update inventory item - inventory_item: - url: http://netbox.local + networktocode.nautobot.inventory_item: + url: http://nautobot.local token: thisIsMyToken data: device: test100 @@ -142,9 +141,9 @@ description: "New SFP" state: present - - name: Delete inventory item within netbox - inventory_item: - url: http://netbox.local + - name: Delete inventory item within nautobot + networktocode.nautobot.inventory_item: + url: http://nautobot.local token: thisIsMyToken data: device: test100 @@ -165,7 +164,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -178,7 +177,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/ip_address.py b/plugins/modules/ip_address.py index 20f4dc94..d169a870 100644 --- a/plugins/modules/ip_address.py +++ b/plugins/modules/ip_address.py @@ -1,8 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function @@ -24,11 +22,11 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) - Anthony Ruhier (@Anthony25) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -189,36 +187,36 @@ tasks: - name: Create IP address within Nautobot with only required information - ip_address: - url: http://netbox.local + networktocode.nautobot.ip_address: + url: http://nautobot.local token: thisIsMyToken data: address: 192.168.1.10 state: present - name: Force to create (even if it already exists) the IP - ip_address: - url: http://netbox.local + networktocode.nautobot.ip_address: + url: http://nautobot.local token: thisIsMyToken data: address: 192.168.1.10 state: new - name: Get a new available IP inside 192.168.1.0/24 - ip_address: - url: http://netbox.local + networktocode.nautobot.ip_address: + url: http://nautobot.local token: thisIsMyToken data: prefix: 192.168.1.0/24 state: new - - name: Delete IP address within netbox - ip_address: - url: http://netbox.local + - name: Delete IP address within nautobot + networktocode.nautobot.ip_address: + url: http://nautobot.local token: thisIsMyToken data: address: 192.168.1.10 state: absent - name: Create IP address with several specified options - ip_address: - url: http://netbox.local + networktocode.nautobot.ip_address: + url: http://nautobot.local token: thisIsMyToken data: family: 4 @@ -232,8 +230,8 @@ - Schnozzberry state: present - name: Create IP address and assign a nat_inside IP - ip_address: - url: http://netbox.local + networktocode.nautobot.ip_address: + url: http://nautobot.local token: thisIsMyToken data: family: 4 @@ -246,8 +244,8 @@ name: GigabitEthernet1 device: test100 - name: Ensure that an IP inside 192.168.1.0/24 is attached to GigabitEthernet1 - ip_address: - url: http://netbox.local + networktocode.nautobot.ip_address: + url: http://nautobot.local token: thisIsMyToken data: prefix: 192.168.1.0/24 @@ -257,8 +255,8 @@ device: test100 state: present - name: Attach a new available IP of 192.168.1.0/24 to GigabitEthernet1 - ip_address: - url: http://netbox.local + networktocode.nautobot.ip_address: + url: http://nautobot.local token: thisIsMyToken data: prefix: 192.168.1.0/24 @@ -268,8 +266,8 @@ device: test100 state: new - name: Attach a new available IP of 192.168.1.0/24 to GigabitEthernet1 (Nautobot 2.9+) - ip_address: - url: http://netbox.local + networktocode.nautobot.ip_address: + url: http://nautobot.local token: thisIsMyToken data: prefix: 192.168.1.0/24 @@ -293,7 +291,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( NautobotIpamModule, @@ -306,7 +304,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) # state choices present, absent, new argument_spec["state"] = dict( required=False, default="present", choices=["present", "absent", "new"] diff --git a/plugins/modules/ipam_role.py b/plugins/modules/ipam_role.py index cf8e6c0f..fbac21f7 100644 --- a/plugins/modules/ipam_role.py +++ b/plugins/modules/ipam_role.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: "0.1.0" +version_added: "1.0.0" options: url: description: @@ -90,16 +89,16 @@ gather_facts: False tasks: - name: Create ipam role within Nautobot with only required information - ipam_role: - url: http://netbox.local + networktocode.nautobot.ipam_role: + url: http://nautobot.local token: thisIsMyToken data: name: Test IPAM Role state: present - - name: Delete ipam role within netbox - ipam_role: - url: http://netbox.local + - name: Delete ipam role within nautobot + networktocode.nautobot.ipam_role: + url: http://nautobot.local token: thisIsMyToken data: name: Test IPAM Role @@ -119,7 +118,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( NautobotIpamModule, @@ -132,7 +131,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/manufacturer.py b/plugins/modules/manufacturer.py index 4dd839a4..56f14c33 100644 --- a/plugins/modules/manufacturer.py +++ b/plugins/modules/manufacturer.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -84,16 +83,16 @@ tasks: - name: Create manufacturer within Nautobot with only required information - manufacturer: - url: http://netbox.local + networktocode.nautobot.manufacturer: + url: http://nautobot.local token: thisIsMyToken data: name: Test Manufacturer state: present - - name: Delete manufacturer within netbox - manufacturer: - url: http://netbox.local + - name: Delete manufacturer within nautobot + networktocode.nautobot.manufacturer: + url: http://nautobot.local token: thisIsMyToken data: name: Test Manufacturer @@ -113,7 +112,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -126,7 +125,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/platform.py b/plugins/modules/platform.py index 95c16ea8..b55727c0 100644 --- a/plugins/modules/platform.py +++ b/plugins/modules/platform.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -104,16 +103,16 @@ tasks: - name: Create platform within Nautobot with only required information - platform: - url: http://netbox.local + networktocode.nautobot.platform: + url: http://nautobot.local token: thisIsMyToken data: name: Test Platform state: present - name: Create platform within Nautobot with only required information - platform: - url: http://netbox.local + networktocode.nautobot.platform: + url: http://nautobot.local token: thisIsMyToken data: name: Test Platform All @@ -123,9 +122,9 @@ global_delay_factor: 2 state: present - - name: Delete platform within netbox - platform: - url: http://netbox.local + - name: Delete platform within nautobot + networktocode.nautobot.platform: + url: http://nautobot.local token: thisIsMyToken data: name: Test Platform @@ -145,7 +144,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -158,7 +157,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/power_feed.py b/plugins/modules/power_feed.py index d6050b6b..f4982979 100644 --- a/plugins/modules/power_feed.py +++ b/plugins/modules/power_feed.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -153,8 +150,8 @@ tasks: - name: Create power feed within Nautobot with only required information - power_feed: - url: http://netbox.local + networktocode.nautobot.power_feed: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Feed @@ -162,8 +159,8 @@ state: present - name: Update power feed with other fields - power_feed: - url: http://netbox.local + networktocode.nautobot.power_feed: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Feed @@ -178,9 +175,9 @@ comments: normal power feed state: present - - name: Delete power feed within netbox - power_feed: - url: http://netbox.local + - name: Delete power feed within nautobot + networktocode.nautobot.power_feed: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Feed @@ -201,7 +198,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -214,7 +211,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/power_outlet.py b/plugins/modules/power_outlet.py index 42d6b549..edb4625f 100644 --- a/plugins/modules/power_outlet.py +++ b/plugins/modules/power_outlet.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -168,8 +165,8 @@ tasks: - name: Create power port within Nautobot with only required information - power_outlet: - url: http://netbox.local + networktocode.nautobot.power_outlet: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Outlet @@ -177,8 +174,8 @@ state: present - name: Update power port with other fields - power_outlet: - url: http://netbox.local + networktocode.nautobot.power_outlet: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Outlet @@ -189,9 +186,9 @@ description: power port description state: present - - name: Delete power port within netbox - power_outlet: - url: http://netbox.local + - name: Delete power port within nautobot + networktocode.nautobot.power_outlet: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Outlet @@ -212,7 +209,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -225,7 +222,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/power_outlet_template.py b/plugins/modules/power_outlet_template.py index 6b5eba75..1d7e7e60 100644 --- a/plugins/modules/power_outlet_template.py +++ b/plugins/modules/power_outlet_template.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -158,8 +155,8 @@ tasks: - name: Create power port within Nautobot with only required information - power_outlet_template: - url: http://netbox.local + networktocode.nautobot.power_outlet_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Outlet @@ -167,8 +164,8 @@ state: present - name: Update power port with other fields - power_outlet_template: - url: http://netbox.local + networktocode.nautobot.power_outlet_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Outlet @@ -178,9 +175,9 @@ feed_leg: A state: present - - name: Delete power port within netbox - power_outlet_template: - url: http://netbox.local + - name: Delete power port within nautobot + networktocode.nautobot.power_outlet_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Outlet @@ -201,7 +198,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -214,7 +211,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/power_panel.py b/plugins/modules/power_panel.py index e20264b1..31ca8a26 100644 --- a/plugins/modules/power_panel.py +++ b/plugins/modules/power_panel.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -89,8 +86,8 @@ tasks: - name: Create power panel within Nautobot with only required information - power_panel: - url: http://netbox.local + networktocode.nautobot.power_panel: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Panel @@ -98,8 +95,8 @@ state: present - name: Update power panel with other fields - power_panel: - url: http://netbox.local + networktocode.nautobot.power_panel: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Panel @@ -107,9 +104,9 @@ rack_group: Test Rack Group state: present - - name: Delete power panel within netbox - power_panel: - url: http://netbox.local + - name: Delete power panel within nautobot + networktocode.nautobot.power_panel: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Panel @@ -130,7 +127,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -143,7 +140,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/power_port.py b/plugins/modules/power_port.py index f20d0c61..5a14222f 100644 --- a/plugins/modules/power_port.py +++ b/plugins/modules/power_port.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -164,8 +161,8 @@ tasks: - name: Create power port within Nautobot with only required information - power_port: - url: http://netbox.local + networktocode.nautobot.power_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Port @@ -173,8 +170,8 @@ state: present - name: Update power port with other fields - power_port: - url: http://netbox.local + networktocode.nautobot.power_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Port @@ -185,9 +182,9 @@ description: power port description state: present - - name: Delete power port within netbox - power_port: - url: http://netbox.local + - name: Delete power port within nautobot + networktocode.nautobot.power_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Port @@ -208,7 +205,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -221,7 +218,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/power_port_template.py b/plugins/modules/power_port_template.py index e8cf6d6d..1d2795a2 100644 --- a/plugins/modules/power_port_template.py +++ b/plugins/modules/power_port_template.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -154,8 +151,8 @@ tasks: - name: Create power port within Nautobot with only required information - power_port_template: - url: http://netbox.local + networktocode.nautobot.power_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Port Template @@ -163,8 +160,8 @@ state: present - name: Update power port with other fields - power_port_template: - url: http://netbox.local + networktocode.nautobot.power_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Port Template @@ -174,9 +171,9 @@ maximum_draw: 80 state: present - - name: Delete power port within netbox - power_port_template: - url: http://netbox.local + - name: Delete power port within nautobot + networktocode.nautobot.power_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Power Port Template @@ -197,7 +194,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -210,7 +207,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/prefix.py b/plugins/modules/prefix.py index e394b230..13b83b8c 100644 --- a/plugins/modules/prefix.py +++ b/plugins/modules/prefix.py @@ -1,8 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function @@ -24,11 +22,11 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) - Anthony Ruhier (@Anthony25) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -155,24 +153,24 @@ tasks: - name: Create prefix within Nautobot with only required information - prefix: - url: http://netbox.local + networktocode.nautobot.prefix: + url: http://nautobot.local token: thisIsMyToken data: prefix: 10.156.0.0/19 state: present - - name: Delete prefix within netbox - prefix: - url: http://netbox.local + - name: Delete prefix within nautobot + networktocode.nautobot.prefix: + url: http://nautobot.local token: thisIsMyToken data: prefix: 10.156.0.0/19 state: absent - name: Create prefix with several specified options - prefix: - url: http://netbox.local + networktocode.nautobot.prefix: + url: http://nautobot.local token: thisIsMyToken data: family: 4 @@ -194,8 +192,8 @@ state: present - name: Get a new /24 inside 10.156.0.0/19 within Nautobot - Parent doesn't exist - prefix: - url: http://netbox.local + networktocode.nautobot.prefix: + url: http://nautobot.local token: thisIsMyToken data: parent: 10.156.0.0/19 @@ -204,16 +202,16 @@ first_available: yes - name: Create prefix within Nautobot with only required information - prefix: - url: http://netbox.local + networktocode.nautobot.prefix: + url: http://nautobot.local token: thisIsMyToken data: prefix: 10.156.0.0/19 state: present - name: Get a new /24 inside 10.156.0.0/19 within Nautobot - prefix: - url: http://netbox.local + networktocode.nautobot.prefix: + url: http://nautobot.local token: thisIsMyToken data: parent: 10.156.0.0/19 @@ -222,8 +220,8 @@ first_available: yes - name: Get a new /24 inside 10.157.0.0/19 within Nautobot with additional values - prefix: - url: http://netbox.local + networktocode.nautobot.prefix: + url: http://nautobot.local token: thisIsMyToken data: parent: 10.157.0.0/19 @@ -248,7 +246,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( NautobotIpamModule, @@ -261,7 +259,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/provider.py b/plugins/modules/provider.py index cbb2feec..0d7d93b8 100644 --- a/plugins/modules/provider.py +++ b/plugins/modules/provider.py @@ -1,8 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function @@ -24,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -119,16 +117,16 @@ tasks: - name: Create provider within Nautobot with only required information - provider: - url: http://netbox.local + networktocode.nautobot.provider: + url: http://nautobot.local token: thisIsMyToken data: name: Test Provider state: present - name: Update provider with other fields - provider: - url: http://netbox.local + networktocode.nautobot.provider: + url: http://nautobot.local token: thisIsMyToken data: name: Test Provider @@ -140,9 +138,9 @@ comments: "BAD PROVIDER" state: present - - name: Delete provider within netbox - provider: - url: http://netbox.local + - name: Delete provider within nautobot + networktocode.nautobot.provider: + url: http://nautobot.local token: thisIsMyToken data: name: Test Provider @@ -162,7 +160,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.circuits import ( NautobotCircuitsModule, @@ -175,7 +173,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/rack.py b/plugins/modules/rack.py index b4eefa1f..70184e0d 100644 --- a/plugins/modules/rack.py +++ b/plugins/modules/rack.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -182,17 +181,17 @@ tasks: - name: Create rack within Nautobot with only required information - rack: - url: http://netbox.local + networktocode.nautobot.rack: + url: http://nautobot.local token: thisIsMyToken data: name: Test rack site: Test Site state: present - - name: Delete rack within netbox - rack: - url: http://netbox.local + - name: Delete rack within nautobot + networktocode.nautobot.rack: + url: http://nautobot.local token: thisIsMyToken data: name: Test Rack @@ -212,7 +211,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -225,7 +224,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/rack_group.py b/plugins/modules/rack_group.py index 45ad88f1..4dd78e0e 100644 --- a/plugins/modules/rack_group.py +++ b/plugins/modules/rack_group.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -89,17 +88,17 @@ tasks: - name: Create rack group within Nautobot with only required information - rack_group: - url: http://netbox.local + networktocode.nautobot.rack_group: + url: http://nautobot.local token: thisIsMyToken data: name: Test rack group site: Test Site state: present - - name: Delete rack group within netbox - rack_group: - url: http://netbox.local + - name: Delete rack group within nautobot + networktocode.nautobot.rack_group: + url: http://nautobot.local token: thisIsMyToken data: name: Test Rack group @@ -120,7 +119,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -133,7 +132,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/rack_role.py b/plugins/modules/rack_role.py index a0f5651e..ec210a27 100644 --- a/plugins/modules/rack_role.py +++ b/plugins/modules/rack_role.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -89,17 +88,17 @@ tasks: - name: Create rack role within Nautobot with only required information - rack_role: - url: http://netbox.local + networktocode.nautobot.rack_role: + url: http://nautobot.local token: thisIsMyToken data: name: Test rack role color: FFFFFF state: present - - name: Delete rack role within netbox - rack_role: - url: http://netbox.local + - name: Delete rack role within nautobot + networktocode.nautobot.rack_role: + url: http://nautobot.local token: thisIsMyToken data: name: Test Rack role @@ -119,7 +118,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -132,7 +131,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/rear_port.py b/plugins/modules/rear_port.py index 7f661466..396ab8c1 100644 --- a/plugins/modules/rear_port.py +++ b/plugins/modules/rear_port.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -119,8 +116,8 @@ tasks: - name: Create rear port within Nautobot with only required information - rear_port: - url: http://netbox.local + networktocode.nautobot.rear_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Rear Port @@ -129,8 +126,8 @@ state: present - name: Update rear port with other fields - rear_port: - url: http://netbox.local + networktocode.nautobot.rear_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Rear Port @@ -140,9 +137,9 @@ description: rear port description state: present - - name: Delete rear port within netbox - rear_port: - url: http://netbox.local + - name: Delete rear port within nautobot + networktocode.nautobot.rear_port: + url: http://nautobot.local token: thisIsMyToken data: name: Test Rear Port @@ -164,7 +161,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -177,7 +174,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/rear_port_template.py b/plugins/modules/rear_port_template.py index 83ffbfb7..a795f190 100644 --- a/plugins/modules/rear_port_template.py +++ b/plugins/modules/rear_port_template.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.2.3' +version_added: "1.0.0" options: url: description: @@ -109,8 +106,8 @@ tasks: - name: Create rear port template within Nautobot with only required information - rear_port_template: - url: http://netbox.local + networktocode.nautobot.rear_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Rear Port Template @@ -119,8 +116,8 @@ state: present - name: Update rear port template with other fields - rear_port_template: - url: http://netbox.local + networktocode.nautobot.rear_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Rear Port Template @@ -129,9 +126,9 @@ positions: 5 state: present - - name: Delete rear port template within netbox - rear_port_template: - url: http://netbox.local + - name: Delete rear port template within nautobot + networktocode.nautobot.rear_port_template: + url: http://nautobot.local token: thisIsMyToken data: name: Test Rear Port Template @@ -153,7 +150,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -166,7 +163,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/region.py b/plugins/modules/region.py index 025bcf71..9cf72636 100644 --- a/plugins/modules/region.py +++ b/plugins/modules/region.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: "0.1.0" +version_added: "1.0.0" options: url: description: @@ -90,16 +89,16 @@ gather_facts: False tasks: - name: Create tenant within Nautobot with only required information - region: - url: http://netbox.local + networktocode.nautobot.region: + url: http://nautobot.local token: thisIsMyToken data: name: "Test Region One" state: present - - name: Delete tenant within netbox - region: - url: http://netbox.local + - name: Delete tenant within nautobot + networktocode.nautobot.region: + url: http://nautobot.local token: thisIsMyToken data: name: Tenant Group ABC @@ -119,7 +118,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -132,7 +131,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/rir.py b/plugins/modules/rir.py index 31c2eae5..029d16ab 100644 --- a/plugins/modules/rir.py +++ b/plugins/modules/rir.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -89,25 +88,25 @@ tasks: - name: Create RIR within Nautobot with only required information - rir: - url: http://netbox.local + networktocode.nautobot.rir: + url: http://nautobot.local token: thisIsMyToken data: name: Test RIR One state: present - name: Update Test RIR One - rir: - url: http://netbox.local + networktocode.nautobot.rir: + url: http://nautobot.local token: thisIsMyToken data: name: Test RIR One is_private: True state: present - - name: Delete RIR within netbox - rir: - url: http://netbox.local + - name: Delete RIR within nautobot + networktocode.nautobot.rir: + url: http://nautobot.local token: thisIsMyToken data: name: Test RIR One @@ -127,7 +126,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( NautobotIpamModule, @@ -140,7 +139,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/route_target.py b/plugins/modules/route_target.py index 2cb1cff5..822b232a 100644 --- a/plugins/modules/route_target.py +++ b/plugins/modules/route_target.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Pavel Korovin (@pkorovin) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@fragmentedpacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: "2.0.0" +version_added: "1.0.0" options: url: description: @@ -100,7 +99,7 @@ tasks: - name: Create Route Targets networktocode.nautobot.route_target: - url: http://netbox.local + url: http://nautobot.local token: thisIsMyToken data: name: "{{ item.name }}" @@ -113,7 +112,7 @@ - name: Update Description on Route Targets networktocode.nautobot.route_target: - url: http://netbox.local + url: http://nautobot.local token: thisIsMyToken data: name: "{{ item.name }}" @@ -127,7 +126,7 @@ - name: Delete Route Targets networktocode.nautobot.route_target: - url: http://netbox.local + url: http://nautobot.local token: thisIsMyToken data: name: "{{ item }}" @@ -150,7 +149,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( NautobotIpamModule, @@ -163,7 +162,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/service.py b/plugins/modules/service.py index cccd5a9a..2a5663c5 100644 --- a/plugins/modules/service.py +++ b/plugins/modules/service.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Kulakov Ilya (@TawR1024) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -25,7 +24,7 @@ - Kulakov Ilya (@TawR1024) requirements: - pynautobot -version_added: '0.1.5' +version_added: "1.0.0" options: url: description: @@ -57,11 +56,6 @@ - Name of the region to be created required: true type: str - port: - description: - - Specifies which port used by service - required: false - type: int ports: description: - Specifies which ports used by service (Nautobot 2.10 and newer) @@ -115,14 +109,14 @@ """ EXAMPLES = r""" -- name: "Create netbox service" +- name: "Create nautobot service" connection: local hosts: all gather_facts: False tasks: - name: Create service - service: + networktocode.nautobot.service: url: url token: token data: @@ -136,27 +130,27 @@ - prometheus state: present -- name: "Delete netbox service" +- name: "Delete nautobot service" connection: local hosts: all gather_facts: False tasks: - name: Delete service - service: + networktocode.nautobot.service: url: url token: token data: device: Test666 name: node-exporter - port: 9100 + ports: 9100 protocol: TCP state: absent """ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( NautobotIpamModule, @@ -169,7 +163,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( @@ -179,7 +173,6 @@ def main(): device=dict(required=False, type="raw"), virtual_machine=dict(required=False, type="raw"), name=dict(required=True, type="str"), - port=dict(required=False, type="int"), ports=dict(required=False, type="list", elements="int"), protocol=dict(required=True, type="raw"), ipaddresses=dict(required=False, type="raw"), @@ -195,25 +188,17 @@ def main(): ("state", "present", ["name"]), ("state", "absent", ["name"]), ] - mutually_exclusive = [("port", "ports")] - required_one_of = [["device", "virtual_machine"], ["port", "ports"]] + required_one_of = [["device", "virtual_machine"]] module = NautobotAnsibleModule( argument_spec=argument_spec, supports_check_mode=True, required_if=required_if, required_one_of=required_one_of, - mutually_exclusive=mutually_exclusive, ) service = NautobotIpamModule(module, NB_SERVICES) - # Change port to ports for 2.10+ and convert to a list with the single integer - if service.data.get("port") and service._version_check_greater( - service.version, "2.10", greater_or_equal=True - ): - service.data["ports"] = [service.data.pop("port")] - # Run the normal run() method service.run() diff --git a/plugins/modules/site.py b/plugins/modules/site.py index 41fe83bc..e315b146 100644 --- a/plugins/modules/site.py +++ b/plugins/modules/site.py @@ -1,8 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function @@ -24,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: "0.1.0" +version_added: "1.0.0" options: url: description: @@ -170,24 +168,24 @@ gather_facts: False tasks: - name: Create site within Nautobot with only required information - site: - url: http://netbox.local + networktocode.nautobot.site: + url: http://nautobot.local token: thisIsMyToken data: name: Test - Colorado state: present - - name: Delete site within netbox - site: - url: http://netbox.local + - name: Delete site within nautobot + networktocode.nautobot.site: + url: http://nautobot.local token: thisIsMyToken data: name: Test - Colorado state: absent - name: Create site with all parameters - site: - url: http://netbox.local + networktocode.nautobot.site: + url: http://nautobot.local token: thisIsMyToken data: name: Test - California @@ -223,7 +221,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -236,7 +234,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/status.py b/plugins/modules/status.py index 98e79a84..0752469c 100644 --- a/plugins/modules/status.py +++ b/plugins/modules/status.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Network to Code (@networktocode) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,7 +22,7 @@ - Status should be defined as a YAML list author: - Network to Code, LLC (@networktocode) - - Mikhail Yohman (@fragmentedpacket) + - Network to Code (@networktocode) - Josh VanDeraa (@jvanaderaa) requirements: - pynautobot @@ -99,8 +98,8 @@ gather_facts: False tasks: - name: Create status - status: - url: http://netbox.local + networktocode.nautobot.status: + url: http://nautobot.local token: thisIsMyToken data: name: "{{ item.name }}" @@ -109,8 +108,8 @@ color: 01bea3 - name: Delete status - status: - url: http://netbox.local + networktocode.nautobot.status: + url: http://nautobot.local token: thisIsMyToken data: name: "ansible_status" @@ -133,7 +132,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.extras import ( NautobotExtrasModule, @@ -146,7 +145,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/tag.py b/plugins/modules/tag.py index db62cd73..5a313242 100644 --- a/plugins/modules/tag.py +++ b/plugins/modules/tag.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Pavel Korovin (@pkorovin) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -26,7 +25,7 @@ - Pavel Korovin (@pkorovin) requirements: - pynautobot -version_added: "1.2.0" +version_added: "1.0.0" options: url: description: @@ -95,8 +94,8 @@ gather_facts: False tasks: - name: Create tags - tag: - url: http://netbox.local + networktocode.nautobot.tag: + url: http://nautobot.local token: thisIsMyToken data: name: "{{ item.name }}" @@ -106,8 +105,8 @@ - { name: tun, description: "tunnel" } - name: Delete tags - tag: - url: http://netbox.local + networktocode.nautobot.tag: + url: http://nautobot.local token: thisIsMyToken data: name: "{{ item }}" @@ -130,7 +129,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.extras import ( NautobotExtrasModule, @@ -143,7 +142,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/tenant.py b/plugins/modules/tenant.py index 8d41d35d..6130dfcb 100644 --- a/plugins/modules/tenant.py +++ b/plugins/modules/tenant.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Amy Liebowitz (@amylieb) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -26,7 +25,7 @@ - Amy Liebowitz (@amylieb) requirements: - pynautobot -version_added: "0.1.0" +version_added: "1.0.0" options: url: description: @@ -109,24 +108,24 @@ gather_facts: False tasks: - name: Create tenant within Nautobot with only required information - tenant: - url: http://netbox.local + networktocode.nautobot.tenant: + url: http://nautobot.local token: thisIsMyToken data: name: Tenant ABC state: present - - name: Delete tenant within netbox - tenant: - url: http://netbox.local + - name: Delete tenant within nautobot + networktocode.nautobot.tenant: + url: http://nautobot.local token: thisIsMyToken data: name: Tenant ABC state: absent - name: Create tenant with all parameters - tenant: - url: http://netbox.local + networktocode.nautobot.tenant: + url: http://nautobot.local token: thisIsMyToken data: name: Tenant ABC @@ -154,7 +153,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.tenancy import ( NautobotTenancyModule, @@ -167,7 +166,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/tenant_group.py b/plugins/modules/tenant_group.py index d5ebbef2..17087457 100644 --- a/plugins/modules/tenant_group.py +++ b/plugins/modules/tenant_group.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: "0.1.0" +version_added: "1.0.0" options: url: description: @@ -84,17 +83,17 @@ gather_facts: False tasks: - name: Create tenant within Nautobot with only required information - tenant_group: - url: http://netbox.local + networktocode.nautobot.tenant_group: + url: http://nautobot.local token: thisIsMyToken data: name: Tenant Group ABC slug: "tenant_group_abc" state: present - - name: Delete tenant within netbox - tenant_group: - url: http://netbox.local + - name: Delete tenant within nautobot + networktocode.nautobot.tenant_group: + url: http://nautobot.local token: thisIsMyToken data: name: Tenant ABC @@ -115,7 +114,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.tenancy import ( NautobotTenancyModule, @@ -128,7 +127,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/virtual_chassis.py b/plugins/modules/virtual_chassis.py index 76b34105..e460a53e 100644 --- a/plugins/modules/virtual_chassis.py +++ b/plugins/modules/virtual_chassis.py @@ -1,8 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# © 2020 Nokia -# Licensed under the GNU General Public License v3.0 only -# SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function @@ -27,7 +24,7 @@ - Tobias Groß (@toerb) requirements: - pynautobot -version_added: '0.3.0' +version_added: "1.0.0" options: url: description: @@ -94,8 +91,8 @@ tasks: - name: Create virtual chassis within Nautobot with only required information - virtual_chassis: - url: http://netbox.local + networktocode.nautobot.virtual_chassis: + url: http://nautobot.local token: thisIsMyToken data: name: "Virtual Chassis 1" @@ -103,17 +100,17 @@ state: present - name: Update virtual chassis with other fields - virtual_chassis: - url: http://netbox.local + networktocode.nautobot.virtual_chassis: + url: http://nautobot.local token: thisIsMyToken data: master: Test Device domain: Domain Text state: present - - name: Delete virtual chassis within netbox - virtual_chassis: - url: http://netbox.local + - name: Delete virtual chassis within nautobot + networktocode.nautobot.virtual_chassis: + url: http://nautobot.local token: thisIsMyToken data: master: Test Device @@ -133,7 +130,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.dcim import ( NautobotDcimModule, @@ -146,7 +143,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/virtual_machine.py b/plugins/modules/virtual_machine.py index 0854a32e..a09c5376 100644 --- a/plugins/modules/virtual_machine.py +++ b/plugins/modules/virtual_machine.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Gaelle Mangin (@gmangin) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -26,7 +25,7 @@ - Gaelle MANGIN (@gmangin) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -152,25 +151,25 @@ gather_facts: False tasks: - name: Create virtual machine within Nautobot with only required information - virtual_machine: - url: http://netbox.local + networktocode.nautobot.virtual_machine: + url: http://nautobot.local token: thisIsMyToken data: name: Test Virtual Machine cluster: test cluster state: present - - name: Delete virtual machine within netbox - virtual_machine: - url: http://netbox.local + - name: Delete virtual machine within nautobot + networktocode.nautobot.virtual_machine: + url: http://nautobot.local token: thisIsMyToken data: name: Test Virtual Machine state: absent - name: Create virtual machine with tags - virtual_machine: - url: http://netbox.local + networktocode.nautobot.virtual_machine: + url: http://nautobot.local token: thisIsMyToken data: name: Another Test Virtual Machine @@ -181,8 +180,8 @@ state: present - name: Update vcpus, memory and disk of an existing virtual machine - virtual_machine: - url: http://netbox.local + networktocode.nautobot.virtual_machine: + url: http://nautobot.local token: thisIsMyToken data: name: Test Virtual Machine @@ -206,7 +205,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.virtualization import ( NautobotVirtualizationModule, @@ -219,7 +218,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/vlan.py b/plugins/modules/vlan.py index 9cf9c677..f6247eb0 100644 --- a/plugins/modules/vlan.py +++ b/plugins/modules/vlan.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -123,17 +122,17 @@ tasks: - name: Create vlan within Nautobot with only required information - vlan: - url: http://netbox.local + networktocode.nautobot.vlan: + url: http://nautobot.local token: thisIsMyToken data: name: Test VLAN vid: 400 state: present - - name: Delete vlan within netbox - vlan: - url: http://netbox.local + - name: Delete vlan within nautobot + networktocode.nautobot.vlan: + url: http://nautobot.local token: thisIsMyToken data: name: Test VLAN @@ -141,8 +140,8 @@ state: absent - name: Create vlan with all information - vlan: - url: http://netbox.local + networktocode.nautobot.vlan: + url: http://nautobot.local token: thisIsMyToken data: name: Test VLAN @@ -171,7 +170,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( NautobotIpamModule, @@ -184,7 +183,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/vlan_group.py b/plugins/modules/vlan_group.py index 2b434b2f..9346174d 100644 --- a/plugins/modules/vlan_group.py +++ b/plugins/modules/vlan_group.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -89,17 +88,17 @@ tasks: - name: Create vlan group within Nautobot with only required information - vlan_group: - url: http://netbox.local + networktocode.nautobot.vlan_group: + url: http://nautobot.local token: thisIsMyToken data: name: Test vlan group site: Test Site state: present - - name: Delete vlan group within netbox - vlan_group: - url: http://netbox.local + - name: Delete vlan group within nautobot + networktocode.nautobot.vlan_group: + url: http://nautobot.local token: thisIsMyToken data: name: Test vlan group @@ -119,7 +118,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( NautobotIpamModule, @@ -132,7 +131,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/vm_interface.py b/plugins/modules/vm_interface.py index acebc020..17044802 100644 --- a/plugins/modules/vm_interface.py +++ b/plugins/modules/vm_interface.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Benjamin Vergnaud (@bvergnaud) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -26,7 +25,7 @@ - Benjamin Vergnaud (@bvergnaud) requirements: - pynautobot -version_added: "0.1.0" +version_added: "1.0.0" options: url: description: @@ -124,17 +123,17 @@ gather_facts: False tasks: - name: Create interface within Nautobot with only required information - vm_interface: - url: http://netbox.local + networktocode.nautobot.vm_interface: + url: http://nautobot.local token: thisIsMyToken data: virtual_machine: test100 name: GigabitEthernet1 state: present - - name: Delete interface within netbox - vm_interface: - url: http://netbox.local + - name: Delete interface within nautobot + networktocode.nautobot.vm_interface: + url: http://nautobot.local token: thisIsMyToken data: virtual_machine: test100 @@ -142,8 +141,8 @@ state: absent - name: Create interface as a trunk port - vm_interface: - url: http://netbox.local + networktocode.nautobot.vm_interface: + url: http://nautobot.local token: thisIsMyToken data: virtual_machine: test100 @@ -175,7 +174,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.virtualization import ( NautobotVirtualizationModule, @@ -188,7 +187,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/plugins/modules/vrf.py b/plugins/modules/vrf.py index 71d5aa3d..bfee9f62 100644 --- a/plugins/modules/vrf.py +++ b/plugins/modules/vrf.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -23,10 +22,10 @@ - Tags should be defined as a YAML list - This should be ran with connection C(local) and hosts C(localhost) author: - - Mikhail Yohman (@FragmentedPacket) + - Network to Code (@networktocode) requirements: - pynautobot -version_added: '0.1.0' +version_added: "1.0.0" options: url: description: @@ -69,14 +68,14 @@ required: false type: list elements: str - version_added: 2.0.0 + version_added: "1.0.0" export_targets: description: - Export targets tied to VRF required: false type: list elements: str - version_added: 2.0.0 + version_added: "1.0.0" description: description: - The description of the vrf @@ -122,24 +121,24 @@ tasks: - name: Create vrf within Nautobot with only required information - vrf: - url: http://netbox.local + networktocode.nautobot.vrf: + url: http://nautobot.local token: thisIsMyToken data: name: Test VRF state: present - - name: Delete vrf within netbox - vrf: - url: http://netbox.local + - name: Delete vrf within nautobot + networktocode.nautobot.vrf: + url: http://nautobot.local token: thisIsMyToken data: name: Test VRF state: absent - name: Create vrf with all information - vrf: - url: http://netbox.local + networktocode.nautobot.vrf: + url: http://nautobot.local token: thisIsMyToken data: name: Test VRF @@ -169,7 +168,7 @@ from ansible_collections.networktocode.nautobot.plugins.module_utils.utils import ( NautobotAnsibleModule, - NETBOX_ARG_SPEC, + NAUTOBOT_ARG_SPEC, ) from ansible_collections.networktocode.nautobot.plugins.module_utils.ipam import ( NautobotIpamModule, @@ -182,7 +181,7 @@ def main(): """ Main entry point for module execution """ - argument_spec = deepcopy(NETBOX_ARG_SPEC) + argument_spec = deepcopy(NAUTOBOT_ARG_SPEC) argument_spec.update( dict( data=dict( diff --git a/poetry.lock b/poetry.lock index 9fab9199..5b2bb5c9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,7 +2,7 @@ name = "aiocontextvars" version = "0.2.2" description = "Asyncio support for PEP-567 contextvars backport." -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -13,7 +13,7 @@ contextvars = {version = "2.4", markers = "python_version < \"3.7\""} name = "aiofiles" version = "0.6.0" description = "File support for asyncio." -category = "main" +category = "dev" optional = false python-versions = "*" @@ -21,7 +21,7 @@ python-versions = "*" name = "aiohttp" version = "3.7.3" description = "Async http client/server framework (asyncio)" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -41,13 +41,13 @@ speedups = ["aiodns", "brotlipy", "cchardet"] name = "alabaster" version = "0.7.12" description = "A configurable sidebar-enabled Sphinx theme" -category = "main" +category = "dev" optional = false python-versions = "*" [[package]] name = "ansible-base" -version = "2.10.5" +version = "2.10.6" description = "Radically simple IT automation" category = "main" optional = false @@ -63,7 +63,7 @@ PyYAML = "*" name = "antsibull" version = "0.25.0" description = "Tools for building the Ansible Distribution" -category = "main" +category = "dev" optional = false python-versions = ">=3.6.0,<4.0.0" @@ -90,7 +90,7 @@ twiggy = ">=0.5.0" name = "antsibull-changelog" version = "0.9.0" description = "Changelog tool for Ansible-base and Ansible collections" -category = "main" +category = "dev" optional = false python-versions = ">=3.6.0,<4.0.0" @@ -105,7 +105,7 @@ semantic_version = "*" name = "apipkg" version = "1.5" description = "apipkg: namespace control and lazy-import mechanism" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -113,7 +113,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" name = "appdirs" version = "1.4.4" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "main" +category = "dev" optional = false python-versions = "*" @@ -121,7 +121,7 @@ python-versions = "*" name = "astroid" version = "2.4.2" description = "An abstract syntax tree for Python with inference support." -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -135,7 +135,7 @@ wrapt = ">=1.11,<2.0" name = "async-timeout" version = "3.0.1" description = "Timeout context manager for asyncio programs" -category = "main" +category = "dev" optional = false python-versions = ">=3.5.3" @@ -143,7 +143,7 @@ python-versions = ">=3.5.3" name = "asyncio-pool" version = "0.5.2" description = "Pool of asyncio coroutines with familiar interface" -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -151,7 +151,7 @@ python-versions = ">=3.5" name = "atomicwrites" version = "1.4.0" description = "Atomic file writes." -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -159,7 +159,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" name = "attrs" version = "20.3.0" description = "Classes Without Boilerplate" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -173,7 +173,7 @@ tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (> name = "babel" version = "2.9.0" description = "Internationalization utilities" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -184,7 +184,7 @@ pytz = ">=2015.7" name = "black" version = "19.10b0" description = "The uncompromising code formatter." -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -231,7 +231,7 @@ python-versions = "*" name = "click" version = "7.1.2" description = "Composable command line interface toolkit" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -239,7 +239,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" name = "codecov" version = "2.1.11" description = "Hosted coverage reports for GitHub, Bitbucket and Gitlab" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -251,7 +251,7 @@ requests = ">=2.7.9" name = "colorama" version = "0.4.4" description = "Cross-platform colored terminal text." -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -259,7 +259,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" name = "contextvars" version = "2.4" description = "PEP 567 Backport" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -270,7 +270,7 @@ immutables = ">=0.9" name = "coverage" version = "4.5.4" description = "Code coverage measurement for Python" -category = "main" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4" @@ -297,7 +297,7 @@ test = ["pytest (>=6.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pret name = "dataclasses" version = "0.8" description = "A backport of the dataclasses module for Python 3.6" -category = "main" +category = "dev" optional = false python-versions = ">=3.6, <3.7" @@ -305,7 +305,7 @@ python-versions = ">=3.6, <3.7" name = "docutils" version = "0.16" description = "Docutils -- Python Documentation Utilities" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -313,7 +313,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" name = "execnet" version = "1.8.0" description = "execnet: rapid multi-Python deployment" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -335,7 +335,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" name = "idna-ssl" version = "1.1.0" description = "Patch ssl.match_hostname for Unicode(idna) domains support" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -346,7 +346,7 @@ idna = ">=2.0" name = "imagesize" version = "1.2.0" description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -354,7 +354,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" name = "immutables" version = "0.15" description = "Immutable Collections" -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -365,7 +365,7 @@ test = ["flake8 (>=3.8.4,<3.9.0)", "pycodestyle (>=2.6.0,<2.7.0)"] name = "importlib-metadata" version = "1.7.0" description = "Read metadata from Python packages" -category = "main" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" @@ -380,7 +380,7 @@ testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -388,7 +388,7 @@ python-versions = "*" name = "isort" version = "5.7.0" description = "A Python utility / library to sort Python imports." -category = "main" +category = "dev" optional = false python-versions = ">=3.6,<4.0" @@ -415,7 +415,7 @@ i18n = ["Babel (>=0.8)"] name = "jmespath" version = "0.10.0" description = "JSON Matching Expressions" -category = "main" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" @@ -423,7 +423,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" name = "jsondiff" version = "1.2.0" description = "Diff JSON and JSON-like structures in Python" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -431,7 +431,7 @@ python-versions = "*" name = "lazy-object-proxy" version = "1.4.3" description = "A fast and thorough lazy object proxy." -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -447,7 +447,7 @@ python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" name = "mccabe" version = "0.6.1" description = "McCabe checker, plugin for flake8" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -455,7 +455,7 @@ python-versions = "*" name = "mock" version = "4.0.3" description = "Rolling backport of unittest.mock for all Pythons" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -468,7 +468,7 @@ test = ["pytest (<5.4)", "pytest-cov"] name = "multidict" version = "5.1.0" description = "multidict implementation" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -487,7 +487,7 @@ pyparsing = ">=2.0.2" name = "pathspec" version = "0.8.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -495,7 +495,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" name = "perky" version = "0.2.3" description = "A simple, Pythonic file format. Same interface as the" -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -503,7 +503,7 @@ python-versions = ">=3.5" name = "pluggy" version = "0.13.1" description = "plugin and hook calling mechanisms for python" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -517,7 +517,7 @@ dev = ["pre-commit", "tox"] name = "py" version = "1.10.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -533,7 +533,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" name = "pydantic" version = "1.7.3" description = "Data validation and settings management using python 3.6 type hinting" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -549,7 +549,7 @@ typing_extensions = ["typing-extensions (>=3.7.2)"] name = "pygments" version = "2.8.0" description = "Pygments is a syntax highlighting package written in Python." -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -557,7 +557,7 @@ python-versions = ">=3.5" name = "pylint" version = "2.6.2" description = "python code static checker" -category = "main" +category = "dev" optional = false python-versions = ">=3.5.*" @@ -569,17 +569,21 @@ mccabe = ">=0.6,<0.7" toml = ">=0.7.1" [[package]] -name = "pynetbox" -version = "5.3.1" -description = "NetBox API client library" +name = "pynautobot" +version = "1.0.0" +description = "Nautbot API client library" category = "main" optional = false -python-versions = "*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.dependencies] -requests = ">=2.20.0,<3.0" +requests = ">=2.20.0,<3.0.0" six = ">=1.0.0,<2.0.0" +[package.source] +type = "file" +url = "hacking/packages/pynautobot-1.0.0.tar.gz" + [[package]] name = "pyparsing" version = "2.4.7" @@ -592,7 +596,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" name = "pytest" version = "6.2.2" description = "pytest: simple powerful testing with Python" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -614,7 +618,7 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm name = "pytest-forked" version = "1.3.0" description = "run tests in isolated forked subprocesses" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -626,7 +630,7 @@ pytest = ">=3.10" name = "pytest-mock" version = "3.5.1" description = "Thin-wrapper around the mock package for easier use with pytest" -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -640,7 +644,7 @@ dev = ["pre-commit", "tox", "pytest-asyncio"] name = "pytest-xdist" version = "2.2.1" description = "pytest xdist plugin for distributed testing and loop-on-failing modes" -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -657,7 +661,7 @@ testing = ["filelock"] name = "pytz" version = "2021.1" description = "World timezone definitions, modern and historical" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -673,7 +677,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" name = "regex" version = "2020.11.13" description = "Alternative regular expression module, to replace re." -category = "main" +category = "dev" optional = false python-versions = "*" @@ -699,7 +703,7 @@ socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] name = "rstcheck" version = "3.3.1" description = "Checks syntax of reStructuredText and code blocks nested within it" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -710,7 +714,7 @@ docutils = ">=0.7" name = "semantic-version" version = "2.8.5" description = "A library implementing the 'SemVer' scheme." -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -718,7 +722,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" name = "sh" version = "1.14.1" description = "Python subprocess replacement" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -734,7 +738,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" name = "snowballstemmer" version = "2.1.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "main" +category = "dev" optional = false python-versions = "*" @@ -742,7 +746,7 @@ python-versions = "*" name = "sphinx" version = "3.5.1" description = "Python documentation generator" -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -769,11 +773,25 @@ docs = ["sphinxcontrib-websupport"] lint = ["flake8 (>=3.5.0)", "isort", "mypy (>=0.800)", "docutils-stubs"] test = ["pytest", "pytest-cov", "html5lib", "cython", "typed-ast"] +[[package]] +name = "sphinx-rtd-theme" +version = "0.5.1" +description = "Read the Docs theme for Sphinx" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +sphinx = "*" + +[package.extras] +dev = ["transifex-client", "sphinxcontrib-httpdomain", "bump2version"] + [[package]] name = "sphinxcontrib-applehelp" version = "1.0.2" description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -785,7 +803,7 @@ test = ["pytest"] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -797,7 +815,7 @@ test = ["pytest"] name = "sphinxcontrib-htmlhelp" version = "1.0.3" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -809,7 +827,7 @@ test = ["pytest", "html5lib"] name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -820,7 +838,7 @@ test = ["pytest", "flake8", "mypy"] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -832,7 +850,7 @@ test = ["pytest"] name = "sphinxcontrib-serializinghtml" version = "1.1.4" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "main" +category = "dev" optional = false python-versions = ">=3.5" @@ -844,7 +862,7 @@ test = ["pytest"] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "main" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" @@ -852,7 +870,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" name = "twiggy" version = "0.5.0" description = "a Pythonic logger" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -863,7 +881,7 @@ six = "*" name = "typed-ast" version = "1.4.2" description = "a fork of Python 2 and 3 ast modules with type comment support" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -871,7 +889,7 @@ python-versions = "*" name = "typing-extensions" version = "3.7.4.3" description = "Backported and Experimental Type Hints for Python 3.5+" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -892,7 +910,7 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] name = "wrapt" version = "1.12.1" description = "Module for decorators, wrappers and monkey patching." -category = "main" +category = "dev" optional = false python-versions = "*" @@ -900,7 +918,7 @@ python-versions = "*" name = "yarl" version = "1.6.3" description = "Yet another URL library" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -913,7 +931,7 @@ typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} name = "zipp" version = "3.4.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -924,7 +942,7 @@ testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake [metadata] lock-version = "1.1" python-versions = "^3.6" -content-hash = "2de69ca1ebb0995baa66483ac475a383dc3342710c2f2acaf50f35c3cfcc9ed3" +content-hash = "e66d28d9239c82ce0bf4ae06b9c08dc31a98f1b0704708d924c4cabb5749a375" [metadata.files] aiocontextvars = [ @@ -979,7 +997,7 @@ alabaster = [ {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, ] ansible-base = [ - {file = "ansible-base-2.10.5.tar.gz", hash = "sha256:33ae323923b841f3d822f355380ce7c92610440362efeed67b4b39db41e555af"}, + {file = "ansible-base-2.10.6.tar.gz", hash = "sha256:c6b3bc3dc83ee510357cb7afc8c557c05ce38f6b40e9bc9dab13551b2944dfd4"}, ] antsibull = [ {file = "antsibull-0.25.0-py3-none-any.whl", hash = "sha256:2f75baa501b857b1b2a1310dd3ac442cebd94cab60ebc984454dac012a1137ff"}, @@ -1355,9 +1373,8 @@ pylint = [ {file = "pylint-2.6.2-py3-none-any.whl", hash = "sha256:e71c2e9614a4f06e36498f310027942b0f4f2fde20aebb01655b31edc63b9eaf"}, {file = "pylint-2.6.2.tar.gz", hash = "sha256:718b74786ea7ed07aa0c58bf572154d4679f960d26e9641cc1de204a30b87fc9"}, ] -pynetbox = [ - {file = "pynetbox-5.3.1-py3-none-any.whl", hash = "sha256:b5326f3483b873ba1cb230e36ef5a7cd732b6f5428a0005b2978f3b2c40105db"}, - {file = "pynetbox-5.3.1.tar.gz", hash = "sha256:80743328f51f28827825fb2c9cb1993175da37c88988f02075f6f50e16333e0c"}, +pynautobot = [ + {file = "pynautobot-1.0.0.tar.gz", hash = "sha256:8a9443214c2d1f64c5b0519afe99127471ca4895ec8be6cebc81d7de277aeacb"}, ] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, @@ -1476,6 +1493,10 @@ sphinx = [ {file = "Sphinx-3.5.1-py3-none-any.whl", hash = "sha256:e90161222e4d80ce5fc811ace7c6787a226b4f5951545f7f42acf97277bfc35c"}, {file = "Sphinx-3.5.1.tar.gz", hash = "sha256:11d521e787d9372c289472513d807277caafb1684b33eb4f08f7574c405893a9"}, ] +sphinx-rtd-theme = [ + {file = "sphinx_rtd_theme-0.5.1-py2.py3-none-any.whl", hash = "sha256:fa6bebd5ab9a73da8e102509a86f3fcc36dec04a0b52ea80e5a033b2aba00113"}, + {file = "sphinx_rtd_theme-0.5.1.tar.gz", hash = "sha256:eda689eda0c7301a80cf122dad28b1861e5605cbf455558f3775e1e8200e83a5"}, +] sphinxcontrib-applehelp = [ {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, diff --git a/pyproject.toml b/pyproject.toml index 2c33816a..a0aa3a99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,9 @@ license = "Apache 2.0" [tool.poetry.dependencies] python = "^3.6" ansible-base = "^2.10.0" +pynautobot = {path = "hacking/packages/pynautobot-1.0.0.tar.gz"} + +[tool.poetry.dev-dependencies] black = "19.10b0" codecov = "*" coverage = "^4.0" @@ -15,7 +18,6 @@ cryptography = "*" jinja2 = "*" jmespath = "*" jsondiff = "*" -pynetbox = "*" pytest = "*" pytest-mock = "*" pytest-xdist = "*" @@ -24,8 +26,7 @@ mock = "^4.0.2" antsibull = "^0.25.0" importlib-metadata = "1.7.0" pylint = "^2.6.0" - -[tool.poetry.dev-dependencies] +sphinx_rtd_theme = "*" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/tests/integration/netbox-deploy.py b/tests/integration/nautobot-populate.py similarity index 77% rename from tests/integration/netbox-deploy.py rename to tests/integration/nautobot-populate.py index 3e6851d5..187556c3 100755 --- a/tests/integration/netbox-deploy.py +++ b/tests/integration/nautobot-populate.py @@ -6,32 +6,32 @@ import os import sys -import pynetbox +import pynautobot from packaging import version -# NOTE: If anything depends on specific versions of NetBox, can check INTEGRATION_TESTS in env +# NOTE: If anything depends on specific versions of Nautobot, can check INTEGRATION_TESTS in env # os.environ["INTEGRATION_TESTS"] -# Set nb variable to connect to Netbox and use the veriable in future calls -nb_host = os.getenv("NETBOX_HOST", "http://localhost:32768") -nb_token = os.getenv("NETBOX_TOKEN", "0123456789abcdef0123456789abcdef01234567") -nb = pynetbox.api(nb_host, nb_token) +# Set nb variable to connect to Nautobot and use the veriable in future calls +nb_host = os.getenv("PYNAUTOBOT_HOST", "http://localhost:32768") +nb_token = os.getenv("PYNAUTOBOT_TOKEN", "0123456789abcdef0123456789abcdef01234567") +nb = pynautobot.api(nb_host, nb_token) nb_version = version.parse(nb.version) ERRORS = False -def make_netbox_calls(endpoint, payload): +def make_nautobot_calls(endpoint, payload): """Make the necessary calls to create endpoints, and pass any errors. Args: - endpoint (obj): pynetbox endpoint object. + endpoint (obj): pynautobot endpoint object. payload (list): List of endpoint objects. """ try: created = endpoint.create(payload) - except pynetbox.RequestError as e: + except pynautobot.RequestError as e: print(e.error) ERRORS = True return @@ -41,7 +41,7 @@ def make_netbox_calls(endpoint, payload): # Create tags used in future tests if nb_version >= version.parse("2.9"): - create_tags = make_netbox_calls( + create_tags = make_nautobot_calls( nb.extras.tags, [ {"name": "First", "slug": "first"}, @@ -61,14 +61,14 @@ def make_netbox_calls(endpoint, payload): ## Create TENANTS tenants = [{"name": "Test Tenant", "slug": "test-tenant"}] -created_tenants = make_netbox_calls(nb.tenancy.tenants, tenants) +created_tenants = make_nautobot_calls(nb.tenancy.tenants, tenants) ### Test Tenant to be used later on test_tenant = nb.tenancy.tenants.get(slug="test-tenant") ## Create TENANT GROUPS tenant_groups = [{"name": "Test Tenant Group", "slug": "test-tenant-group"}] -created_tenant_groups = make_netbox_calls(nb.tenancy.tenant_groups, tenant_groups) +created_tenant_groups = make_nautobot_calls(nb.tenancy.tenant_groups, tenant_groups) ## Create Regions @@ -77,7 +77,7 @@ def make_netbox_calls(endpoint, payload): {"name": "Parent Region", "slug": "parent-region"}, {"name": "Other Region", "slug": "other-region"}, ] -created_regions = make_netbox_calls(nb.dcim.regions, regions) +created_regions = make_nautobot_calls(nb.dcim.regions, regions) ### Region variables to be used later on parent_region = nb.dcim.regions.get(slug="parent-region") test_region = nb.dcim.regions.get(slug="test-region") @@ -97,7 +97,7 @@ def make_netbox_calls(endpoint, payload): }, {"name": "Test Site2", "slug": "test-site2"}, ] -created_sites = make_netbox_calls(nb.dcim.sites, sites) +created_sites = make_nautobot_calls(nb.dcim.sites, sites) ### Site variables to be used later on test_site = nb.dcim.sites.get(slug="test-site") test_site2 = nb.dcim.sites.get(slug="test-site2") @@ -105,7 +105,7 @@ def make_netbox_calls(endpoint, payload): ## Create VRFs vrfs = [{"name": "Test VRF", "rd": "1:1"}] -created_vrfs = make_netbox_calls(nb.ipam.vrfs, vrfs) +created_vrfs = make_nautobot_calls(nb.ipam.vrfs, vrfs) ## Create PREFIXES @@ -113,7 +113,7 @@ def make_netbox_calls(endpoint, payload): {"prefix": "192.168.100.0/24", "site": test_site2.id}, {"prefix": "10.10.0.0/16"}, ] -created_prefixes = make_netbox_calls(nb.ipam.prefixes, prefixes) +created_prefixes = make_nautobot_calls(nb.ipam.prefixes, prefixes) ## Create VLAN GROUPS @@ -131,7 +131,7 @@ def make_netbox_calls(endpoint, payload): "tenant": test_tenant.id, }, ] -created_vlan_groups = make_netbox_calls(nb.ipam.vlan_groups, vlan_groups) +created_vlan_groups = make_nautobot_calls(nb.ipam.vlan_groups, vlan_groups) ## VLAN Group variables to be used later on test_vlan_group = nb.ipam.vlan_groups.get(slug="test-vlan-group") @@ -149,12 +149,12 @@ def make_netbox_calls(endpoint, payload): "group": test_vlan_group.id, }, ] -created_vlans = make_netbox_calls(nb.ipam.vlans, vlans) +created_vlans = make_nautobot_calls(nb.ipam.vlans, vlans) ## Create IPAM Roles ipam_roles = [{"name": "Network of care", "slug": "network-of-care"}] -create_ipam_roles = make_netbox_calls(nb.ipam.roles, ipam_roles) +create_ipam_roles = make_nautobot_calls(nb.ipam.roles, ipam_roles) ## Create Manufacturers @@ -163,7 +163,7 @@ def make_netbox_calls(endpoint, payload): {"name": "Arista", "slug": "arista"}, {"name": "Test Manufactuer", "slug": "test-manufacturer"}, ] -created_manufacturers = make_netbox_calls(nb.dcim.manufacturers, manufacturers) +created_manufacturers = make_nautobot_calls(nb.dcim.manufacturers, manufacturers) ### Manufacturer variables to be used later on cisco_manu = nb.dcim.manufacturers.get(slug="cisco") arista_manu = nb.dcim.manufacturers.get(slug="arista") @@ -189,17 +189,8 @@ def make_netbox_calls(endpoint, payload): }, {"model": "1841", "slug": "1841", "manufacturer": cisco_manu.id,}, ] -if nb_version > version.parse("2.8"): - temp_dt = [] - for dt_type in device_types: - if dt_type.get("subdevice_role") is not None and not dt_type["subdevice_role"]: - dt_type["subdevice_role"] = "child" - if dt_type.get("subdevice_role"): - dt_type["subdevice_role"] = "parent" - temp_dt.append(dt_type) - device_types = temp_dt - -created_device_types = make_netbox_calls(nb.dcim.device_types, device_types) + +created_device_types = make_nautobot_calls(nb.dcim.device_types, device_types) ### Device type variables to be used later on cisco_test = nb.dcim.device_types.get(slug="cisco-test") arista_test = nb.dcim.device_types.get(slug="arista-test") @@ -222,7 +213,7 @@ def make_netbox_calls(endpoint, payload): "vm_role": True, }, ] -created_device_roles = make_netbox_calls(nb.dcim.device_roles, device_roles) +created_device_roles = make_nautobot_calls(nb.dcim.device_roles, device_roles) ### Device role variables to be used later on core_switch = nb.dcim.device_roles.get(slug="core-switch") @@ -232,7 +223,7 @@ def make_netbox_calls(endpoint, payload): {"name": "Test Rack Group", "slug": "test-rack-group", "site": test_site.id}, {"name": "Parent Rack Group", "slug": "parent-rack-group", "site": test_site.id}, ] -created_rack_groups = make_netbox_calls(nb.dcim.rack_groups, rack_groups) +created_rack_groups = make_nautobot_calls(nb.dcim.rack_groups, rack_groups) ### Create Rack Group Parent relationship created_rack_groups[0].parent = created_rack_groups[1] @@ -240,7 +231,7 @@ def make_netbox_calls(endpoint, payload): ## Create Rack Roles rack_roles = [{"name": "Test Rack Role", "slug": "test-rack-role", "color": "4287f5"}] -created_rack_roles = make_netbox_calls(nb.dcim.rack_roles, rack_roles) +created_rack_roles = make_nautobot_calls(nb.dcim.rack_roles, rack_roles) ## Create Racks racks = [ @@ -251,7 +242,7 @@ def make_netbox_calls(endpoint, payload): }, {"name": "Test Rack", "site": test_site.id, "group": created_rack_groups[0].id}, ] -created_racks = make_netbox_calls(nb.dcim.racks, racks) +created_racks = make_nautobot_calls(nb.dcim.racks, racks) test_rack = nb.dcim.racks.get(name="Test Rack") # racks don't have slugs test_rack_site2 = nb.dcim.racks.get(name="Test Rack Site 2") @@ -292,12 +283,12 @@ def make_netbox_calls(endpoint, payload): "site": test_site.id, }, ] -created_devices = make_netbox_calls(nb.dcim.devices, devices) +created_devices = make_nautobot_calls(nb.dcim.devices, devices) ### Device variables to be used later on test100 = nb.dcim.devices.get(name="test100") # Create VC, assign member, create initial interface -created_vcs = make_netbox_calls(nb.dcim.virtual_chassis, {"name": "VC1", "master": 4}) +created_vcs = make_nautobot_calls(nb.dcim.virtual_chassis, {"name": "VC1", "master": 4}) nexus_child = nb.dcim.devices.get(5) nexus_child.update({"virtual_chassis": 1, "vc_position": 2}) nexus = nb.dcim.devices.get(4) @@ -306,14 +297,14 @@ def make_netbox_calls(endpoint, payload): {"device": nexus.id, "name": "Ethernet1/1", "type": "1000base-t"}, {"device": nexus_child.id, "name": "Ethernet2/1", "type": "1000base-t"}, ] -created_nexus_interfaces = make_netbox_calls(nb.dcim.interfaces, nexus_interfaces) +created_nexus_interfaces = make_nautobot_calls(nb.dcim.interfaces, nexus_interfaces) ## Create Interfaces dev_interfaces = [ {"name": "GigabitEthernet1", "device": test100.id, "type": "1000base-t"}, {"name": "GigabitEthernet2", "device": test100.id, "type": "1000base-t"}, ] -created_interfaces = make_netbox_calls(nb.dcim.interfaces, dev_interfaces) +created_interfaces = make_nautobot_calls(nb.dcim.interfaces, dev_interfaces) ## Interface variables to be used later on test100_gi1 = nb.dcim.interfaces.get(name="GigabitEthernet1", device_id=1) test100_gi2 = nb.dcim.interfaces.get(name="GigabitEthernet2", device_id=1) @@ -331,33 +322,26 @@ def make_netbox_calls(endpoint, payload): }, {"address": "172.16.180.254/24"}, ] -if nb_version > version.parse("2.8"): - temp_ips = [] - for ip in ip_addresses: - if ip.get("interface"): - ip["assigned_object_id"] = ip.pop("interface") - ip["assigned_object_type"] = "dcim.interface" - temp_ips.append(ip) -created_ip_addresses = make_netbox_calls(nb.ipam.ip_addresses, ip_addresses) +created_ip_addresses = make_nautobot_calls(nb.ipam.ip_addresses, ip_addresses) # Assign Primary IP nexus.update({"primary_ip4": 4}) ## Create RIRs rirs = [{"name": "Example RIR", "slug": "example-rir"}] -created_rirs = make_netbox_calls(nb.ipam.rirs, rirs) +created_rirs = make_nautobot_calls(nb.ipam.rirs, rirs) ## Create Cluster Group cluster_groups = [{"name": "Test Cluster Group", "slug": "test-cluster-group"}] -created_cluster_groups = make_netbox_calls( +created_cluster_groups = make_nautobot_calls( nb.virtualization.cluster_groups, cluster_groups ) test_cluster_group = nb.virtualization.cluster_groups.get(slug="test-cluster-group") ## Create Cluster Type cluster_types = [{"name": "Test Cluster Type", "slug": "test-cluster-type"}] -created_cluster_types = make_netbox_calls( +created_cluster_types = make_nautobot_calls( nb.virtualization.cluster_types, cluster_types ) test_cluster_type = nb.virtualization.cluster_types.get(slug="test-cluster-type") @@ -372,7 +356,7 @@ def make_netbox_calls(endpoint, payload): }, {"name": "Test Cluster 2", "type": test_cluster_type.id,}, ] -created_clusters = make_netbox_calls(nb.virtualization.clusters, clusters) +created_clusters = make_nautobot_calls(nb.virtualization.clusters, clusters) test_cluster = nb.virtualization.clusters.get(name="Test Cluster") test_cluster2 = nb.virtualization.clusters.get(name="Test Cluster 2") @@ -385,7 +369,7 @@ def make_netbox_calls(endpoint, payload): {"name": "test104-vm", "cluster": test_cluster2.id}, {"name": "Test VM With Spaces", "cluster": test_cluster2.id}, ] -created_virtual_machines = make_netbox_calls( +created_virtual_machines = make_nautobot_calls( nb.virtualization.virtual_machines, virtual_machines ) test100_vm = nb.virtualization.virtual_machines.get(name="test100-vm") @@ -410,7 +394,7 @@ def make_netbox_calls(endpoint, payload): {"name": "Eth0", "virtual_machine": test_spaces_vm.id}, {"name": "Eth1", "virtual_machine": test_spaces_vm.id}, ] -created_virtual_machines_intfs = make_netbox_calls( +created_virtual_machines_intfs = make_nautobot_calls( nb.virtualization.interfaces, virtual_machines_intfs ) @@ -421,7 +405,7 @@ def make_netbox_calls(endpoint, payload): { "device": test100.id, "name": "http", - "port": 80, + "ports": 80, "protocol": "tcp", "ipaddresses": [created_ip_addresses[0].id, created_ip_addresses[1].id], }, @@ -429,27 +413,22 @@ def make_netbox_calls(endpoint, payload): { "virtual_machine": test_spaces_vm.id, "name": "ssh", - "port": 22, + "ports": 22, "protocol": "tcp", }, ] -# 2.10+ requires the port attribute to be 'ports' and a list instead of an integer -for service in services: - if nb_version >= version.parse("2.10"): - service["ports"] = [service["port"]] - del service["port"] -created_services = make_netbox_calls(nb.ipam.services, services) +created_services = make_nautobot_calls(nb.ipam.services, services) ## Create Circuit Provider providers = [{"name": "Test Provider", "slug": "test-provider"}] -created_providers = make_netbox_calls(nb.circuits.providers, providers) +created_providers = make_nautobot_calls(nb.circuits.providers, providers) test_provider = nb.circuits.providers.get(slug="test-provider") ## Create Circuit Type circuit_types = [{"name": "Test Circuit Type", "slug": "test-circuit-type"}] -created_circuit_types = make_netbox_calls(nb.circuits.circuit_types, circuit_types) +created_circuit_types = make_nautobot_calls(nb.circuits.circuit_types, circuit_types) test_circuit_type = nb.circuits.circuit_types.get(slug="test-circuit-type") ## Create Circuit @@ -461,7 +440,7 @@ def make_netbox_calls(endpoint, payload): "type": test_circuit_type.id, }, ] -created_circuits = make_netbox_calls(nb.circuits.circuits, circuits) +created_circuits = make_nautobot_calls(nb.circuits.circuits, circuits) test_circuit_two = nb.circuits.circuits.get(cid="Test Circuit Two") ## Create Circuit Termination @@ -473,7 +452,7 @@ def make_netbox_calls(endpoint, payload): "site": test_site.id, } ] -created_circuit_terms = make_netbox_calls( +created_circuit_terms = make_nautobot_calls( nb.circuits.circuit_terminations, circuit_terms ) @@ -482,7 +461,7 @@ def make_netbox_calls(endpoint, payload): {"name": "5000:5000"}, {"name": "6000:6000"}, ] -created_route_targets = make_netbox_calls(nb.ipam.route_targets, route_targets) +created_route_targets = make_nautobot_calls(nb.ipam.route_targets, route_targets) if ERRORS: sys.exit( diff --git a/tests/integration/targets/inventory-latest/compare_inventory_json.py b/tests/integration/targets/inventory-latest/compare_inventory_json.py index 15be28b2..e0703c65 100755 --- a/tests/integration/targets/inventory-latest/compare_inventory_json.py +++ b/tests/integration/targets/inventory-latest/compare_inventory_json.py @@ -14,32 +14,19 @@ from typing import Iterable from operator import itemgetter -# Netbox includes "created" and "last_updated" times on objects. These end up in the interfaces objects that are included verbatim from the Netbox API. +# Nautobot includes "created" and "last_updated" times on objects. These end up in the interfaces objects that are included verbatim from the Nautobot 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 - ] -) - -def all_keys_to_ignore(netbox_version): +def all_keys_to_ignore(nautobot_version): keys = KEYS_REMOVE.union(KEYS_IGNORE) - if netbox_version == "v2.7": - return keys.union(KEYS_IGNORE_27) - else: - return keys + return keys # Assume the object will not be recursive, as it originally came from JSON @@ -117,11 +104,11 @@ def main(): ), ) parser.add_argument( - "--netbox-version", + "--nautobot-version", metavar="VERSION", type=str, help=( - "Apply comparison specific to NetBox version. " + "Apply comparison specific to Nautobot version. " "For example, rack_groups arrays will only contain a single item in v2.7, so are ignored in the comparison." ), ) @@ -141,7 +128,7 @@ def main(): 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 = all_keys_to_ignore(args.netbox_version) + keys = all_keys_to_ignore(args.nautobot_version) remove_keys(data_a, keys) remove_keys(data_b, keys) diff --git a/tests/integration/targets/inventory-latest/files/test-inventory-options-flatten.yml b/tests/integration/targets/inventory-latest/files/test-inventory-options-flatten.yml index a63d73ac..d559e737 100644 --- a/tests/integration/targets/inventory-latest/files/test-inventory-options-flatten.yml +++ b/tests/integration/targets/inventory-latest/files/test-inventory-options-flatten.yml @@ -7,7 +7,7 @@ validate_certs: False cache: True cache_timeout: 3600 cache_plugin: jsonfile -cache_connection: /tmp/inventory_netbox +cache_connection: /tmp/inventory_nautobot config_context: True flatten_config_context: True diff --git a/tests/integration/targets/inventory-latest/files/test-inventory-options.yml b/tests/integration/targets/inventory-latest/files/test-inventory-options.yml index a03090f2..61d4b57e 100644 --- a/tests/integration/targets/inventory-latest/files/test-inventory-options.yml +++ b/tests/integration/targets/inventory-latest/files/test-inventory-options.yml @@ -8,7 +8,7 @@ validate_certs: False cache: True cache_timeout: 3600 cache_plugin: jsonfile -cache_connection: /tmp/inventory_netbox +cache_connection: /tmp/inventory_nautobot config_context: False plurals: False diff --git a/tests/integration/targets/inventory-latest/files/test-inventory-plurals.yml b/tests/integration/targets/inventory-latest/files/test-inventory-plurals.yml index 5184147e..63b6ba66 100644 --- a/tests/integration/targets/inventory-latest/files/test-inventory-plurals.yml +++ b/tests/integration/targets/inventory-latest/files/test-inventory-plurals.yml @@ -6,7 +6,7 @@ validate_certs: false cache: True cache_timeout: 3600 cache_plugin: jsonfile -cache_connection: /tmp/inventory_netbox +cache_connection: /tmp/inventory_nautobot config_context: True plurals: True diff --git a/tests/integration/targets/inventory-latest/runme.sh b/tests/integration/targets/inventory-latest/runme.sh index 0850539f..ad146d6f 100755 --- a/tests/integration/targets/inventory-latest/runme.sh +++ b/tests/integration/targets/inventory-latest/runme.sh @@ -18,12 +18,6 @@ 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:-}" == "v2.7" ]] -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:-}" ]] diff --git a/tests/integration/targets/inventory-latest/runme_config.template b/tests/integration/targets/inventory-latest/runme_config.template index 80b42a32..7865d774 100644 --- a/tests/integration/targets/inventory-latest/runme_config.template +++ b/tests/integration/targets/inventory-latest/runme_config.template @@ -1,6 +1,6 @@ -# runme_config is source'd by runme.sh to set environment variables used to modify the test against different versions of NetBox. +# runme_config is source'd by runme.sh to set environment variables used to modify the test against different versions of Nautobot. # .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} +export PYNAUTOBOT_VERSION=${VERSION} diff --git a/tests/integration/targets/inventory-v2.9/compare_inventory_json.py b/tests/integration/targets/inventory-v2.9/compare_inventory_json.py index 15be28b2..e0703c65 100755 --- a/tests/integration/targets/inventory-v2.9/compare_inventory_json.py +++ b/tests/integration/targets/inventory-v2.9/compare_inventory_json.py @@ -14,32 +14,19 @@ from typing import Iterable from operator import itemgetter -# Netbox includes "created" and "last_updated" times on objects. These end up in the interfaces objects that are included verbatim from the Netbox API. +# Nautobot includes "created" and "last_updated" times on objects. These end up in the interfaces objects that are included verbatim from the Nautobot 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 - ] -) - -def all_keys_to_ignore(netbox_version): +def all_keys_to_ignore(nautobot_version): keys = KEYS_REMOVE.union(KEYS_IGNORE) - if netbox_version == "v2.7": - return keys.union(KEYS_IGNORE_27) - else: - return keys + return keys # Assume the object will not be recursive, as it originally came from JSON @@ -117,11 +104,11 @@ def main(): ), ) parser.add_argument( - "--netbox-version", + "--nautobot-version", metavar="VERSION", type=str, help=( - "Apply comparison specific to NetBox version. " + "Apply comparison specific to Nautobot version. " "For example, rack_groups arrays will only contain a single item in v2.7, so are ignored in the comparison." ), ) @@ -141,7 +128,7 @@ def main(): 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 = all_keys_to_ignore(args.netbox_version) + keys = all_keys_to_ignore(args.nautobot_version) remove_keys(data_a, keys) remove_keys(data_b, keys) diff --git a/tests/integration/targets/inventory-v2.9/files/test-inventory-options-flatten.yml b/tests/integration/targets/inventory-v2.9/files/test-inventory-options-flatten.yml index 795f0aa4..08d35c09 100644 --- a/tests/integration/targets/inventory-v2.9/files/test-inventory-options-flatten.yml +++ b/tests/integration/targets/inventory-v2.9/files/test-inventory-options-flatten.yml @@ -7,7 +7,7 @@ validate_certs: False cache: True cache_timeout: 3600 cache_plugin: jsonfile -cache_connection: /tmp/inventory_netbox +cache_connection: /tmp/inventory_nautobot config_context: True diff --git a/tests/integration/targets/inventory-v2.9/files/test-inventory-options.yml b/tests/integration/targets/inventory-v2.9/files/test-inventory-options.yml index 5301bf46..7bbb9f6b 100644 --- a/tests/integration/targets/inventory-v2.9/files/test-inventory-options.yml +++ b/tests/integration/targets/inventory-v2.9/files/test-inventory-options.yml @@ -8,7 +8,7 @@ validate_certs: False cache: True cache_timeout: 3600 cache_plugin: jsonfile -cache_connection: /tmp/inventory_netbox +cache_connection: /tmp/inventory_nautobot config_context: False plurals: False diff --git a/tests/integration/targets/inventory-v2.9/files/test-inventory-plurals.yml b/tests/integration/targets/inventory-v2.9/files/test-inventory-plurals.yml index bb4039d7..2bf6ed64 100644 --- a/tests/integration/targets/inventory-v2.9/files/test-inventory-plurals.yml +++ b/tests/integration/targets/inventory-v2.9/files/test-inventory-plurals.yml @@ -6,7 +6,7 @@ validate_certs: false cache: True cache_timeout: 3600 cache_plugin: jsonfile -cache_connection: /tmp/inventory_netbox +cache_connection: /tmp/inventory_nautobot config_context: True plurals: True diff --git a/tests/integration/targets/inventory-v2.9/runme.sh b/tests/integration/targets/inventory-v2.9/runme.sh index 0850539f..ad146d6f 100755 --- a/tests/integration/targets/inventory-v2.9/runme.sh +++ b/tests/integration/targets/inventory-v2.9/runme.sh @@ -18,12 +18,6 @@ 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:-}" == "v2.7" ]] -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:-}" ]] diff --git a/tests/integration/targets/inventory-v2.9/runme_config.template b/tests/integration/targets/inventory-v2.9/runme_config.template index 80b42a32..7865d774 100644 --- a/tests/integration/targets/inventory-v2.9/runme_config.template +++ b/tests/integration/targets/inventory-v2.9/runme_config.template @@ -1,6 +1,6 @@ -# runme_config is source'd by runme.sh to set environment variables used to modify the test against different versions of NetBox. +# runme_config is source'd by runme.sh to set environment variables used to modify the test against different versions of Nautobot. # .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} +export PYNAUTOBOT_VERSION=${VERSION} diff --git a/tests/integration/targets/latest/tasks/aggregate.yml b/tests/integration/targets/latest/tasks/aggregate.yml index ae0c332e..b577a2ce 100644 --- a/tests/integration/targets/latest/tasks/aggregate.yml +++ b/tests/integration/targets/latest/tasks/aggregate.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_AGGEGATE +### PYNAUTOBOT_AGGEGATE ## ## - name: "AGGREGATE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/cable.yml b/tests/integration/targets/latest/tasks/cable.yml index c359e8ed..823c5a00 100644 --- a/tests/integration/targets/latest/tasks/cable.yml +++ b/tests/integration/targets/latest/tasks/cable.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_CABLE +### PYNAUTOBOT_CABLE ## ## - name: "CABLE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/circuit.yml b/tests/integration/targets/latest/tasks/circuit.yml index ef1fbb78..46d3d316 100644 --- a/tests/integration/targets/latest/tasks/circuit.yml +++ b/tests/integration/targets/latest/tasks/circuit.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_CIRCUIT +### PYNAUTOBOT_CIRCUIT ## ## -- name: "NETBOX_CIRCUIT 1: Create provider within Netbox with only required information" +- name: "PYNAUTOBOT_CIRCUIT 1: Create provider within Nautobot with only required information" networktocode.nautobot.circuit: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -15,7 +15,7 @@ state: present register: test_one -- name: "NETBOX_CIRCUIT 1: ASSERT - Necessary info creation" +- name: "PYNAUTOBOT_CIRCUIT 1: ASSERT - Necessary info creation" assert: that: - test_one is changed @@ -26,7 +26,7 @@ - test_one['circuit']['type'] == 1 - test_one['msg'] == "circuit Test Circuit One created" -- name: "NETBOX_CIRCUIT 2: Duplicate" +- name: "PYNAUTOBOT_CIRCUIT 2: Duplicate" networktocode.nautobot.circuit: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -37,7 +37,7 @@ state: present register: test_two -- name: "NETBOX_CIRCUIT 2: ASSERT - Create duplicate" +- name: "PYNAUTOBOT_CIRCUIT 2: ASSERT - Create duplicate" assert: that: - not test_two['changed'] @@ -46,7 +46,7 @@ - test_two['circuit']['type'] == 1 - test_two['msg'] == "circuit Test Circuit One already exists" -- name: "NETBOX_CIRCUIT 3: Update provider with other fields" +- name: "PYNAUTOBOT_CIRCUIT 3: Update provider with other fields" networktocode.nautobot.circuit: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -63,7 +63,7 @@ state: present register: test_three -- name: "NETBOX_CIRCUIT 3: ASSERT - Updated" +- name: "PYNAUTOBOT_CIRCUIT 3: ASSERT - Updated" assert: that: - test_three is changed @@ -84,7 +84,7 @@ - test_three['circuit']['comments'] == "FAST CIRCUIT" - test_three['msg'] == "circuit Test Circuit One updated" -- name: "NETBOX_CIRCUIT 4: Delete provider within netbox" +- name: "PYNAUTOBOT_CIRCUIT 4: Delete provider within nautobot" networktocode.nautobot.circuit: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -93,7 +93,7 @@ state: absent register: test_four -- name: "NETBOX_CIRCUIT 4 : ASSERT - Delete" +- name: "PYNAUTOBOT_CIRCUIT 4 : ASSERT - Delete" assert: that: - test_four is changed diff --git a/tests/integration/targets/latest/tasks/circuit_termination.yml b/tests/integration/targets/latest/tasks/circuit_termination.yml index 68740242..3a270f61 100644 --- a/tests/integration/targets/latest/tasks/circuit_termination.yml +++ b/tests/integration/targets/latest/tasks/circuit_termination.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_CIRCUIT_TERMINATION +### PYNAUTOBOT_CIRCUIT_TERMINATION ## ## -- name: "NETBOX_CIRCUIT_TERMINATION 1: Create provider within Netbox with only required information" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 1: Create provider within Nautobot with only required information" networktocode.nautobot.circuit_termination: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -16,7 +16,7 @@ state: present register: test_one -- name: "NETBOX_CIRCUIT_TERMINATION 1: ASSERT - Necessary info creation" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 1: ASSERT - Necessary info creation" assert: that: - test_one is changed @@ -28,7 +28,7 @@ - test_one['circuit_termination']['port_speed'] == 10000 - test_one['msg'] == "circuit_termination test_circuit_a created" -- name: "NETBOX_CIRCUIT_TERMINATION 2: Duplicate" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 2: Duplicate" networktocode.nautobot.circuit_termination: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -38,7 +38,7 @@ state: present register: test_two -- name: "NETBOX_CIRCUIT_TERMINATION 2: ASSERT - Create duplicate" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 2: ASSERT - Create duplicate" assert: that: - not test_two['changed'] @@ -48,7 +48,7 @@ - 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" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 3: Update provider with other fields" networktocode.nautobot.circuit_termination: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -62,7 +62,7 @@ state: present register: test_three -- name: "NETBOX_CIRCUIT_TERMINATION 3: ASSERT - Updated" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 3: ASSERT - Updated" assert: that: - test_three is changed @@ -80,7 +80,7 @@ - test_three['circuit_termination']['description'] == "Test description" - test_three['msg'] == "circuit_termination test_circuit_a updated" -- name: "NETBOX_CIRCUIT_TERMINATION 4: Create Z Side" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 4: Create Z Side" networktocode.nautobot.circuit_termination: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -92,7 +92,7 @@ state: present register: test_four -- name: "NETBOX_CIRCUIT_TERMINATION 4: ASSERT - Create Z Side" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 4: ASSERT - Create Z Side" assert: that: - test_four is changed @@ -104,7 +104,7 @@ - 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" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 5: Delete provider within nautobot" networktocode.nautobot.circuit_termination: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -114,7 +114,7 @@ state: absent register: test_five -- name: "NETBOX_CIRCUIT_TERMINATION 5: ASSERT - Delete" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 5: ASSERT - Delete" assert: that: - test_five is changed diff --git a/tests/integration/targets/latest/tasks/circuit_type.yml b/tests/integration/targets/latest/tasks/circuit_type.yml index fecb90ec..a3e861e1 100644 --- a/tests/integration/targets/latest/tasks/circuit_type.yml +++ b/tests/integration/targets/latest/tasks/circuit_type.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_CIRCUIT_TYPE +### PYNAUTOBOT_CIRCUIT_TYPE ## ## - name: "CIRCUIT_TYPE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/cluster.yml b/tests/integration/targets/latest/tasks/cluster.yml index 58b0cfeb..e3b661ca 100644 --- a/tests/integration/targets/latest/tasks/cluster.yml +++ b/tests/integration/targets/latest/tasks/cluster.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_CLUSTER +### PYNAUTOBOT_CLUSTER ## ## - name: "CLUSTER 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/cluster_group.yml b/tests/integration/targets/latest/tasks/cluster_group.yml index ed974440..1ce28771 100644 --- a/tests/integration/targets/latest/tasks/cluster_group.yml +++ b/tests/integration/targets/latest/tasks/cluster_group.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_CLUSTER_GROUP +### PYNAUTOBOT_CLUSTER_GROUP ## ## - name: "CLUSTER_GROUP 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/cluster_type.yml b/tests/integration/targets/latest/tasks/cluster_type.yml index 93ac8539..1f4e01fb 100644 --- a/tests/integration/targets/latest/tasks/cluster_type.yml +++ b/tests/integration/targets/latest/tasks/cluster_type.yml @@ -1,6 +1,6 @@ ## ## -### NETBOX_CLUSTER_TYPE +### PYNAUTOBOT_CLUSTER_TYPE ## ## - name: "CLUSTER_TYPE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/console_port.yml b/tests/integration/targets/latest/tasks/console_port.yml index a70d3061..1939ee63 100644 --- a/tests/integration/targets/latest/tasks/console_port.yml +++ b/tests/integration/targets/latest/tasks/console_port.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_CONSOLE_PORT +### PYNAUTOBOT_CONSOLE_PORT ## ## - name: "CONSOLE_PORT 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/console_port_template.yml b/tests/integration/targets/latest/tasks/console_port_template.yml index 48db96f0..49ead67e 100644 --- a/tests/integration/targets/latest/tasks/console_port_template.yml +++ b/tests/integration/targets/latest/tasks/console_port_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_CONSOLE_PORT_TEMPLATE +### PYNAUTOBOT_CONSOLE_PORT_TEMPLATE ## ## - name: "CONSOLE_PORT_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/console_server_port.yml b/tests/integration/targets/latest/tasks/console_server_port.yml index 25a3fa43..98c11690 100644 --- a/tests/integration/targets/latest/tasks/console_server_port.yml +++ b/tests/integration/targets/latest/tasks/console_server_port.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_CONSOLE_SERVER_PORT +### PYNAUTOBOT_CONSOLE_SERVER_PORT ## ## - name: "CONSOLE_SERVER_PORT 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/console_server_port_template.yml b/tests/integration/targets/latest/tasks/console_server_port_template.yml index 613da5dc..9420cb3d 100644 --- a/tests/integration/targets/latest/tasks/console_server_port_template.yml +++ b/tests/integration/targets/latest/tasks/console_server_port_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_CONSOLE_SERVER_PORT_TEMPLATE +### PYNAUTOBOT_CONSOLE_SERVER_PORT_TEMPLATE ## ## - name: "CONSOLE_SERVER_PORT_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/device.yml b/tests/integration/targets/latest/tasks/device.yml index 6e79e6c0..f5bf2258 100644 --- a/tests/integration/targets/latest/tasks/device.yml +++ b/tests/integration/targets/latest/tasks/device.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE +### PYNAUTOBOT_DEVICE ## ## - name: "1 - Device with required information" diff --git a/tests/integration/targets/latest/tasks/device_bay.yml b/tests/integration/targets/latest/tasks/device_bay.yml index 3993e295..9e11ad9d 100644 --- a/tests/integration/targets/latest/tasks/device_bay.yml +++ b/tests/integration/targets/latest/tasks/device_bay.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_BAY +### PYNAUTOBOT_DEVICE_BAY ## ## - name: "DEVICE_BAY 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/device_bay_template.yml b/tests/integration/targets/latest/tasks/device_bay_template.yml index be5519d3..2aeefe48 100644 --- a/tests/integration/targets/latest/tasks/device_bay_template.yml +++ b/tests/integration/targets/latest/tasks/device_bay_template.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_BAY_TEMPLATE +### PYNAUTOBOT_DEVICE_BAY_TEMPLATE ## ## - name: "DEVICE_BAY_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/device_interface.yml b/tests/integration/targets/latest/tasks/device_interface.yml index b6659a39..4a167cab 100644 --- a/tests/integration/targets/latest/tasks/device_interface.yml +++ b/tests/integration/targets/latest/tasks/device_interface.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_INTERFACE +### PYNAUTOBOT_DEVICE_INTERFACE ## ## - name: "1 - Interface with required information" diff --git a/tests/integration/targets/latest/tasks/device_interface_template.yml b/tests/integration/targets/latest/tasks/device_interface_template.yml index 840de653..fe148d4b 100644 --- a/tests/integration/targets/latest/tasks/device_interface_template.yml +++ b/tests/integration/targets/latest/tasks/device_interface_template.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_INTERFACE_TEMPLATE +### PYNAUTOBOT_DEVICE_INTERFACE_TEMPLATE ## ## - name: "1 - Interface with required information" diff --git a/tests/integration/targets/latest/tasks/device_role.yml b/tests/integration/targets/latest/tasks/device_role.yml index 0e96106a..fdcc0ca5 100644 --- a/tests/integration/targets/latest/tasks/device_role.yml +++ b/tests/integration/targets/latest/tasks/device_role.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_ROLE +### PYNAUTOBOT_DEVICE_ROLE ## ## - name: "DEVICE_ROLE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/device_type.yml b/tests/integration/targets/latest/tasks/device_type.yml index 26a84559..16ac4fe7 100644 --- a/tests/integration/targets/latest/tasks/device_type.yml +++ b/tests/integration/targets/latest/tasks/device_type.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_TYPE +### PYNAUTOBOT_DEVICE_TYPE ## ## - name: "DEVICE_TYPE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/front_port.yml b/tests/integration/targets/latest/tasks/front_port.yml index 605fa9da..9d44a2b8 100644 --- a/tests/integration/targets/latest/tasks/front_port.yml +++ b/tests/integration/targets/latest/tasks/front_port.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_FRONT_PORT +### PYNAUTOBOT_FRONT_PORT ## ## - name: "FRONT_PORT 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/front_port_template.yml b/tests/integration/targets/latest/tasks/front_port_template.yml index 4c9e0886..88c3754d 100644 --- a/tests/integration/targets/latest/tasks/front_port_template.yml +++ b/tests/integration/targets/latest/tasks/front_port_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_FRONT_PORT_TEMPLATE +### PYNAUTOBOT_FRONT_PORT_TEMPLATE ## ## - name: "FRONT_PORT_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/inventory_item.yml b/tests/integration/targets/latest/tasks/inventory_item.yml index bc4de3da..4cdee971 100644 --- a/tests/integration/targets/latest/tasks/inventory_item.yml +++ b/tests/integration/targets/latest/tasks/inventory_item.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_INVENTORY_ITEM +### PYNAUTOBOT_INVENTORY_ITEM ## ## - name: "INVENTORY_ITEM 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/ip_address.yml b/tests/integration/targets/latest/tasks/ip_address.yml index 04921afd..1f597443 100644 --- a/tests/integration/targets/latest/tasks/ip_address.yml +++ b/tests/integration/targets/latest/tasks/ip_address.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_IP_ADDRESS +### PYNAUTOBOT_IP_ADDRESS ## ## -- name: "1 - Create IP address within Netbox with only required information - State: Present" +- name: "1 - Create IP address within Nautobot with only required information - State: Present" networktocode.nautobot.ip_address: url: http://localhost.org:32768 token: 0123456789abcdef0123456789abcdef01234567 diff --git a/tests/integration/targets/latest/tasks/ipam_role.yml b/tests/integration/targets/latest/tasks/ipam_role.yml index 5b9d1fa2..f2a7d023 100644 --- a/tests/integration/targets/latest/tasks/ipam_role.yml +++ b/tests/integration/targets/latest/tasks/ipam_role.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_IPAM_ROLE +### PYNAUTOBOT_IPAM_ROLE ## ## - name: "IPAM_ROLE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/lookup.yml b/tests/integration/targets/latest/tasks/lookup.yml index 3b750b4f..cec2caad 100644 --- a/tests/integration/targets/latest/tasks/lookup.yml +++ b/tests/integration/targets/latest/tasks/lookup.yml @@ -1,34 +1,34 @@ --- ## ## -### NETBOX_LOOKUP +### PYNAUTOBOT_LOOKUP ## ## -- name: "NETBOX_LOOKUP 1: Lookup returns exactly two sites" +- name: "PYNAUTOBOT_LOOKUP 1: Lookup returns exactly two sites" assert: that: "{{ query_result|count }} == 3" vars: query_result: "{{ query('networktocode.nautobot.lookup', 'sites', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" -- name: "NETBOX_LOOKUP 2: Query doesn't return Wibble (sanity check json_query)" +- name: "PYNAUTOBOT_LOOKUP 2: Query doesn't return Wibble (sanity check json_query)" assert: that: "{{ query_result|json_query('[?value.display_name==`Wibble`]')|count }} == 0" vars: query_result: "{{ query('networktocode.nautobot.lookup', 'devices', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" -- name: "NETBOX_LOOKUP 3: Device query returns exactly one TestDeviceR1" +- name: "PYNAUTOBOT_LOOKUP 3: Device query returns exactly one TestDeviceR1" assert: that: "{{ query_result|json_query('[?value.display_name==`TestDeviceR1`]')|count }} == 1" vars: query_result: "{{ query('networktocode.nautobot.lookup', 'devices', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" -- name: "NETBOX_LOOKUP 4: VLAN ID 400 can be queried and is named 'Test VLAN'" +- name: "PYNAUTOBOT_LOOKUP 4: VLAN ID 400 can be queried and is named 'Test VLAN'" assert: that: "{{ (query_result|json_query('[?value.vid==`400`].value.name'))[0] == 'Test VLAN' }}" vars: query_result: "{{ query('networktocode.nautobot.lookup', 'vlans', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" -- name: "NETBOX_LOOKUP 5: Add one of two devices for lookup filter test." +- name: "PYNAUTOBOT_LOOKUP 5: Add one of two devices for lookup filter test." networktocode.nautobot.device: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -42,7 +42,7 @@ - "nolookup" state: present -- name: "NETBOX_LOOKUP 6: Add two of two devices for lookup filter test." +- name: "PYNAUTOBOT_LOOKUP 6: Add two of two devices for lookup filter test." networktocode.nautobot.device: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -56,19 +56,19 @@ - "lookup" state: present -- name: "NETBOX_LOOKUP 7: Device query returns exactly the L2 device" +- name: "PYNAUTOBOT_LOOKUP 7: Device query returns exactly the L2 device" assert: that: "{{ query_result|json_query('[?value.display_name==`L2`]')|count }} == 1" vars: query_result: "{{ query('networktocode.nautobot.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" +- name: "PYNAUTOBOT_LOOKUP 8: Device query specifying raw data returns payload without key/value dict" assert: that: "{{ query_result|json_query('[?display_name==`L2`]')|count }} == 1" vars: query_result: "{{ query('networktocode.nautobot.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" +- name: "PYNAUTOBOT_LOOKUP 9: Device query specifying multiple sites, Make sure L1 and L2 are in the results" assert: that: - "'L1' in {{ query_result |json_query('[*].display_name') }}" @@ -76,7 +76,7 @@ vars: query_result: "{{ query('networktocode.nautobot.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" +- name: "PYNAUTOBOT_LOOKUP 10: Device query by ID" assert: that: - "{{ query('networktocode.nautobot.lookup', 'devices', api_filter='id=1', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" diff --git a/tests/integration/targets/latest/tasks/main.yml b/tests/integration/targets/latest/tasks/main.yml index ecbaff23..bd718ae9 100644 --- a/tests/integration/targets/latest/tasks/main.yml +++ b/tests/integration/targets/latest/tasks/main.yml @@ -1,162 +1,162 @@ --- -- name: "NETBOX_DEVICE TESTS" +- name: "PYNAUTOBOT_DEVICE TESTS" include_tasks: "device.yml" -- name: "NETBOX_DEVICE_INTERFACE TESTS" +- name: "PYNAUTOBOT_DEVICE_INTERFACE TESTS" include_tasks: "device_interface.yml" -- name: "NETBOX_DEVICE_INTERFACE_TEMPLATE TESTS" +- name: "PYNAUTOBOT_DEVICE_INTERFACE_TEMPLATE TESTS" include_tasks: "device_interface_template.yml" -- name: "NETBOX_IP_ADDRESS TESTS" +- name: "PYNAUTOBOT_IP_ADDRESS TESTS" include_tasks: "ip_address.yml" -- name: "NETBOX_PREFIX TESTS" +- name: "PYNAUTOBOT_PREFIX TESTS" include_tasks: "prefix.yml" -- name: "NETBOX_SITE TESTS" +- name: "PYNAUTOBOT_SITE TESTS" include_tasks: "site.yml" -- name: "NETBOX_TENTANT TESTS" +- name: "PYNAUTOBOT_TENTANT TESTS" include_tasks: "tenant.yml" -- name: "NETBOX_TENTANT_GROUP TESTS" +- name: "PYNAUTOBOT_TENTANT_GROUP TESTS" include_tasks: "tenant_group.yml" -- name: "NETBOX_RACK TESTS" +- name: "PYNAUTOBOT_RACK TESTS" include_tasks: "rack.yml" -- name: "NETBOX_RACK_ROLE TESTS" +- name: "PYNAUTOBOT_RACK_ROLE TESTS" include_tasks: "rack_role.yml" -- name: "NETBOX_RACK_GROUP TESTS" +- name: "PYNAUTOBOT_RACK_GROUP TESTS" include_tasks: "rack_group.yml" -- name: "NETBOX_MANUFACTURER TESTS" +- name: "PYNAUTOBOT_MANUFACTURER TESTS" include_tasks: "manufacturer.yml" -- name: "NETBOX_PLATFORM TESTS" +- name: "PYNAUTOBOT_PLATFORM TESTS" include_tasks: "platform.yml" -- name: "NETBOX_DEVICE_TYPE TESTS" +- name: "PYNAUTOBOT_DEVICE_TYPE TESTS" include_tasks: "device_type.yml" -- name: "NETBOX_DEVICE_ROLE TESTS" +- name: "PYNAUTOBOT_DEVICE_ROLE TESTS" include_tasks: "device_role.yml" -- name: "NETBOX_IPAM_ROLE TESTS" +- name: "PYNAUTOBOT_IPAM_ROLE TESTS" include_tasks: "ipam_role.yml" -- name: "NETBOX_VLAN_GROUP TESTS" +- name: "PYNAUTOBOT_VLAN_GROUP TESTS" include_tasks: "vlan_group.yml" -- name: "NETBOX_VLAN TESTS" +- name: "PYNAUTOBOT_VLAN TESTS" include_tasks: "vlan.yml" -- name: "NETBOX_VRF TESTS" +- name: "PYNAUTOBOT_VRF TESTS" include_tasks: "vrf.yml" -- name: "NETBOX_RIR TESTS" +- name: "PYNAUTOBOT_RIR TESTS" include_tasks: "rir.yml" -- name: "NETBOX_AGGREGATE TESTS" +- name: "PYNAUTOBOT_AGGREGATE TESTS" include_tasks: "aggregate.yml" -- name: "NETBOX_REGION TESTS" +- name: "PYNAUTOBOT_REGION TESTS" include_tasks: "region.yml" -- name: "NETBOX_DEVICE_BAY TESTS" +- name: "PYNAUTOBOT_DEVICE_BAY TESTS" include_tasks: "device_bay.yml" -- name: "NETBOX_DEVICE_BAY_TEMPLATE TESTS" +- name: "PYNAUTOBOT_DEVICE_BAY_TEMPLATE TESTS" include_tasks: "device_bay_template.yml" -- name: "NETBOX_INVENTORY_ITEM TESTS" +- name: "PYNAUTOBOT_INVENTORY_ITEM TESTS" include_tasks: "inventory_item.yml" -- name: "NETBOX_VIRTUAL_MACHINE TESTS" +- name: "PYNAUTOBOT_VIRTUAL_MACHINE TESTS" include_tasks: "virtual_machine.yml" -- name: "NETBOX_CLUSTER TESTS" +- name: "PYNAUTOBOT_CLUSTER TESTS" include_tasks: "cluster.yml" -- name: "NETBOX_CLUSTER_GROUP TESTS" +- name: "PYNAUTOBOT_CLUSTER_GROUP TESTS" include_tasks: "cluster_group.yml" -- name: "NETBOX_CLUSTER_TYPE TESTS" +- name: "PYNAUTOBOT_CLUSTER_TYPE TESTS" include_tasks: "cluster_type.yml" -- name: "NETBOX_VM_INTERFACE TESTS" +- name: "PYNAUTOBOT_VM_INTERFACE TESTS" include_tasks: "vm_interface.yml" -- name: "NETBOX_PROVIDER TESTS" +- name: "PYNAUTOBOT_PROVIDER TESTS" include_tasks: "provider.yml" -- name: "NETBOX_CIRCUIT_TYPE TESTS" +- name: "PYNAUTOBOT_CIRCUIT_TYPE TESTS" include_tasks: "circuit_type.yml" -- name: "NETBOX_CIRCUIT TESTS" +- name: "PYNAUTOBOT_CIRCUIT TESTS" include_tasks: "circuit.yml" -- name: "NETBOX_CIRCUIT_TERMINATION TESTS" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION TESTS" include_tasks: "circuit_termination.yml" -- name: "NETBOX_REAR_PORT TESTS" +- name: "PYNAUTOBOT_REAR_PORT TESTS" include_tasks: "rear_port.yml" -- name: "NETBOX_REAR_PORT_TEMPLATE TESTS" +- name: "PYNAUTOBOT_REAR_PORT_TEMPLATE TESTS" include_tasks: "rear_port_template.yml" -- name: "NETBOX_FRONT_PORT TESTS" +- name: "PYNAUTOBOT_FRONT_PORT TESTS" include_tasks: "front_port.yml" -- name: "NETBOX_FRONT_PORT_TEMPLATE TESTS" +- name: "PYNAUTOBOT_FRONT_PORT_TEMPLATE TESTS" include_tasks: "front_port_template.yml" -- name: "NETBOX_CONSOLE_PORT TESTS" +- name: "PYNAUTOBOT_CONSOLE_PORT TESTS" include_tasks: "console_port.yml" -- name: "NETBOX_CONSOLE_PORT_TEMPLATE TESTS" +- name: "PYNAUTOBOT_CONSOLE_PORT_TEMPLATE TESTS" include_tasks: "console_port_template.yml" -- name: "NETBOX_CONSOLE_SERVER_PORT TESTS" +- name: "PYNAUTOBOT_CONSOLE_SERVER_PORT TESTS" include_tasks: "console_server_port.yml" -- name: "NETBOX_CONSOLE_SERVER_PORT_TEMPLATE TESTS" +- name: "PYNAUTOBOT_CONSOLE_SERVER_PORT_TEMPLATE TESTS" include_tasks: "console_server_port_template.yml" -- name: "NETBOX_POWER_PANEL TESTS" +- name: "PYNAUTOBOT_POWER_PANEL TESTS" include_tasks: "power_panel.yml" -- name: "NETBOX_POWER_FEED TESTS" +- name: "PYNAUTOBOT_POWER_FEED TESTS" include_tasks: "power_feed.yml" -- name: "NETBOX_POWER_PORT TESTS" +- name: "PYNAUTOBOT_POWER_PORT TESTS" include_tasks: "power_port.yml" -- name: "NETBOX_POWER_PORT_TEMPLATE TESTS" +- name: "PYNAUTOBOT_POWER_PORT_TEMPLATE TESTS" include_tasks: "power_port_template.yml" -- name: "NETBOX_POWER_OUTLET TESTS" +- name: "PYNAUTOBOT_POWER_OUTLET TESTS" include_tasks: "power_outlet.yml" -- name: "NETBOX_POWER_OUTLET_TEMPLATE TESTS" +- name: "PYNAUTOBOT_POWER_OUTLET_TEMPLATE TESTS" include_tasks: "power_outlet_template.yml" -- name: "NETBOX_VIRTUAL_CHASSIS TESTS" +- name: "PYNAUTOBOT_VIRTUAL_CHASSIS TESTS" include_tasks: "virtual_chassis.yml" -- name: "NETBOX_CABLE TESTS" +- name: "PYNAUTOBOT_CABLE TESTS" include_tasks: "cable.yml" -- name: "NETBOX_SERVICE TESTS" +- name: "PYNAUTOBOT_SERVICE TESTS" include_tasks: "service.yml" -- name: "NETBOX_LOOKUP TESTS" +- name: "PYNAUTOBOT_LOOKUP TESTS" include_tasks: "lookup.yml" -- name: "NETBOX_TAG_TESTS" +- name: "PYNAUTOBOT_TAG_TESTS" include_tasks: "tag.yml" -- name: "NETBOX_ROUTE_TARGET_TESTS" +- name: "PYNAUTOBOT_ROUTE_TARGET_TESTS" include_tasks: "route_target.yml" diff --git a/tests/integration/targets/latest/tasks/manufacturer.yml b/tests/integration/targets/latest/tasks/manufacturer.yml index d105dec4..1199683c 100644 --- a/tests/integration/targets/latest/tasks/manufacturer.yml +++ b/tests/integration/targets/latest/tasks/manufacturer.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_MANUFACTURER +### PYNAUTOBOT_MANUFACTURER ## ## - name: "MANUFACTURER 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/platform.yml b/tests/integration/targets/latest/tasks/platform.yml index ba1586e2..5e9c84ec 100644 --- a/tests/integration/targets/latest/tasks/platform.yml +++ b/tests/integration/targets/latest/tasks/platform.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_PLATFORM +### PYNAUTOBOT_PLATFORM ## ## - name: "PLATFORM 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/power_feed.yml b/tests/integration/targets/latest/tasks/power_feed.yml index 24c9b0ec..3014756c 100644 --- a/tests/integration/targets/latest/tasks/power_feed.yml +++ b/tests/integration/targets/latest/tasks/power_feed.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_FEED +### PYNAUTOBOT_POWER_FEED ## ## - name: "POWER_FEED 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/power_outlet.yml b/tests/integration/targets/latest/tasks/power_outlet.yml index 22eae571..32ab2cf7 100644 --- a/tests/integration/targets/latest/tasks/power_outlet.yml +++ b/tests/integration/targets/latest/tasks/power_outlet.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_OUTLET +### PYNAUTOBOT_POWER_OUTLET ## ## - name: "POWER_OUTLET 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/power_outlet_template.yml b/tests/integration/targets/latest/tasks/power_outlet_template.yml index 869c5092..ae196e74 100644 --- a/tests/integration/targets/latest/tasks/power_outlet_template.yml +++ b/tests/integration/targets/latest/tasks/power_outlet_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_OUTLET_TEMPLATE +### PYNAUTOBOT_POWER_OUTLET_TEMPLATE ## ## - name: "POWER_OUTLET_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/power_panel.yml b/tests/integration/targets/latest/tasks/power_panel.yml index a98dbb49..184cdcb4 100644 --- a/tests/integration/targets/latest/tasks/power_panel.yml +++ b/tests/integration/targets/latest/tasks/power_panel.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_PANEL +### PYNAUTOBOT_POWER_PANEL ## ## - name: "POWER_PANEL 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/power_port.yml b/tests/integration/targets/latest/tasks/power_port.yml index 04f09d1a..3583361b 100644 --- a/tests/integration/targets/latest/tasks/power_port.yml +++ b/tests/integration/targets/latest/tasks/power_port.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_PORT +### PYNAUTOBOT_POWER_PORT ## ## - name: "POWER_PORT 0: Create device for testing power ports" diff --git a/tests/integration/targets/latest/tasks/power_port_template.yml b/tests/integration/targets/latest/tasks/power_port_template.yml index 77533a96..e6a4407d 100644 --- a/tests/integration/targets/latest/tasks/power_port_template.yml +++ b/tests/integration/targets/latest/tasks/power_port_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_PORT_TEMPLATE +### PYNAUTOBOT_POWER_PORT_TEMPLATE ## ## - name: "POWER_PORT_TEMPLATE 0: Create device type for testing power ports" diff --git a/tests/integration/targets/latest/tasks/prefix.yml b/tests/integration/targets/latest/tasks/prefix.yml index 1f014752..71fdbd00 100644 --- a/tests/integration/targets/latest/tasks/prefix.yml +++ b/tests/integration/targets/latest/tasks/prefix.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_PREFIX +### PYNAUTOBOT_PREFIX ## ## -- name: "1 - Create prefix within Netbox with only required information" +- name: "1 - Create prefix within Nautobot with only required information" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -63,7 +63,7 @@ - test_three['prefix']['status'] == "reserved" - test_three['prefix']['description'] == "This prefix has been updated" -- name: "4 - Delete prefix within netbox" +- name: "4 - Delete prefix within nautobot" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -123,7 +123,7 @@ - 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" +- name: "6 - Get a new /24 inside 10.156.0.0/19 within Nautobot - Parent doesn't exist" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -140,7 +140,7 @@ - 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" +- name: "7 - Create prefix within Nautobot with only required information" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -158,7 +158,7 @@ - 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" +- name: "8 - Get a new /24 inside 10.156.0.0/19 within Nautobot" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -200,7 +200,7 @@ - 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" +- name: "10 - Get a new /24 inside 10.157.0.0/19 within Nautobot with additional values" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -224,7 +224,7 @@ - test_ten['prefix']['site'] == 1 - test_ten['prefix']['vrf'] == 1 -- name: "11 - Get a new /24 inside 10.156.0.0/19 within Netbox" +- name: "11 - Get a new /24 inside 10.156.0.0/19 within Nautobot" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 diff --git a/tests/integration/targets/latest/tasks/provider.yml b/tests/integration/targets/latest/tasks/provider.yml index df09a355..4c4ea2e8 100644 --- a/tests/integration/targets/latest/tasks/provider.yml +++ b/tests/integration/targets/latest/tasks/provider.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_PROVIDER +### PYNAUTOBOT_PROVIDER ## ## -- name: "NETBOX_PROVIDER 1: Create provider within Netbox with only required information" +- name: "PYNAUTOBOT_PROVIDER 1: Create provider within Nautobot with only required information" networktocode.nautobot.provider: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -13,7 +13,7 @@ state: present register: test_one -- name: "NETBOX_PROVIDER 1: ASSERT - Necessary info creation" +- name: "PYNAUTOBOT_PROVIDER 1: ASSERT - Necessary info creation" assert: that: - test_one is changed @@ -23,7 +23,7 @@ - test_one['provider']['slug'] == "test-provider-one" - test_one['msg'] == "provider Test Provider One created" -- name: "NETBOX_PROVIDER 2: Duplicate" +- name: "PYNAUTOBOT_PROVIDER 2: Duplicate" networktocode.nautobot.provider: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -32,7 +32,7 @@ state: present register: test_two -- name: "NETBOX_PROVIDER 2: ASSERT - Create duplicate" +- name: "PYNAUTOBOT_PROVIDER 2: ASSERT - Create duplicate" assert: that: - not test_two['changed'] @@ -40,7 +40,7 @@ - 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" +- name: "PYNAUTOBOT_PROVIDER 3: Update provider with other fields" networktocode.nautobot.provider: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -55,7 +55,7 @@ state: present register: test_three -- name: "NETBOX_PROVIDER 3: ASSERT - Updated" +- name: "PYNAUTOBOT_PROVIDER 3: ASSERT - Updated" assert: that: - test_three is changed @@ -75,7 +75,7 @@ - test_three['provider']['comments'] == "BAD PROVIDER" - test_three['msg'] == "provider Test Provider One updated" -- name: "NETBOX_PROVIDER 4: Delete provider within netbox" +- name: "PYNAUTOBOT_PROVIDER 4: Delete provider within nautobot" networktocode.nautobot.provider: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -84,7 +84,7 @@ state: absent register: test_four -- name: "NETBOX_PROVIDER 4 : ASSERT - Delete" +- name: "PYNAUTOBOT_PROVIDER 4 : ASSERT - Delete" assert: that: - test_four is changed diff --git a/tests/integration/targets/latest/tasks/rack.yml b/tests/integration/targets/latest/tasks/rack.yml index 8273d1de..33ed4a1e 100644 --- a/tests/integration/targets/latest/tasks/rack.yml +++ b/tests/integration/targets/latest/tasks/rack.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_RACK +### PYNAUTOBOT_RACK ## ## - name: "1 - Test rack creation" diff --git a/tests/integration/targets/latest/tasks/rack_group.yml b/tests/integration/targets/latest/tasks/rack_group.yml index 4e7064fa..c7bac243 100644 --- a/tests/integration/targets/latest/tasks/rack_group.yml +++ b/tests/integration/targets/latest/tasks/rack_group.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_RACK_GROUP +### PYNAUTOBOT_RACK_GROUP ## ## - name: "RACK_GROUP 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/rack_role.yml b/tests/integration/targets/latest/tasks/rack_role.yml index d0fdcec2..446376ce 100644 --- a/tests/integration/targets/latest/tasks/rack_role.yml +++ b/tests/integration/targets/latest/tasks/rack_role.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_RACK_ROLE +### PYNAUTOBOT_RACK_ROLE ## ## - name: "RACK_ROLE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/rear_port.yml b/tests/integration/targets/latest/tasks/rear_port.yml index 887442ff..176691dc 100644 --- a/tests/integration/targets/latest/tasks/rear_port.yml +++ b/tests/integration/targets/latest/tasks/rear_port.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_REAR_PORT +### PYNAUTOBOT_REAR_PORT ## ## - name: "REAR_PORT 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/rear_port_template.yml b/tests/integration/targets/latest/tasks/rear_port_template.yml index f0a9b740..b6e2fe20 100644 --- a/tests/integration/targets/latest/tasks/rear_port_template.yml +++ b/tests/integration/targets/latest/tasks/rear_port_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_REAR_PORT_TEMPLATE +### PYNAUTOBOT_REAR_PORT_TEMPLATE ## ## - name: "REAR_PORT_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/region.yml b/tests/integration/targets/latest/tasks/region.yml index 47cea024..afd5db0a 100644 --- a/tests/integration/targets/latest/tasks/region.yml +++ b/tests/integration/targets/latest/tasks/region.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_REGION +### PYNAUTOBOT_REGION ## ## - name: "REGION 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/rir.yml b/tests/integration/targets/latest/tasks/rir.yml index 41c9e821..9be96af7 100644 --- a/tests/integration/targets/latest/tasks/rir.yml +++ b/tests/integration/targets/latest/tasks/rir.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_RIR +### PYNAUTOBOT_RIR ## ## - name: "RIR 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/route_target.yml b/tests/integration/targets/latest/tasks/route_target.yml index 0ff060fb..7d64c097 100644 --- a/tests/integration/targets/latest/tasks/route_target.yml +++ b/tests/integration/targets/latest/tasks/route_target.yml @@ -1,7 +1,7 @@ --- # # ADD (CHECK MODE) -- name: "NETBOX_ROUTE_TARGET_ADD: Check Mode - Add all fields except description" +- name: "PYNAUTOBOT_ROUTE_TARGET_ADD: Check Mode - Add all fields except description" networktocode.nautobot.route_target: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -14,7 +14,7 @@ check_mode: yes register: test_results -- name: "NETBOX_ROUTE_TARGET_ADD: (ASSERT) Check Mode - Add all fields except description" +- name: "PYNAUTOBOT_ROUTE_TARGET_ADD: (ASSERT) Check Mode - Add all fields except description" assert: that: - test_results is changed @@ -26,7 +26,7 @@ - test_results['msg'] == "route_target 65000:65001 created" # ADD -- name: "NETBOX_ROUTE_TARGET_ADD: Add all fields except description" +- name: "PYNAUTOBOT_ROUTE_TARGET_ADD: Add all fields except description" networktocode.nautobot.route_target: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -38,7 +38,7 @@ - second register: test_results -- name: "NETBOX_ROUTE_TARGET_ADD: (ASSERT) Add all fields except description" +- name: "PYNAUTOBOT_ROUTE_TARGET_ADD: (ASSERT) Add all fields except description" assert: that: - test_results is changed @@ -50,7 +50,7 @@ - test_results['msg'] == "route_target 65000:65001 created" # ADD (IDEMPOTENT) -- name: "NETBOX_ROUTE_TARGET_ADD_IDEM: (IDEMPOTENT) Add all fields except description" +- name: "PYNAUTOBOT_ROUTE_TARGET_ADD_IDEM: (IDEMPOTENT) Add all fields except description" networktocode.nautobot.route_target: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -62,7 +62,7 @@ - second register: test_results -- name: "NETBOX_ROUTE_TARGET_ADD_IDEM: (IDEMPOTENT) Add all fields except description" +- name: "PYNAUTOBOT_ROUTE_TARGET_ADD_IDEM: (IDEMPOTENT) Add all fields except description" assert: that: - test_results is not changed @@ -73,7 +73,7 @@ # # UPDATE (CHECK MODE) -- name: "NETBOX_ROUTE_TARGET_UPDATE: Check Mode - Update description" +- name: "PYNAUTOBOT_ROUTE_TARGET_UPDATE: Check Mode - Update description" networktocode.nautobot.route_target: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -87,7 +87,7 @@ check_mode: yes register: test_results -- name: "NETBOX_ROUTE_TARGET_UPDATE: (ASSERT) Check Mode - Update description" +- name: "PYNAUTOBOT_ROUTE_TARGET_UPDATE: (ASSERT) Check Mode - Update description" assert: that: - test_results is changed @@ -100,7 +100,7 @@ - test_results['msg'] == "route_target 65000:65001 updated" # UPDATE -- name: "NETBOX_ROUTE_TARGET_UPDATE: Update description" +- name: "PYNAUTOBOT_ROUTE_TARGET_UPDATE: Update description" networktocode.nautobot.route_target: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -113,7 +113,7 @@ - second register: test_results -- name: "NETBOX_ROUTE_TARGET_UPDATE: (ASSERT) Update description" +- name: "PYNAUTOBOT_ROUTE_TARGET_UPDATE: (ASSERT) Update description" assert: that: - test_results is changed @@ -126,7 +126,7 @@ - test_results['msg'] == "route_target 65000:65001 updated" # UPDATE (IDEMPOTENT) -- name: "NETBOX_ROUTE_TARGET_UPDATE_IDEM: (IDEMPOTENT) Update description" +- name: "PYNAUTOBOT_ROUTE_TARGET_UPDATE_IDEM: (IDEMPOTENT) Update description" networktocode.nautobot.route_target: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -139,7 +139,7 @@ - second register: test_results -- name: "NETBOX_ROUTE_TARGET_UPDATE_IDEM: (IDEMPOTENT) Update description" +- name: "PYNAUTOBOT_ROUTE_TARGET_UPDATE_IDEM: (IDEMPOTENT) Update description" assert: that: - test_results is not changed @@ -151,7 +151,7 @@ # # DELETE (CHECK MODE) -- name: "NETBOX_ROUTE_TARGET_DELETE: Check Mode - Delete route target" +- name: "PYNAUTOBOT_ROUTE_TARGET_DELETE: Check Mode - Delete route target" networktocode.nautobot.route_target: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -161,7 +161,7 @@ check_mode: yes register: test_results -- name: "NETBOX_ROUTE_TARGET_DELETE: (ASSERT) Check Mode - Delete route target" +- name: "PYNAUTOBOT_ROUTE_TARGET_DELETE: (ASSERT) Check Mode - Delete route target" assert: that: - test_results is changed @@ -170,7 +170,7 @@ - test_results['msg'] == "route_target 65000:65001 deleted" # DELETE -- name: "NETBOX_ROUTE_TARGET_DELETE: Delete route target" +- name: "PYNAUTOBOT_ROUTE_TARGET_DELETE: Delete route target" networktocode.nautobot.route_target: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -179,7 +179,7 @@ state: absent register: test_results -- name: "NETBOX_ROUTE_TARGET_DELETE: (ASSERT) Delete route target" +- name: "PYNAUTOBOT_ROUTE_TARGET_DELETE: (ASSERT) Delete route target" assert: that: - test_results is changed @@ -188,7 +188,7 @@ - test_results['msg'] == "route_target 65000:65001 deleted" # DELETE (IDEMPOTENT) -- name: "NETBOX_ROUTE_TARGET_DELETE_IDEM: (IDEMPOTENT) Delete route target" +- name: "PYNAUTOBOT_ROUTE_TARGET_DELETE_IDEM: (IDEMPOTENT) Delete route target" networktocode.nautobot.route_target: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -197,7 +197,7 @@ state: absent register: test_results -- name: "NETBOX_ROUTE_TARGET_DELETE_IDEM: (IDEMPOTENT) Delete route target" +- name: "PYNAUTOBOT_ROUTE_TARGET_DELETE_IDEM: (IDEMPOTENT) Delete route target" assert: that: - test_results is not changed diff --git a/tests/integration/targets/latest/tasks/service.yml b/tests/integration/targets/latest/tasks/service.yml index cf459908..28233753 100644 --- a/tests/integration/targets/latest/tasks/service.yml +++ b/tests/integration/targets/latest/tasks/service.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_SERVICE +### PYNAUTOBOT_SERVICE ## ## - name: "1 - Device with required information needs to add new service" @@ -16,7 +16,7 @@ status: "Staged" state: present -- name: "NETBOX_SERVICE: Create new service" +- name: "PYNAUTOBOT_SERVICE: Create new service" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -28,7 +28,7 @@ state: present register: test_service_create -- name: "NETBOX_SERVICE ASSERT - Create" +- name: "PYNAUTOBOT_SERVICE ASSERT - Create" assert: that: - test_service_create is changed @@ -39,7 +39,7 @@ - test_service_create['diff']['before']['state'] == "absent" - test_service_create['msg'] == "services node-exporter created" -- name: "NETBOX_SERVICE: Test idempotence" +- name: "PYNAUTOBOT_SERVICE: Test idempotence" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -51,7 +51,7 @@ state: present register: test_service_idempotence -- name: "NETBOX_SERVICE ASSERT - Not changed" +- name: "PYNAUTOBOT_SERVICE ASSERT - Not changed" assert: that: - test_service_idempotence['services']['name'] == "node-exporter" @@ -59,7 +59,7 @@ - test_service_idempotence['services']['protocol'] == "tcp" - test_service_idempotence['msg'] == "services node-exporter already exists" -- name: "NETBOX_SERVICE: Test update" +- name: "PYNAUTOBOT_SERVICE: Test update" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -75,7 +75,7 @@ state: present register: test_service_update -- name: "NETBOX_SERVICE ASSERT - Service has been updated" +- name: "PYNAUTOBOT_SERVICE ASSERT - Service has been updated" assert: that: - test_service_update is changed @@ -83,7 +83,7 @@ - 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" +- name: "PYNAUTOBOT_SERVICE: Test same details, but different protocol - Create" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -95,7 +95,7 @@ state: present register: test_service_protocol -- name: "NETBOX_SERVICE ASSERT - Different protocol - Create" +- name: "PYNAUTOBOT_SERVICE ASSERT - Different protocol - Create" assert: that: - test_service_protocol is changed @@ -106,7 +106,7 @@ - test_service_protocol['services']['protocol'] == "udp" - test_service_protocol['msg'] == "services node-exporter created" -- name: "NETBOX_SERVICE: Test service deletion" +- name: "PYNAUTOBOT_SERVICE: Test service deletion" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -118,7 +118,7 @@ state: absent register: test_service_delete -- name: "NETBOX_SERVICE ASSERT - Service has been deleted" +- name: "PYNAUTOBOT_SERVICE ASSERT - Service has been deleted" assert: that: - test_service_delete is changed @@ -126,7 +126,7 @@ - test_service_delete['diff']['before']['state'] == "present" - test_service_delete['msg'] == "services node-exporter deleted" -- name: "NETBOX_SERVICE: Test service IP addresses" +- name: "PYNAUTOBOT_SERVICE: Test service IP addresses" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -140,7 +140,7 @@ state: present register: test_service_ip_addresses -- name: "NETBOX_SERVICE ASSERT - Service has been created with IP address" +- name: "PYNAUTOBOT_SERVICE ASSERT - Service has been created with IP address" assert: that: - test_service_ip_addresses is changed @@ -152,7 +152,7 @@ - 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" +- name: "PYNAUTOBOT_SERVICE: Missing both device & virtual_machine options - Tests required_one_of" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -166,13 +166,13 @@ ignore_errors: yes register: test_service_required_one_of -- name: "NETBOX_SERVICE ASSERT - Failed due to missing arguments" +- name: "PYNAUTOBOT_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" +- name: "PYNAUTOBOT_SERVICE: Create new service on virtual_machine" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -184,7 +184,7 @@ state: present register: test_service_create_vm -- name: "NETBOX_SERVICE ASSERT - Create" +- name: "PYNAUTOBOT_SERVICE ASSERT - Create" assert: that: - test_service_create_vm is changed diff --git a/tests/integration/targets/latest/tasks/site.yml b/tests/integration/targets/latest/tasks/site.yml index fe0f06ce..ce1e4578 100644 --- a/tests/integration/targets/latest/tasks/site.yml +++ b/tests/integration/targets/latest/tasks/site.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_SITE +### PYNAUTOBOT_SITE ## ## -- name: "1 - Create site within Netbox with only required information" +- name: "1 - Create site within Nautobot with only required information" networktocode.nautobot.site: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -113,7 +113,7 @@ - test_four['site']['comments'] == "### Placeholder" - test_four['site']['slug'] == "test_california" -- name: "NETBOX_SITE_IDEM: Idempotency - Create duplicate site with all parameters" +- name: "PYNAUTOBOT_SITE_IDEM: Idempotency - Create duplicate site with all parameters" networktocode.nautobot.site: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -138,7 +138,7 @@ state: present register: test_results -- name: "NETBOX_SITE_IDEM: (ASSERT) Idempotency - Duplicate device site with all parameters" +- name: "PYNAUTOBOT_SITE_IDEM: (ASSERT) Idempotency - Duplicate device site with all parameters" assert: that: - test_results is not changed @@ -161,7 +161,7 @@ - test_results['site']['comments'] == "### Placeholder" - test_results['site']['slug'] == "test_california" -- name: "5 - Delete site within netbox" +- name: "5 - Delete site within nautobot" networktocode.nautobot.site: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 diff --git a/tests/integration/targets/latest/tasks/tag.yml b/tests/integration/targets/latest/tasks/tag.yml index 99e0ff12..88f61a46 100644 --- a/tests/integration/targets/latest/tasks/tag.yml +++ b/tests/integration/targets/latest/tasks/tag.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_TAGS +### PYNAUTOBOT_TAGS ## ## - name: "TAG 1: ASSERT - Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/tenant.yml b/tests/integration/targets/latest/tasks/tenant.yml index da16d4bc..85646f58 100644 --- a/tests/integration/targets/latest/tasks/tenant.yml +++ b/tests/integration/targets/latest/tasks/tenant.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_TENANT +### PYNAUTOBOT_TENANT ## ## - name: "1 - Test tenant creation" diff --git a/tests/integration/targets/latest/tasks/tenant_group.yml b/tests/integration/targets/latest/tasks/tenant_group.yml index fd2a92bc..63bda776 100644 --- a/tests/integration/targets/latest/tasks/tenant_group.yml +++ b/tests/integration/targets/latest/tasks/tenant_group.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_TENANT_GROUP +### PYNAUTOBOT_TENANT_GROUP ## ## - name: "1 - Test tenant group creation" diff --git a/tests/integration/targets/latest/tasks/virtual_chassis.yml b/tests/integration/targets/latest/tasks/virtual_chassis.yml index fc8f6a4f..aa2fddac 100644 --- a/tests/integration/targets/latest/tasks/virtual_chassis.yml +++ b/tests/integration/targets/latest/tasks/virtual_chassis.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_VIRTUAL_CHASSIS +### PYNAUTOBOT_VIRTUAL_CHASSIS ## ## - name: "VIRTUAL_CHASSIS 0: Create device for testing virtual chassis" diff --git a/tests/integration/targets/latest/tasks/virtual_machine.yml b/tests/integration/targets/latest/tasks/virtual_machine.yml index 6fc72933..40f5f608 100644 --- a/tests/integration/targets/latest/tasks/virtual_machine.yml +++ b/tests/integration/targets/latest/tasks/virtual_machine.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_VIRTUAL_MACHINES +### PYNAUTOBOT_VIRTUAL_MACHINES ## ## - name: "VIRTUAL_MACHINE 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/vlan.yml b/tests/integration/targets/latest/tasks/vlan.yml index 5d8af503..c7b2f084 100644 --- a/tests/integration/targets/latest/tasks/vlan.yml +++ b/tests/integration/targets/latest/tasks/vlan.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_VLAN +### PYNAUTOBOT_VLAN ## ## - name: "VLAN 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/vlan_group.yml b/tests/integration/targets/latest/tasks/vlan_group.yml index 50f411e8..38053297 100644 --- a/tests/integration/targets/latest/tasks/vlan_group.yml +++ b/tests/integration/targets/latest/tasks/vlan_group.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_VLAN_GROUP +### PYNAUTOBOT_VLAN_GROUP ## ## - name: "VLAN_GROUP 1: Necessary info creation" diff --git a/tests/integration/targets/latest/tasks/vm_interface.yml b/tests/integration/targets/latest/tasks/vm_interface.yml index 94173aa6..4429ce05 100644 --- a/tests/integration/targets/latest/tasks/vm_interface.yml +++ b/tests/integration/targets/latest/tasks/vm_interface.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_VM_INTERFACE +### PYNAUTOBOT_VM_INTERFACE ## ## -- name: "NETBOX_VM_INTERFACE 1: Necessary info creation" +- name: "PYNAUTOBOT_VM_INTERFACE 1: Necessary info creation" networktocode.nautobot.vm_interface: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -14,7 +14,7 @@ state: present register: test_one -- name: "NETBOX_VM_INTERFACE 1: ASSERT - Necessary info creation" +- name: "PYNAUTOBOT_VM_INTERFACE 1: ASSERT - Necessary info creation" assert: that: - test_one is changed @@ -24,7 +24,7 @@ - test_one['interface']['virtual_machine'] == 1 - test_one['msg'] == "interface Eth10 created" -- name: "NETBOX_VM_INTERFACE 2: Create duplicate" +- name: "PYNAUTOBOT_VM_INTERFACE 2: Create duplicate" networktocode.nautobot.vm_interface: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -34,7 +34,7 @@ state: present register: test_two -- name: "NETBOX_VM_INTERFACE 2: ASSERT - Create duplicate" +- name: "PYNAUTOBOT_VM_INTERFACE 2: ASSERT - Create duplicate" assert: that: - not test_two['changed'] @@ -42,7 +42,7 @@ - test_two['interface']['virtual_machine'] == 1 - test_two['msg'] == "interface Eth10 already exists" -- name: "NETBOX_VM_INTERFACE 3: Updated" +- name: "PYNAUTOBOT_VM_INTERFACE 3: Updated" networktocode.nautobot.vm_interface: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -67,7 +67,7 @@ state: present register: test_three -- name: "NETBOX_VM_INTERFACE 4: ASSERT - Updated" +- name: "PYNAUTOBOT_VM_INTERFACE 4: ASSERT - Updated" assert: that: - test_three is changed @@ -91,7 +91,7 @@ - test_three['interface']['tags'][0] == 4 - test_three['msg'] == "interface Eth10 updated" -- name: "NETBOX_VM_INTERFACE 4: ASSERT - Delete" +- name: "PYNAUTOBOT_VM_INTERFACE 4: ASSERT - Delete" networktocode.nautobot.vm_interface: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -101,7 +101,7 @@ state: absent register: test_four -- name: "NETBOX_VM_INTERFACE 4: ASSERT - Delete" +- name: "PYNAUTOBOT_VM_INTERFACE 4: ASSERT - Delete" assert: that: - test_four is changed @@ -109,7 +109,7 @@ - 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" +- name: "PYNAUTOBOT_VM_INTERFACE 5: Attempt to update interface with same name on other VMs" networktocode.nautobot.vm_interface: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -134,7 +134,7 @@ state: present register: test_five -- name: "NETBOX_VM_INTERFACE 5: ASSERT - Updated" +- name: "PYNAUTOBOT_VM_INTERFACE 5: ASSERT - Updated" assert: that: - test_five is changed diff --git a/tests/integration/targets/latest/tasks/vrf.yml b/tests/integration/targets/latest/tasks/vrf.yml index 57d143ba..924c9001 100644 --- a/tests/integration/targets/latest/tasks/vrf.yml +++ b/tests/integration/targets/latest/tasks/vrf.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_VRF +### PYNAUTOBOT_VRF ## ## - name: "VRF 1: Necessary info creation" diff --git a/tests/integration/targets/regression-latest/tasks/main.yml b/tests/integration/targets/regression-latest/tasks/main.yml index 14aa3bea..b4cc8587 100644 --- a/tests/integration/targets/regression-latest/tasks/main.yml +++ b/tests/integration/targets/regression-latest/tasks/main.yml @@ -1,10 +1,10 @@ --- ## ## -### TEST NETBOX CONNECTION FAILURE +### TEST PYNAUTOBOT CONNECTION FAILURE ## ## -- name: "TEST NETBOX CONNECTION FAILURE" +- name: "TEST PYNAUTOBOT CONNECTION FAILURE" connection: local block: - name: "1 - Device with required information" @@ -161,7 +161,7 @@ - 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) + - name: Add ip address to nautobot and don't assign it to a device (Issue 372) networktocode.nautobot.ip_address: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -230,32 +230,32 @@ assigned_object: device: "Test Nexus One" name: "Ethernet1/1" - description: ansible-netbox-1.2.1 - dns_name: ansible-netbox-1.2.1 + description: ansible-nautobot-1.2.1 + dns_name: ansible-nautobot-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 + description: ansible-nautobot-1.2.1 + dns_name: ansible-nautobot-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 + description: ansible-nautobot-1.2.1 + dns_name: ansible-nautobot-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 + description: ansible-nautobot-1.2.1 + dns_name: ansible-nautobot-1.2.1 role: HSRP status: Active diff --git a/tests/integration/targets/regression-v2.9/tasks/main.yml b/tests/integration/targets/regression-v2.9/tasks/main.yml index 0d7369c9..2fefc0eb 100644 --- a/tests/integration/targets/regression-v2.9/tasks/main.yml +++ b/tests/integration/targets/regression-v2.9/tasks/main.yml @@ -1,10 +1,10 @@ --- ## ## -### TEST NETBOX CONNECTION FAILURE +### TEST PYNAUTOBOT CONNECTION FAILURE ## ## -- name: "TEST NETBOX CONNECTION FAILURE" +- name: "TEST PYNAUTOBOT CONNECTION FAILURE" connection: local block: - name: "1 - Device with required information" @@ -161,7 +161,7 @@ - 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) + - name: Add ip address to nautobot and don't assign it to a device (Issue 372) networktocode.nautobot.ip_address: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" diff --git a/tests/integration/targets/v2.9/tasks/aggregate.yml b/tests/integration/targets/v2.9/tasks/aggregate.yml index ae0c332e..b577a2ce 100644 --- a/tests/integration/targets/v2.9/tasks/aggregate.yml +++ b/tests/integration/targets/v2.9/tasks/aggregate.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_AGGEGATE +### PYNAUTOBOT_AGGEGATE ## ## - name: "AGGREGATE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/cable.yml b/tests/integration/targets/v2.9/tasks/cable.yml index c359e8ed..823c5a00 100644 --- a/tests/integration/targets/v2.9/tasks/cable.yml +++ b/tests/integration/targets/v2.9/tasks/cable.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_CABLE +### PYNAUTOBOT_CABLE ## ## - name: "CABLE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/circuit.yml b/tests/integration/targets/v2.9/tasks/circuit.yml index ef1fbb78..46d3d316 100644 --- a/tests/integration/targets/v2.9/tasks/circuit.yml +++ b/tests/integration/targets/v2.9/tasks/circuit.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_CIRCUIT +### PYNAUTOBOT_CIRCUIT ## ## -- name: "NETBOX_CIRCUIT 1: Create provider within Netbox with only required information" +- name: "PYNAUTOBOT_CIRCUIT 1: Create provider within Nautobot with only required information" networktocode.nautobot.circuit: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -15,7 +15,7 @@ state: present register: test_one -- name: "NETBOX_CIRCUIT 1: ASSERT - Necessary info creation" +- name: "PYNAUTOBOT_CIRCUIT 1: ASSERT - Necessary info creation" assert: that: - test_one is changed @@ -26,7 +26,7 @@ - test_one['circuit']['type'] == 1 - test_one['msg'] == "circuit Test Circuit One created" -- name: "NETBOX_CIRCUIT 2: Duplicate" +- name: "PYNAUTOBOT_CIRCUIT 2: Duplicate" networktocode.nautobot.circuit: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -37,7 +37,7 @@ state: present register: test_two -- name: "NETBOX_CIRCUIT 2: ASSERT - Create duplicate" +- name: "PYNAUTOBOT_CIRCUIT 2: ASSERT - Create duplicate" assert: that: - not test_two['changed'] @@ -46,7 +46,7 @@ - test_two['circuit']['type'] == 1 - test_two['msg'] == "circuit Test Circuit One already exists" -- name: "NETBOX_CIRCUIT 3: Update provider with other fields" +- name: "PYNAUTOBOT_CIRCUIT 3: Update provider with other fields" networktocode.nautobot.circuit: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -63,7 +63,7 @@ state: present register: test_three -- name: "NETBOX_CIRCUIT 3: ASSERT - Updated" +- name: "PYNAUTOBOT_CIRCUIT 3: ASSERT - Updated" assert: that: - test_three is changed @@ -84,7 +84,7 @@ - test_three['circuit']['comments'] == "FAST CIRCUIT" - test_three['msg'] == "circuit Test Circuit One updated" -- name: "NETBOX_CIRCUIT 4: Delete provider within netbox" +- name: "PYNAUTOBOT_CIRCUIT 4: Delete provider within nautobot" networktocode.nautobot.circuit: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -93,7 +93,7 @@ state: absent register: test_four -- name: "NETBOX_CIRCUIT 4 : ASSERT - Delete" +- name: "PYNAUTOBOT_CIRCUIT 4 : ASSERT - Delete" assert: that: - test_four is changed diff --git a/tests/integration/targets/v2.9/tasks/circuit_termination.yml b/tests/integration/targets/v2.9/tasks/circuit_termination.yml index 68740242..3a270f61 100644 --- a/tests/integration/targets/v2.9/tasks/circuit_termination.yml +++ b/tests/integration/targets/v2.9/tasks/circuit_termination.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_CIRCUIT_TERMINATION +### PYNAUTOBOT_CIRCUIT_TERMINATION ## ## -- name: "NETBOX_CIRCUIT_TERMINATION 1: Create provider within Netbox with only required information" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 1: Create provider within Nautobot with only required information" networktocode.nautobot.circuit_termination: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -16,7 +16,7 @@ state: present register: test_one -- name: "NETBOX_CIRCUIT_TERMINATION 1: ASSERT - Necessary info creation" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 1: ASSERT - Necessary info creation" assert: that: - test_one is changed @@ -28,7 +28,7 @@ - test_one['circuit_termination']['port_speed'] == 10000 - test_one['msg'] == "circuit_termination test_circuit_a created" -- name: "NETBOX_CIRCUIT_TERMINATION 2: Duplicate" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 2: Duplicate" networktocode.nautobot.circuit_termination: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -38,7 +38,7 @@ state: present register: test_two -- name: "NETBOX_CIRCUIT_TERMINATION 2: ASSERT - Create duplicate" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 2: ASSERT - Create duplicate" assert: that: - not test_two['changed'] @@ -48,7 +48,7 @@ - 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" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 3: Update provider with other fields" networktocode.nautobot.circuit_termination: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -62,7 +62,7 @@ state: present register: test_three -- name: "NETBOX_CIRCUIT_TERMINATION 3: ASSERT - Updated" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 3: ASSERT - Updated" assert: that: - test_three is changed @@ -80,7 +80,7 @@ - test_three['circuit_termination']['description'] == "Test description" - test_three['msg'] == "circuit_termination test_circuit_a updated" -- name: "NETBOX_CIRCUIT_TERMINATION 4: Create Z Side" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 4: Create Z Side" networktocode.nautobot.circuit_termination: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -92,7 +92,7 @@ state: present register: test_four -- name: "NETBOX_CIRCUIT_TERMINATION 4: ASSERT - Create Z Side" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 4: ASSERT - Create Z Side" assert: that: - test_four is changed @@ -104,7 +104,7 @@ - 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" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 5: Delete provider within nautobot" networktocode.nautobot.circuit_termination: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -114,7 +114,7 @@ state: absent register: test_five -- name: "NETBOX_CIRCUIT_TERMINATION 5: ASSERT - Delete" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION 5: ASSERT - Delete" assert: that: - test_five is changed diff --git a/tests/integration/targets/v2.9/tasks/circuit_type.yml b/tests/integration/targets/v2.9/tasks/circuit_type.yml index fecb90ec..a3e861e1 100644 --- a/tests/integration/targets/v2.9/tasks/circuit_type.yml +++ b/tests/integration/targets/v2.9/tasks/circuit_type.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_CIRCUIT_TYPE +### PYNAUTOBOT_CIRCUIT_TYPE ## ## - name: "CIRCUIT_TYPE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/cluster.yml b/tests/integration/targets/v2.9/tasks/cluster.yml index 58b0cfeb..e3b661ca 100644 --- a/tests/integration/targets/v2.9/tasks/cluster.yml +++ b/tests/integration/targets/v2.9/tasks/cluster.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_CLUSTER +### PYNAUTOBOT_CLUSTER ## ## - name: "CLUSTER 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/cluster_group.yml b/tests/integration/targets/v2.9/tasks/cluster_group.yml index ed974440..1ce28771 100644 --- a/tests/integration/targets/v2.9/tasks/cluster_group.yml +++ b/tests/integration/targets/v2.9/tasks/cluster_group.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_CLUSTER_GROUP +### PYNAUTOBOT_CLUSTER_GROUP ## ## - name: "CLUSTER_GROUP 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/cluster_type.yml b/tests/integration/targets/v2.9/tasks/cluster_type.yml index 93ac8539..1f4e01fb 100644 --- a/tests/integration/targets/v2.9/tasks/cluster_type.yml +++ b/tests/integration/targets/v2.9/tasks/cluster_type.yml @@ -1,6 +1,6 @@ ## ## -### NETBOX_CLUSTER_TYPE +### PYNAUTOBOT_CLUSTER_TYPE ## ## - name: "CLUSTER_TYPE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/console_port.yml b/tests/integration/targets/v2.9/tasks/console_port.yml index a70d3061..1939ee63 100644 --- a/tests/integration/targets/v2.9/tasks/console_port.yml +++ b/tests/integration/targets/v2.9/tasks/console_port.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_CONSOLE_PORT +### PYNAUTOBOT_CONSOLE_PORT ## ## - name: "CONSOLE_PORT 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/console_port_template.yml b/tests/integration/targets/v2.9/tasks/console_port_template.yml index 48db96f0..49ead67e 100644 --- a/tests/integration/targets/v2.9/tasks/console_port_template.yml +++ b/tests/integration/targets/v2.9/tasks/console_port_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_CONSOLE_PORT_TEMPLATE +### PYNAUTOBOT_CONSOLE_PORT_TEMPLATE ## ## - name: "CONSOLE_PORT_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/console_server_port.yml b/tests/integration/targets/v2.9/tasks/console_server_port.yml index 25a3fa43..98c11690 100644 --- a/tests/integration/targets/v2.9/tasks/console_server_port.yml +++ b/tests/integration/targets/v2.9/tasks/console_server_port.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_CONSOLE_SERVER_PORT +### PYNAUTOBOT_CONSOLE_SERVER_PORT ## ## - name: "CONSOLE_SERVER_PORT 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/console_server_port_template.yml b/tests/integration/targets/v2.9/tasks/console_server_port_template.yml index 613da5dc..9420cb3d 100644 --- a/tests/integration/targets/v2.9/tasks/console_server_port_template.yml +++ b/tests/integration/targets/v2.9/tasks/console_server_port_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_CONSOLE_SERVER_PORT_TEMPLATE +### PYNAUTOBOT_CONSOLE_SERVER_PORT_TEMPLATE ## ## - name: "CONSOLE_SERVER_PORT_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/device.yml b/tests/integration/targets/v2.9/tasks/device.yml index 6e79e6c0..f5bf2258 100644 --- a/tests/integration/targets/v2.9/tasks/device.yml +++ b/tests/integration/targets/v2.9/tasks/device.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE +### PYNAUTOBOT_DEVICE ## ## - name: "1 - Device with required information" diff --git a/tests/integration/targets/v2.9/tasks/device_bay.yml b/tests/integration/targets/v2.9/tasks/device_bay.yml index 3993e295..9e11ad9d 100644 --- a/tests/integration/targets/v2.9/tasks/device_bay.yml +++ b/tests/integration/targets/v2.9/tasks/device_bay.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_BAY +### PYNAUTOBOT_DEVICE_BAY ## ## - name: "DEVICE_BAY 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/device_bay_template.yml b/tests/integration/targets/v2.9/tasks/device_bay_template.yml index be5519d3..2aeefe48 100644 --- a/tests/integration/targets/v2.9/tasks/device_bay_template.yml +++ b/tests/integration/targets/v2.9/tasks/device_bay_template.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_BAY_TEMPLATE +### PYNAUTOBOT_DEVICE_BAY_TEMPLATE ## ## - name: "DEVICE_BAY_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/device_interface.yml b/tests/integration/targets/v2.9/tasks/device_interface.yml index b6659a39..4a167cab 100644 --- a/tests/integration/targets/v2.9/tasks/device_interface.yml +++ b/tests/integration/targets/v2.9/tasks/device_interface.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_INTERFACE +### PYNAUTOBOT_DEVICE_INTERFACE ## ## - name: "1 - Interface with required information" diff --git a/tests/integration/targets/v2.9/tasks/device_interface_template.yml b/tests/integration/targets/v2.9/tasks/device_interface_template.yml index 840de653..fe148d4b 100644 --- a/tests/integration/targets/v2.9/tasks/device_interface_template.yml +++ b/tests/integration/targets/v2.9/tasks/device_interface_template.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_INTERFACE_TEMPLATE +### PYNAUTOBOT_DEVICE_INTERFACE_TEMPLATE ## ## - name: "1 - Interface with required information" diff --git a/tests/integration/targets/v2.9/tasks/device_role.yml b/tests/integration/targets/v2.9/tasks/device_role.yml index 0e96106a..fdcc0ca5 100644 --- a/tests/integration/targets/v2.9/tasks/device_role.yml +++ b/tests/integration/targets/v2.9/tasks/device_role.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_ROLE +### PYNAUTOBOT_DEVICE_ROLE ## ## - name: "DEVICE_ROLE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/device_type.yml b/tests/integration/targets/v2.9/tasks/device_type.yml index 11a32a0c..8ad92e7a 100644 --- a/tests/integration/targets/v2.9/tasks/device_type.yml +++ b/tests/integration/targets/v2.9/tasks/device_type.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_DEVICE_TYPE +### PYNAUTOBOT_DEVICE_TYPE ## ## - name: "DEVICE_TYPE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/front_port.yml b/tests/integration/targets/v2.9/tasks/front_port.yml index 605fa9da..9d44a2b8 100644 --- a/tests/integration/targets/v2.9/tasks/front_port.yml +++ b/tests/integration/targets/v2.9/tasks/front_port.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_FRONT_PORT +### PYNAUTOBOT_FRONT_PORT ## ## - name: "FRONT_PORT 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/front_port_template.yml b/tests/integration/targets/v2.9/tasks/front_port_template.yml index 4c9e0886..88c3754d 100644 --- a/tests/integration/targets/v2.9/tasks/front_port_template.yml +++ b/tests/integration/targets/v2.9/tasks/front_port_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_FRONT_PORT_TEMPLATE +### PYNAUTOBOT_FRONT_PORT_TEMPLATE ## ## - name: "FRONT_PORT_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/inventory_item.yml b/tests/integration/targets/v2.9/tasks/inventory_item.yml index bc4de3da..4cdee971 100644 --- a/tests/integration/targets/v2.9/tasks/inventory_item.yml +++ b/tests/integration/targets/v2.9/tasks/inventory_item.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_INVENTORY_ITEM +### PYNAUTOBOT_INVENTORY_ITEM ## ## - name: "INVENTORY_ITEM 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/ip_address.yml b/tests/integration/targets/v2.9/tasks/ip_address.yml index e3b8a8a1..652c1d02 100644 --- a/tests/integration/targets/v2.9/tasks/ip_address.yml +++ b/tests/integration/targets/v2.9/tasks/ip_address.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_IP_ADDRESS +### PYNAUTOBOT_IP_ADDRESS ## ## -- name: "1 - Create IP address within Netbox with only required information - State: Present" +- name: "1 - Create IP address within Nautobot with only required information - State: Present" networktocode.nautobot.ip_address: url: http://localhost.org:32768 token: 0123456789abcdef0123456789abcdef01234567 diff --git a/tests/integration/targets/v2.9/tasks/ipam_role.yml b/tests/integration/targets/v2.9/tasks/ipam_role.yml index 5b9d1fa2..f2a7d023 100644 --- a/tests/integration/targets/v2.9/tasks/ipam_role.yml +++ b/tests/integration/targets/v2.9/tasks/ipam_role.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_IPAM_ROLE +### PYNAUTOBOT_IPAM_ROLE ## ## - name: "IPAM_ROLE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/lookup.yml b/tests/integration/targets/v2.9/tasks/lookup.yml index 3b750b4f..cec2caad 100644 --- a/tests/integration/targets/v2.9/tasks/lookup.yml +++ b/tests/integration/targets/v2.9/tasks/lookup.yml @@ -1,34 +1,34 @@ --- ## ## -### NETBOX_LOOKUP +### PYNAUTOBOT_LOOKUP ## ## -- name: "NETBOX_LOOKUP 1: Lookup returns exactly two sites" +- name: "PYNAUTOBOT_LOOKUP 1: Lookup returns exactly two sites" assert: that: "{{ query_result|count }} == 3" vars: query_result: "{{ query('networktocode.nautobot.lookup', 'sites', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" -- name: "NETBOX_LOOKUP 2: Query doesn't return Wibble (sanity check json_query)" +- name: "PYNAUTOBOT_LOOKUP 2: Query doesn't return Wibble (sanity check json_query)" assert: that: "{{ query_result|json_query('[?value.display_name==`Wibble`]')|count }} == 0" vars: query_result: "{{ query('networktocode.nautobot.lookup', 'devices', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" -- name: "NETBOX_LOOKUP 3: Device query returns exactly one TestDeviceR1" +- name: "PYNAUTOBOT_LOOKUP 3: Device query returns exactly one TestDeviceR1" assert: that: "{{ query_result|json_query('[?value.display_name==`TestDeviceR1`]')|count }} == 1" vars: query_result: "{{ query('networktocode.nautobot.lookup', 'devices', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" -- name: "NETBOX_LOOKUP 4: VLAN ID 400 can be queried and is named 'Test VLAN'" +- name: "PYNAUTOBOT_LOOKUP 4: VLAN ID 400 can be queried and is named 'Test VLAN'" assert: that: "{{ (query_result|json_query('[?value.vid==`400`].value.name'))[0] == 'Test VLAN' }}" vars: query_result: "{{ query('networktocode.nautobot.lookup', 'vlans', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" -- name: "NETBOX_LOOKUP 5: Add one of two devices for lookup filter test." +- name: "PYNAUTOBOT_LOOKUP 5: Add one of two devices for lookup filter test." networktocode.nautobot.device: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -42,7 +42,7 @@ - "nolookup" state: present -- name: "NETBOX_LOOKUP 6: Add two of two devices for lookup filter test." +- name: "PYNAUTOBOT_LOOKUP 6: Add two of two devices for lookup filter test." networktocode.nautobot.device: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -56,19 +56,19 @@ - "lookup" state: present -- name: "NETBOX_LOOKUP 7: Device query returns exactly the L2 device" +- name: "PYNAUTOBOT_LOOKUP 7: Device query returns exactly the L2 device" assert: that: "{{ query_result|json_query('[?value.display_name==`L2`]')|count }} == 1" vars: query_result: "{{ query('networktocode.nautobot.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" +- name: "PYNAUTOBOT_LOOKUP 8: Device query specifying raw data returns payload without key/value dict" assert: that: "{{ query_result|json_query('[?display_name==`L2`]')|count }} == 1" vars: query_result: "{{ query('networktocode.nautobot.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" +- name: "PYNAUTOBOT_LOOKUP 9: Device query specifying multiple sites, Make sure L1 and L2 are in the results" assert: that: - "'L1' in {{ query_result |json_query('[*].display_name') }}" @@ -76,7 +76,7 @@ vars: query_result: "{{ query('networktocode.nautobot.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" +- name: "PYNAUTOBOT_LOOKUP 10: Device query by ID" assert: that: - "{{ query('networktocode.nautobot.lookup', 'devices', api_filter='id=1', api_endpoint='http://localhost:32768', token='0123456789abcdef0123456789abcdef01234567') }}" diff --git a/tests/integration/targets/v2.9/tasks/main.yml b/tests/integration/targets/v2.9/tasks/main.yml index 7f27910d..589685ea 100644 --- a/tests/integration/targets/v2.9/tasks/main.yml +++ b/tests/integration/targets/v2.9/tasks/main.yml @@ -1,159 +1,159 @@ --- -- name: "NETBOX_DEVICE TESTS" +- name: "PYNAUTOBOT_DEVICE TESTS" include_tasks: "device.yml" -- name: "NETBOX_DEVICE_INTERFACE TESTS" +- name: "PYNAUTOBOT_DEVICE_INTERFACE TESTS" include_tasks: "device_interface.yml" -- name: "NETBOX_DEVICE_INTERFACE_TEMPLATE TESTS" +- name: "PYNAUTOBOT_DEVICE_INTERFACE_TEMPLATE TESTS" include_tasks: "device_interface_template.yml" -- name: "NETBOX_IP_ADDRESS TESTS" +- name: "PYNAUTOBOT_IP_ADDRESS TESTS" include_tasks: "ip_address.yml" -- name: "NETBOX_PREFIX TESTS" +- name: "PYNAUTOBOT_PREFIX TESTS" include_tasks: "prefix.yml" -- name: "NETBOX_SITE TESTS" +- name: "PYNAUTOBOT_SITE TESTS" include_tasks: "site.yml" -- name: "NETBOX_TENTANT TESTS" +- name: "PYNAUTOBOT_TENTANT TESTS" include_tasks: "tenant.yml" -- name: "NETBOX_TENTANT_GROUP TESTS" +- name: "PYNAUTOBOT_TENTANT_GROUP TESTS" include_tasks: "tenant_group.yml" -- name: "NETBOX_RACK TESTS" +- name: "PYNAUTOBOT_RACK TESTS" include_tasks: "rack.yml" -- name: "NETBOX_RACK_ROLE TESTS" +- name: "PYNAUTOBOT_RACK_ROLE TESTS" include_tasks: "rack_role.yml" -- name: "NETBOX_RACK_GROUP TESTS" +- name: "PYNAUTOBOT_RACK_GROUP TESTS" include_tasks: "rack_group.yml" -- name: "NETBOX_MANUFACTURER TESTS" +- name: "PYNAUTOBOT_MANUFACTURER TESTS" include_tasks: "manufacturer.yml" -- name: "NETBOX_PLATFORM TESTS" +- name: "PYNAUTOBOT_PLATFORM TESTS" include_tasks: "platform.yml" -- name: "NETBOX_DEVICE_TYPE TESTS" +- name: "PYNAUTOBOT_DEVICE_TYPE TESTS" include_tasks: "device_type.yml" -- name: "NETBOX_DEVICE_ROLE TESTS" +- name: "PYNAUTOBOT_DEVICE_ROLE TESTS" include_tasks: "device_role.yml" -- name: "NETBOX_IPAM_ROLE TESTS" +- name: "PYNAUTOBOT_IPAM_ROLE TESTS" include_tasks: "ipam_role.yml" -- name: "NETBOX_VLAN_GROUP TESTS" +- name: "PYNAUTOBOT_VLAN_GROUP TESTS" include_tasks: "vlan_group.yml" -- name: "NETBOX_VLAN TESTS" +- name: "PYNAUTOBOT_VLAN TESTS" include_tasks: "vlan.yml" -- name: "NETBOX_VRF TESTS" +- name: "PYNAUTOBOT_VRF TESTS" include_tasks: "vrf.yml" -- name: "NETBOX_RIR TESTS" +- name: "PYNAUTOBOT_RIR TESTS" include_tasks: "rir.yml" -- name: "NETBOX_AGGREGATE TESTS" +- name: "PYNAUTOBOT_AGGREGATE TESTS" include_tasks: "aggregate.yml" -- name: "NETBOX_REGION TESTS" +- name: "PYNAUTOBOT_REGION TESTS" include_tasks: "region.yml" -- name: "NETBOX_DEVICE_BAY TESTS" +- name: "PYNAUTOBOT_DEVICE_BAY TESTS" include_tasks: "device_bay.yml" -- name: "NETBOX_DEVICE_BAY_TEMPLATE TESTS" +- name: "PYNAUTOBOT_DEVICE_BAY_TEMPLATE TESTS" include_tasks: "device_bay_template.yml" -- name: "NETBOX_INVENTORY_ITEM TESTS" +- name: "PYNAUTOBOT_INVENTORY_ITEM TESTS" include_tasks: "inventory_item.yml" -- name: "NETBOX_VIRTUAL_MACHINE TESTS" +- name: "PYNAUTOBOT_VIRTUAL_MACHINE TESTS" include_tasks: "virtual_machine.yml" -- name: "NETBOX_CLUSTER TESTS" +- name: "PYNAUTOBOT_CLUSTER TESTS" include_tasks: "cluster.yml" -- name: "NETBOX_CLUSTER_GROUP TESTS" +- name: "PYNAUTOBOT_CLUSTER_GROUP TESTS" include_tasks: "cluster_group.yml" -- name: "NETBOX_CLUSTER_TYPE TESTS" +- name: "PYNAUTOBOT_CLUSTER_TYPE TESTS" include_tasks: "cluster_type.yml" -- name: "NETBOX_VM_INTERFACE TESTS" +- name: "PYNAUTOBOT_VM_INTERFACE TESTS" include_tasks: "vm_interface.yml" -- name: "NETBOX_PROVIDER TESTS" +- name: "PYNAUTOBOT_PROVIDER TESTS" include_tasks: "provider.yml" -- name: "NETBOX_CIRCUIT_TYPE TESTS" +- name: "PYNAUTOBOT_CIRCUIT_TYPE TESTS" include_tasks: "circuit_type.yml" -- name: "NETBOX_CIRCUIT TESTS" +- name: "PYNAUTOBOT_CIRCUIT TESTS" include_tasks: "circuit.yml" -- name: "NETBOX_CIRCUIT_TERMINATION TESTS" +- name: "PYNAUTOBOT_CIRCUIT_TERMINATION TESTS" include_tasks: "circuit_termination.yml" -- name: "NETBOX_REAR_PORT TESTS" +- name: "PYNAUTOBOT_REAR_PORT TESTS" include_tasks: "rear_port.yml" -- name: "NETBOX_REAR_PORT_TEMPLATE TESTS" +- name: "PYNAUTOBOT_REAR_PORT_TEMPLATE TESTS" include_tasks: "rear_port_template.yml" -- name: "NETBOX_FRONT_PORT TESTS" +- name: "PYNAUTOBOT_FRONT_PORT TESTS" include_tasks: "front_port.yml" -- name: "NETBOX_FRONT_PORT_TEMPLATE TESTS" +- name: "PYNAUTOBOT_FRONT_PORT_TEMPLATE TESTS" include_tasks: "front_port_template.yml" -- name: "NETBOX_CONSOLE_PORT TESTS" +- name: "PYNAUTOBOT_CONSOLE_PORT TESTS" include_tasks: "console_port.yml" -- name: "NETBOX_CONSOLE_PORT_TEMPLATE TESTS" +- name: "PYNAUTOBOT_CONSOLE_PORT_TEMPLATE TESTS" include_tasks: "console_port_template.yml" -- name: "NETBOX_CONSOLE_SERVER_PORT TESTS" +- name: "PYNAUTOBOT_CONSOLE_SERVER_PORT TESTS" include_tasks: "console_server_port.yml" -- name: "NETBOX_CONSOLE_SERVER_PORT_TEMPLATE TESTS" +- name: "PYNAUTOBOT_CONSOLE_SERVER_PORT_TEMPLATE TESTS" include_tasks: "console_server_port_template.yml" -- name: "NETBOX_POWER_PANEL TESTS" +- name: "PYNAUTOBOT_POWER_PANEL TESTS" include_tasks: "power_panel.yml" -- name: "NETBOX_POWER_FEED TESTS" +- name: "PYNAUTOBOT_POWER_FEED TESTS" include_tasks: "power_feed.yml" -- name: "NETBOX_POWER_PORT TESTS" +- name: "PYNAUTOBOT_POWER_PORT TESTS" include_tasks: "power_port.yml" -- name: "NETBOX_POWER_PORT_TEMPLATE TESTS" +- name: "PYNAUTOBOT_POWER_PORT_TEMPLATE TESTS" include_tasks: "power_port_template.yml" -- name: "NETBOX_POWER_OUTLET TESTS" +- name: "PYNAUTOBOT_POWER_OUTLET TESTS" include_tasks: "power_outlet.yml" -- name: "NETBOX_POWER_OUTLET_TEMPLATE TESTS" +- name: "PYNAUTOBOT_POWER_OUTLET_TEMPLATE TESTS" include_tasks: "power_outlet_template.yml" -- name: "NETBOX_VIRTUAL_CHASSIS TESTS" +- name: "PYNAUTOBOT_VIRTUAL_CHASSIS TESTS" include_tasks: "virtual_chassis.yml" -- name: "NETBOX_CABLE TESTS" +- name: "PYNAUTOBOT_CABLE TESTS" include_tasks: "cable.yml" -- name: "NETBOX_SERVICE TESTS" +- name: "PYNAUTOBOT_SERVICE TESTS" include_tasks: "service.yml" -- name: "NETBOX_LOOKUP TESTS" +- name: "PYNAUTOBOT_LOOKUP TESTS" include_tasks: "lookup.yml" -- name: "NETBOX_TAG_TESTS" +- name: "PYNAUTOBOT_TAG_TESTS" include_tasks: "tag.yml" diff --git a/tests/integration/targets/v2.9/tasks/manufacturer.yml b/tests/integration/targets/v2.9/tasks/manufacturer.yml index d105dec4..1199683c 100644 --- a/tests/integration/targets/v2.9/tasks/manufacturer.yml +++ b/tests/integration/targets/v2.9/tasks/manufacturer.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_MANUFACTURER +### PYNAUTOBOT_MANUFACTURER ## ## - name: "MANUFACTURER 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/platform.yml b/tests/integration/targets/v2.9/tasks/platform.yml index ba1586e2..5e9c84ec 100644 --- a/tests/integration/targets/v2.9/tasks/platform.yml +++ b/tests/integration/targets/v2.9/tasks/platform.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_PLATFORM +### PYNAUTOBOT_PLATFORM ## ## - name: "PLATFORM 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/power_feed.yml b/tests/integration/targets/v2.9/tasks/power_feed.yml index 24c9b0ec..3014756c 100644 --- a/tests/integration/targets/v2.9/tasks/power_feed.yml +++ b/tests/integration/targets/v2.9/tasks/power_feed.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_FEED +### PYNAUTOBOT_POWER_FEED ## ## - name: "POWER_FEED 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/power_outlet.yml b/tests/integration/targets/v2.9/tasks/power_outlet.yml index 22eae571..32ab2cf7 100644 --- a/tests/integration/targets/v2.9/tasks/power_outlet.yml +++ b/tests/integration/targets/v2.9/tasks/power_outlet.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_OUTLET +### PYNAUTOBOT_POWER_OUTLET ## ## - name: "POWER_OUTLET 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/power_outlet_template.yml b/tests/integration/targets/v2.9/tasks/power_outlet_template.yml index 869c5092..ae196e74 100644 --- a/tests/integration/targets/v2.9/tasks/power_outlet_template.yml +++ b/tests/integration/targets/v2.9/tasks/power_outlet_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_OUTLET_TEMPLATE +### PYNAUTOBOT_POWER_OUTLET_TEMPLATE ## ## - name: "POWER_OUTLET_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/power_panel.yml b/tests/integration/targets/v2.9/tasks/power_panel.yml index a98dbb49..184cdcb4 100644 --- a/tests/integration/targets/v2.9/tasks/power_panel.yml +++ b/tests/integration/targets/v2.9/tasks/power_panel.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_PANEL +### PYNAUTOBOT_POWER_PANEL ## ## - name: "POWER_PANEL 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/power_port.yml b/tests/integration/targets/v2.9/tasks/power_port.yml index 04f09d1a..3583361b 100644 --- a/tests/integration/targets/v2.9/tasks/power_port.yml +++ b/tests/integration/targets/v2.9/tasks/power_port.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_PORT +### PYNAUTOBOT_POWER_PORT ## ## - name: "POWER_PORT 0: Create device for testing power ports" diff --git a/tests/integration/targets/v2.9/tasks/power_port_template.yml b/tests/integration/targets/v2.9/tasks/power_port_template.yml index 77533a96..e6a4407d 100644 --- a/tests/integration/targets/v2.9/tasks/power_port_template.yml +++ b/tests/integration/targets/v2.9/tasks/power_port_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_POWER_PORT_TEMPLATE +### PYNAUTOBOT_POWER_PORT_TEMPLATE ## ## - name: "POWER_PORT_TEMPLATE 0: Create device type for testing power ports" diff --git a/tests/integration/targets/v2.9/tasks/prefix.yml b/tests/integration/targets/v2.9/tasks/prefix.yml index 1f014752..71fdbd00 100644 --- a/tests/integration/targets/v2.9/tasks/prefix.yml +++ b/tests/integration/targets/v2.9/tasks/prefix.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_PREFIX +### PYNAUTOBOT_PREFIX ## ## -- name: "1 - Create prefix within Netbox with only required information" +- name: "1 - Create prefix within Nautobot with only required information" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -63,7 +63,7 @@ - test_three['prefix']['status'] == "reserved" - test_three['prefix']['description'] == "This prefix has been updated" -- name: "4 - Delete prefix within netbox" +- name: "4 - Delete prefix within nautobot" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -123,7 +123,7 @@ - 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" +- name: "6 - Get a new /24 inside 10.156.0.0/19 within Nautobot - Parent doesn't exist" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -140,7 +140,7 @@ - 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" +- name: "7 - Create prefix within Nautobot with only required information" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -158,7 +158,7 @@ - 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" +- name: "8 - Get a new /24 inside 10.156.0.0/19 within Nautobot" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -200,7 +200,7 @@ - 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" +- name: "10 - Get a new /24 inside 10.157.0.0/19 within Nautobot with additional values" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -224,7 +224,7 @@ - test_ten['prefix']['site'] == 1 - test_ten['prefix']['vrf'] == 1 -- name: "11 - Get a new /24 inside 10.156.0.0/19 within Netbox" +- name: "11 - Get a new /24 inside 10.156.0.0/19 within Nautobot" networktocode.nautobot.prefix: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 diff --git a/tests/integration/targets/v2.9/tasks/provider.yml b/tests/integration/targets/v2.9/tasks/provider.yml index df09a355..4c4ea2e8 100644 --- a/tests/integration/targets/v2.9/tasks/provider.yml +++ b/tests/integration/targets/v2.9/tasks/provider.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_PROVIDER +### PYNAUTOBOT_PROVIDER ## ## -- name: "NETBOX_PROVIDER 1: Create provider within Netbox with only required information" +- name: "PYNAUTOBOT_PROVIDER 1: Create provider within Nautobot with only required information" networktocode.nautobot.provider: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -13,7 +13,7 @@ state: present register: test_one -- name: "NETBOX_PROVIDER 1: ASSERT - Necessary info creation" +- name: "PYNAUTOBOT_PROVIDER 1: ASSERT - Necessary info creation" assert: that: - test_one is changed @@ -23,7 +23,7 @@ - test_one['provider']['slug'] == "test-provider-one" - test_one['msg'] == "provider Test Provider One created" -- name: "NETBOX_PROVIDER 2: Duplicate" +- name: "PYNAUTOBOT_PROVIDER 2: Duplicate" networktocode.nautobot.provider: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -32,7 +32,7 @@ state: present register: test_two -- name: "NETBOX_PROVIDER 2: ASSERT - Create duplicate" +- name: "PYNAUTOBOT_PROVIDER 2: ASSERT - Create duplicate" assert: that: - not test_two['changed'] @@ -40,7 +40,7 @@ - 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" +- name: "PYNAUTOBOT_PROVIDER 3: Update provider with other fields" networktocode.nautobot.provider: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -55,7 +55,7 @@ state: present register: test_three -- name: "NETBOX_PROVIDER 3: ASSERT - Updated" +- name: "PYNAUTOBOT_PROVIDER 3: ASSERT - Updated" assert: that: - test_three is changed @@ -75,7 +75,7 @@ - test_three['provider']['comments'] == "BAD PROVIDER" - test_three['msg'] == "provider Test Provider One updated" -- name: "NETBOX_PROVIDER 4: Delete provider within netbox" +- name: "PYNAUTOBOT_PROVIDER 4: Delete provider within nautobot" networktocode.nautobot.provider: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -84,7 +84,7 @@ state: absent register: test_four -- name: "NETBOX_PROVIDER 4 : ASSERT - Delete" +- name: "PYNAUTOBOT_PROVIDER 4 : ASSERT - Delete" assert: that: - test_four is changed diff --git a/tests/integration/targets/v2.9/tasks/rack.yml b/tests/integration/targets/v2.9/tasks/rack.yml index 8273d1de..33ed4a1e 100644 --- a/tests/integration/targets/v2.9/tasks/rack.yml +++ b/tests/integration/targets/v2.9/tasks/rack.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_RACK +### PYNAUTOBOT_RACK ## ## - name: "1 - Test rack creation" diff --git a/tests/integration/targets/v2.9/tasks/rack_group.yml b/tests/integration/targets/v2.9/tasks/rack_group.yml index 4e7064fa..c7bac243 100644 --- a/tests/integration/targets/v2.9/tasks/rack_group.yml +++ b/tests/integration/targets/v2.9/tasks/rack_group.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_RACK_GROUP +### PYNAUTOBOT_RACK_GROUP ## ## - name: "RACK_GROUP 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/rack_role.yml b/tests/integration/targets/v2.9/tasks/rack_role.yml index d0fdcec2..446376ce 100644 --- a/tests/integration/targets/v2.9/tasks/rack_role.yml +++ b/tests/integration/targets/v2.9/tasks/rack_role.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_RACK_ROLE +### PYNAUTOBOT_RACK_ROLE ## ## - name: "RACK_ROLE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/rear_port.yml b/tests/integration/targets/v2.9/tasks/rear_port.yml index 887442ff..176691dc 100644 --- a/tests/integration/targets/v2.9/tasks/rear_port.yml +++ b/tests/integration/targets/v2.9/tasks/rear_port.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_REAR_PORT +### PYNAUTOBOT_REAR_PORT ## ## - name: "REAR_PORT 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/rear_port_template.yml b/tests/integration/targets/v2.9/tasks/rear_port_template.yml index f0a9b740..b6e2fe20 100644 --- a/tests/integration/targets/v2.9/tasks/rear_port_template.yml +++ b/tests/integration/targets/v2.9/tasks/rear_port_template.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_REAR_PORT_TEMPLATE +### PYNAUTOBOT_REAR_PORT_TEMPLATE ## ## - name: "REAR_PORT_TEMPLATE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/region.yml b/tests/integration/targets/v2.9/tasks/region.yml index 47cea024..afd5db0a 100644 --- a/tests/integration/targets/v2.9/tasks/region.yml +++ b/tests/integration/targets/v2.9/tasks/region.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_REGION +### PYNAUTOBOT_REGION ## ## - name: "REGION 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/rir.yml b/tests/integration/targets/v2.9/tasks/rir.yml index 41c9e821..9be96af7 100644 --- a/tests/integration/targets/v2.9/tasks/rir.yml +++ b/tests/integration/targets/v2.9/tasks/rir.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_RIR +### PYNAUTOBOT_RIR ## ## - name: "RIR 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/service.yml b/tests/integration/targets/v2.9/tasks/service.yml index 8869b178..9fc64b26 100644 --- a/tests/integration/targets/v2.9/tasks/service.yml +++ b/tests/integration/targets/v2.9/tasks/service.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_SERVICE +### PYNAUTOBOT_SERVICE ## ## - name: "1 - Device with required information needs to add new service" @@ -16,7 +16,7 @@ status: "Staged" state: present -- name: "NETBOX_SERVICE: Create new service" +- name: "PYNAUTOBOT_SERVICE: Create new service" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -28,7 +28,7 @@ state: present register: test_service_create -- name: "NETBOX_SERVICE ASSERT - Create" +- name: "PYNAUTOBOT_SERVICE ASSERT - Create" assert: that: - test_service_create is changed @@ -39,7 +39,7 @@ - test_service_create['diff']['before']['state'] == "absent" - test_service_create['msg'] == "services node-exporter created" -- name: "NETBOX_SERVICE: Test idempotence" +- name: "PYNAUTOBOT_SERVICE: Test idempotence" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -51,7 +51,7 @@ state: present register: test_service_idempotence -- name: "NETBOX_SERVICE ASSERT - Not changed" +- name: "PYNAUTOBOT_SERVICE ASSERT - Not changed" assert: that: - test_service_idempotence['services']['name'] == "node-exporter" @@ -59,7 +59,7 @@ - test_service_idempotence['services']['protocol'] == "tcp" - test_service_idempotence['msg'] == "services node-exporter already exists" -- name: "NETBOX_SERVICE: Test update" +- name: "PYNAUTOBOT_SERVICE: Test update" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -73,14 +73,14 @@ state: present register: test_service_update -- name: "NETBOX_SERVICE ASSERT - Service has been updated" +- name: "PYNAUTOBOT_SERVICE ASSERT - Service has been updated" assert: that: - test_service_update is changed - test_service_update['diff']['after']['tags'][0] == 4 - test_service_update['msg'] == "services node-exporter updated" -- name: "NETBOX_SERVICE: Test same details, but different protocol - Create" +- name: "PYNAUTOBOT_SERVICE: Test same details, but different protocol - Create" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -92,7 +92,7 @@ state: present register: test_service_protocol -- name: "NETBOX_SERVICE ASSERT - Different protocol - Create" +- name: "PYNAUTOBOT_SERVICE ASSERT - Different protocol - Create" assert: that: - test_service_protocol is changed @@ -103,7 +103,7 @@ - test_service_protocol['services']['protocol'] == "udp" - test_service_protocol['msg'] == "services node-exporter created" -- name: "NETBOX_SERVICE: Test service deletion" +- name: "PYNAUTOBOT_SERVICE: Test service deletion" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -115,7 +115,7 @@ state: absent register: test_service_delete -- name: "NETBOX_SERVICE ASSERT - Service has been deleted" +- name: "PYNAUTOBOT_SERVICE ASSERT - Service has been deleted" assert: that: - test_service_delete is changed @@ -123,7 +123,7 @@ - test_service_delete['diff']['before']['state'] == "present" - test_service_delete['msg'] == "services node-exporter deleted" -- name: "NETBOX_SERVICE: Test service IP addresses" +- name: "PYNAUTOBOT_SERVICE: Test service IP addresses" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -137,7 +137,7 @@ state: present register: test_service_ip_addresses -- name: "NETBOX_SERVICE ASSERT - Service has been created with IP address" +- name: "PYNAUTOBOT_SERVICE ASSERT - Service has been created with IP address" assert: that: - test_service_ip_addresses is changed @@ -149,7 +149,7 @@ - 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" +- name: "PYNAUTOBOT_SERVICE: Missing both device & virtual_machine options - Tests required_one_of" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -163,13 +163,13 @@ ignore_errors: yes register: test_service_required_one_of -- name: "NETBOX_SERVICE ASSERT - Failed due to missing arguments" +- name: "PYNAUTOBOT_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" +- name: "PYNAUTOBOT_SERVICE: Create new service on virtual_machine" networktocode.nautobot.service: url: "http://localhost:32768" token: "0123456789abcdef0123456789abcdef01234567" @@ -181,7 +181,7 @@ state: present register: test_service_create_vm -- name: "NETBOX_SERVICE ASSERT - Create" +- name: "PYNAUTOBOT_SERVICE ASSERT - Create" assert: that: - test_service_create_vm is changed diff --git a/tests/integration/targets/v2.9/tasks/site.yml b/tests/integration/targets/v2.9/tasks/site.yml index fe0f06ce..ce1e4578 100644 --- a/tests/integration/targets/v2.9/tasks/site.yml +++ b/tests/integration/targets/v2.9/tasks/site.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_SITE +### PYNAUTOBOT_SITE ## ## -- name: "1 - Create site within Netbox with only required information" +- name: "1 - Create site within Nautobot with only required information" networktocode.nautobot.site: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -113,7 +113,7 @@ - test_four['site']['comments'] == "### Placeholder" - test_four['site']['slug'] == "test_california" -- name: "NETBOX_SITE_IDEM: Idempotency - Create duplicate site with all parameters" +- name: "PYNAUTOBOT_SITE_IDEM: Idempotency - Create duplicate site with all parameters" networktocode.nautobot.site: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -138,7 +138,7 @@ state: present register: test_results -- name: "NETBOX_SITE_IDEM: (ASSERT) Idempotency - Duplicate device site with all parameters" +- name: "PYNAUTOBOT_SITE_IDEM: (ASSERT) Idempotency - Duplicate device site with all parameters" assert: that: - test_results is not changed @@ -161,7 +161,7 @@ - test_results['site']['comments'] == "### Placeholder" - test_results['site']['slug'] == "test_california" -- name: "5 - Delete site within netbox" +- name: "5 - Delete site within nautobot" networktocode.nautobot.site: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 diff --git a/tests/integration/targets/v2.9/tasks/tag.yml b/tests/integration/targets/v2.9/tasks/tag.yml index 99e0ff12..88f61a46 100644 --- a/tests/integration/targets/v2.9/tasks/tag.yml +++ b/tests/integration/targets/v2.9/tasks/tag.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_TAGS +### PYNAUTOBOT_TAGS ## ## - name: "TAG 1: ASSERT - Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/tenant.yml b/tests/integration/targets/v2.9/tasks/tenant.yml index da16d4bc..85646f58 100644 --- a/tests/integration/targets/v2.9/tasks/tenant.yml +++ b/tests/integration/targets/v2.9/tasks/tenant.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_TENANT +### PYNAUTOBOT_TENANT ## ## - name: "1 - Test tenant creation" diff --git a/tests/integration/targets/v2.9/tasks/tenant_group.yml b/tests/integration/targets/v2.9/tasks/tenant_group.yml index fd2a92bc..63bda776 100644 --- a/tests/integration/targets/v2.9/tasks/tenant_group.yml +++ b/tests/integration/targets/v2.9/tasks/tenant_group.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_TENANT_GROUP +### PYNAUTOBOT_TENANT_GROUP ## ## - name: "1 - Test tenant group creation" diff --git a/tests/integration/targets/v2.9/tasks/virtual_chassis.yml b/tests/integration/targets/v2.9/tasks/virtual_chassis.yml index fc8f6a4f..aa2fddac 100644 --- a/tests/integration/targets/v2.9/tasks/virtual_chassis.yml +++ b/tests/integration/targets/v2.9/tasks/virtual_chassis.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-only ## ## -### NETBOX_VIRTUAL_CHASSIS +### PYNAUTOBOT_VIRTUAL_CHASSIS ## ## - name: "VIRTUAL_CHASSIS 0: Create device for testing virtual chassis" diff --git a/tests/integration/targets/v2.9/tasks/virtual_machine.yml b/tests/integration/targets/v2.9/tasks/virtual_machine.yml index 6fc72933..40f5f608 100644 --- a/tests/integration/targets/v2.9/tasks/virtual_machine.yml +++ b/tests/integration/targets/v2.9/tasks/virtual_machine.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_VIRTUAL_MACHINES +### PYNAUTOBOT_VIRTUAL_MACHINES ## ## - name: "VIRTUAL_MACHINE 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/vlan.yml b/tests/integration/targets/v2.9/tasks/vlan.yml index 5d8af503..c7b2f084 100644 --- a/tests/integration/targets/v2.9/tasks/vlan.yml +++ b/tests/integration/targets/v2.9/tasks/vlan.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_VLAN +### PYNAUTOBOT_VLAN ## ## - name: "VLAN 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/vlan_group.yml b/tests/integration/targets/v2.9/tasks/vlan_group.yml index 50f411e8..38053297 100644 --- a/tests/integration/targets/v2.9/tasks/vlan_group.yml +++ b/tests/integration/targets/v2.9/tasks/vlan_group.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_VLAN_GROUP +### PYNAUTOBOT_VLAN_GROUP ## ## - name: "VLAN_GROUP 1: Necessary info creation" diff --git a/tests/integration/targets/v2.9/tasks/vm_interface.yml b/tests/integration/targets/v2.9/tasks/vm_interface.yml index 94173aa6..4429ce05 100644 --- a/tests/integration/targets/v2.9/tasks/vm_interface.yml +++ b/tests/integration/targets/v2.9/tasks/vm_interface.yml @@ -1,10 +1,10 @@ --- ## ## -### NETBOX_VM_INTERFACE +### PYNAUTOBOT_VM_INTERFACE ## ## -- name: "NETBOX_VM_INTERFACE 1: Necessary info creation" +- name: "PYNAUTOBOT_VM_INTERFACE 1: Necessary info creation" networktocode.nautobot.vm_interface: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -14,7 +14,7 @@ state: present register: test_one -- name: "NETBOX_VM_INTERFACE 1: ASSERT - Necessary info creation" +- name: "PYNAUTOBOT_VM_INTERFACE 1: ASSERT - Necessary info creation" assert: that: - test_one is changed @@ -24,7 +24,7 @@ - test_one['interface']['virtual_machine'] == 1 - test_one['msg'] == "interface Eth10 created" -- name: "NETBOX_VM_INTERFACE 2: Create duplicate" +- name: "PYNAUTOBOT_VM_INTERFACE 2: Create duplicate" networktocode.nautobot.vm_interface: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -34,7 +34,7 @@ state: present register: test_two -- name: "NETBOX_VM_INTERFACE 2: ASSERT - Create duplicate" +- name: "PYNAUTOBOT_VM_INTERFACE 2: ASSERT - Create duplicate" assert: that: - not test_two['changed'] @@ -42,7 +42,7 @@ - test_two['interface']['virtual_machine'] == 1 - test_two['msg'] == "interface Eth10 already exists" -- name: "NETBOX_VM_INTERFACE 3: Updated" +- name: "PYNAUTOBOT_VM_INTERFACE 3: Updated" networktocode.nautobot.vm_interface: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -67,7 +67,7 @@ state: present register: test_three -- name: "NETBOX_VM_INTERFACE 4: ASSERT - Updated" +- name: "PYNAUTOBOT_VM_INTERFACE 4: ASSERT - Updated" assert: that: - test_three is changed @@ -91,7 +91,7 @@ - test_three['interface']['tags'][0] == 4 - test_three['msg'] == "interface Eth10 updated" -- name: "NETBOX_VM_INTERFACE 4: ASSERT - Delete" +- name: "PYNAUTOBOT_VM_INTERFACE 4: ASSERT - Delete" networktocode.nautobot.vm_interface: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -101,7 +101,7 @@ state: absent register: test_four -- name: "NETBOX_VM_INTERFACE 4: ASSERT - Delete" +- name: "PYNAUTOBOT_VM_INTERFACE 4: ASSERT - Delete" assert: that: - test_four is changed @@ -109,7 +109,7 @@ - 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" +- name: "PYNAUTOBOT_VM_INTERFACE 5: Attempt to update interface with same name on other VMs" networktocode.nautobot.vm_interface: url: http://localhost:32768 token: 0123456789abcdef0123456789abcdef01234567 @@ -134,7 +134,7 @@ state: present register: test_five -- name: "NETBOX_VM_INTERFACE 5: ASSERT - Updated" +- name: "PYNAUTOBOT_VM_INTERFACE 5: ASSERT - Updated" assert: that: - test_five is changed diff --git a/tests/integration/targets/v2.9/tasks/vrf.yml b/tests/integration/targets/v2.9/tasks/vrf.yml index be39e678..c395806f 100644 --- a/tests/integration/targets/v2.9/tasks/vrf.yml +++ b/tests/integration/targets/v2.9/tasks/vrf.yml @@ -1,7 +1,7 @@ --- ## ## -### NETBOX_VRF +### PYNAUTOBOT_VRF ## ## - name: "VRF 1: Necessary info creation" diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index eb595284..c3a2c259 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -1,89 +1,137 @@ -plugins/modules/interface.py import-3.8!skip # Module is deprecated, so will not be updated for 2.10 compatibility -plugins/modules/interface.py validate-modules!skip -plugins/modules/interface.py ansible-doc!skip -plugins/modules/interface.py import-3.6!skip -plugins/modules/interface.py import-3.7!skip plugins/modules/aggregate.py validate-modules:parameter-list-no-elements plugins/modules/aggregate.py validate-modules:required_if-requirements-unknown +plugins/modules/aggregate.py validate-modules:missing-gplv3-license plugins/modules/cable.py validate-modules:required_if-requirements-unknown +plugins/modules/cable.py validate-modules:missing-gplv3-license plugins/modules/circuit.py validate-modules:required_if-requirements-unknown plugins/modules/circuit.py validate-modules:parameter-list-no-elements +plugins/modules/circuit.py validate-modules:missing-gplv3-license plugins/modules/circuit_termination.py validate-modules:required_if-requirements-unknown +plugins/modules/circuit_termination.py validate-modules:missing-gplv3-license plugins/modules/circuit_type.py validate-modules:required_if-requirements-unknown +plugins/modules/circuit_type.py validate-modules:missing-gplv3-license plugins/modules/cluster.py validate-modules:required_if-requirements-unknown plugins/modules/cluster.py validate-modules:parameter-list-no-elements +plugins/modules/cluster.py validate-modules:missing-gplv3-license plugins/modules/cluster_group.py validate-modules:required_if-requirements-unknown +plugins/modules/cluster_group.py validate-modules:missing-gplv3-license plugins/modules/cluster_type.py validate-modules:required_if-requirements-unknown +plugins/modules/cluster_type.py validate-modules:missing-gplv3-license plugins/modules/console_port.py validate-modules:required_if-requirements-unknown plugins/modules/console_port.py validate-modules:parameter-list-no-elements +plugins/modules/console_port.py validate-modules:missing-gplv3-license plugins/modules/console_port_template.py validate-modules:required_if-requirements-unknown +plugins/modules/console_port_template.py validate-modules:missing-gplv3-license plugins/modules/console_server_port.py validate-modules:required_if-requirements-unknown plugins/modules/console_server_port.py validate-modules:parameter-list-no-elements +plugins/modules/console_server_port.py validate-modules:missing-gplv3-license +plugins/modules/console_server_port_template.py validate-modules:required_if-requirements-unknown +plugins/modules/console_server_port_template.py validate-modules:missing-gplv3-license plugins/modules/device.py validate-modules:required_if-requirements-unknown plugins/modules/device.py validate-modules:parameter-list-no-elements -plugins/modules/console_server_port_template.py validate-modules:required_if-requirements-unknown +plugins/modules/device.py validate-modules:missing-gplv3-license plugins/modules/device_bay.py validate-modules:required_if-requirements-unknown plugins/modules/device_bay.py validate-modules:parameter-list-no-elements +plugins/modules/device_bay.py validate-modules:missing-gplv3-license plugins/modules/device_bay_template.py validate-modules:required_if-requirements-unknown +plugins/modules/device_bay_template.py validate-modules:missing-gplv3-license plugins/modules/device_interface.py validate-modules:required_if-requirements-unknown plugins/modules/device_interface.py validate-modules:parameter-list-no-elements +plugins/modules/device_interface.py validate-modules:missing-gplv3-license plugins/modules/device_interface_template.py validate-modules:required_if-requirements-unknown +plugins/modules/device_interface_template.py validate-modules:missing-gplv3-license plugins/modules/device_role.py validate-modules:required_if-requirements-unknown +plugins/modules/device_role.py validate-modules:missing-gplv3-license plugins/modules/device_type.py validate-modules:required_if-requirements-unknown plugins/modules/device_type.py validate-modules:parameter-list-no-elements +plugins/modules/device_type.py validate-modules:missing-gplv3-license plugins/modules/front_port.py validate-modules:required_if-requirements-unknown plugins/modules/front_port.py validate-modules:parameter-list-no-elements +plugins/modules/front_port.py validate-modules:missing-gplv3-license plugins/modules/front_port_template.py validate-modules:required_if-requirements-unknown +plugins/modules/front_port_template.py validate-modules:missing-gplv3-license plugins/modules/inventory_item.py validate-modules:required_if-requirements-unknown plugins/modules/inventory_item.py validate-modules:parameter-list-no-elements +plugins/modules/inventory_item.py validate-modules:missing-gplv3-license plugins/modules/ip_address.py validate-modules:mutually_exclusive-unknown plugins/modules/ip_address.py validate-modules:required_if-requirements-unknown plugins/modules/ip_address.py validate-modules:parameter-list-no-elements +plugins/modules/ip_address.py validate-modules:missing-gplv3-license plugins/modules/ipam_role.py validate-modules:required_if-requirements-unknown +plugins/modules/ipam_role.py validate-modules:missing-gplv3-license plugins/modules/manufacturer.py validate-modules:required_if-requirements-unknown +plugins/modules/manufacturer.py validate-modules:missing-gplv3-license plugins/modules/platform.py validate-modules:required_if-requirements-unknown +plugins/modules/platform.py validate-modules:missing-gplv3-license plugins/modules/power_feed.py validate-modules:required_if-requirements-unknown plugins/modules/power_feed.py validate-modules:parameter-list-no-elements +plugins/modules/power_feed.py validate-modules:missing-gplv3-license plugins/modules/power_outlet.py validate-modules:required_if-requirements-unknown plugins/modules/power_outlet.py validate-modules:parameter-list-no-elements +plugins/modules/power_outlet.py validate-modules:missing-gplv3-license plugins/modules/power_outlet_template.py validate-modules:required_if-requirements-unknown +plugins/modules/power_outlet_template.py validate-modules:missing-gplv3-license plugins/modules/power_panel.py validate-modules:required_if-requirements-unknown +plugins/modules/power_panel.py validate-modules:missing-gplv3-license plugins/modules/power_port.py validate-modules:required_if-requirements-unknown plugins/modules/power_port.py validate-modules:parameter-list-no-elements +plugins/modules/power_port.py validate-modules:missing-gplv3-license plugins/modules/power_port_template.py validate-modules:required_if-requirements-unknown +plugins/modules/power_port_template.py validate-modules:missing-gplv3-license plugins/modules/prefix.py validate-modules:required_if-requirements-unknown plugins/modules/prefix.py validate-modules:parameter-list-no-elements +plugins/modules/prefix.py validate-modules:missing-gplv3-license plugins/modules/provider.py validate-modules:required_if-requirements-unknown plugins/modules/provider.py validate-modules:parameter-list-no-elements +plugins/modules/provider.py validate-modules:missing-gplv3-license plugins/modules/rack.py validate-modules:required_if-requirements-unknown plugins/modules/rack.py validate-modules:parameter-list-no-elements +plugins/modules/rack.py validate-modules:missing-gplv3-license plugins/modules/rack_group.py validate-modules:required_if-requirements-unknown +plugins/modules/rack_group.py validate-modules:missing-gplv3-license plugins/modules/rack_role.py validate-modules:required_if-requirements-unknown +plugins/modules/rack_role.py validate-modules:missing-gplv3-license plugins/modules/rear_port.py validate-modules:required_if-requirements-unknown plugins/modules/rear_port.py validate-modules:parameter-list-no-elements +plugins/modules/rear_port.py validate-modules:missing-gplv3-license plugins/modules/rear_port_template.py validate-modules:required_if-requirements-unknown +plugins/modules/rear_port_template.py validate-modules:missing-gplv3-license plugins/modules/region.py validate-modules:required_if-requirements-unknown +plugins/modules/region.py validate-modules:missing-gplv3-license plugins/modules/rir.py validate-modules:required_if-requirements-unknown +plugins/modules/rir.py validate-modules:missing-gplv3-license plugins/modules/route_target.py validate-modules:parameter-list-no-elements -plugins/modules/service.py validate-modules:mutually_exclusive-unknown +plugins/modules/route_target.py validate-modules:missing-gplv3-license plugins/modules/service.py validate-modules:required_if-requirements-unknown plugins/modules/service.py validate-modules:parameter-list-no-elements plugins/modules/service.py validate-modules:required_one_of-unknown +plugins/modules/service.py validate-modules:missing-gplv3-license plugins/modules/site.py validate-modules:required_if-requirements-unknown plugins/modules/site.py validate-modules:parameter-list-no-elements +plugins/modules/site.py validate-modules:missing-gplv3-license plugins/modules/status.py validate-modules:required_if-requirements-unknown +plugins/modules/status.py validate-modules:missing-gplv3-license plugins/modules/tag.py validate-modules:required_if-requirements-unknown +plugins/modules/tag.py validate-modules:missing-gplv3-license plugins/modules/tenant.py validate-modules:required_if-requirements-unknown plugins/modules/tenant.py validate-modules:parameter-list-no-elements +plugins/modules/tenant.py validate-modules:missing-gplv3-license plugins/modules/tenant_group.py validate-modules:required_if-requirements-unknown +plugins/modules/tenant_group.py validate-modules:missing-gplv3-license plugins/modules/virtual_chassis.py validate-modules:parameter-list-no-elements plugins/modules/virtual_chassis.py validate-modules:required_one_of-unknown +plugins/modules/virtual_chassis.py validate-modules:missing-gplv3-license plugins/modules/virtual_machine.py validate-modules:required_if-requirements-unknown plugins/modules/virtual_machine.py validate-modules:parameter-list-no-elements +plugins/modules/virtual_machine.py validate-modules:missing-gplv3-license plugins/modules/vlan.py validate-modules:required_if-requirements-unknown plugins/modules/vlan.py validate-modules:parameter-list-no-elements +plugins/modules/vlan.py validate-modules:missing-gplv3-license plugins/modules/vlan_group.py validate-modules:required_if-requirements-unknown +plugins/modules/vlan_group.py validate-modules:missing-gplv3-license plugins/modules/vm_interface.py validate-modules:required_if-requirements-unknown plugins/modules/vm_interface.py validate-modules:parameter-list-no-elements +plugins/modules/vm_interface.py validate-modules:missing-gplv3-license plugins/modules/vrf.py validate-modules:required_if-requirements-unknown plugins/modules/vrf.py validate-modules:parameter-list-no-elements +plugins/modules/vrf.py validate-modules:missing-gplv3-license diff --git a/tests/test_data.py b/tests/test_data.py index 95e6dd34..6beb3ae5 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Bruno Inec (@sweenu) -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function diff --git a/tests/unit/inventory/test_data/get_resource_list_chunked/data.json b/tests/unit/inventory/test_data/get_resource_list_chunked/data.json index f6d1233a..ffef9424 100644 --- a/tests/unit/inventory/test_data/get_resource_list_chunked/data.json +++ b/tests/unit/inventory/test_data/get_resource_list_chunked/data.json @@ -1,73 +1,53 @@ [ - { - "api_url": "https://netbox:1234?limit=0", - "max_uri_length": 35, - "query_key": "key", - "query_values": [ - 1, - 2, - 3, - 4 - ], - "expected": [ - "https://netbox:1234?limit=0&key=1", - "https://netbox:1234?limit=0&key=2", - "https://netbox:1234?limit=0&key=3", - "https://netbox:1234?limit=0&key=4" - ] - }, - { - "api_url": "https://netbox:1234?limit=0", - "max_uri_length": -5, - "query_key": "key", - "query_values": [ - 1, - 2, - 3, - 4 - ], - "expected": [ - "https://netbox:1234?limit=0&key=1", - "https://netbox:1234?limit=0&key=2", - "https://netbox:1234?limit=0&key=3", - "https://netbox:1234?limit=0&key=4" - ] - }, - { - "api_url": "https://netbox:1234?limit=0", - "max_uri_length": 50, - "query_key": "key", - "query_values": [ - 1, - 2, - 3000, - 4 - ], - "expected": [ - "https://netbox:1234?limit=0&key=1&key=2", - "https://netbox:1234?limit=0&key=3000&key=4" - ] - }, - { - "api_url": "https://netbox:1234", - "max_uri_length": 42, - "query_key": "key", - "query_values": [ - 1, - 2, - 3, - 4 - ], - "expected": [ - "https://netbox:1234?key=1&key=2&key=3", - "https://netbox:1234?key=4" - ] - }, - { - "api_url": "https://netbox:1234?limit=0", - "max_uri_length": 4000, - "query_key": "key", - "query_values": [], - "expected": [] - } -] \ No newline at end of file + { + "api_url": "https://nautobot:1234?limit=0", + "max_uri_length": 35, + "query_key": "key", + "query_values": [1, 2, 3, 4], + "expected": [ + "https://nautobot:1234?limit=0&key=1", + "https://nautobot:1234?limit=0&key=2", + "https://nautobot:1234?limit=0&key=3", + "https://nautobot:1234?limit=0&key=4" + ] + }, + { + "api_url": "https://nautobot:1234?limit=0", + "max_uri_length": -5, + "query_key": "key", + "query_values": [1, 2, 3, 4], + "expected": [ + "https://nautobot:1234?limit=0&key=1", + "https://nautobot:1234?limit=0&key=2", + "https://nautobot:1234?limit=0&key=3", + "https://nautobot:1234?limit=0&key=4" + ] + }, + { + "api_url": "https://nautobot:1234?limit=0", + "max_uri_length": 50, + "query_key": "key", + "query_values": [1, 2, 3000, 4], + "expected": [ + "https://nautobot:1234?limit=0&key=1&key=2", + "https://nautobot:1234?limit=0&key=3000&key=4" + ] + }, + { + "api_url": "https://nautobot:1234", + "max_uri_length": 42, + "query_key": "key", + "query_values": [1, 2, 3, 4], + "expected": [ + "https://nautobot:1234?key=1&key=2&key=3", + "https://nautobot:1234?key=4" + ] + }, + { + "api_url": "https://nautobot:1234?limit=0", + "max_uri_length": 4000, + "query_key": "key", + "query_values": [], + "expected": [] + } +] diff --git a/tests/unit/inventory/test_data/refresh_url/data.json b/tests/unit/inventory/test_data/refresh_url/data.json index 542e048e..77f447cc 100644 --- a/tests/unit/inventory/test_data/refresh_url/data.json +++ b/tests/unit/inventory/test_data/refresh_url/data.json @@ -1,186 +1,186 @@ [ - { - "options": { - "query_filters": [], - "device_query_filters": {}, - "vm_query_filters": {}, - "config_context": true - }, - "expected": [ - "https://netbox.test.endpoint:1234/api/dcim/devices/?limit=0", - "https://netbox.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0" - ] + { + "options": { + "query_filters": [], + "device_query_filters": {}, + "vm_query_filters": {}, + "config_context": true }, - { - "options": { - "query_filters": 12345, - "device_query_filters": 6543, - "vm_query_filters": null, - "config_context": true - }, - "expected": [ - "https://netbox.test.endpoint:1234/api/dcim/devices/?limit=0", - "https://netbox.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0" - ] + "expected": [ + "https://nautobot.test.endpoint:1234/api/dcim/devices/?limit=0", + "https://nautobot.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0" + ] + }, + { + "options": { + "query_filters": 12345, + "device_query_filters": 6543, + "vm_query_filters": null, + "config_context": true }, - { - "options": { - "query_filters": [], - "device_query_filters": {}, - "vm_query_filters": {}, - "config_context": false - }, - "expected": [ - "https://netbox.test.endpoint:1234/api/dcim/devices/?limit=0&exclude=config_context", - "https://netbox.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&exclude=config_context" - ] + "expected": [ + "https://nautobot.test.endpoint:1234/api/dcim/devices/?limit=0", + "https://nautobot.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0" + ] + }, + { + "options": { + "query_filters": [], + "device_query_filters": {}, + "vm_query_filters": {}, + "config_context": false }, - { - "options": { - "query_filters": [ - { - "name": "name value" - }, - { - "region": "region value" - } - ], - "device_query_filters": {}, - "vm_query_filters": {}, - "config_context": true + "expected": [ + "https://nautobot.test.endpoint:1234/api/dcim/devices/?limit=0&exclude=config_context", + "https://nautobot.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&exclude=config_context" + ] + }, + { + "options": { + "query_filters": [ + { + "name": "name value" }, - "expected": [ - "https://netbox.test.endpoint:1234/api/dcim/devices/?limit=0&name=name+value®ion=region+value", - "https://netbox.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&name=name+value®ion=region+value" - ] + { + "region": "region value" + } + ], + "device_query_filters": {}, + "vm_query_filters": {}, + "config_context": true }, - { - "options": { - "query_filters": [ - { - "name": "name value" - } - ], - "device_query_filters": [ - { - "region": "device" - } - ], - "vm_query_filters": [ - { - "region": "vm" - } - ], - "config_context": true - }, - "expected": [ - "https://netbox.test.endpoint:1234/api/dcim/devices/?limit=0&name=name+value®ion=device", - "https://netbox.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&name=name+value®ion=vm" - ] + "expected": [ + "https://nautobot.test.endpoint:1234/api/dcim/devices/?limit=0&name=name+value®ion=region+value", + "https://nautobot.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&name=name+value®ion=region+value" + ] + }, + { + "options": { + "query_filters": [ + { + "name": "name value" + } + ], + "device_query_filters": [ + { + "region": "device" + } + ], + "vm_query_filters": [ + { + "region": "vm" + } + ], + "config_context": true }, - { - "options": { - "query_filters": [ - { - "name": "name value" - }, - { - "invalid query filter": "nope" - } - ], - "device_query_filters": [ - { - "has_primary_ip": "true" - }, - { - "invalid device filter": "nope" - } - ], - "vm_query_filters": [ - { - "disk": 42 - }, - { - "invalid vm filter": "nope" - } - ], - "config_context": true + "expected": [ + "https://nautobot.test.endpoint:1234/api/dcim/devices/?limit=0&name=name+value®ion=device", + "https://nautobot.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&name=name+value®ion=vm" + ] + }, + { + "options": { + "query_filters": [ + { + "name": "name value" }, - "expected": [ - "https://netbox.test.endpoint:1234/api/dcim/devices/?limit=0&name=name+value&has_primary_ip=true", - "https://netbox.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&name=name+value&disk=42" - ] - }, - { - "options": { - "query_filters": [ - { - "disk": "3" - } - ], - "device_query_filters": [], - "vm_query_filters": [], - "config_context": true + { + "invalid query filter": "nope" + } + ], + "device_query_filters": [ + { + "has_primary_ip": "true" }, - "expected": [ - null, - "https://netbox.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&disk=3" - ] - }, - { - "options": { - "query_filters": [ - { - "has_primary_ip": "true" - } - ], - "device_query_filters": [], - "vm_query_filters": [], - "config_context": true + { + "invalid device filter": "nope" + } + ], + "vm_query_filters": [ + { + "disk": 42 }, - "expected": [ - "https://netbox.test.endpoint:1234/api/dcim/devices/?limit=0&has_primary_ip=true", - null - ] + { + "invalid vm filter": "nope" + } + ], + "config_context": true }, - { - "options": { - "query_filters": [ - { - "disk": "3" - } - ], - "device_query_filters": [ - { - "name": "name value" - } - ], - "vm_query_filters": [], - "config_context": true - }, - "expected": [ - "https://netbox.test.endpoint:1234/api/dcim/devices/?limit=0&name=name+value", - "https://netbox.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&disk=3" - ] + "expected": [ + "https://nautobot.test.endpoint:1234/api/dcim/devices/?limit=0&name=name+value&has_primary_ip=true", + "https://nautobot.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&name=name+value&disk=42" + ] + }, + { + "options": { + "query_filters": [ + { + "disk": "3" + } + ], + "device_query_filters": [], + "vm_query_filters": [], + "config_context": true }, - { - "options": { - "query_filters": [ - { - "has_primary_ip": "true" - } - ], - "device_query_filters": [], - "vm_query_filters": [ - { - "name": "name value" - } - ], - "config_context": true - }, - "expected": [ - "https://netbox.test.endpoint:1234/api/dcim/devices/?limit=0&has_primary_ip=true", - "https://netbox.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&name=name+value" - ] - } -] \ No newline at end of file + "expected": [ + null, + "https://nautobot.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&disk=3" + ] + }, + { + "options": { + "query_filters": [ + { + "has_primary_ip": "true" + } + ], + "device_query_filters": [], + "vm_query_filters": [], + "config_context": true + }, + "expected": [ + "https://nautobot.test.endpoint:1234/api/dcim/devices/?limit=0&has_primary_ip=true", + null + ] + }, + { + "options": { + "query_filters": [ + { + "disk": "3" + } + ], + "device_query_filters": [ + { + "name": "name value" + } + ], + "vm_query_filters": [], + "config_context": true + }, + "expected": [ + "https://nautobot.test.endpoint:1234/api/dcim/devices/?limit=0&name=name+value", + "https://nautobot.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&disk=3" + ] + }, + { + "options": { + "query_filters": [ + { + "has_primary_ip": "true" + } + ], + "device_query_filters": [], + "vm_query_filters": [ + { + "name": "name value" + } + ], + "config_context": true + }, + "expected": [ + "https://nautobot.test.endpoint:1234/api/dcim/devices/?limit=0&has_primary_ip=true", + "https://nautobot.test.endpoint:1234/api/virtualization/virtual-machines/?limit=0&name=name+value" + ] + } +] diff --git a/tests/unit/inventory/test_nb_inventory.py b/tests/unit/inventory/test_nb_inventory.py index f37912af..7f6126c8 100644 --- a/tests/unit/inventory/test_nb_inventory.py +++ b/tests/unit/inventory/test_nb_inventory.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Hillsong, Douglas Heriot (@DouglasHeriot) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function @@ -39,7 +37,7 @@ def inventory_fixture( allowed_device_query_parameters_fixture, allowed_vm_query_parameters_fixture ): inventory = InventoryModule() - inventory.api_endpoint = "https://netbox.test.endpoint:1234" + inventory.api_endpoint = "https://nautobot.test.endpoint:1234" # Fill in data that is fetched dynamically inventory.api_version = None @@ -51,7 +49,7 @@ def inventory_fixture( @pytest.fixture def allowed_device_query_parameters_fixture(): - # Subset of parameters - real list is fetched dynamically from NetBox openapi endpoint + # Subset of parameters - real list is fetched dynamically from Nautobot openapi endpoint return [ "id", "interfaces", @@ -68,7 +66,7 @@ def allowed_device_query_parameters_fixture(): @pytest.fixture def allowed_vm_query_parameters_fixture(): - # Subset of parameters - real list is fetched dynamically from NetBox openapi endpoint + # Subset of parameters - real list is fetched dynamically from Nautobot openapi endpoint return [ "id", "interfaces", diff --git a/tests/unit/module_utils/test_nautobot_base_class.py b/tests/unit/module_utils/test_nautobot_base_class.py index 3a10c1b9..8f3dc4b0 100644 --- a/tests/unit/module_utils/test_nautobot_base_class.py +++ b/tests/unit/module_utils/test_nautobot_base_class.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Bruno Inec (@sweenu) -# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + from __future__ import absolute_import, division, print_function @@ -47,7 +45,7 @@ @pytest.fixture def fixture_arg_spec(): return { - "url": "http://netbox.local/", + "url": "http://nautobot.local/", "token": "0123456789", "data": { "name": "Test Device1", @@ -132,11 +130,11 @@ def on_deletion_diff(mock_module): def mock_module(mocker, mock_ansible_module, find_ids_return): find_ids = mocker.patch("%s%s" % (MOCKER_PATCH_PATH, "._find_ids")) find_ids.return_value = find_ids_return - client = mocker.Mock(name="pynetbox.api") + client = mocker.Mock(name="pynautobot.api") client.version = "2.10" - netbox = NautobotModule(mock_ansible_module, NB_DEVICES, client=client) + nautobot = NautobotModule(mock_ansible_module, NB_DEVICES, client=client) - return netbox + return nautobot @pytest.fixture @@ -233,7 +231,6 @@ def test_build_query_params_child( fetch_choice_value.return_value = 200 query_params = mock_module._build_query_params(parent, module_data, child=child) - print(query_params) assert query_params == expected @@ -289,7 +286,7 @@ def test_create_object_check_mode_true( def test_delete_object_check_mode_false(mock_module, obj_mock, on_deletion_diff): - mock_module.object = obj_mock + mock_module.nb_object = obj_mock diff = mock_module._delete_object() assert obj_mock.delete.called_once() assert diff == on_deletion_diff @@ -304,7 +301,7 @@ def test_delete_object_check_mode_true(mock_module, obj_mock, on_deletion_diff): def test_update_object_no_changes(mock_module, obj_mock): - mock_module.object = obj_mock + mock_module.nb_object = obj_mock unchanged_data = obj_mock.serialize() serialized_object, diff = mock_module._update_object(unchanged_data) assert obj_mock.update.not_called()