Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop into main after 4.1.0 release #162

Merged
merged 25 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d8c196f
Fixes GraphQL query boolean filters (#152)
joewesch Aug 1, 2022
f7e3fc1
Fixes group_by empty values (#153)
joewesch Aug 1, 2022
2f69700
Fixes antsibull import for RTD builds (#154)
joewesch Aug 1, 2022
ecaef75
Prep for v4.0.1 release (#157)
joewesch Aug 1, 2022
e794da3
Fix api_filter to allow UUIDs (#159)
lungj Aug 24, 2022
77608d0
Add support for Nautobot REST API versioning (#139)
timizuoebideri1 Aug 24, 2022
2c5c33b
Release v4.1.0 (#161)
FragmentedPacket Aug 24, 2022
1564938
Fix query params sent to filter for ip-addresses
FragmentedPacket Aug 28, 2022
9aa9509
Ok now it should be backwards compatible.
FragmentedPacket Aug 28, 2022
9789c22
Update nautobot population for tests.
FragmentedPacket Aug 28, 2022
67161d7
Create new inventory tests for 1.4
FragmentedPacket Aug 29, 2022
75617b8
Fix bash syntax issue
FragmentedPacket Aug 29, 2022
41b40ae
Oh my bash
FragmentedPacket Aug 29, 2022
3e216c4
Syntax error.
FragmentedPacket Aug 29, 2022
8d5c5cd
A few more updates.
FragmentedPacket Aug 29, 2022
393b90b
Swap back to prod container.
FragmentedPacket Aug 29, 2022
653062a
Remove notes_url from inventory comparison
FragmentedPacket Aug 29, 2022
10754cb
Updated to account for more bad filters.
FragmentedPacket Aug 30, 2022
2f45488
Revert changes to entrypoint.sh
FragmentedPacket Aug 30, 2022
02d4b27
ANSIBLE_COLLECTIONS_PATH appears to not be valid for 2.9 so added pat…
FragmentedPacket Aug 30, 2022
999b10d
Merge pull request #163 from FragmentedPacket/fix-strict-filtering
jvanderaa Sep 7, 2022
daf6423
Release v4.1.1 (#165)
FragmentedPacket Sep 8, 2022
efe664a
adjusting incorrect key name to 'tenant_group'
cdot65 Oct 27, 2022
04af7b7
adjusting incorrect key name to 'tenant_group'
cdot65 Oct 27, 2022
1c73408
Merge pull request #170 from cdot65/develop
jvanderaa Nov 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Default owner(s) of all files in this repository
* @FragmentedPacket @jvanderaa @jmcgill298
* @FragmentedPacket @jvanderaa @jmcgill298 @joewesch
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ jobs:
- python-version: "3.8"
nautobot-version: "1.3"
ansible-release: "2.12"
- python-version: "3.8"
nautobot-version: "1.4"
ansible-release: "2.12"
env:
INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_NAUTOBOT_ANSIBLE_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
Expand All @@ -74,31 +77,31 @@ jobs:
run: "pip install -U pip && pip install invoke"
- name: "Install poetry"
if: "${{ matrix.ansible-release == '2.11' }}"
run: "pip install poetry"
run: "pip install poetry==1.1.15"
- name: "Remove ansible-base"
if: "${{ matrix.ansible-release == '2.11' }}"
run: "poetry remove ansible-base"
- name: "Add ansible-core"
if: "${{ matrix.ansible-release == '2.11' }}"
run: "poetry add ansible-core@^2.11"
run: "poetry add ansible-core@~2.11"
- name: "Install poetry"
if: "${{ matrix.ansible-release == '2.9' }}"
run: "pip install poetry"
run: "pip install poetry==1.1.15"
- name: "Remove ansible-base"
if: "${{ matrix.ansible-release == '2.9' }}"
run: "poetry remove ansible-base"
- name: "Add Ansible 2.9"
if: "${{ matrix.ansible-release == '2.9' }}"
run: "poetry add ansible@^2.9"
run: "poetry add ansible@~2.9"
- name: "Install poetry"
if: "${{ matrix.ansible-release == '2.12' }}"
run: "pip install poetry"
run: "pip install poetry==1.1.15"
- name: "Remove ansible-base"
if: "${{ matrix.ansible-release == '2.12' }}"
run: "poetry remove ansible-base"
- name: "Add Ansible 2.12"
if: "${{ matrix.ansible-release == '2.12' }}"
run: "poetry add ansible-core@^2.12 --python ^${{ matrix.python-version }}"
run: "poetry add ansible-core@~2.12 --python ^${{ matrix.python-version }}"
- name: "Start containers"
run: "invoke start"
- name: "Tests"
Expand Down
46 changes: 46 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,52 @@ networktocode.nautobot Release Notes
.. contents:: Topics


v4.1.1
======

Release Summary
---------------

Fix incorrect filter parameters

Bugfixes
--------

- (#163) Fix bad filter params due to `STRICT_FILTERING` being enabled in Nautobot 1.4.

v4.1.0
======

Release Summary
---------------

Fix minor bugs and add API versioning to collection.

Minor Changes
-------------

- (#139) - Add API versioning to compatible plugins.

Bugfixes
--------

- (#159) Lookup - Fix `api_filter` to not attempt to convert UUIDs to integers from legacy forked code.

v4.0.1
======

Release Summary
---------------

Fixes GraphQL inventory plugin bugs and RTD builds.

Bugfixes
--------

- (#150) GraphQL inventory plugin - boolean filters are invalid
- (#151) GraphQL inventory plugin - using group_by can crash if there are empty values
- (#154) Fixes antsibull import for RTD builds

v4.0.0
======

Expand Down
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ WORKDIR /usr/src/app
RUN python -m pip install -U pip

# Install poetry for dep management
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
ENV PATH="$PATH:/root/.poetry/bin"
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="$PATH:/root/.local/bin"
RUN poetry config virtualenvs.create false

# Bring in Poetry related files needed for other stages
COPY pyproject.toml poetry.lock ./

# Install only package Dependencies
RUN poetry install --no-dev
RUN poetry install --only main

#########
# Linting
Expand Down Expand Up @@ -55,7 +55,7 @@ RUN echo 'Running Black' && \
FROM lint AS unittests

# Remove black from dev dependencies to prevent conflicts with Ansible
RUN poetry remove black --dev
RUN poetry remove black --group dev

# Set a custom collection path for all ansible commands
# Note: This only allows for one path, not colon-separated, because we use it
Expand All @@ -79,7 +79,7 @@ RUN ansible-galaxy collection install community.general
RUN ansible-galaxy collection build --output-path ./dist/ .

# Install built library
RUN ansible-galaxy collection install ./dist/networktocode*.tar.gz
RUN ansible-galaxy collection install ./dist/networktocode*.tar.gz -p ${ANSIBLE_COLLECTIONS_PATH}

# Switch to the collection path for tests
WORKDIR ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/networktocode/nautobot
Expand All @@ -100,6 +100,8 @@ FROM unittests AS integration

ARG ANSIBLE_INTEGRATION_ARGS
ENV ANSIBLE_INTEGRATION_ARGS=${ANSIBLE_INTEGRATION_ARGS}
ARG NAUTOBOT_VER
ENV NAUTOBOT_VER=${NAUTOBOT_VER}

# Integration test entrypoint
ENTRYPOINT ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/networktocode/nautobot/tests/integration/entrypoint.sh
Expand Down
21 changes: 21 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,24 @@ releases:
- description: Creates or removes a relationship association from Nautobot
name: relationship_association
namespace: ""
4.0.1:
changes:
bugfixes:
- (#150) GraphQL inventory plugin - boolean filters are invalid
- (#151) GraphQL inventory plugin - using group_by can crash if there are empty values
- (#154) Fixes antsibull import for RTD builds
release_summary: "Fixes GraphQL inventory plugin bugs and RTD builds."

4.1.0:
changes:
bugfixes:
- (#159) Lookup - Fix `api_filter` to not attempt to convert UUIDs to integers from legacy forked code.
minor_changes:
- (#139) - Add API versioning to compatible plugins.
release_summary: "Fix minor bugs and add API versioning to collection."

4.1.1:
changes:
bugfixes:
- (#163) Fix bad filter params due to `STRICT_FILTERING` being enabled in Nautobot 1.4.
release_summary: "Fix incorrect filter parameters"
6 changes: 3 additions & 3 deletions development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ services:
image: "redis:6-alpine"
command:
- "sh"
- "-c" # this is to evaluate the $REDIS_PASSWORD from the env
- "redis-server --appendonly yes --requirepass $$REDIS_PASSWORD" ## $$ because of docker-compose
env_file: "./dev.env"
- "-c" # this is to evaluate the $REDIS_PASSWORD from the env
- "redis-server --appendonly yes --requirepass $$REDIS_PASSWORD" ## $$ because of docker-compose
env_file: "./dev.env"
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ x-service:
ANSIBLE_INTEGRATION_ARGS: ${ANSIBLE_INTEGRATION_ARGS:-}
ANSIBLE_SANITY_ARGS: ${ANSIBLE_SANITY_ARGS:-}
ANSIBLE_UNIT_ARGS: ${ANSIBLE_UNIT_ARGS:-}
NAUTOBOT_VER: ${INVOKE_NAUTOBOT_ANSIBLE_NAUTOBOT_VER:-}

services:
unit:
Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
import re
import stat
from pathlib import Path
from antsibull.cli import antsibull_docs
from antsibull_docs.cli import antsibull_docs


sys.path.insert(0, os.path.abspath("../"))

Expand Down
54 changes: 46 additions & 8 deletions docs/plugins/aggregate_module.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.. Document meta

:orphan:
Expand Down Expand Up @@ -42,13 +43,11 @@ networktocode.nautobot.aggregate module -- Creates or removes aggregates from Na
.. Collection note

.. note::
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 4.0.0).

You might already have this collection installed if you are using the ``ansible`` package.
It is not included in ``ansible-core``.
To check whether it is installed, run :code:`ansible-galaxy collection list`.
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 4.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
see :ref:`Requirements <ansible_collections.networktocode.nautobot.aggregate_module_requirements>` for details.

To use it in a playbook, specify: :code:`networktocode.nautobot.aggregate`.

Expand Down Expand Up @@ -76,6 +75,8 @@ Synopsis

.. Requirements

.. _ansible_collections.networktocode.nautobot.aggregate_module_requirements:

Requirements
------------
The below requirements are needed on the host that executes this module.
Expand Down Expand Up @@ -103,6 +104,43 @@ Parameters
* - Parameter
- Comments

* - .. raw:: html

<div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-api_version"></div>

.. _ansible_collections.networktocode.nautobot.aggregate_module__parameter-api_version:

.. rst-class:: ansible-option-title

**api_version**

.. raw:: html

<a class="ansibleOptionLink" href="#parameter-api_version" title="Permalink to this option"></a>

.. rst-class:: ansible-option-type-line

:ansible-option-type:`string`

:ansible-option-versionadded:`added in 4.1.0 of networktocode.nautobot`


.. raw:: html

</div>

- .. raw:: html

<div class="ansible-option-cell">

API Version Nautobot REST API


.. raw:: html

</div>

* - .. raw:: html

<div class="ansible-option-cell">
Expand Down Expand Up @@ -281,9 +319,9 @@ Parameters

<div class="ansible-option-cell">

This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
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
in plugins/module\_utils/utils.py and provides control to users on what may make

an object unique in their environment.

Expand Down Expand Up @@ -507,7 +545,7 @@ Parameters

.. rst-class:: ansible-option-line

:ansible-option-default-bold:`Default:` :ansible-option-default:`"yes"`
:ansible-option-default-bold:`Default:` :ansible-option-default:`"true"`

.. raw:: html

Expand Down
54 changes: 46 additions & 8 deletions docs/plugins/cable_module.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.. Document meta

:orphan:
Expand Down Expand Up @@ -42,13 +43,11 @@ 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 4.0.0).

You might already have this collection installed if you are using the ``ansible`` package.
It is not included in ``ansible-core``.
To check whether it is installed, run :code:`ansible-galaxy collection list`.
This module is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 4.1.1).

To install it, use: :code:`ansible-galaxy collection install networktocode.nautobot`.
You need further requirements to be able to use this module,
see :ref:`Requirements <ansible_collections.networktocode.nautobot.cable_module_requirements>` for details.

To use it in a playbook, specify: :code:`networktocode.nautobot.cable`.

Expand Down Expand Up @@ -76,6 +75,8 @@ Synopsis

.. Requirements

.. _ansible_collections.networktocode.nautobot.cable_module_requirements:

Requirements
------------
The below requirements are needed on the host that executes this module.
Expand Down Expand Up @@ -103,6 +104,43 @@ Parameters
* - Parameter
- Comments

* - .. raw:: html

<div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-api_version"></div>

.. _ansible_collections.networktocode.nautobot.cable_module__parameter-api_version:

.. rst-class:: ansible-option-title

**api_version**

.. raw:: html

<a class="ansibleOptionLink" href="#parameter-api_version" title="Permalink to this option"></a>

.. rst-class:: ansible-option-type-line

:ansible-option-type:`string`

:ansible-option-versionadded:`added in 4.1.0 of networktocode.nautobot`


.. raw:: html

</div>

- .. raw:: html

<div class="ansible-option-cell">

API Version Nautobot REST API


.. raw:: html

</div>

* - .. raw:: html

<div class="ansible-option-cell">
Expand Down Expand Up @@ -290,9 +328,9 @@ Parameters

<div class="ansible-option-cell">

This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined
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
in plugins/module\_utils/utils.py and provides control to users on what may make

an object unique in their environment.

Expand Down Expand Up @@ -719,7 +757,7 @@ Parameters

.. rst-class:: ansible-option-line

:ansible-option-default-bold:`Default:` :ansible-option-default:`"yes"`
:ansible-option-default-bold:`Default:` :ansible-option-default:`"true"`

.. raw:: html

Expand Down
Loading