Skip to content

Commit f0b4616

Browse files
authored
netbox 3.6 support (#167)
netbox 3.6 support thanks to @abhi1693 & @kbelokon
1 parent bc17018 commit f0b4616

File tree

19 files changed

+315
-332
lines changed

19 files changed

+315
-332
lines changed

.devcontainer/Dockerfile-plugin_dev

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
ARG NETBOX_VARIANT=v3.5
1+
ARG NETBOX_VARIANT=v3.6
22

33
FROM netboxcommunity/netbox:${NETBOX_VARIANT}
44

5-
ARG NETBOX_INITIALIZERS_VARIANT=3.5.*
5+
ARG NETBOX_INITIALIZERS_VARIANT=3.6.*
66

77
ARG DEBIAN_FRONTEND=noninteractive
88

99
# Install APT packages
1010
# hadolint ignore=DL3008
1111
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
12-
&& apt-get -y install --no-install-recommends curl git make openssh-client python3.10-dev sudo wget zsh \
12+
&& apt-get -y install --no-install-recommends curl git make openssh-client python3.11-dev sudo wget zsh \
1313
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
1414

1515
# Install development & ide dependencies
1616
COPY requirements-dev.txt /tmp/pip-tmp/
1717
RUN /opt/netbox/venv/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements-dev.txt \
1818
&& rm -rf /tmp/*
1919

20-
ARG USERNAME=vscode
20+
ARG USERNAME=ubuntu
2121
ARG USER_UID=1000
2222
ARG USER_GID=$USER_UID
2323

24-
RUN useradd -l -md /home/vscode -s /usr/bin/zsh -u $USER_UID $USERNAME \
25-
&& usermod -aG sudo $USERNAME \
24+
RUN usermod -aG sudo $USERNAME \
2625
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
2726
&& mkdir /opt/netbox/netbox/netbox-acls \
2827
&& chown $USERNAME:$USERNAME /opt/netbox /etc/netbox /opt/unit -R

.devcontainer/configuration/configuration.py

Lines changed: 194 additions & 169 deletions
Large diffs are not rendered by default.

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@
104104
//"postAttachCommand": "source /opt/netbox/venv/bin/activate",
105105

106106
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
107-
"remoteUser": "vscode"
107+
"remoteUser": "ubuntu"
108108
}

.devcontainer/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ services:
1616
interval: 15s
1717
test: "curl -f http://localhost:8080/api/ || exit 1"
1818
volumes:
19-
- ./configuration:/etc/netbox/config:z,ro
20-
#- ./reports:/etc/netbox/reports:z,ro
21-
#- ./scripts:/etc/netbox/scripts:z,ro
22-
#- netbox-media-files:/opt/netbox/netbox/media:z
19+
- ./configuration:/etc/netbox/config:ro
20+
#- netbox-media-files:/opt/netbox/netbox/media:rw
21+
#- netbox-reports-files:/opt/netbox/netbox/reports:rw
22+
#- netbox-scripts-files:/opt/netbox/netbox/scripts:rw
2323
#netbox-worker:
2424
# <<: *netbox
2525
# depends_on:

.devcontainer/env/netbox.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ REDIS_DATABASE=0
1515
REDIS_HOST=redis
1616
REDIS_INSECURE_SKIP_TLS_VERIFY=false
1717
REDIS_PASSWORD=H733Kdjndks81
18-
SECRET_KEY=r8OwDznj!!dciP9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNjaa
18+
SECRET_KEY='r(m)9nLGnz$(_q3N4z1k(EFsMCjjjzx08x9VhNVcfd%6RF#r!6DE@+V5Zk2X'
1919
SUPERUSER_API_TOKEN=0123456789abcdef0123456789abcdef01234567
2020
SUPERUSER_EMAIL=[email protected]
2121
SUPERUSER_NAME=admin

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ body:
2323
attributes:
2424
label: NetBox access-list plugin version
2525
description: What version of the NetBox access-list plugin are you currently running?
26-
placeholder: v1.3.0
26+
placeholder: v1.4.0
2727
validations:
2828
required: true
2929
- type: input
3030
attributes:
3131
label: NetBox version
3232
description: What version of NetBox are you currently running?
33-
placeholder: v3.5.4
33+
placeholder: v3.6.3
3434
validations:
3535
required: true
3636
- type: textarea

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ body:
1515
attributes:
1616
label: NetBox version
1717
description: What version of NetBox are you currently running?
18-
placeholder: v3.5.4
18+
placeholder: v3.6.3
1919
validations:
2020
required: true
2121
- type: dropdown

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ jobs:
4444

4545
- id: docker-test
4646
name: Test the image
47-
run: ./test.sh snapshot
47+
run: ./test.sh

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.4.0
4+
rev: v4.5.0
55
hooks:
66
- id: check-docstring-first
77
- id: check-merge-conflict
@@ -21,24 +21,24 @@ repos:
2121
- "--profile=black"
2222
exclude: ^.devcontainer/
2323
- repo: https://github.com/psf/black
24-
rev: 23.3.0
24+
rev: 23.9.1
2525
hooks:
2626
- id: black
2727
language_version: python3
2828
exclude: ^.devcontainer/
2929
- repo: https://github.com/asottile/add-trailing-comma
30-
rev: v2.5.1
30+
rev: v3.1.0
3131
hooks:
3232
- id: add-trailing-comma
3333
args:
3434
- "--py36-plus"
3535
- repo: https://github.com/PyCQA/flake8
36-
rev: 6.0.0
36+
rev: 6.1.0
3737
hooks:
3838
- id: flake8
3939
exclude: ^.devcontainer/
4040
- repo: https://github.com/asottile/pyupgrade
41-
rev: v3.7.0
41+
rev: v3.15.0
4242
hooks:
4343
- id: pyupgrade
4444
args:
@@ -59,11 +59,11 @@ repos:
5959
# - id: htmlhint
6060
# args: [--config, .htmlhintrc]
6161
- repo: https://github.com/igorshubovych/markdownlint-cli
62-
rev: v0.35.0
62+
rev: v0.37.0
6363
hooks:
6464
- id: markdownlint
6565
- repo: https://github.com/astral-sh/ruff-pre-commit
66-
rev: v0.0.272
66+
rev: v0.0.292
6767
hooks:
6868
- id: ruff
6969
#- repo: local

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
ARG NETBOX_VARIANT=v3.5
1+
ARG NETBOX_VARIANT=v3.6
22

33
FROM netboxcommunity/netbox:${NETBOX_VARIANT}
44

55
RUN mkdir -pv /plugins/netbox-acls
66
COPY . /plugins/netbox-acls
77

88
RUN /opt/netbox/venv/bin/python3 /plugins/netbox-acls/setup.py develop && \
9-
cp -rf /plugins/netbox-acls/netbox_acls/ /opt/netbox/venv/lib/python3.10/site-packages/netbox_acls
9+
cp -rf /plugins/netbox-acls/netbox_acls/ /opt/netbox/venv/lib/python3.11/site-packages/netbox_acls

0 commit comments

Comments
 (0)