netbox-plugin-dns 1.0b1__py3-none-any.whl → 1.0b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of netbox-plugin-dns might be problematic. Click here for more details.
- netbox_dns/__init__.py +1 -1
- netbox_dns/api/serializers_/zone.py +0 -11
- netbox_dns/management/commands/cleanup_rrset_ttl.py +1 -1
- netbox_dns/models/record.py +2 -1
- netbox_dns/views/record.py +7 -14
- {netbox_plugin_dns-1.0b1.dist-info → netbox_plugin_dns-1.0b2.dist-info}/METADATA +23 -9
- {netbox_plugin_dns-1.0b1.dist-info → netbox_plugin_dns-1.0b2.dist-info}/RECORD +9 -9
- {netbox_plugin_dns-1.0b1.dist-info → netbox_plugin_dns-1.0b2.dist-info}/LICENSE +0 -0
- {netbox_plugin_dns-1.0b1.dist-info → netbox_plugin_dns-1.0b2.dist-info}/WHEEL +0 -0
netbox_dns/__init__.py
CHANGED
|
@@ -13,17 +13,6 @@ from netbox_dns.models import Zone
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class ZoneSerializer(NetBoxModelSerializer):
|
|
16
|
-
# +
|
|
17
|
-
# This is a hack to avoid the exception raised by the UniqueTogetherValidator
|
|
18
|
-
# after NetBox commit https://github.com/netbox-community/netbox/commit/78e284c
|
|
19
|
-
#
|
|
20
|
-
# See https://github.com/netbox-community/netbox/issues/15351 for details.
|
|
21
|
-
# -
|
|
22
|
-
def __init__(self, *args, **kwargs):
|
|
23
|
-
super().__init__(*args, **kwargs)
|
|
24
|
-
if self.nested:
|
|
25
|
-
self.validators = []
|
|
26
|
-
|
|
27
16
|
url = serializers.HyperlinkedIdentityField(
|
|
28
17
|
view_name="plugins-api:netbox_dns-api:zone-detail"
|
|
29
18
|
)
|
|
@@ -32,7 +32,7 @@ class Command(BaseCommand):
|
|
|
32
32
|
ttl_records = (
|
|
33
33
|
Record.objects.filter(ttl__isnull=False)
|
|
34
34
|
.exclude(type=RecordTypeChoices.SOA)
|
|
35
|
-
.exclude(type=RecordTypeChoices.PTR,
|
|
35
|
+
.exclude(type=RecordTypeChoices.PTR, managed=True)
|
|
36
36
|
)
|
|
37
37
|
for record in ttl_records:
|
|
38
38
|
records = Record.objects.filter(
|
netbox_dns/models/record.py
CHANGED
netbox_dns/views/record.py
CHANGED
|
@@ -41,22 +41,15 @@ class RecordView(generic.ObjectView):
|
|
|
41
41
|
queryset = Record.objects.all().prefetch_related("zone", "ptr_record")
|
|
42
42
|
|
|
43
43
|
def get_value_records(self, instance):
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
]
|
|
49
|
-
|
|
50
|
-
value_zone = (
|
|
51
|
-
Zone.objects.filter(instance.zone.view_filter, name__in=value_zone_names)
|
|
52
|
-
.order_by(Length("name").desc())
|
|
53
|
-
.first()
|
|
44
|
+
view_filter = (
|
|
45
|
+
Q(zone__view__isnull=True)
|
|
46
|
+
if instance.zone.view is None
|
|
47
|
+
else Q(zone__view=instance.zone.view)
|
|
54
48
|
)
|
|
55
|
-
if not value_zone:
|
|
56
|
-
return None
|
|
57
49
|
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
value_fqdn = dns_name.from_text(instance.value_fqdn)
|
|
51
|
+
|
|
52
|
+
cname_targets = Record.objects.filter(view_filter, fqdn=value_fqdn)
|
|
60
53
|
|
|
61
54
|
if cname_targets:
|
|
62
55
|
return RelatedRecordTable(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-plugin-dns
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.0b2
|
|
4
4
|
Summary: NetBox DNS is a NetBox plugin for managing DNS data.
|
|
5
5
|
Home-page: https://github.com/peteeckel/netbox-plugin-dns
|
|
6
6
|
License: MIT
|
|
@@ -34,16 +34,30 @@ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name
|
|
|
34
34
|
<a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Month" src="https://static.pepy.tech/badge/netbox-plugin-dns/week"></a>
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## Objectives
|
|
38
|
+
NetBox DNS is designed to be the 'DNS Source of Truth' analogous to NetBox being the 'Network Source of Truth'.
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
* Automatically generate SOA and NS records for zones
|
|
41
|
-
* Automatically create and update PTR records for IPv4 and IPv6 address records
|
|
42
|
-
* Organize DNS zones in views for split horizon DNS and multi-site deployments
|
|
43
|
-
* Manage domain registrar and registrant information for domains related to zones
|
|
44
|
-
* Manage RFC2317 reverse zones for IPv4 prefixes with a network mask length longer than 24 bits
|
|
40
|
+
The plugin holds information about DNS name servers, DNS Views and Zones, and DNS Records, making it a data source for automatically provisioning DNS instances. Registrarion information about DNS registrars and contacts for DNS domains can also be stored and associated with zones.
|
|
45
41
|
|
|
46
|
-
|
|
42
|
+
The main focus of the plugin is to ensure the quality of data stored in it. To achieve this, many validation and automation mechanisms are in place:
|
|
43
|
+
|
|
44
|
+
* Validation of record names and values
|
|
45
|
+
* Automatic maintenance of PTR records for IPv6 and IPv4 address records
|
|
46
|
+
* Automatic generation of SOA records, optionally including the serial number of the zone data
|
|
47
|
+
* Validation of record types such as CNAME and singletons, to ensure DNS zone validity
|
|
48
|
+
* [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) support for delegation of PTR zones for IPv4 subnets longer than 24 bits
|
|
49
|
+
|
|
50
|
+
Other main features are:
|
|
51
|
+
|
|
52
|
+
* Support for BIND views, providing lightweight namespaces for zones
|
|
53
|
+
* Support for IDN, inclucing the validation of punycode names
|
|
54
|
+
* Fully supported NetBox REST and GraphQL API
|
|
55
|
+
* Support for all major NetBox features like Global Search, Tenancy, Change Logs, Tagging, Journaling etc.
|
|
56
|
+
|
|
57
|
+
## Non-Objectives
|
|
58
|
+
In the same way in which NetBox is not a network management application, NetBox DNS does not provide functionality to manage specific name servers or DNS service providers or generate input like configuration and zone files for them. The focus is on the completeness and integrity of the data needed to run DNS zones, not on the peculiarities of a plethora of servers and services actually using the data. This functionality is left to specialized integration tools, or in many cases it can be easily implemented using Ansible or similar tools based on NetBox DNS data. Example code for some simple use cases is provided.
|
|
59
|
+
|
|
60
|
+
For integration with a large number of DNS server implementations integration tools like [octodns-netbox-dns](https://pypi.org/project/octodns-netbox-dns/) are available.
|
|
47
61
|
|
|
48
62
|
## Requirements
|
|
49
63
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
netbox_dns/__init__.py,sha256=
|
|
1
|
+
netbox_dns/__init__.py,sha256=SLW3Fu-mT6oDSVx4BOS6-sjEjF33vQh_ImHOkzS7wBU,1053
|
|
2
2
|
netbox_dns/api/nested_serializers.py,sha256=kkTU4Hylkbam9-lIniv8E0nTQwE1bz8D_GzIEOUy0Mw,2145
|
|
3
3
|
netbox_dns/api/serializers.py,sha256=C4-TP1luq9QjEHjPS5cW7u2flAEdIFjghpVd_sa5S_Y,249
|
|
4
4
|
netbox_dns/api/serializers_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -7,7 +7,7 @@ netbox_dns/api/serializers_/nameserver.py,sha256=Y1Ou6wAFddL28bIR10kYdHMHucbFGD7
|
|
|
7
7
|
netbox_dns/api/serializers_/record.py,sha256=USnaNU5Mj6Uxo-qqOtBn_y1hj6UO1UcdCbj_9emDHfQ,2284
|
|
8
8
|
netbox_dns/api/serializers_/registrar.py,sha256=hnd6yzxd3wtIaUFkaeVyJ9q63M3IFdq_JftJj8KMIEQ,805
|
|
9
9
|
netbox_dns/api/serializers_/view.py,sha256=cCeaTBiAAVBvPd8hBAl_XIW6O3FpwXNh0dcY-vX1H_I,798
|
|
10
|
-
netbox_dns/api/serializers_/zone.py,sha256=
|
|
10
|
+
netbox_dns/api/serializers_/zone.py,sha256=Px6FCLtApAEptkLpVo2bsNAzhRdeyOq_XoTqjqZQQSE,4351
|
|
11
11
|
netbox_dns/api/urls.py,sha256=R9VmmWtdrjvr35i5d_SfZK2lGn6JzmPuWEKTQlZ8MJo,575
|
|
12
12
|
netbox_dns/api/views.py,sha256=NI6ge3aCum394G0YN3mVSTQdFPB5kMOPdWRMR05aDO8,3566
|
|
13
13
|
netbox_dns/apps.py,sha256=JCW5eS-AQBUubDJve1DjP-IRFKTFGQh1NLGWzJpC5MI,151
|
|
@@ -34,7 +34,7 @@ netbox_dns/graphql/filters.py,sha256=Kwjrn0SaxaeqhxzjFb6isXYVvL_IXOwUpNsQd_c-ffY
|
|
|
34
34
|
netbox_dns/graphql/schema.py,sha256=2CHe93vQQgFhl5cQTYCJp3JikK_QnBok8xi5UFvPmac,1915
|
|
35
35
|
netbox_dns/graphql/types.py,sha256=Md-OZgih9GFomQuqwOK-sIHyNGET8iMAkQ8s9cryC2A,4207
|
|
36
36
|
netbox_dns/management/commands/cleanup_database.py,sha256=HbfhYONCv1xlAbGP4e4Yv9IIoB0U-R8wAnyOjYMvxM0,5960
|
|
37
|
-
netbox_dns/management/commands/cleanup_rrset_ttl.py,sha256=
|
|
37
|
+
netbox_dns/management/commands/cleanup_rrset_ttl.py,sha256=WJb_K95GbyszAS4HWEf8UMzpqKA1fIsLkLon0ytSog8,2029
|
|
38
38
|
netbox_dns/management/commands/setup_coupling.py,sha256=1cUxDvHoX1UebgyCsbrLqIccuXhE8tkvyhW8dofIyr4,4556
|
|
39
39
|
netbox_dns/management/commands/update_soa.py,sha256=Rj_Xk-qpwkAVRubVnM5OqSTwgzi93E0PqjwGb3rYjf0,660
|
|
40
40
|
netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py,sha256=3U0810NWSHPu2dTSHpfzlleDgwMS04FhJ_CkO76SDaw,10283
|
|
@@ -54,7 +54,7 @@ netbox_dns/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
54
54
|
netbox_dns/models/__init__.py,sha256=Q7UIEe2vGh18AZN4er6CykciwXPQGgUq0L-9718wZqU,182
|
|
55
55
|
netbox_dns/models/contact.py,sha256=xXmNGuM6k1U98jO3mMmp93PXamh1YZQ270JOcy0FFnE,2958
|
|
56
56
|
netbox_dns/models/nameserver.py,sha256=LuE0VNwu3jM-IKf6ubq4kWHZpCAmTPdhGhz3btYtE0U,3021
|
|
57
|
-
netbox_dns/models/record.py,sha256=
|
|
57
|
+
netbox_dns/models/record.py,sha256=_CbAL0aj-Ko1pHsifitnOqNsO6XqiYgQnjA2QhaNEIA,23763
|
|
58
58
|
netbox_dns/models/registrar.py,sha256=yidjVCq7WPECsHLKQRRCSzGbvG2jIXu8lqAKox0SU5Q,1502
|
|
59
59
|
netbox_dns/models/view.py,sha256=-CniIpddvoGAQQSS8y5R6Oq6IuPU_mGSi8J-3WLtYNU,920
|
|
60
60
|
netbox_dns/models/zone.py,sha256=8V7cJPhX3mWsmhWNH3Jc7-6cRPTeLXxb4CdOeo2YNOk,26519
|
|
@@ -93,11 +93,11 @@ netbox_dns/validators/rfc2317.py,sha256=L2Z-z5ghktFyWMLVZPeK8OEVGnQzbXD11fha2xGH
|
|
|
93
93
|
netbox_dns/views/__init__.py,sha256=Aw8HrCTjaJfu5JSwJsQRHfOUz4zKwAmZNByT9q6BrFU,136
|
|
94
94
|
netbox_dns/views/contact.py,sha256=mBWM92UVjoz90JCUGO7kaFUI0_yA7tH4lSHxOZQB3MQ,2253
|
|
95
95
|
netbox_dns/views/nameserver.py,sha256=Sxl1h8v1W-uP0Qxz-Re0Ei1LgnWJuQGjI7ZaHS7qLeE,3011
|
|
96
|
-
netbox_dns/views/record.py,sha256=
|
|
96
|
+
netbox_dns/views/record.py,sha256=qBgCCHRoiupLKUurNAShchhButlX3_CrpAmInIEOSdg,4616
|
|
97
97
|
netbox_dns/views/registrar.py,sha256=NK6jTYRwRjaVjYmI7T4Phh_gjXg9yPrxl-7vciZ9doc,2090
|
|
98
98
|
netbox_dns/views/view.py,sha256=a3l6pybhqGb_RMxrRgFT1Gia9tRq8EmXFxPv9WUId0U,1913
|
|
99
99
|
netbox_dns/views/zone.py,sha256=EqkjXuX1xhkjDgaSNgFBvnA74IhuK_zDWlHPb3_4YKQ,4591
|
|
100
|
-
netbox_plugin_dns-1.
|
|
101
|
-
netbox_plugin_dns-1.
|
|
102
|
-
netbox_plugin_dns-1.
|
|
103
|
-
netbox_plugin_dns-1.
|
|
100
|
+
netbox_plugin_dns-1.0b2.dist-info/LICENSE,sha256=tziMJKpkMbySr09L6bIwsu7Ca9ICoqpMO3yAXgEMQA4,1076
|
|
101
|
+
netbox_plugin_dns-1.0b2.dist-info/METADATA,sha256=qRoOU1e8sRzum0UwmlMLRKbSOh3Conrhkfr8vKkOXIg,5990
|
|
102
|
+
netbox_plugin_dns-1.0b2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
103
|
+
netbox_plugin_dns-1.0b2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|