-
-
Notifications
You must be signed in to change notification settings - Fork 872
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #705 from netbox-community/develop
Release 1.6.0
- Loading branch information
Showing
52 changed files
with
58 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.5.1 | ||
1.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# - asn: 1 | ||
# rir: RFC1918 | ||
# tenant: tenant1 | ||
# - asn: 2 | ||
# rir: RFC4193 ULA | ||
# - asn: 3 | ||
# rir: RFC3849 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
napalm==3.3.1 | ||
ruamel.yaml==0.17.17 | ||
django-auth-ldap==3.0.0 | ||
google-crc32c==1.3.0 | ||
django-auth-ldap==4.0.0 | ||
django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.12.3 | ||
google-crc32c==1.3.0 | ||
napalm==3.3.1 | ||
ruamel.yaml==0.17.21 | ||
tzdata==2021.5 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import sys | ||
|
||
from ipam.models import ASN, RIR | ||
from startup_script_utils import load_yaml | ||
from tenancy.models import Tenant | ||
|
||
asns = load_yaml("/opt/netbox/initializers/asns.yml") | ||
|
||
if asns is None: | ||
sys.exit() | ||
|
||
required_assocs = {"rir": (RIR, "name")} | ||
|
||
optional_assocs = {"tenant": (Tenant, "name")} | ||
|
||
for params in asns: | ||
for assoc, details in required_assocs.items(): | ||
model, field = details | ||
query = {field: params.pop(assoc)} | ||
|
||
params[assoc] = model.objects.get(**query) | ||
|
||
for assoc, details in optional_assocs.items(): | ||
if assoc in params: | ||
model, field = details | ||
query = {field: params.pop(assoc)} | ||
|
||
params[assoc] = model.objects.get(**query) | ||
|
||
asn, created = ASN.objects.get_or_create(**params) | ||
|
||
if created: | ||
print(f"π‘ Created ASN {asn.asn}") |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.