Skip to content

Commit 6852298

Browse files
authored
πŸš€ release (#139)
2 parents f57c725 + 1204138 commit 6852298

File tree

23 files changed

+715
-382
lines changed

23 files changed

+715
-382
lines changed

β€ŽMakefileβ€Ž

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,24 @@ docker-compose-netbox-plugin-down:
2323

2424
.PHONY: docker-compose-netbox-plugin-test
2525
docker-compose-netbox-plugin-test:
26-
-@$(DOCKER_COMPOSE) -f $(DOCKER_PATH)/docker-compose.yaml -f $(DOCKER_PATH)/docker-compose.test.yaml run -u root --rm netbox ./manage.py test $(TEST_FLAGS) --keepdb $(TEST_SELECTOR)
27-
@$(MAKE) docker-compose-netbox-plugin-down
26+
@$(DOCKER_COMPOSE) -f $(DOCKER_PATH)/docker-compose.yaml -f $(DOCKER_PATH)/docker-compose.test.yaml run -u root --rm netbox ./manage.py test $(TEST_FLAGS) --keepdb $(TEST_SELECTOR); \
27+
EXIT_CODE=$$?; \
28+
$(MAKE) docker-compose-netbox-plugin-down; \
29+
exit $$EXIT_CODE
2830

2931
.PHONY: docker-compose-netbox-plugin-test-lint
3032
docker-compose-netbox-plugin-test-lint:
31-
-@$(DOCKER_COMPOSE) -f $(DOCKER_PATH)/docker-compose.yaml -f $(DOCKER_PATH)/docker-compose.test.yaml run -u root --rm netbox ruff check --output-format=github netbox_diode_plugin
32-
@$(MAKE) docker-compose-netbox-plugin-down
33+
@$(DOCKER_COMPOSE) -f $(DOCKER_PATH)/docker-compose.yaml -f $(DOCKER_PATH)/docker-compose.test.yaml run -u root --rm netbox ruff check --output-format=github netbox_diode_plugin; \
34+
EXIT_CODE=$$?; \
35+
$(MAKE) docker-compose-netbox-plugin-down; \
36+
exit $$EXIT_CODE
3337

3438
.PHONY: docker-compose-netbox-plugin-test-cover
3539
docker-compose-netbox-plugin-test-cover:
36-
-@$(DOCKER_COMPOSE) -f $(DOCKER_PATH)/docker-compose.yaml -f $(DOCKER_PATH)/docker-compose.test.yaml run --rm -u root -e COVERAGE_FILE=/opt/netbox/netbox/coverage/.coverage netbox sh -c "coverage run --source=netbox_diode_plugin --omit=*/migrations/* ./manage.py test --keepdb $(TEST_SELECTOR) && coverage xml -o /opt/netbox/netbox/coverage/report.xml && coverage report -m | tee /opt/netbox/netbox/coverage/report.txt"
37-
@$(MAKE) docker-compose-netbox-plugin-down
40+
@$(DOCKER_COMPOSE) -f $(DOCKER_PATH)/docker-compose.yaml -f $(DOCKER_PATH)/docker-compose.test.yaml run --rm -u root -e COVERAGE_FILE=/opt/netbox/netbox/coverage/.coverage netbox sh -c "coverage run --source=netbox_diode_plugin --omit=*/migrations/* ./manage.py test --keepdb $(TEST_SELECTOR) && coverage xml -o /opt/netbox/netbox/coverage/report.xml && coverage report -m | tee /opt/netbox/netbox/coverage/report.txt"; \
41+
EXIT_CODE=$$?; \
42+
$(MAKE) docker-compose-netbox-plugin-down; \
43+
exit $$EXIT_CODE
3844

3945
.PHONY: docker-compose-generate-matching-docs
4046
docker-compose-generate-matching-docs:
File renamed without changes.

β€Ždocker/docker-compose.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
image: netboxcommunity/netbox:v4.4.2-3.4.1-diode-netbox-plugin
55
build:
66
context: .
7-
dockerfile: Dockerfile-diode-netbox-plugin
7+
dockerfile: Dockerfile
88
pull: true
99
depends_on:
1010
- netbox-postgres

β€Ždocker/netbox/configuration/configuration.pyβ€Ž

Lines changed: 179 additions & 122 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
####
2-
## This file contains extra configuration options that can't be configured
3-
## directly through environment variables.
2+
# This file contains extra configuration options that can't be configured
3+
# directly through environment variables.
44
####
55

6-
## Specify one or more name and email address tuples representing NetBox administrators. These people will be notified of
7-
## application errors (assuming correct email settings are provided).
6+
# Specify one or more name and email address tuples representing NetBox administrators. These people will be notified of
7+
# application errors (assuming correct email settings are provided).
88
# ADMINS = [
99
# # ['John Doe', '[email protected]'],
1010
# ]
1111

1212

13-
## URL schemes that are allowed within links in NetBox
13+
# URL schemes that are allowed within links in NetBox
1414
# ALLOWED_URL_SCHEMES = (
1515
# 'file', 'ftp', 'ftps', 'http', 'https', 'irc', 'mailto', 'sftp', 'ssh', 'tel', 'telnet', 'tftp', 'vnc', 'xmpp',
1616
# )
1717

18-
## Enable installed plugins. Add the name of each plugin to the list.
18+
# Enable installed plugins. Add the name of each plugin to the list.
1919
# from netbox.configuration.configuration import PLUGINS
2020
# PLUGINS.append('my_plugin')
2121

22-
## Plugins configuration settings. These settings are used by various plugins that the user may have installed.
23-
## Each key in the dictionary is the name of an installed plugin and its value is a dictionary of settings.
22+
# Plugins configuration settings. These settings are used by various plugins that the user may have installed.
23+
# Each key in the dictionary is the name of an installed plugin and its value is a dictionary of settings.
2424
# from netbox.configuration.configuration import PLUGINS_CONFIG
2525
# PLUGINS_CONFIG['my_plugin'] = {
2626
# 'foo': 'bar',
2727
# 'buzz': 'bazz'
2828
# }
2929

3030

31-
## Remote authentication support
31+
# Remote authentication support
3232
# REMOTE_AUTH_DEFAULT_PERMISSIONS = {}
3333

3434

35-
## By default uploaded media is stored on the local filesystem. Using Django-storages is also supported. Provide the
36-
## class path of the storage driver in STORAGE_BACKEND and any configuration options in STORAGE_CONFIG. For example:
35+
# By default uploaded media is stored on the local filesystem. Using Django-storages is also supported. Provide the
36+
# class path of the storage driver in STORAGE_BACKEND and any configuration options in STORAGE_CONFIG. For example:
3737
# STORAGE_BACKEND = 'storages.backends.s3boto3.S3Boto3Storage'
3838
# STORAGE_CONFIG = {
3939
# 'AWS_ACCESS_KEY_ID': 'Key ID',
@@ -43,7 +43,7 @@
4343
# }
4444

4545

46-
## This file can contain arbitrary Python code, e.g.:
46+
# This file can contain arbitrary Python code, e.g.:
4747
# from datetime import datetime
4848
# now = datetime.now().strftime("%d/%m/%Y %H:%M:%S")
4949
# BANNER_TOP = f'<marquee width="200px">This instance started on {now}.</marquee>'

β€Ždocker/netbox/configuration/ldap/extra.pyβ€Ž

Lines changed: 0 additions & 28 deletions
This file was deleted.

β€Ždocker/netbox/configuration/ldap/ldap_config.pyβ€Ž

Lines changed: 0 additions & 113 deletions
This file was deleted.

β€Ždocker/netbox/configuration/logging.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
},
1616
},
1717
}
18+
1819
# # Remove first comment(#) on each line to implement this working logging example.
1920
# # Add LOGLEVEL environment variable to netbox if you use this example & want a different log level.
2021
# from os import environ

β€Ždocker/netbox/configuration/plugins.pyβ€Ž

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,3 @@
88
"netbox_diode_plugin",
99
"netbox_branching",
1010
]
11-
12-
# PLUGINS_CONFIG = {
13-
# "netbox_diode_plugin": {
14-
# # Auto-provision users for Diode plugin
15-
# "auto_provision_users": True,
16-
#
17-
# # Diode gRPC target for communication with Diode server
18-
# "diode_target_override": "grpc://localhost:8080/diode",
19-
#
20-
# # User allowed for Diode to NetBox communication
21-
# "diode_to_netbox_username": "diode-to-netbox",
22-
#
23-
# # User allowed for NetBox to Diode communication
24-
# "netbox_to_diode_username": "netbox-to-diode",
25-
#
26-
# # User allowed for data ingestion
27-
# "diode_username": "diode-ingestion",
28-
# },
29-
# }

β€Ždocker/v4.2.3/netbox/docker-entrypoint.shβ€Ž

100755100644
File mode changed.

0 commit comments

Comments
Β (0)