Skip to content

Commit 226d843

Browse files
authored
Merge pull request #705 from netbox-community/develop
Release 1.6.0
2 parents 58a1579 + b6d6f85 commit 226d843

Some content is hidden

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

52 files changed

+58
-74
lines changed

β€Ž.github/workflows/push.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ jobs:
4646
- ./build.sh develop
4747
docker_from:
4848
- '' # use the default of the build script
49-
- alpine:edge
5049
fail-fast: false
5150
runs-on: ubuntu-latest
5251
name: Builds new NetBox Docker Images

β€ŽDockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ WORKDIR /opt/netbox/netbox
9797
RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
9898
&& chown -R unit:root media /opt/unit/ \
9999
&& chmod -R g+w media /opt/unit/ \
100-
&& cd /opt/netbox/ && /opt/netbox/venv/bin/python -m mkdocs build \
100+
&& cd /opt/netbox/ && SECRET_KEY="dummy" /opt/netbox/venv/bin/python -m mkdocs build \
101101
--config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/ \
102102
&& SECRET_KEY="dummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
103103

β€ŽREADME.md

Lines changed: 5 additions & 5 deletions

β€ŽVERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.1
1+
1.6.0

β€Žconfiguration/configuration.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ def _read_secret(secret_name, default = None):
147147
# by anonymous users. List models in the form `<app>.<model>`. Add '*' to this list to exempt all models.
148148
EXEMPT_VIEW_PERMISSIONS = list(filter(None, environ.get('EXEMPT_VIEW_PERMISSIONS', '').split(' ')))
149149

150+
# Enable GraphQL API.
151+
GRAPHQL_ENABLED = environ.get('GRAPHQL_ENABLED', 'True').lower() == 'true'
152+
150153
# Enable custom logging. Please see the Django documentation for detailed guidance on configuring custom logs:
151154
# https://docs.djangoproject.com/en/stable/topics/logging/
152155
LOGGING = {}

β€Ždocker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3.4'
22
services:
33
netbox: &netbox
4-
image: netboxcommunity/netbox:${VERSION-v3.1-1.5.1}
4+
image: netboxcommunity/netbox:${VERSION-v3.1-1.6.0}
55
depends_on:
66
- postgres
77
- redis

β€Ženv/netbox.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ EMAIL_USERNAME=netbox
1414
# EMAIL_USE_SSL and EMAIL_USE_TLS are mutually exclusive, i.e. they can't both be `true`!
1515
EMAIL_USE_SSL=false
1616
EMAIL_USE_TLS=false
17+
GRAPHQL_ENABLED=true
1718
HOUSEKEEPING_INTERVAL=86400
1819
MAX_PAGE_SIZE=1000
1920
MEDIA_ROOT=/opt/netbox/netbox/media

β€Žinitializers/asns.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# - asn: 1
2+
# rir: RFC1918
3+
# tenant: tenant1
4+
# - asn: 2
5+
# rir: RFC4193 ULA
6+
# - asn: 3
7+
# rir: RFC3849

β€Žinitializers/sites.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,20 @@
33
# region: Downtown
44
# status: active
55
# facility: Amsterdam 1
6-
# asn: 12345
76
# custom_field_data:
87
# text_field: Description for AMS1
98
# - name: AMS 2
109
# slug: ams2
1110
# region: Downtown
1211
# status: active
1312
# facility: Amsterdam 2
14-
# asn: 54321
1513
# custom_field_data:
1614
# text_field: Description for AMS2
1715
# - name: AMS 3
1816
# slug: ams3
1917
# region: Suburbs
2018
# status: active
2119
# facility: Amsterdam 3
22-
# asn: 67890
2320
# tenant: tenant1
2421
# custom_field_data:
2522
# text_field: Description for AMS3
@@ -28,7 +25,6 @@
2825
# region: Singapore
2926
# status: active
3027
# facility: Singapore 1
31-
# asn: 09876
3228
# tenant: tenant2
3329
# custom_field_data:
3430
# text_field: Description for SING1

β€Žrequirements-container.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
napalm==3.3.1
2-
ruamel.yaml==0.17.17
3-
django-auth-ldap==3.0.0
4-
google-crc32c==1.3.0
1+
django-auth-ldap==4.0.0
52
django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.12.3
3+
google-crc32c==1.3.0
4+
napalm==3.3.1
5+
ruamel.yaml==0.17.21
6+
tzdata==2021.5
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

β€Žstartup_scripts/140_clusters.py

Lines changed: 0 additions & 42 deletions
This file was deleted.
File renamed without changes.

β€Žstartup_scripts/165_cluster_groups.py

Lines changed: 0 additions & 15 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.

β€Žstartup_scripts/260_asns.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import sys
2+
3+
from ipam.models import ASN, RIR
4+
from startup_script_utils import load_yaml
5+
from tenancy.models import Tenant
6+
7+
asns = load_yaml("/opt/netbox/initializers/asns.yml")
8+
9+
if asns is None:
10+
sys.exit()
11+
12+
required_assocs = {"rir": (RIR, "name")}
13+
14+
optional_assocs = {"tenant": (Tenant, "name")}
15+
16+
for params in asns:
17+
for assoc, details in required_assocs.items():
18+
model, field = details
19+
query = {field: params.pop(assoc)}
20+
21+
params[assoc] = model.objects.get(**query)
22+
23+
for assoc, details in optional_assocs.items():
24+
if assoc in params:
25+
model, field = details
26+
query = {field: params.pop(assoc)}
27+
28+
params[assoc] = model.objects.get(**query)
29+
30+
asn, created = ASN.objects.get_or_create(**params)
31+
32+
if created:
33+
print(f"πŸ”‘ Created ASN {asn.asn}")
File renamed without changes.

β€Žstartup_scripts/260_ip_addresses.py renamed to β€Žstartup_scripts/370_ip_addresses.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
params["assigned_object_id"] = Interface.objects.get(**query).id
5353
else:
5454
query = {field: params.pop(assoc)}
55+
5556
params[assoc] = model.objects.get(**query)
5657

5758
ip_address, created = IPAddress.objects.get_or_create(**params)

0 commit comments

Comments
Β (0)