Skip to content

Commit 676ca79

Browse files
authored
Merge pull request #493 from netbox-community/develop
Release 1.2.0
2 parents cb5ffa0 + 60428d5 commit 676ca79

34 files changed

+305
-207
lines changed

.github/workflows/push.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
name: Checks syntax of our code
1515
steps:
1616
- uses: actions/checkout@v2
17+
with:
18+
# Full git history is needed to get a proper list of changed files within `super-linter`
19+
fetch-depth: 0
1720
- uses: actions/setup-python@v2
1821
- name: Lint Code Base
1922
uses: github/super-linter@v3
@@ -39,7 +42,7 @@ jobs:
3942
build_cmd:
4043
- ./build-latest.sh
4144
- PRERELEASE=true ./build-latest.sh
42-
- ./build-next.sh
45+
- ./build.sh feature
4346
- ./build.sh develop
4447
docker_from:
4548
- '' # use the default of the build script

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
build_cmd:
1515
- ./build-latest.sh
1616
- PRERELEASE=true ./build-latest.sh
17-
- ./build-next.sh
17+
- ./build.sh feature
1818
- ./build.sh develop
1919
fail-fast: false
2020
runs-on: ubuntu-latest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ configuration/*
77
!configuration/configuration.py
88
!configuration/extra.py
99
configuration/ldap/*
10+
!configuration/ldap/extra.py
1011
!configuration/ldap/ldap_config.py
12+
!configuration/logging.py
13+
!configuration/plugins.py
1114
prometheus.yml
1215
super-linter.log

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ It runs NetBox's own unit tests and ensures that all initializers work:
134134
IMAGE=netboxcommunity/netbox:latest ./test.sh
135135
```
136136

137-
## About
137+
## Support
138138

139-
This repository is currently maintained and funded by [nxt][nxt].
140-
141-
[nxt]: https://nxt.engineering/en/
139+
This repository is currently maintained by the community.
140+
Please consider sponsoring the maintainers of this project.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.0
1+
1.2.0

build-next.sh

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

configuration/ldap/extra.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
####
2+
## This file contains extra configuration options that can't be configured
3+
## directly through environment variables.
4+
## All vairables set here overwrite any existing found in ldap_config.py
5+
####
6+
7+
# # This Python script inherits all the imports from ldap_config.py
8+
# from django_auth_ldap.config import LDAPGroupQuery # Imported since not in ldap_config.py
9+
10+
# # Sets a base requirement of membetship to netbox-user-ro, netbox-user-rw, or netbox-user-admin.
11+
# AUTH_LDAP_REQUIRE_GROUP = (
12+
# LDAPGroupQuery("cn=netbox-user-ro,ou=groups,dc=example,dc=com")
13+
# | LDAPGroupQuery("cn=netbox-user-rw,ou=groups,dc=example,dc=com")
14+
# | LDAPGroupQuery("cn=netbox-user-admin,ou=groups,dc=example,dc=com")
15+
# )
16+
17+
# # Sets LDAP Flag groups variables with example.
18+
# AUTH_LDAP_USER_FLAGS_BY_GROUP = {
19+
# "is_staff": (
20+
# LDAPGroupQuery("cn=netbox-user-ro,ou=groups,dc=example,dc=com")
21+
# | LDAPGroupQuery("cn=netbox-user-rw,ou=groups,dc=example,dc=com")
22+
# | LDAPGroupQuery("cn=netbox-user-admin,ou=groups,dc=example,dc=com")
23+
# ),
24+
# "is_superuser": "cn=netbox-user-admin,ou=groups,dc=example,dc=com",
25+
# }
26+
27+
# # Sets LDAP Mirror groups variables with example groups
28+
# AUTH_LDAP_MIRROR_GROUPS = ["netbox-user-ro", "netbox-user-rw", "netbox-user-admin"]

configuration/logging.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# # Remove first comment(#) on each line to implement this working logging example.
2+
# # Add LOGLEVEL environment variable to netbox if you use this example & want a different log level.
3+
# from os import environ
4+
5+
# # Set LOGLEVEL in netbox.env or docker-compose.overide.yml to override a logging level of INFO.
6+
# LOGLEVEL = environ.get('LOGLEVEL', 'INFO')
7+
8+
# LOGGING = {
9+
10+
# 'version': 1,
11+
# 'disable_existing_loggers': False,
12+
# 'formatters': {
13+
# 'verbose': {
14+
# 'format': '{levelname} {asctime} {module} {process:d} {thread:d} {message}',
15+
# 'style': '{',
16+
# },
17+
# 'simple': {
18+
# 'format': '{levelname} {message}',
19+
# 'style': '{',
20+
# },
21+
# },
22+
# 'filters': {
23+
# 'require_debug_false': {
24+
# '()': 'django.utils.log.RequireDebugFalse',
25+
# },
26+
# },
27+
# 'handlers': {
28+
# 'console': {
29+
# 'level': LOGLEVEL,
30+
# 'filters': ['require_debug_false'],
31+
# 'class': 'logging.StreamHandler',
32+
# 'formatter': 'simple'
33+
# },
34+
# 'mail_admins': {
35+
# 'level': 'ERROR',
36+
# 'class': 'django.utils.log.AdminEmailHandler',
37+
# 'filters': ['require_debug_false']
38+
# }
39+
# },
40+
# 'loggers': {
41+
# 'django': {
42+
# 'handlers': ['console'],
43+
# 'propagate': True,
44+
# },
45+
# 'django.request': {
46+
# 'handlers': ['mail_admins'],
47+
# 'level': 'ERROR',
48+
# 'propagate': False,
49+
# },
50+
# 'django_auth_ldap': {
51+
# 'handlers': ['console',],
52+
# 'level': LOGLEVEL,
53+
# }
54+
# }
55+
# }

configuration/plugins.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Add your plugins and plugin settings here.
2+
# Of course uncomment this file out.
3+
4+
# To learn how to build images with your required plugins
5+
# See https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins
6+
7+
# PLUGINS = ["netbox_bgp"]
8+
9+
# PLUGINS_CONFIG = {
10+
# "netbox_bgp": {
11+
# ADD YOUR SETTINGS HERE
12+
# }
13+
# }

docker-compose.override.yml.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: '3.4'
2+
services:
3+
netbox:
4+
ports:
5+
- 8000:8080

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ services:
1616
- ./reports:/etc/netbox/reports:z,ro
1717
- ./scripts:/etc/netbox/scripts:z,ro
1818
- netbox-media-files:/opt/netbox/netbox/media:z
19-
ports:
20-
- "8080"
2119
netbox-worker:
2220
<<: *netbox
2321
depends_on:

docker/docker-entrypoint.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,4 @@ echo "✅ Initialisation is done."
6868

6969
# Launch whatever is passed by docker
7070
# (i.e. the RUN instruction in the Dockerfile)
71-
#
72-
# shellcheck disable=SC2068
73-
exec $@
71+
exec "$@"

initializers/custom_links.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
## Examples:
1111

1212
# - name: link_to_repo
13-
# text: 'Link to Netbox Docker'
14-
# url: 'https://github.com/netbox-community/netbox-docker'
13+
# link_text: 'Link to Netbox Docker'
14+
# link_url: 'https://github.com/netbox-community/netbox-docker'
1515
# new_window: False
1616
# content_type: device
1717
# - name: link_to_localhost
18-
# text: 'Link to localhost'
19-
# url: 'http://localhost'
18+
# link_text: 'Link to localhost'
19+
# link_url: 'http://localhost'
2020
# new_window: True
2121
# content_type: device

initializers/devices.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,12 @@
4242
# position: 3
4343
# custom_field_data:
4444
# text_field: Description
45+
# - name: server04
46+
# device_role: server
47+
# device_type: Other
48+
# site: SING 1
49+
# location: cage 101
50+
# face: front
51+
# position: 3
52+
# custom_field_data:
53+
# text_field: Description

initializers/groups.yml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,9 @@
1-
## To list all permissions, run:
2-
##
3-
## docker-compose run --rm --entrypoint /bin/bash netbox
4-
## $ ./manage.py migrate
5-
## $ ./manage.py shell
6-
## > from django.contrib.auth.models import Permission
7-
## > print('\n'.join([p.codename for p in Permission.objects.all()]))
8-
##
9-
## Permission lists support wildcards. See the examples below.
10-
##
11-
## Examples:
12-
131
# applications:
142
# users:
15-
# - technical_user
3+
# - technical_user
164
# readers:
175
# users:
18-
# - reader
6+
# - reader
197
# writers:
208
# users:
21-
# - writer
22-
# permissions:
23-
# - delete_device
24-
# - delete_virtualmachine
25-
# - add_*
26-
# - change_*
27-
# vm_managers:
28-
# permissions:
29-
# - '*_virtualmachine'
30-
# device_managers:
31-
# permissions:
32-
# - '*device*'
33-
# creators:
34-
# permissions:
35-
# - add_*
9+
# - writer
File renamed without changes.

initializers/object_permissions.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# all.ro:
2+
# actions:
3+
# - view
4+
# description: 'Read Only for All Objects'
5+
# enabled: true
6+
# groups:
7+
# - applications
8+
# - readers
9+
# object_types: all
10+
# users:
11+
# - jdoe
12+
# all.rw:
13+
# actions:
14+
# - add
15+
# - change
16+
# - delete
17+
# - view
18+
# description: 'Read/Write for All Objects'
19+
# enabled: true
20+
# groups:
21+
# - writers
22+
# object_types: all
23+
# network_team.rw:
24+
# actions:
25+
# - add
26+
# - change
27+
# - delete
28+
# - view
29+
# description: "Network Team Permissions"
30+
# enabled: true
31+
# object_types:
32+
# circuits:
33+
# - circuit
34+
# - circuittermination
35+
# - circuittype
36+
# - provider
37+
# dcim: all
38+
# ipam:
39+
# - aggregate
40+
# - ipaddress
41+
# - prefix
42+
# - rir
43+
# - role
44+
# - routetarget
45+
# - service
46+
# - vlan
47+
# - vlangroup
48+
# - vrf

initializers/power_panels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# site: AMS 1
33
# - name: power panel SING 1
44
# site: SING 1
5-
# rack_group: cage 101
5+
# location: cage 101

initializers/racks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# text_field: Description
3333
# - site: SING 1
3434
# name: rack-03
35-
# group: cage 101
35+
# location: cage 101
3636
# role: Role 3
3737
# type: 4-post-cabinet
3838
# width: 19

initializers/users.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1-
## To list all permissions, run:
2-
##
3-
## docker-compose run --rm --entrypoint /bin/bash netbox
4-
## $ ./manage.py migrate
5-
## $ ./manage.py shell
6-
## > from django.contrib.auth.models import Permission
7-
## > print('\n'.join([p.codename for p in Permission.objects.all()]))
8-
##
9-
## Permission lists support wildcards. See the examples below.
10-
##
11-
## Examples:
12-
131
# technical_user:
142
# api_token: 0123456789technicaluser789abcdef01234567 # must be looooong!
153
# reader:
164
# password: reader
175
# writer:
186
# password: writer
19-
# permissions:
20-
# - delete_device
21-
# - delete_virtualmachine
22-
# - add_*
23-
# - change_*
7+
# jdoe:
8+
# first_name: John
9+
# last_name: Doe
10+
# api_token: 0123456789jdoe789abcdef01234567jdoe
11+
# is_active: True
12+
# is_superuser: False
13+
# is_staff: False
14+
# email: john.doe@example.com

0 commit comments

Comments
 (0)