netbox-plugin-dns 1.0.7__py3-none-any.whl → 1.1.0__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 +23 -4
- netbox_dns/api/serializers.py +2 -1
- netbox_dns/api/serializers_/prefix.py +18 -0
- netbox_dns/api/serializers_/{contact.py → registration_contact.py} +5 -5
- netbox_dns/api/serializers_/view.py +34 -2
- netbox_dns/api/serializers_/zone.py +5 -5
- netbox_dns/api/serializers_/zone_template.py +5 -5
- netbox_dns/api/urls.py +5 -2
- netbox_dns/api/views.py +17 -7
- netbox_dns/fields/__init__.py +1 -0
- netbox_dns/fields/ipam.py +15 -0
- netbox_dns/filtersets/__init__.py +1 -1
- netbox_dns/filtersets/{contact.py → registration_contact.py} +4 -4
- netbox_dns/filtersets/view.py +16 -0
- netbox_dns/filtersets/zone.py +15 -15
- netbox_dns/filtersets/zone_template.py +15 -15
- netbox_dns/forms/__init__.py +1 -1
- netbox_dns/forms/{contact.py → registration_contact.py} +16 -16
- netbox_dns/forms/view.py +204 -4
- netbox_dns/forms/zone.py +15 -18
- netbox_dns/forms/zone_template.py +13 -13
- netbox_dns/graphql/__init__.py +2 -2
- netbox_dns/graphql/filters.py +5 -5
- netbox_dns/graphql/schema.py +9 -5
- netbox_dns/graphql/types.py +41 -12
- netbox_dns/management/commands/rebuild_dnssync.py +18 -0
- netbox_dns/management/commands/setup_dnssync.py +140 -0
- netbox_dns/migrations/0008_view_prefixes.py +18 -0
- netbox_dns/migrations/0009_rename_contact_registrationcontact.py +27 -0
- netbox_dns/models/__init__.py +1 -3
- netbox_dns/models/record.py +139 -20
- netbox_dns/models/{contact.py → registration_contact.py} +8 -8
- netbox_dns/models/view.py +5 -0
- netbox_dns/models/zone.py +66 -30
- netbox_dns/models/zone_template.py +4 -4
- netbox_dns/navigation.py +7 -7
- netbox_dns/signals/ipam_dnssync.py +224 -0
- netbox_dns/tables/__init__.py +1 -1
- netbox_dns/tables/ipam_dnssync.py +11 -0
- netbox_dns/tables/record.py +33 -0
- netbox_dns/tables/{contact.py → registration_contact.py} +5 -5
- netbox_dns/tables/view.py +24 -2
- netbox_dns/template_content.py +41 -40
- netbox_dns/templates/netbox_dns/record.html +6 -6
- netbox_dns/templates/netbox_dns/{contact.html → registrationcontact.html} +1 -1
- netbox_dns/templates/netbox_dns/view/button.html +9 -0
- netbox_dns/templates/netbox_dns/view/prefix.html +41 -0
- netbox_dns/templates/netbox_dns/view/related.html +17 -0
- netbox_dns/templates/netbox_dns/view.html +25 -0
- netbox_dns/urls/__init__.py +2 -2
- netbox_dns/urls/registration_contact.py +60 -0
- netbox_dns/urls/view.py +6 -0
- netbox_dns/utilities/__init__.py +2 -74
- netbox_dns/utilities/conversions.py +83 -0
- netbox_dns/utilities/ipam_dnssync.py +295 -0
- netbox_dns/views/__init__.py +1 -1
- netbox_dns/views/record.py +3 -5
- netbox_dns/views/registration_contact.py +94 -0
- netbox_dns/views/view.py +26 -1
- {netbox_plugin_dns-1.0.7.dist-info → netbox_plugin_dns-1.1.0.dist-info}/METADATA +2 -1
- {netbox_plugin_dns-1.0.7.dist-info → netbox_plugin_dns-1.1.0.dist-info}/RECORD +63 -54
- netbox_dns/management/commands/setup_coupling.py +0 -109
- netbox_dns/signals/ipam_coupling.py +0 -168
- netbox_dns/templates/netbox_dns/related_dns_objects.html +0 -21
- netbox_dns/urls/contact.py +0 -29
- netbox_dns/utilities/ipam_coupling.py +0 -112
- netbox_dns/views/contact.py +0 -94
- {netbox_plugin_dns-1.0.7.dist-info → netbox_plugin_dns-1.1.0.dist-info}/LICENSE +0 -0
- {netbox_plugin_dns-1.0.7.dist-info → netbox_plugin_dns-1.1.0.dist-info}/WHEEL +0 -0
netbox_dns/views/contact.py
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
from django.db.models import Q
|
|
2
|
-
|
|
3
|
-
from netbox.views import generic
|
|
4
|
-
|
|
5
|
-
from utilities.views import ViewTab, register_model_view
|
|
6
|
-
|
|
7
|
-
from netbox_dns.models import Contact, Zone
|
|
8
|
-
from netbox_dns.filtersets import ContactFilterSet, ZoneFilterSet
|
|
9
|
-
from netbox_dns.forms import (
|
|
10
|
-
ContactForm,
|
|
11
|
-
ContactFilterForm,
|
|
12
|
-
ContactImportForm,
|
|
13
|
-
ContactBulkEditForm,
|
|
14
|
-
)
|
|
15
|
-
from netbox_dns.tables import ContactTable, ZoneTable
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
__all__ = (
|
|
19
|
-
"ContactView",
|
|
20
|
-
"ContactEditView",
|
|
21
|
-
"ContactListView",
|
|
22
|
-
"ContactDeleteView",
|
|
23
|
-
"ContactBulkImportView",
|
|
24
|
-
"ContactBulkEditView",
|
|
25
|
-
"ContactBulkDeleteView",
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class ContactView(generic.ObjectView):
|
|
30
|
-
queryset = Contact.objects.all()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class ContactListView(generic.ObjectListView):
|
|
34
|
-
queryset = Contact.objects.all()
|
|
35
|
-
table = ContactTable
|
|
36
|
-
filterset = ContactFilterSet
|
|
37
|
-
filterset_form = ContactFilterForm
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class ContactEditView(generic.ObjectEditView):
|
|
41
|
-
queryset = Contact.objects.all()
|
|
42
|
-
form = ContactForm
|
|
43
|
-
default_return_url = "plugins:netbox_dns:contact_list"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
class ContactDeleteView(generic.ObjectDeleteView):
|
|
47
|
-
queryset = Contact.objects.all()
|
|
48
|
-
default_return_url = "plugins:netbox_dns:contact_list"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
class ContactBulkImportView(generic.BulkImportView):
|
|
52
|
-
queryset = Contact.objects.all()
|
|
53
|
-
model_form = ContactImportForm
|
|
54
|
-
table = ContactTable
|
|
55
|
-
default_return_url = "plugins:netbox_dns:contact_list"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
class ContactBulkEditView(generic.BulkEditView):
|
|
59
|
-
queryset = Contact.objects.all()
|
|
60
|
-
filterset = ContactFilterSet
|
|
61
|
-
table = ContactTable
|
|
62
|
-
form = ContactBulkEditForm
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
class ContactBulkDeleteView(generic.BulkDeleteView):
|
|
66
|
-
queryset = Contact.objects.all()
|
|
67
|
-
table = ContactTable
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
@register_model_view(Contact, "zones")
|
|
71
|
-
class ContactZoneListView(generic.ObjectChildrenView):
|
|
72
|
-
queryset = Contact.objects.all().prefetch_related(
|
|
73
|
-
"zone_set", "admin_c_zones", "tech_c_zones", "billing_c_zones"
|
|
74
|
-
)
|
|
75
|
-
child_model = Zone
|
|
76
|
-
table = ZoneTable
|
|
77
|
-
filterset = ZoneFilterSet
|
|
78
|
-
template_name = "netbox_dns/zone/child.html"
|
|
79
|
-
hide_if_empty = True
|
|
80
|
-
|
|
81
|
-
tab = ViewTab(
|
|
82
|
-
label="Zones",
|
|
83
|
-
permission="netbox_dns.view_zone",
|
|
84
|
-
badge=lambda obj: len(obj.zones),
|
|
85
|
-
hide_if_empty=True,
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
def get_children(self, request, parent):
|
|
89
|
-
return Zone.objects.filter(
|
|
90
|
-
Q(registrant=parent)
|
|
91
|
-
| Q(admin_c=parent)
|
|
92
|
-
| Q(tech_c=parent)
|
|
93
|
-
| Q(billing_c=parent)
|
|
94
|
-
)
|
|
File without changes
|
|
File without changes
|