Skip to content

Commit f6d52d2

Browse files
authored
Merge pull request #1001 from netbox-community/devel
Release 3.13
2 parents cb0f86d + 782584b commit f6d52d2

File tree

360 files changed

+5306
-18859
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

360 files changed

+5306
-18859
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ body:
88
attributes:
99
value: >
1010
**NOTE:** This form is only for reporting _reproducible bugs_ in a current NetBox Collection
11-
installation.
12-
11+
installation.
12+
1313
- See the latest ansible module documentation:
1414
https://netbox-ansible-collection.readthedocs.io
1515
- Check the release notes:
@@ -33,7 +33,7 @@ body:
3333
label: Ansible version
3434
description: >
3535
What version of the Ansible NetBox Collection are you currently running?
36-
Paste the output of "ansible --version"
36+
Paste the output of "ansible --version"
3737
value: >
3838
```bash
3939

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# Reference: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
23
blank_issues_enabled: false
34
contact_links:

.github/workflows/main.yml

Lines changed: 71 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,163 +1,143 @@
1+
---
12
name: All CI related tasks
23

34
# Run this workflow every time a new commit pushed to your repository
45
on: [push, pull_request]
56

67
jobs:
7-
linting_unit_testing:
8+
linting:
89
runs-on: ubuntu-latest
10+
steps:
11+
12+
- name: Checkout repo
13+
uses: actions/checkout@v3
14+
15+
- name: Run black
16+
uses: psf/black@stable
17+
18+
- name: 'Yamllint'
19+
uses: karancode/yamllint-github-action@master
20+
21+
#- name: Run isort
22+
# uses: jamescurtin/isort-action@master
23+
24+
#- name: Run ruff
25+
# uses: chartboost/ruff-action@v1
26+
27+
unit_testing:
28+
runs-on: ubuntu-latest
29+
needs: linting
930
strategy:
1031
fail-fast: false
1132
matrix:
12-
python-version: ["3.8", "3.9", "3.10"]
33+
python-version: ["3.9", "3.10", "3.11"]
34+
1335
steps:
36+
1437
- name: Checkout repo
15-
uses: actions/checkout@v2
38+
uses: actions/checkout@v3
39+
1640
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v2
41+
uses: actions/setup-python@v4
1842
with:
1943
python-version: ${{ matrix.python-version }}
44+
2045
- name: Install and configure Poetry
2146
uses: snok/install-poetry@v1
2247
with:
2348
virtualenvs-create: false
49+
2450
- name: Install Python packages
2551
run: poetry install
52+
2653
- name: Build and install collection
2754
run: |
2855
ansible-galaxy collection build .
2956
ansible-galaxy collection install netbox*.tar.gz -p /home/runner/.ansible/collections
30-
- name: Run Black
31-
run: poetry run black . --check --diff
57+
3258
- name: Run Ansible Sanity tests
3359
run: poetry run ansible-test sanity -v --requirements --python ${{ matrix.python-version }} --skip-test pep8 plugins/
3460
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox
61+
3562
- name: Run Ansible Unit tests
3663
run: poetry run ansible-test units -vvv --coverage --python ${{ matrix.python-version }}
3764
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox
65+
3866
- name: Run Ansible Coverage
3967
run: poetry run ansible-test coverage report --all --omit "tests/*,hacking/*,docs/*" --show-missing
4068
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox
41-
integration:
69+
70+
integration_testing:
4271
runs-on: ubuntu-latest
43-
needs: linting_unit_testing
72+
needs: unit_testing
73+
env:
74+
python-version: "3.9"
4475
strategy:
4576
fail-fast: false
4677
matrix:
47-
include:
48-
- python-version: 3.8
49-
VERSION: "v3.2"
50-
INTEGRATION_TESTS: "v3.2"
51-
- python-version: 3.8
52-
VERSION: "v3.3"
53-
INTEGRATION_TESTS: "v3.3"
54-
- python-version: 3.8
55-
VERSION: "v3.4"
56-
INTEGRATION_TESTS: "v3.4"
78+
include:
79+
- VERSION: "v3.3"
80+
NETBOX_DOCKER_VERSION: 2.3.0
81+
- VERSION: "v3.4"
82+
NETBOX_DOCKER_VERSION: 2.5.3
83+
- VERSION: "v3.5"
84+
NETBOX_DOCKER_VERSION: 2.6.1
85+
# If we want to integration test wiht all supported Python:
86+
#python-version: ["3.9", "3.10", "3.11"]
87+
5788
steps:
89+
5890
- name: Checkout repo
59-
uses: actions/checkout@v2
60-
- name: Set up Python ${{ matrix.python-version }}
61-
uses: actions/setup-python@v2
62-
with:
63-
python-version: ${{ matrix.python-version }}
64-
- name: Clone & Start netbox-docker containers - 3.2
65-
env:
66-
VERSION: ${{ matrix.VERSION }}
67-
run: |
68-
cd ..
69-
git clone https://github.com/netbox-community/netbox-docker.git
70-
cd netbox-docker
71-
git checkout 1.6.1
72-
tee docker-compose.override.yml <<EOF
73-
version: '3.4'
74-
services:
75-
netbox:
76-
image: netboxcommunity/netbox:v3.2
77-
ports:
78-
- 32768:8080
79-
EOF
80-
docker-compose up -d --quiet-pull
81-
docker container ls
82-
cd ..
83-
if: matrix.VERSION == 'v3.2'
84-
- name: Clone & Start netbox-docker containers - 3.3
85-
env:
86-
VERSION: ${{ matrix.VERSION }}
87-
run: |
88-
cd ..
89-
git clone https://github.com/netbox-community/netbox-docker.git
90-
cd netbox-docker
91-
git checkout 2.2.0
92-
tee docker-compose.override.yml <<EOF
93-
version: '3.4'
94-
services:
95-
netbox:
96-
image: netboxcommunity/netbox:v3.3
97-
ports:
98-
- 32768:8080
99-
EOF
100-
docker-compose up -d --quiet-pull
101-
docker container ls
102-
cd ..
103-
if: matrix.VERSION == 'v3.3'
104-
- name: Clone & Start netbox-docker containers - 3.4
105-
env:
106-
VERSION: ${{ matrix.VERSION }}
91+
uses: actions/checkout@v3
92+
93+
- name: Clone & Start netbox-docker containers - ${{ matrix.VERSION }}
10794
run: |
10895
cd ..
10996
git clone https://github.com/netbox-community/netbox-docker.git
11097
cd netbox-docker
111-
git checkout 2.3.0
112-
tee docker-compose.override.yml <<EOF
113-
version: '3.4'
114-
services:
115-
netbox:
116-
image: netboxcommunity/netbox:v3.4
117-
ports:
118-
- 32768:8080
119-
EOF
120-
docker-compose up -d --quiet-pull
98+
git checkout ${{ matrix.NETBOX_DOCKER_VERSION }}
99+
cp $GITHUB_WORKSPACE/tests/netbox-docker/${{ matrix.VERSION }}/docker-compose.override.yml docker-compose.override.yml
100+
docker-compose up -d --quiet-pull netbox netbox-worker postgres redis redis-cache
121101
docker container ls
122102
cd ..
123-
if: matrix.VERSION == 'v3.4'
103+
104+
- name: Set up Python ${{ env.python-version }}
105+
uses: actions/setup-python@v4
106+
with:
107+
python-version: ${{ env.python-version }}
108+
124109
- name: Install and configure Poetry
125110
uses: snok/install-poetry@v1.3.3
126111
with:
127112
virtualenvs-create: false
113+
128114
- name: Install Python packages
129115
run: poetry install
116+
130117
- name: Build and install collection
131118
run: |
132119
ansible-galaxy collection install community.general -p /home/runner/.ansible/collections
133120
ansible-galaxy collection build .
134121
ansible-galaxy collection install netbox*.tar.gz -p /home/runner/.ansible/collections
122+
135123
- name: Wait for NetBox to be available
136124
run: |
137125
docker container ls
138126
docker logs netbox-docker_netbox_1
139127
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
140128
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox
129+
#if: matrix.VERSION == 'v3.3'
130+
141131
- name: Pre-populate NetBox
142132
run: ./tests/integration/netbox-deploy.py
143133
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox
144-
- name: Allow scripts to be executed
145-
# Set runme.sh execute permissions stripped by ansible-galaxy. Should be fixed in Ansible 2.10
146-
# https://github.com/ansible/ansible/issues/68415
147-
# Run render_config.sh to pass environment variables to integration tests
148-
# https://www.ansible.com/blog/adding-integration-tests-to-ansible-content-collections
149-
run: |
150-
chmod +x tests/integration/targets/inventory-${{ matrix.INTEGRATION_TESTS }}/runme.sh
151-
chmod +x tests/integration/targets/inventory-${{ matrix.INTEGRATION_TESTS }}/compare_inventory_json.py
152-
chmod +x tests/integration/render_config.sh
153-
tests/integration/render_config.sh tests/integration/targets/inventory/runme_config.template > tests/integration/targets/inventory-${{ matrix.INTEGRATION_TESTS }}/runme_config
154-
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox
134+
155135
- name: Run integration tests
156136
# Run regression and integration tests
157137
# Run the inventory test first, in case any of the other tests modify the data.
158138
run: |
159-
ansible-test integration -v --color --coverage --python ${{ matrix.python-version }} inventory-${{ matrix.INTEGRATION_TESTS }}
160-
ansible-test integration -v --color --coverage --python ${{ matrix.python-version }} regression-${{ matrix.INTEGRATION_TESTS }}
161-
ansible-test integration -v --color --coverage --python ${{ matrix.python-version }} ${{ matrix.INTEGRATION_TESTS }}
139+
ansible-test integration -v --color --coverage --python ${{ env.python-version }} inventory-${{ matrix.VERSION }}
140+
ansible-test integration -v --color --coverage --python ${{ env.python-version }} regression-${{ matrix.VERSION }}
141+
ansible-test integration -v --color --coverage --python ${{ env.python-version }} ${{ matrix.VERSION }}
162142
ansible-test coverage report --all --omit "tests/*,hacking/*,docs/*" --show-missing
163143
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Deploy collection to Ansible Galaxy
23
on:
34
create:

.readthedocs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
---
12
version: 2
23
#sphinx:
34
# configuration: docs/conf.py
45

6+
build:
7+
os: ubuntu-22.04
8+
tools:
9+
python: "3.9"
10+
511
python:
6-
version: 3.8
712
install:
813
- requirements: docs/requirements.txt

.yamllint

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
3+
yaml-files:
4+
- '*.yaml'
5+
- '*.yml'
6+
- '.yamllint'
7+
8+
rules:
9+
anchors: enable
10+
braces: enable
11+
brackets: enable
12+
colons: enable
13+
commas: enable
14+
comments: disable
15+
comments-indentation: disable
16+
document-end: disable
17+
document-start:
18+
level: warning
19+
empty-lines: enable
20+
empty-values: enable
21+
float-values: disable
22+
hyphens: enable
23+
indentation: disable
24+
key-duplicates: enable
25+
key-ordering: disable
26+
line-length: disable
27+
new-line-at-end-of-file: enable
28+
new-lines: enable
29+
octal-values: disable
30+
quoted-strings: disable
31+
trailing-spaces: enable
32+
truthy: disable

CHANGELOG.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ NetBox.NetBox Release Notes
55
.. contents:: Topics
66

77

8+
v3.13.0
9+
=======
10+
11+
Minor Changes
12+
-------------
13+
14+
- nb_inventory - Enable NetBox 3.5 support [#999](https://github.com/netbox-community/ansible_modules/pull/999)
15+
- netbox_fhrp_group_assignment - Add module [#974](https://github.com/netbox-community/ansible_modules/pull/974)
16+
- netbox_lsvpn_termination - Add module [#994](https://github.com/netbox-community/ansible_modules/pull/994)
17+
18+
Bugfixes
19+
--------
20+
21+
- netbox_cable - Fix idempotency [#990](https://github.com/netbox-community/ansible_modules/pull/990)
22+
23+
New Modules
24+
-----------
25+
26+
- netbox.netbox.netbox_fhrp_group_assignment - Creates, updates or removes FHRP group assignments from NetBox
27+
- netbox.netbox.netbox_lsvpn_termination - Creates, updates or removes L2VPNs terminations from NetBox
28+
829
v3.12.0
930
=======
1031

0 commit comments

Comments
 (0)