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

Release 1.2.0 #493

Merged
merged 62 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
020e0ad
update .gitignore to keep extra.py in ldap config
ryanmerolle Feb 22, 2021
22186b2
do not set AUTH_LDAP_MIRROR_GROUPS if not defined
ryanmerolle Feb 22, 2021
0dec4d8
Add extra.py example for ldap config
ryanmerolle Feb 22, 2021
f19d650
Merge pull request #1 from netbox-community/develop
ryanmerolle Feb 25, 2021
edb61f3
Sponsor Message
cimnine Mar 11, 2021
8f119ed
Merge pull request #469 from cimnine/Sponsoring
cimnine Mar 12, 2021
ce6fe5c
Update dependency ruamel.yaml to v0.17.0
renovate-bot Mar 26, 2021
61eecdd
Merge pull request #477 from netbox-community/renovate/ruamel.yaml-0.x
cimnine Mar 26, 2021
cca79b5
Update dependency ruamel.yaml to v0.17.2
renovate-bot Mar 29, 2021
9ab202f
Merge pull request #479 from netbox-community/renovate/ruamel.yaml-0.x
cimnine Mar 29, 2021
a2e33c1
Fix link name reference if content type is invalid
marcus-crane Apr 1, 2021
5944086
Rack groups have been renamed to locations
tobiasge Apr 7, 2021
45824ba
Devices can be added to locations
tobiasge Apr 7, 2021
b18e4aa
Fix super-linter on PRs
tobiasge Apr 7, 2021
1c4b674
Fixed isort issues
tobiasge Apr 7, 2021
9874cef
VLAN Groups can be scoped to multiple types
tobiasge Apr 7, 2021
3673196
Fields in Custom links have been renamed
tobiasge Apr 7, 2021
a572d5f
Update dependency ruamel.yaml to v0.17.4
renovate-bot Apr 7, 2021
14c0d17
Merge pull request #486 from netbox-community/renovate/ruamel.yaml-0.x
cimnine Apr 12, 2021
a5da382
Merge pull request #482 from Daimler/custom-link-error-fix
cimnine Apr 13, 2021
f637de8
Improved error logging
tobiasge Apr 13, 2021
752f592
Fixed Python f-string
tobiasge Apr 13, 2021
6e7d5a6
Fix quoting of exec argument in the entrypoint script
jhujhiti Apr 15, 2021
eee07f7
Merge pull request #492 from jhujhiti/upstreaming
cimnine Apr 16, 2021
c7df608
Merge pull request #485 from tobiasge/prepare-2.11
tobiasge Apr 16, 2021
d5c92e9
Preparation for 1.2.0
tobiasge Apr 16, 2021
a89d2e0
Don't publish Netbox on random port
tobiasge Apr 17, 2021
6879412
Merge pull request #495 from tobiasge/no-random-port
tobiasge Apr 19, 2021
53d759e
Update dependency django-auth-ldap to v2.4.0
renovate-bot Apr 19, 2021
28a2628
Merge pull request #3 from netbox-community/develop
ryanmerolle Apr 20, 2021
5304c8f
Merge pull request #483 from netbox-community/renovate/django-auth-ld…
cimnine Apr 20, 2021
222ede2
enahance ldap extra.py with more examples
ryanmerolle Apr 20, 2021
6f4d025
backed out ldap_config changes
ryanmerolle Apr 20, 2021
f2731d3
Merge pull request #448 from ryanmerolle/develop
cimnine Apr 20, 2021
eb5cc88
Add expample plugin configuration
ryanmerolle Apr 20, 2021
8176ef8
Add expample logging configuration
ryanmerolle Apr 20, 2021
b69a97d
add LOGLEVEL into netbox.env
ryanmerolle Apr 20, 2021
9fab9a3
mention plugin wiki page in plugins.py comment
ryanmerolle Apr 20, 2021
69dd876
switch plugin example to netbox_bgp
ryanmerolle Apr 20, 2021
5d4ecb7
user, group, & permissions fix
ryanmerolle Apr 20, 2021
a7a5d13
updated given linting feedback
ryanmerolle Apr 20, 2021
b1bcfcb
fix isort on groups & permissions scripts
ryanmerolle Apr 21, 2021
744ed91
permissions script cleanup
ryanmerolle Apr 21, 2021
71d8ac1
correct issues with users.yml spacing
ryanmerolle Apr 21, 2021
45889c3
commented out the logging
ryanmerolle Apr 24, 2021
a1e0c52
revert startup scripts to use key for object name
ryanmerolle Apr 24, 2021
ff0bc97
correct ldap example var name case
ryanmerolle Apr 24, 2021
d1b70ba
Merge pull request #499 from ryanmerolle/ldap-example-var-name
cimnine Apr 24, 2021
4e31218
update object permission conditionals
ryanmerolle Apr 25, 2021
528bc17
correct flake8 in object_permissions.py
ryanmerolle Apr 25, 2021
12401f2
correct black formatting for object_permissions.py
ryanmerolle Apr 25, 2021
474ca9e
fully working object permissions
ryanmerolle Apr 25, 2021
9654513
remove example evn var for logging
ryanmerolle Apr 25, 2021
604ff3b
Merge branch 'plugins-and-logging' of https://github.com/ryanmerolle/…
cimnine Apr 26, 2021
f924e76
Formatting
cimnine Apr 26, 2021
3d063a4
Merge branch 'ryanmerolle-plugins-and-logging' into develop
cimnine Apr 26, 2021
5b34df1
Build feature branch
tobiasge Apr 24, 2021
8678ad9
update permission user & group lookup as suggested
ryanmerolle Apr 26, 2021
1f3d946
apply black formating to all startup_scripts
ryanmerolle Apr 26, 2021
73b07a7
Merge pull request #500 from ryanmerolle/python-formatting
cimnine Apr 26, 2021
fd55ec2
Merge pull request #497 from ryanmerolle/startup-scripts-2.10+
tobiasge Apr 27, 2021
60428d5
Merge pull request #498 from tobiasge/build-feature-branch
cimnine Apr 27, 2021
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
5 changes: 4 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
name: Checks syntax of our code
steps:
- uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- uses: actions/setup-python@v2
- name: Lint Code Base
uses: github/super-linter@v3
Expand All @@ -39,7 +42,7 @@ jobs:
build_cmd:
- ./build-latest.sh
- PRERELEASE=true ./build-latest.sh
- ./build-next.sh
- ./build.sh feature
- ./build.sh develop
docker_from:
- '' # use the default of the build script
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build_cmd:
- ./build-latest.sh
- PRERELEASE=true ./build-latest.sh
- ./build-next.sh
- ./build.sh feature
- ./build.sh develop
fail-fast: false
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ configuration/*
!configuration/configuration.py
!configuration/extra.py
configuration/ldap/*
!configuration/ldap/extra.py
!configuration/ldap/ldap_config.py
!configuration/logging.py
!configuration/plugins.py
prometheus.yml
super-linter.log
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ It runs NetBox's own unit tests and ensures that all initializers work:
IMAGE=netboxcommunity/netbox:latest ./test.sh
```

## About
## Support

This repository is currently maintained and funded by [nxt][nxt].

[nxt]: https://nxt.engineering/en/
This repository is currently maintained by the community.
Please consider sponsoring the maintainers of this project.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.2.0
39 changes: 0 additions & 39 deletions build-next.sh

This file was deleted.

28 changes: 28 additions & 0 deletions configuration/ldap/extra.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
####
## This file contains extra configuration options that can't be configured
## directly through environment variables.
## All vairables set here overwrite any existing found in ldap_config.py
####

# # This Python script inherits all the imports from ldap_config.py
# from django_auth_ldap.config import LDAPGroupQuery # Imported since not in ldap_config.py

# # Sets a base requirement of membetship to netbox-user-ro, netbox-user-rw, or netbox-user-admin.
# AUTH_LDAP_REQUIRE_GROUP = (
# LDAPGroupQuery("cn=netbox-user-ro,ou=groups,dc=example,dc=com")
# | LDAPGroupQuery("cn=netbox-user-rw,ou=groups,dc=example,dc=com")
# | LDAPGroupQuery("cn=netbox-user-admin,ou=groups,dc=example,dc=com")
# )

# # Sets LDAP Flag groups variables with example.
# AUTH_LDAP_USER_FLAGS_BY_GROUP = {
# "is_staff": (
# LDAPGroupQuery("cn=netbox-user-ro,ou=groups,dc=example,dc=com")
# | LDAPGroupQuery("cn=netbox-user-rw,ou=groups,dc=example,dc=com")
# | LDAPGroupQuery("cn=netbox-user-admin,ou=groups,dc=example,dc=com")
# ),
# "is_superuser": "cn=netbox-user-admin,ou=groups,dc=example,dc=com",
# }

# # Sets LDAP Mirror groups variables with example groups
# AUTH_LDAP_MIRROR_GROUPS = ["netbox-user-ro", "netbox-user-rw", "netbox-user-admin"]
55 changes: 55 additions & 0 deletions configuration/logging.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# # Remove first comment(#) on each line to implement this working logging example.
# # Add LOGLEVEL environment variable to netbox if you use this example & want a different log level.
# from os import environ

# # Set LOGLEVEL in netbox.env or docker-compose.overide.yml to override a logging level of INFO.
# LOGLEVEL = environ.get('LOGLEVEL', 'INFO')

# LOGGING = {

# 'version': 1,
# 'disable_existing_loggers': False,
# 'formatters': {
# 'verbose': {
# 'format': '{levelname} {asctime} {module} {process:d} {thread:d} {message}',
# 'style': '{',
# },
# 'simple': {
# 'format': '{levelname} {message}',
# 'style': '{',
# },
# },
# 'filters': {
# 'require_debug_false': {
# '()': 'django.utils.log.RequireDebugFalse',
# },
# },
# 'handlers': {
# 'console': {
# 'level': LOGLEVEL,
# 'filters': ['require_debug_false'],
# 'class': 'logging.StreamHandler',
# 'formatter': 'simple'
# },
# 'mail_admins': {
# 'level': 'ERROR',
# 'class': 'django.utils.log.AdminEmailHandler',
# 'filters': ['require_debug_false']
# }
# },
# 'loggers': {
# 'django': {
# 'handlers': ['console'],
# 'propagate': True,
# },
# 'django.request': {
# 'handlers': ['mail_admins'],
# 'level': 'ERROR',
# 'propagate': False,
# },
# 'django_auth_ldap': {
# 'handlers': ['console',],
# 'level': LOGLEVEL,
# }
# }
# }
13 changes: 13 additions & 0 deletions configuration/plugins.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Add your plugins and plugin settings here.
# Of course uncomment this file out.

# To learn how to build images with your required plugins
# See https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins

# PLUGINS = ["netbox_bgp"]

# PLUGINS_CONFIG = {
# "netbox_bgp": {
# ADD YOUR SETTINGS HERE
# }
# }
5 changes: 5 additions & 0 deletions docker-compose.override.yml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: '3.4'
services:
netbox:
ports:
- 8000:8080
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ services:
- ./reports:/etc/netbox/reports:z,ro
- ./scripts:/etc/netbox/scripts:z,ro
- netbox-media-files:/opt/netbox/netbox/media:z
ports:
- "8080"
netbox-worker:
<<: *netbox
depends_on:
Expand Down
4 changes: 1 addition & 3 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,4 @@ echo "✅ Initialisation is done."

# Launch whatever is passed by docker
# (i.e. the RUN instruction in the Dockerfile)
#
# shellcheck disable=SC2068
exec $@
exec "$@"
8 changes: 4 additions & 4 deletions initializers/custom_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
## Examples:

# - name: link_to_repo
# text: 'Link to Netbox Docker'
# url: 'https://github.com/netbox-community/netbox-docker'
# link_text: 'Link to Netbox Docker'
# link_url: 'https://github.com/netbox-community/netbox-docker'
# new_window: False
# content_type: device
# - name: link_to_localhost
# text: 'Link to localhost'
# url: 'http://localhost'
# link_text: 'Link to localhost'
# link_url: 'http://localhost'
# new_window: True
# content_type: device
9 changes: 9 additions & 0 deletions initializers/devices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,12 @@
# position: 3
# custom_field_data:
# text_field: Description
# - name: server04
# device_role: server
# device_type: Other
# site: SING 1
# location: cage 101
# face: front
# position: 3
# custom_field_data:
# text_field: Description
32 changes: 3 additions & 29 deletions initializers/groups.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,9 @@
## To list all permissions, run:
##
## docker-compose run --rm --entrypoint /bin/bash netbox
## $ ./manage.py migrate
## $ ./manage.py shell
## > from django.contrib.auth.models import Permission
## > print('\n'.join([p.codename for p in Permission.objects.all()]))
##
## Permission lists support wildcards. See the examples below.
##
## Examples:

# applications:
# users:
# - technical_user
# - technical_user
# readers:
# users:
# - reader
# - reader
# writers:
# users:
# - writer
# permissions:
# - delete_device
# - delete_virtualmachine
# - add_*
# - change_*
# vm_managers:
# permissions:
# - '*_virtualmachine'
# device_managers:
# permissions:
# - '*device*'
# creators:
# permissions:
# - add_*
# - writer
File renamed without changes.
48 changes: 48 additions & 0 deletions initializers/object_permissions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# all.ro:
# actions:
# - view
# description: 'Read Only for All Objects'
# enabled: true
# groups:
# - applications
# - readers
# object_types: all
# users:
# - jdoe
# all.rw:
# actions:
# - add
# - change
# - delete
# - view
# description: 'Read/Write for All Objects'
# enabled: true
# groups:
# - writers
# object_types: all
# network_team.rw:
# actions:
# - add
# - change
# - delete
# - view
# description: "Network Team Permissions"
# enabled: true
# object_types:
# circuits:
# - circuit
# - circuittermination
# - circuittype
# - provider
# dcim: all
# ipam:
# - aggregate
# - ipaddress
# - prefix
# - rir
# - role
# - routetarget
# - service
# - vlan
# - vlangroup
# - vrf
2 changes: 1 addition & 1 deletion initializers/power_panels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# site: AMS 1
# - name: power panel SING 1
# site: SING 1
# rack_group: cage 101
# location: cage 101
2 changes: 1 addition & 1 deletion initializers/racks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# text_field: Description
# - site: SING 1
# name: rack-03
# group: cage 101
# location: cage 101
# role: Role 3
# type: 4-post-cabinet
# width: 19
Expand Down
25 changes: 8 additions & 17 deletions initializers/users.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
## To list all permissions, run:
##
## docker-compose run --rm --entrypoint /bin/bash netbox
## $ ./manage.py migrate
## $ ./manage.py shell
## > from django.contrib.auth.models import Permission
## > print('\n'.join([p.codename for p in Permission.objects.all()]))
##
## Permission lists support wildcards. See the examples below.
##
## Examples:

# technical_user:
# api_token: 0123456789technicaluser789abcdef01234567 # must be looooong!
# reader:
# password: reader
# writer:
# password: writer
# permissions:
# - delete_device
# - delete_virtualmachine
# - add_*
# - change_*
# jdoe:
# first_name: John
# last_name: Doe
# api_token: 0123456789jdoe789abcdef01234567jdoe
# is_active: True
# is_superuser: False
# is_staff: False
# email: [email protected]
Loading