Skip to content

Commit

Permalink
Merge pull request #308 from nautobot/develop
Browse files Browse the repository at this point in the history
Develop to main for release
  • Loading branch information
joewesch committed Jan 23, 2024
2 parents 084e061 + 3c6338d commit 4a23698
Show file tree
Hide file tree
Showing 101 changed files with 859 additions and 662 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ docker-compose.yml
*.md
.env
.venv
venv/
.vscode/
.github/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__/
*.pyc
tests/output/*
venv/
.venv/
.vscode/
changelogs/.plugin-cache.yaml
docs/_build/*
Expand All @@ -16,3 +17,4 @@ pb.*.yml

# Hypothesis output when tests are run locally
.hypothesis/
ansible.cfg
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ networktocode.nautobot Release Notes
.. contents:: Topics


v5.1.1
======

Minor Changes
-------------
- (#298) Removes `status` option from being required unless creating a new object for various modules
- (#299) Added example for using the `depth` option in the `lookup` module
- (#304) Fixed the ability to look up `parent_location` by name instead of UUID in the `location` module

v5.1.0
======

Expand Down
6 changes: 6 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -427,3 +427,9 @@ releases:
- description: Creates or removes namespaces.
name: namespace
namespace: ''
5.1.1:
changes:
minor_changes:
- (#298) Removes `status` option from being required unless creating a new object for various modules
- (#299) Added example for using the `depth` option in the `lookup` module
- (#304) Fixed the ability to look up `parent_location` by name instead of UUID in the `location` module
2 changes: 1 addition & 1 deletion docs/plugins/cable_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.cable module -- Create, update or delete cables within Na
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/circuit_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.circuit module -- Create, update or delete circuits withi
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/circuit_termination_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.circuit_termination module -- Create, update or delete ci
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/circuit_type_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.circuit_type module -- Create, update or delete circuit t
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/cluster_group_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.cluster_group module -- Create, update or delete cluster
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/cluster_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.cluster module -- Create, update or delete clusters withi
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/cluster_type_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.cluster_type module -- Create, update or delete cluster t
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/console_port_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.console_port module -- Create, update or delete console p
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/console_port_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.console_port_template module -- Create, update or delete
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/console_server_port_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.console_server_port module -- Create, update or delete co
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/console_server_port_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.console_server_port_template module -- Create, update or
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/custom_field_choice_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.custom_field_choice module -- Creates or removes custom f
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/custom_field_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.custom_field module -- Creates or removes custom fields f
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_bay_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.device_bay module -- Create, update or delete device bays
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_bay_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.device_bay_template module -- Create, update or delete de
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
4 changes: 2 additions & 2 deletions docs/plugins/device_interface_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.device_interface module -- Creates or removes interfaces
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down Expand Up @@ -753,7 +753,7 @@ Parameters

The status of the interface

Required if \ :emphasis:`state=present`\ and using \ :emphasis:`api\_version`\ 1.4+
Required if \ :emphasis:`state=present`\ and the interface does not exist yet


.. raw:: html
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_interface_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.device_interface_template module -- Creates or removes in
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.device module -- Create, update or delete devices within
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_redundancy_group_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.device_redundancy_group module -- Creates or removes devi
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_type_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.device_type module -- Create, update or delete device typ
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/front_port_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.front_port module -- Create, update or delete front ports
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/front_port_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.front_port_template module -- Create, update or delete fr
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/gql_inventory_inventory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.gql_inventory inventory -- Nautobot inventory source usin
.. Collection note
.. note::
This inventory plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This inventory plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this inventory plugin,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Networktocode.Nautobot
======================

Collection version 5.1.0
Collection version 5.1.1

.. contents::
:local:
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/inventory_inventory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.inventory inventory -- Nautobot inventory source
.. Collection note
.. note::
This inventory plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This inventory plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/inventory_item_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.inventory_item module -- Creates or removes inventory ite
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/ip_address_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.ip_address module -- Creates or removes IP addresses from
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/ip_address_to_interface_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.ip_address_to_interface module -- Creates or removes IP a
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/location_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.location module -- Creates or removes locations from Naut
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/location_type_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.location_type module -- Creates or removes location types
.. Collection note
.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/lookup_graphql_lookup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.lookup_graphql lookup -- Queries and returns elements fro
.. Collection note
.. note::
This lookup plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This lookup plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this lookup plugin,
Expand Down
17 changes: 16 additions & 1 deletion docs/plugins/lookup_lookup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ networktocode.nautobot.lookup lookup -- Queries and returns elements from Nautob
.. Collection note
.. note::
This lookup plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.0).
This lookup plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 5.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this lookup plugin,
Expand Down Expand Up @@ -493,6 +493,21 @@ Examples
api_filter='role=management tag=Dell',
token='<redacted>') }}"

# This example uses an API Filter with Depth set to get additional details from the lookup
tasks:
# query a list of devices, getting API Depth of 1 to get additional details
# Note the space and the use of depth. Note the location_name is set to the namae of the location
- name: "Obtain Location Information from Nautobot and print some facts."
ansible.builtin.debug:
msg: >
"Location {{ item.value.name }} is {{ item.value['status']['name'] }} and has {{ item.value.prefix_count }} Prefixes and {{ item.value.vlan_count }} VLANs."
loop: "{{ query('networktocode.nautobot.lookup', 'locations',
url=NAUTOBOT_URL,
token=NAUTOBOT_TOKEN,
api_filter='name=' + location_name + ' depth=1',
) }}"


# Fetch bgp sessions for R1-device
tasks:
- name: "Obtain bgp sessions for R1-Device"
Expand Down

0 comments on commit 4a23698

Please sign in to comment.