netbox-plugin-dns 1.1.0__py3-none-any.whl → 1.1.0b1__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.

Files changed (84) hide show
  1. netbox_dns/__init__.py +6 -9
  2. netbox_dns/api/nested_serializers.py +16 -17
  3. netbox_dns/api/serializers.py +1 -1
  4. netbox_dns/api/serializers_/{registration_contact.py → contact.py} +5 -5
  5. netbox_dns/api/serializers_/record.py +0 -1
  6. netbox_dns/api/serializers_/zone.py +5 -5
  7. netbox_dns/api/serializers_/zone_template.py +5 -5
  8. netbox_dns/api/urls.py +2 -2
  9. netbox_dns/api/views.py +35 -9
  10. netbox_dns/fields/ipam.py +3 -0
  11. netbox_dns/filtersets/__init__.py +1 -1
  12. netbox_dns/filtersets/{registration_contact.py → contact.py} +4 -4
  13. netbox_dns/filtersets/record.py +1 -1
  14. netbox_dns/filtersets/zone.py +15 -15
  15. netbox_dns/filtersets/zone_template.py +15 -15
  16. netbox_dns/forms/__init__.py +1 -1
  17. netbox_dns/forms/{registration_contact.py → contact.py} +16 -16
  18. netbox_dns/forms/view.py +7 -95
  19. netbox_dns/forms/zone.py +17 -22
  20. netbox_dns/forms/zone_template.py +13 -13
  21. netbox_dns/graphql/__init__.py +2 -2
  22. netbox_dns/graphql/filters.py +5 -5
  23. netbox_dns/graphql/schema.py +44 -24
  24. netbox_dns/graphql/types.py +12 -40
  25. netbox_dns/management/commands/{setup_dnssync.py → setup_autodns.py} +28 -48
  26. netbox_dns/migrations/{0008_view_prefixes.py → 0007_view_prefixes.py} +1 -1
  27. netbox_dns/models/__init__.py +1 -1
  28. netbox_dns/models/{registration_contact.py → contact.py} +9 -15
  29. netbox_dns/models/nameserver.py +3 -8
  30. netbox_dns/models/record.py +28 -93
  31. netbox_dns/models/record_template.py +1 -4
  32. netbox_dns/models/registrar.py +1 -7
  33. netbox_dns/models/view.py +2 -9
  34. netbox_dns/models/zone.py +22 -59
  35. netbox_dns/models/zone_template.py +9 -12
  36. netbox_dns/navigation.py +7 -7
  37. netbox_dns/signals/ipam_autodns.py +138 -0
  38. netbox_dns/tables/__init__.py +1 -1
  39. netbox_dns/tables/{registration_contact.py → contact.py} +6 -5
  40. netbox_dns/tables/nameserver.py +7 -1
  41. netbox_dns/tables/record.py +30 -43
  42. netbox_dns/tables/record_template.py +17 -0
  43. netbox_dns/tables/registrar.py +2 -0
  44. netbox_dns/tables/view.py +8 -1
  45. netbox_dns/tables/zone.py +15 -0
  46. netbox_dns/tables/zone_template.py +16 -2
  47. netbox_dns/template_content.py +2 -14
  48. netbox_dns/templates/netbox_dns/{registrationcontact.html → contact.html} +1 -1
  49. netbox_dns/templates/netbox_dns/view.html +7 -3
  50. netbox_dns/urls/__init__.py +2 -2
  51. netbox_dns/urls/contact.py +51 -0
  52. netbox_dns/urls/nameserver.py +38 -14
  53. netbox_dns/urls/record.py +19 -7
  54. netbox_dns/urls/record_template.py +27 -18
  55. netbox_dns/urls/registrar.py +35 -11
  56. netbox_dns/urls/view.py +20 -12
  57. netbox_dns/urls/zone.py +46 -8
  58. netbox_dns/urls/zone_template.py +26 -16
  59. netbox_dns/utilities/__init__.py +1 -1
  60. netbox_dns/utilities/{ipam_dnssync.py → ipam_autodns.py} +32 -122
  61. netbox_dns/validators/dns_name.py +0 -9
  62. netbox_dns/views/__init__.py +1 -1
  63. netbox_dns/views/contact.py +95 -0
  64. netbox_dns/views/nameserver.py +3 -7
  65. netbox_dns/views/record.py +7 -12
  66. netbox_dns/views/record_template.py +1 -1
  67. netbox_dns/views/registrar.py +1 -0
  68. netbox_dns/views/view.py +2 -32
  69. netbox_dns/views/zone.py +6 -7
  70. netbox_dns/views/zone_template.py +2 -2
  71. {netbox_plugin_dns-1.1.0.dist-info → netbox_plugin_dns-1.1.0b1.dist-info}/METADATA +2 -3
  72. netbox_plugin_dns-1.1.0b1.dist-info/RECORD +140 -0
  73. netbox_dns/management/commands/rebuild_dnssync.py +0 -18
  74. netbox_dns/migrations/0007_alter_ordering_options.py +0 -25
  75. netbox_dns/migrations/0009_rename_contact_registrationcontact.py +0 -27
  76. netbox_dns/signals/ipam_dnssync.py +0 -224
  77. netbox_dns/tables/ipam_dnssync.py +0 -11
  78. netbox_dns/templates/netbox_dns/view/button.html +0 -9
  79. netbox_dns/templates/netbox_dns/view/prefix.html +0 -41
  80. netbox_dns/urls/registration_contact.py +0 -60
  81. netbox_dns/views/registration_contact.py +0 -94
  82. netbox_plugin_dns-1.1.0.dist-info/RECORD +0 -146
  83. {netbox_plugin_dns-1.1.0.dist-info → netbox_plugin_dns-1.1.0b1.dist-info}/LICENSE +0 -0
  84. {netbox_plugin_dns-1.1.0.dist-info → netbox_plugin_dns-1.1.0b1.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: netbox-plugin-dns
3
- Version: 1.1.0
3
+ Version: 1.1.0b1
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
@@ -8,7 +8,7 @@ Keywords: netbox,netbox-plugin,dns
8
8
  Author: Peter Eckel
9
9
  Author-email: pete@netbox-dns.org
10
10
  Requires-Python: >=3.10,<4.0
11
- Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Development Status :: 4 - Beta
12
12
  Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Classifier: Programming Language :: Python :: 3.10
@@ -48,7 +48,6 @@ The main focus of the plugin is to ensure the quality of the data stored in it.
48
48
  * Validation of record types such as CNAME and singletons, to ensure DNS zone validity
49
49
  * Support for [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) delegation of PTR zones for IPv4 subnets longer than 24 bits
50
50
  * Templating for zones and records enables faster creations of zones with given boilerplate object relations, such as name servers, tags, tenants or registration information, or records like standard SPF or MX records that are the same for a subset of zones
51
- * IPAM DNSsync can be used to automatically create address and pointer records for IP addresses by assigning prefixes to DNS views. When an IP address has a DNS name assigned and there are zones with matching names in the DNS views linked to the IP address' prefix, a matching DNS record will be created in these zones
52
51
 
53
52
  Other main features include:
54
53
 
@@ -0,0 +1,140 @@
1
+ netbox_dns/__init__.py,sha256=vipRMjUAjOubMr_a7qFS6wiK0igQpR5FOGKlSrFjDy0,1799
2
+ netbox_dns/api/nested_serializers.py,sha256=-ZhAiyf-8UHlkcBomBp1J7ci1dSwrxWRbbfskD-D_yQ,3172
3
+ netbox_dns/api/serializers.py,sha256=u-kQurUftGkUGAMh-VkMgXPebLYeZq9WDz9uKzkk2No,370
4
+ netbox_dns/api/serializers_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ netbox_dns/api/serializers_/contact.py,sha256=5fAdHfjBGIh4686tvgPejhW5Di46LNzIYVvAGeFDq0c,964
6
+ netbox_dns/api/serializers_/nameserver.py,sha256=PlpVsai24O73B-ZQ4wSaSC0_m_LCtQETDRSUYDb1xGw,1118
7
+ netbox_dns/api/serializers_/prefix.py,sha256=kZ1DjDly6VFZamXSxGa57YC6MfZZcI5S7jmGBkVB2_I,551
8
+ netbox_dns/api/serializers_/record.py,sha256=QAUzU5GXDadOgfug9ApYQ4fw-pztAZSG02LH1UoBNgY,2293
9
+ netbox_dns/api/serializers_/record_template.py,sha256=qh-g-_f6M-eU4GzN-l0nPxiNBpZyYBgib26HwfOMtUc,1466
10
+ netbox_dns/api/serializers_/registrar.py,sha256=xLIaeBJ5ckV1Jf-uyCTFcvsLlsRMlpDtIg6q79vXZic,842
11
+ netbox_dns/api/serializers_/view.py,sha256=u5HqZtPzGCBTFCsH5GkPGsyG-oR4WIJ8XOqdWe3oUow,1723
12
+ netbox_dns/api/serializers_/zone.py,sha256=ZOCNHNufPK8T9UKKjT4NcIyfb1zwG7gD6TpPTlMHi0k,4862
13
+ netbox_dns/api/serializers_/zone_template.py,sha256=usx0vRsqRqHP6sqB92fQy3VTjIfjYflULTtQhQksSpk,3709
14
+ netbox_dns/api/urls.py,sha256=f77mwzenQ54WMZeLRLKBmPZMKmfXhagREe7LAuSjAsM,802
15
+ netbox_dns/api/views.py,sha256=lCK_Z1sImxGc-ClfEsZzh-HoksaLAb6fBgb6dj9lk8o,4805
16
+ netbox_dns/apps.py,sha256=JCW5eS-AQBUubDJve1DjP-IRFKTFGQh1NLGWzJpC5MI,151
17
+ netbox_dns/choices/__init__.py,sha256=jOVs2VGV5SVADRlqVnrFeAy26i8BIeEAbGpiX7K8bL8,42
18
+ netbox_dns/choices/record.py,sha256=IYW_g1ZvuNX2ZlRLOkurcrdfWgcXNpi2gQzRfX5C0lY,1113
19
+ netbox_dns/choices/zone.py,sha256=u0zt03gTkeo_und0VxaTTCh3GIFv6UxtUIhoe3VJ00A,472
20
+ netbox_dns/fields/__init__.py,sha256=U1nbFIwwtvr10pp3Sk91jEZeWkVQBSJtr0BVWYgOfiA,89
21
+ netbox_dns/fields/address.py,sha256=DJwc-z5Lg6US85gNIB_Chx7ahs1GYNswdhaXkLiK3jA,1554
22
+ netbox_dns/fields/ipam.py,sha256=nj3nNMU4ebo3Ung0M7uhOBLlKUGDPIVTv1lJJ82HcLU,565
23
+ netbox_dns/fields/network.py,sha256=FgKEm5DAe_4D7Fubtj8B4SwfU3-Z9KV7kDIzRNpBBnQ,3682
24
+ netbox_dns/fields/rfc2317.py,sha256=24qNNLbI-SGlsKqGaLNaVk8EHFrju65YTET3O-8XgTc,2571
25
+ netbox_dns/filtersets/__init__.py,sha256=zvHYWy23FFmK4vxLpoMo-OD5OQBtcTUV_HG-5LCtvQE,197
26
+ netbox_dns/filtersets/contact.py,sha256=VnlNX6dyUlEbj7tz9cgRKSWQOdg7OqP32cD2IyD5hu8,1091
27
+ netbox_dns/filtersets/nameserver.py,sha256=I7RoIUcgXyIoMrhuS0dJr8uPi0AdNj6D3G6t2oSiQ7s,1147
28
+ netbox_dns/filtersets/record.py,sha256=nr-oLCnaceiQua5tL-_teYj54X-VMXQeYihbCjykaJY,3750
29
+ netbox_dns/filtersets/record_template.py,sha256=jGSjGFEnNSoxtUd7diV8wEhw8qZclz2dKLSqyVC7Djo,1548
30
+ netbox_dns/filtersets/registrar.py,sha256=Wh_l-IXRHnJhW7Pyokp3czQZISDKzXnWeSQKp512Drc,977
31
+ netbox_dns/filtersets/view.py,sha256=sGUhmyr66GY2CVXOFX2g5evDt0nbU6XPPCwptvnicHQ,993
32
+ netbox_dns/filtersets/zone.py,sha256=lKEHNkg7v_y7gb07swwaUTSfx7MPKvpEl4VcxEVazYY,6594
33
+ netbox_dns/filtersets/zone_template.py,sha256=P1G3NG3NFzw5lSaJErZltSSKNcC_WztTNXpU7PtS4SI,3670
34
+ netbox_dns/forms/__init__.py,sha256=s41w4o77tIwmhnLjsOsg08R9m3wrlomkkfCLTVQuPzc,196
35
+ netbox_dns/forms/contact.py,sha256=7BdDDqusswGolzrKpOdWvlvy_UPmm-_EN_F46fNnt9E,5332
36
+ netbox_dns/forms/nameserver.py,sha256=LHomCHmFcASobaD3Z7yhAyA24h-LrYImVMz-EUXbwK4,2836
37
+ netbox_dns/forms/record.py,sha256=svBVAFy-egDEPLcRWkxNi_1bkabKmWgJ87pmdNt6dh4,7155
38
+ netbox_dns/forms/record_template.py,sha256=Q77p9sExJ8Xbl-Co2Px2R0At5O3naQJwx4pnino6i2o,5573
39
+ netbox_dns/forms/registrar.py,sha256=FMnvrcq62R3wNp_2ZUEk3v_PIav0KrWPATaJ7_9KFAo,3758
40
+ netbox_dns/forms/view.py,sha256=txD8BpM-d1YUUm6tYPdEIG7CD30ubE_w6EF1G3PQKi0,6149
41
+ netbox_dns/forms/zone.py,sha256=ZbsYcWX-t1luqBsLj4vec0IZG0lmCwGW5nzVh77qJrw,23164
42
+ netbox_dns/forms/zone_template.py,sha256=UNykid5pRB_ydy40j2DzRlBXp3_QAOqdqxdUojKYTd4,8161
43
+ netbox_dns/graphql/__init__.py,sha256=ZZSsx-VM108tB_FrcVy3uGGhtmePpkXnY5U1ytnoTvE,490
44
+ netbox_dns/graphql/filters.py,sha256=6Ot_d1e7h5lVXVVBB3hyWUql94K3zsK9Tjb3RVJqluw,1706
45
+ netbox_dns/graphql/schema.py,sha256=P-oQ8ei3sC6XLhgCa_riRbRTrMkPCVTJXkGv0U2rPYw,2682
46
+ netbox_dns/graphql/types.py,sha256=4ewWOqEbWtCBiU9bdIm_6CIm6MKAM6szCAXSvokpqWg,6108
47
+ netbox_dns/management/commands/cleanup_database.py,sha256=kfnyybudwKGigjJmrOwafPWSUasZr9jQsxN4eWAgMvY,5969
48
+ netbox_dns/management/commands/cleanup_rrset_ttl.py,sha256=UFRURLBcFeGHUS2lrYFv7UWIebjI72aG1EUQJt0XsXw,2046
49
+ netbox_dns/management/commands/setup_autodns.py,sha256=cyxHjkoVSxSPiUp1OXa6avZ3_jOH6PLVA53lTheuPkk,4786
50
+ netbox_dns/management/commands/update_soa.py,sha256=Rj_Xk-qpwkAVRubVnM5OqSTwgzi93E0PqjwGb3rYjf0,660
51
+ netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py,sha256=3U0810NWSHPu2dTSHpfzlleDgwMS04FhJ_CkO76SDaw,10283
52
+ netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py,sha256=ML6Hp17lrXiaG0eUlBjKMm6HUNhw0AHPnKrb9AN-F6E,20279
53
+ netbox_dns/migrations/0002_contact_description_registrar_description.py,sha256=ZrI-L3jJ5GzdVx21pomgM4waE-njixHQjl_grjsGr0I,583
54
+ netbox_dns/migrations/0003_default_view.py,sha256=NByVlAyiiK6WCfJ014BiFPkoNcHeqr1IpkgNdHiwbWw,367
55
+ netbox_dns/migrations/0004_create_and_assign_default_view.py,sha256=npBFxWuJCZeMhbZLEH9C_sZcQZRaa3IOlyn4p_GULyk,627
56
+ netbox_dns/migrations/0005_alter_zone_view_not_null.py,sha256=vUfCFD-qeh5M1WCqtE1eYHXZwQVCcf841Z2-0CdcMRI,463
57
+ netbox_dns/migrations/0006_templating.py,sha256=7MOZ2bLwkjK1BQCBPBaFWJ-mS_JNrok1XUSh4rriq9Y,6271
58
+ netbox_dns/migrations/0007_view_prefixes.py,sha256=doW0XWDVUJiyZDcnd6kUr3AlF3LcgtAYJphKVdX2R4U,460
59
+ netbox_dns/migrations/0020_netbox_3_4.py,sha256=UMcHdn8ZAuQjUaM_3rEGpktYrM0TuvhccD7Jt7WQnPs,1271
60
+ netbox_dns/migrations/0021_record_ip_address.py,sha256=EqdhWXmq7aiK4X79xTRUZng3zFncCl-8JoO65HqlJKw,3244
61
+ netbox_dns/migrations/0022_search.py,sha256=KW1ffEZ4-0dppGQ_KD1EN7iw8eQJOnDco-xfJFRZqKQ,172
62
+ netbox_dns/migrations/0023_alter_record_value.py,sha256=4_4v8YZzU8_jadJqIUUjH6SIhNTeALWhclozTqYDmv0,378
63
+ netbox_dns/migrations/0024_tenancy.py,sha256=3kc5l5_AyfhOI6g6mbCfReUAbSgb2DAv0MDMZqJ-3YQ,1745
64
+ netbox_dns/migrations/0025_ipam_coupling_cf.py,sha256=7uHujclWrsYw5QMLWft0Po78Ow5Q8MjPuU7moKyQ2qs,620
65
+ netbox_dns/migrations/0026_domain_registration.py,sha256=qUJ1oUGHIGGNWD7QRLnxElbM5eNp7dYNNn_OYIw8Xvo,5796
66
+ netbox_dns/migrations/0027_alter_registrar_iana_id.py,sha256=QUtRIrqqfkraFmzzeJFZWAEv4PfrOouoHtrV6FRn8Kc,404
67
+ netbox_dns/migrations/0028_rfc2317_fields.py,sha256=D8r43xxBjYXiL6ycmX8RY5_WG7tRYEDjutOeYM1H56I,1364
68
+ netbox_dns/migrations/0029_record_fqdn.py,sha256=UAAU38ekKQyiYDOJlcrz6Qbk4bqZfSHZyAHUZFFQrOw,808
69
+ netbox_dns/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
+ netbox_dns/mixins/__init__.py,sha256=LxTEfpod_RHCyMtnzDljv0_dwqp2z3Q6tqbXW8LTGD8,35
71
+ netbox_dns/mixins/object_modification.py,sha256=JbGi8a52wkZ3fFBlfat590CfqRJcEWxBsxSeTIx3Qtg,833
72
+ netbox_dns/models/__init__.py,sha256=wjwNsRttUVYQHZODZi806a_iUDoq_o7mdKObqh1N7N4,300
73
+ netbox_dns/models/contact.py,sha256=oNLyD_6TOTNQQTcCvv6TAC7OkzPTMIRy2NP5nwNKaNg,3009
74
+ netbox_dns/models/nameserver.py,sha256=yKo4Fwqnv5VtTndU2px7tRS3voF3Cal7OWQ6AImLwl0,3208
75
+ netbox_dns/models/record.py,sha256=j8sAeExtFFknMv2-dDhFvDOxOhXYgiKU63zd9sgpEcc,24453
76
+ netbox_dns/models/record_template.py,sha256=3t9VceviX3kNIo5o0VPVFupLFDqPxpHIVLp5U3pBKB4,4661
77
+ netbox_dns/models/registrar.py,sha256=T_oMUlTWTDixOVlIbEZGvOBdvUrKxRkkS41xgM2Oee8,1557
78
+ netbox_dns/models/view.py,sha256=SYmhNYyRCv0rSCK5jrHtug4QgfWCBbjsAjZEEHk02QU,2873
79
+ netbox_dns/models/zone.py,sha256=Vx9yC6YHzk3AViyMPy473oS9A6fxuPttK8O7jcG4cHE,28231
80
+ netbox_dns/models/zone_template.py,sha256=lkiSIfx8KM0Cs3Mb3dLBxKbSpcssVUzQiSmD5W46was,3753
81
+ netbox_dns/navigation.py,sha256=EITDZkbpu4KCC9u4Noj7OORWnkL3EYT2RIRvYlTw34Q,5961
82
+ netbox_dns/signals/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
+ netbox_dns/signals/ipam_autodns.py,sha256=OQIqAue4pA851rn-ZpVJYwtQdXAqEIaGwJepbqNOqig,4771
84
+ netbox_dns/tables/__init__.py,sha256=s41w4o77tIwmhnLjsOsg08R9m3wrlomkkfCLTVQuPzc,196
85
+ netbox_dns/tables/contact.py,sha256=sPs7d1ZhVC5dOS37dPYFqebNd7WGvsV_eYzX_TMcbzY,804
86
+ netbox_dns/tables/nameserver.py,sha256=fFiE-yH-_GyRDaV4SVw094r6uH58Kx56NSWDGaMR58g,764
87
+ netbox_dns/tables/record.py,sha256=0Yg0qwZ8Vjz6pkZnmof4ZK1Hsvk9DNEzmJwoIwJZJFQ,3189
88
+ netbox_dns/tables/record_template.py,sha256=16Lu-WDjs2m9Uxx6WkURL39NlyJ8lWzj5Kl6C6lz3E8,2159
89
+ netbox_dns/tables/registrar.py,sha256=M-ckyQUs6dqjTCPf7bAr6UuLEA-q9f9CxKW7yp3rGoM,680
90
+ netbox_dns/tables/view.py,sha256=jf2S4TiOdMq6-wWk0ndR1uBJpkOx_f3pqAuM1nSXTBo,1178
91
+ netbox_dns/tables/zone.py,sha256=IeCiflrQBn1INV_PxoTySWQrDalykY4mDSG76VXC5WM,1877
92
+ netbox_dns/tables/zone_template.py,sha256=70hvS-xpeaLkcM6y0R9xsUMQVKgTgZJaWWNd99BfmzI,1479
93
+ netbox_dns/template_content.py,sha256=Lhrse5_Aw6L5xaemTD8-ZlTyFqJ-fVqp97TSRT6E7ek,3390
94
+ netbox_dns/templates/netbox_dns/contact.html,sha256=fMHAQyLXIxohKoCTxFEnKetl9UVXeQgjasfpv_JONaw,2855
95
+ netbox_dns/templates/netbox_dns/nameserver.html,sha256=DpTdetQVV_jKThDbi62LvbhiCay-1QxR-yiJEiPFm4w,1554
96
+ netbox_dns/templates/netbox_dns/record/managed.html,sha256=G6LPG1koUGuzUiwYdv1okdVa4sKaofiQegDBnsFL0kA,89
97
+ netbox_dns/templates/netbox_dns/record/related.html,sha256=Aqor8uGcuHQTHjlX-Xmni2Yp4N7lOBrMOqQiszrQOC0,742
98
+ netbox_dns/templates/netbox_dns/record.html,sha256=o3z_D6Fqqn7nx1IwPXKQ75ZaPhU6kae0WpaWa3UMcxQ,5211
99
+ netbox_dns/templates/netbox_dns/recordtemplate.html,sha256=9tkXtKqa5p3LdOU9REm99WSFwGJaH8OczpIqXZuXMcg,3099
100
+ netbox_dns/templates/netbox_dns/registrar.html,sha256=O5veGmW59Pf5yN25ihPLvRIkA2P7xmSGv0G3NrRG8vI,2152
101
+ netbox_dns/templates/netbox_dns/view/related.html,sha256=W9Ie2aOsFkWyYtBnZn38seQDBmyJkV9dqFDG-Dq3yMk,736
102
+ netbox_dns/templates/netbox_dns/view.html,sha256=8Ox9J-BWSutwOBbnwQL4BMydDMBMM2l4bbMwySkiP4k,2706
103
+ netbox_dns/templates/netbox_dns/zone/base.html,sha256=n_E4aVYdGeZZl-ARE8sb4DgAAgPs92X1UEFepX3xIlM,495
104
+ netbox_dns/templates/netbox_dns/zone/child.html,sha256=kH56PJFBGCjiRdIh7zCtClnZdfOChqN_sYslsyoz5gU,2147
105
+ netbox_dns/templates/netbox_dns/zone/child_zone.html,sha256=b9CSGWEfWT7hLQ80gApMnu7mXM8w2LT-3UaOYe6HIRQ,510
106
+ netbox_dns/templates/netbox_dns/zone/managed_record.html,sha256=LOchMAJyfMZIICE6q0pX1eorRbtgUtOQ1u0VvJKCDZ8,514
107
+ netbox_dns/templates/netbox_dns/zone/record.html,sha256=tu5RFm2eYJ3fjeUxZYDJqJ9qK8tGslXl1iGs60DlRyM,2194
108
+ netbox_dns/templates/netbox_dns/zone/registration.html,sha256=de2Kph-G8Gv5LD_Wf294SLfO0UKPS9NmHeQYRfJf-Ck,1151
109
+ netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html,sha256=rWlmb3zRQbLYQ_1dsa0twwu6y1dRj2tfFVEERH07p-s,517
110
+ netbox_dns/templates/netbox_dns/zone.html,sha256=zPi1sLFnya-ytx8-Pcf_ujc1sKllCRuz48x2E-S1HSo,6285
111
+ netbox_dns/templates/netbox_dns/zonetemplate.html,sha256=qjUWqrg4uDaIFt9-g0OBxTi86i_ctf2Ps4qHh11djQE,3081
112
+ netbox_dns/urls/__init__.py,sha256=FDauSMt7a01YJR8_RWkk0-kSmIL2lr1bHF0OU5ROuQ8,610
113
+ netbox_dns/urls/contact.py,sha256=OSQO-AkAhTaBruAdzVgcC7ip_OuiacvFI_ozgkWlNFU,1549
114
+ netbox_dns/urls/nameserver.py,sha256=BBbY-wqPqCquvLLv1_JhqToj7oDHhPNGCWHt0IfjBNM,1941
115
+ netbox_dns/urls/record.py,sha256=bDprohTso1N0GtPXH4X3TNHnkxopiOSQFXWItifEZ_k,1432
116
+ netbox_dns/urls/record_template.py,sha256=Z-7aA-rPIxRBCmXNUiQcHIgjYfai28Tf_sLtkl2ihDk,1827
117
+ netbox_dns/urls/registrar.py,sha256=u6B0zGGYNUJIKTo9uGiUeZLPD0QMGaQOAPShGEy4NaA,1728
118
+ netbox_dns/urls/view.py,sha256=8AeBnOHWusXXQs4JXpNfMSHqszXAY1GDXGWmNsMulQ8,1327
119
+ netbox_dns/urls/zone.py,sha256=rmB1BkzmWNG06ILUf-39Aj6-SBFkwQouyixMQiamqPc,2005
120
+ netbox_dns/urls/zone_template.py,sha256=w3Gu8qfLCWyHofeLkGZd1HpYSlcslomVlBQJZyqh8kk,1690
121
+ netbox_dns/utilities/__init__.py,sha256=M9T8PUFlGddtENzEznHAPbEsz1VFrPcmbD-BGLCsvB4,55
122
+ netbox_dns/utilities/conversions.py,sha256=NS37SoMqXc13wNWRkKnLfyQbVi6QKD33fu5ovTKRo74,1979
123
+ netbox_dns/utilities/ipam_autodns.py,sha256=akS_4o0jtuPYhJVe0mXn75loU_opFFTYQR35MqYPfOI,5993
124
+ netbox_dns/validators/__init__.py,sha256=Mr8TvmcJTa8Pubj8TzbFBKfbHhEmGcr5JdQvczEJ39A,72
125
+ netbox_dns/validators/dns_name.py,sha256=B4A0BOW5pKDjjukvksriRtnLzkYTx_pFjh7eqKo6PBE,3069
126
+ netbox_dns/validators/dns_value.py,sha256=y2Zga4hmywqDrTBXcMC-sWaFbw4eoY8pySq7cWnMP8Y,2822
127
+ netbox_dns/validators/rfc2317.py,sha256=ivylEiNKlmX2x41rwqDrFkD5CFf9FtpNEfsKHX_prbE,585
128
+ netbox_dns/views/__init__.py,sha256=s41w4o77tIwmhnLjsOsg08R9m3wrlomkkfCLTVQuPzc,196
129
+ netbox_dns/views/contact.py,sha256=qM9F6MQBvO8ERR7quGLdQ5kW4roNLJ61As8m0qQTapg,2471
130
+ netbox_dns/views/nameserver.py,sha256=DFr0eybMshc1FW06g4cy9Nk4VRMxRqakI5KtHFiAVRc,3286
131
+ netbox_dns/views/record.py,sha256=fHMafCC14C7d6oXbXc2vN-T70OAOaTY77_m3Dct-oiQ,4590
132
+ netbox_dns/views/record_template.py,sha256=BkemTBEramLhYqB6HrA80sNgtduW1ZOJwbYs3i7srik,2510
133
+ netbox_dns/views/registrar.py,sha256=yRQgFm3vgBD21ZQex9asjs0QWegvSHlcyHXLnjvc5xs,2324
134
+ netbox_dns/views/view.py,sha256=I_hVZYFJF8GTnlUKPrTgBk_x9UDCbZXM8R7U5Bhizjs,2107
135
+ netbox_dns/views/zone.py,sha256=SKhf_WHcFVpKqFTuUMf-Dmxu1AwFHBeo_DtD8UGFrJ8,5483
136
+ netbox_dns/views/zone_template.py,sha256=qvXl-bpc1fMc1WFngynj4-Q3-JJDgKdT-r54s4M1D0s,2118
137
+ netbox_plugin_dns-1.1.0b1.dist-info/LICENSE,sha256=I3tDu11bZfhFm3EkV4zOD5TmWgLjnUNLEFwrdjniZYs,1112
138
+ netbox_plugin_dns-1.1.0b1.dist-info/METADATA,sha256=LNhAMiqES0BIvNc1JrGeHLss0EoAqnOM6TNr8IlYdrU,6393
139
+ netbox_plugin_dns-1.1.0b1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
140
+ netbox_plugin_dns-1.1.0b1.dist-info/RECORD,,
@@ -1,18 +0,0 @@
1
- from django.core.management.base import BaseCommand
2
-
3
- from ipam.models import IPAddress
4
-
5
- from netbox_dns.utilities import update_dns_records
6
-
7
-
8
- class Command(BaseCommand):
9
- help = "Rebuild DNSsync relationships between IP addresses and records"
10
-
11
- def handle(self, *model_names, **options):
12
- ip_addresses = IPAddress.objects.all()
13
- for ip_address in ip_addresses:
14
- if options.get("verbosity") >= 2:
15
- self.stdout.write(
16
- f"Updating DNS records for IP Address {ip_address}, VRF {ip_address.vrf}"
17
- )
18
- update_dns_records(ip_address)
@@ -1,25 +0,0 @@
1
- # Generated by Django 5.0.7 on 2024-08-27 09:29
2
-
3
- from django.db import migrations
4
-
5
-
6
- class Migration(migrations.Migration):
7
-
8
- dependencies = [
9
- ("netbox_dns", "0006_templating"),
10
- ]
11
-
12
- operations = [
13
- migrations.AlterModelOptions(
14
- name="record",
15
- options={"ordering": ("fqdn", "zone", "name", "type", "value", "status")},
16
- ),
17
- migrations.AlterModelOptions(
18
- name="recordtemplate",
19
- options={"ordering": ("name",)},
20
- ),
21
- migrations.AlterModelOptions(
22
- name="zonetemplate",
23
- options={"ordering": ("name",)},
24
- ),
25
- ]
@@ -1,27 +0,0 @@
1
- from django.db import migrations
2
-
3
-
4
- class Migration(migrations.Migration):
5
-
6
- dependencies = [
7
- ("netbox_dns", "0008_view_prefixes"),
8
- ]
9
-
10
- operations = [
11
- migrations.RenameModel(
12
- old_name="Contact",
13
- new_name="RegistrationContact",
14
- ),
15
- migrations.RunSQL(
16
- "ALTER TABLE netbox_dns_contact_id_seq RENAME TO netbox_dns_registrationcontact_id_seq"
17
- ),
18
- migrations.RunSQL(
19
- "ALTER INDEX netbox_dns_contact_pkey RENAME TO netbox_dns_registrationcontact_pkey"
20
- ),
21
- migrations.RunSQL(
22
- "ALTER INDEX netbox_dns_contact_contact_id_50e9d89d_like RENAME TO netbox_dns_registrationcontact_contact_id_6ff98464_like"
23
- ),
24
- migrations.RunSQL(
25
- "ALTER INDEX netbox_dns_contact_contact_id_key RENAME TO netbox_dns_contact_registrationcontact_id_key"
26
- ),
27
- ]
@@ -1,224 +0,0 @@
1
- from netaddr import IPNetwork
2
-
3
- from django.conf import settings
4
- from django.dispatch import receiver
5
- from django.db.models.signals import pre_delete, pre_save, post_save, m2m_changed
6
- from django.core.exceptions import ValidationError
7
-
8
- from netbox.context import current_request
9
- from netbox.signals import post_clean
10
- from ipam.models import IPAddress, Prefix
11
- from utilities.exceptions import AbortRequest
12
-
13
- from netbox_dns.models import view as _view
14
- from netbox_dns.utilities import (
15
- check_dns_records,
16
- check_record_permission,
17
- update_dns_records,
18
- delete_dns_records,
19
- get_views_by_prefix,
20
- get_ip_addresses_by_prefix,
21
- )
22
-
23
- DNSSYNC_CUSTOM_FIELDS = {
24
- "ipaddress_dns_disabled": False,
25
- "ipaddress_dns_record_ttl": None,
26
- "ipaddress_dns_record_disable_ptr": False,
27
- }
28
-
29
- IPADDRESS_ACTIVE_STATUS = settings.PLUGINS_CONFIG["netbox_dns"][
30
- "dnssync_ipaddress_active_status"
31
- ]
32
- ENFORCE_UNIQUE_RECORDS = settings.PLUGINS_CONFIG["netbox_dns"]["enforce_unique_records"]
33
-
34
-
35
- @receiver(post_clean, sender=IPAddress)
36
- def ipam_dnssync_ipaddress_post_clean(instance, **kwargs):
37
- if not isinstance(instance.address, IPNetwork):
38
- return
39
-
40
- if instance.custom_field_data.get("ipaddress_dns_disabled"):
41
- return
42
-
43
- # +
44
- # Check for uniqueness of IP address and dns_name. If unique records are
45
- # enforced, report an error when trying to create the same IP address with
46
- # the same dns_name. Ignore existing IP addresses that have their CF
47
- # "ipaddress_dns_disabled" set to "True".
48
- # -
49
- duplicate_addresses = IPAddress.objects.filter(
50
- address=instance.address,
51
- vrf=instance.vrf,
52
- dns_name=instance.dns_name,
53
- status__in=IPADDRESS_ACTIVE_STATUS,
54
- )
55
- if instance.pk is not None:
56
- duplicate_addresses = duplicate_addresses.exclude(pk=instance.pk)
57
-
58
- if ENFORCE_UNIQUE_RECORDS and instance.status in IPADDRESS_ACTIVE_STATUS:
59
- for ip_address in duplicate_addresses.only("custom_field_data"):
60
- if not ip_address.custom_field_data.get("ipaddress_dns_disabled"):
61
- raise ValidationError(
62
- {
63
- "dns_name": "Unique DNS records are enforced and there is already "
64
- f"an active IP address {instance.address} with DNS name {instance.dns_name}. "
65
- "Plesase choose a different name or disable record creation for this "
66
- "IP address."
67
- }
68
- )
69
-
70
- # +
71
- # Check NetBox DNS record permission for changes to IPAddress custom fields
72
- #
73
- # Normally, as the modfication of DNS fields
74
- if (request := current_request.get()) is not None:
75
- cf_data = instance.custom_field_data
76
- if (
77
- instance.pk is not None
78
- and any(
79
- (
80
- cf_data.get(cf, cf_default)
81
- != IPAddress.objects.get(pk=instance.pk).custom_field_data.get(
82
- cf, cf_default
83
- )
84
- for cf, cf_default in DNSSYNC_CUSTOM_FIELDS.items()
85
- )
86
- )
87
- and not check_record_permission()
88
- ) or (
89
- instance.pk is None
90
- and any(
91
- (
92
- cf_data.get(cf, cf_default) != cf_default
93
- for cf, cf_default in DNSSYNC_CUSTOM_FIELDS.items()
94
- )
95
- )
96
- and not check_record_permission(change=False, delete=False)
97
- ):
98
- raise ValidationError(
99
- f"User '{request.user}' is not allowed to alter DNSsync custom fields"
100
- )
101
-
102
- try:
103
- check_dns_records(instance)
104
- except ValidationError as exc:
105
- raise ValidationError({"dns_name": exc.messages})
106
-
107
-
108
- @receiver(pre_delete, sender=IPAddress)
109
- def ipam_dnssync_ipaddress_pre_delete(instance, **kwargs):
110
- delete_dns_records(instance)
111
-
112
-
113
- @receiver(pre_save, sender=IPAddress)
114
- def ipam_dnssync_ipaddress_pre_save(instance, **kwargs):
115
- check_dns_records(instance)
116
-
117
-
118
- @receiver(post_save, sender=IPAddress)
119
- def ipam_dnssync_ipaddress_post_save(instance, **kwargs):
120
- update_dns_records(instance)
121
-
122
-
123
- @receiver(pre_save, sender=Prefix)
124
- def ipam_dnssync_prefix_pre_save(instance, **kwargs):
125
- """
126
- Changes that modify the prefix hierarchy cannot be validated properly before
127
- commiting them. So the solution in this case is to ask the user to deassign
128
- the prefix from any views it is assigned to and retry.
129
- """
130
- request = current_request.get()
131
-
132
- if instance.pk is None or not instance.netbox_dns_views.exists():
133
- return
134
-
135
- saved_prefix = Prefix.objects.prefetch_related("netbox_dns_views").get(
136
- pk=instance.pk
137
- )
138
- if saved_prefix.prefix != instance.prefix or saved_prefix.vrf != instance.vrf:
139
- dns_views = ", ".join([view.name for view in instance.netbox_dns_views.all()])
140
- if request is not None:
141
- raise AbortRequest(
142
- f"This prefix is currently assigned to the following DNS views: {dns_views}"
143
- f"Please deassign it from these views before making changes to the prefix "
144
- f"or VRF."
145
- )
146
-
147
- raise ValidationError(
148
- f"Prefix is assigned to DNS views {dns_views}. Prefix and VRF must not be changed"
149
- )
150
-
151
-
152
- @receiver(pre_delete, sender=Prefix)
153
- def ipam_dnssync_prefix_pre_delete(instance, **kwargs):
154
- parent = instance.get_parents().last()
155
- request = current_request.get()
156
-
157
- if parent is not None and get_views_by_prefix(instance) != get_views_by_prefix(
158
- parent
159
- ):
160
- try:
161
- for prefix in instance.get_children().filter(
162
- _depth=instance.depth + 1, netbox_dns_views__isnull=True
163
- ):
164
- for ip_address in get_ip_addresses_by_prefix(prefix):
165
- check_dns_records(ip_address)
166
- except ValidationError as exc:
167
- if request is not None:
168
- raise AbortRequest(
169
- f"Prefix deletion would cause DNS errors: {exc.messages[0]} "
170
- "Please review DNS View assignments for this and the parent prefix"
171
- )
172
- else:
173
- raise exc
174
-
175
- # +
176
- # CAUTION: This only works because the NetBox workaround for an ancient
177
- # Django bug (see https://code.djangoproject.com/ticket/17688) has already
178
- # removed the relations between the prefix and the views when this signal
179
- # handler runs.
180
- #
181
- # Should anything be fixed, this code will stop working and need to be
182
- # revisited.
183
- #
184
- # The NetBox workaround only works for requests, not for model level
185
- # operations. The following code replicates it for non-requests.
186
- # -
187
- if request is None:
188
- for view in instance.netbox_dns_views.all():
189
- view.snapshot()
190
- view.prefixes.remove(instance)
191
-
192
- for ip_address in get_ip_addresses_by_prefix(instance):
193
- update_dns_records(ip_address)
194
-
195
-
196
- @receiver(m2m_changed, sender=_view.View.prefixes.through)
197
- def ipam_dnssync_view_prefix_changed(**kwargs):
198
- action = kwargs.get("action")
199
- request = current_request.get()
200
-
201
- # +
202
- # Handle all post_add and post_remove signals except the ones directly
203
- # handled by the pre_delete handler for the Prefix model.
204
- #
205
- # Yes. This IS ugly.
206
- # -
207
- if action not in ("post_add", "post_remove") or (
208
- request is not None
209
- and action == "post_remove"
210
- and (
211
- request.path.startswith("/ipam/prefixes/")
212
- or request.path.startswith("/api/ipam/prefixes/")
213
- )
214
- ):
215
- return
216
-
217
- check_view = action != "post_remove"
218
-
219
- ip_addresses = IPAddress.objects.none()
220
- for prefix in Prefix.objects.filter(pk__in=kwargs.get("pk_set")):
221
- ip_addresses |= get_ip_addresses_by_prefix(prefix, check_view=check_view)
222
-
223
- for ip_address in ip_addresses.distinct():
224
- update_dns_records(ip_address)
@@ -1,11 +0,0 @@
1
- import django_tables2 as tables
2
-
3
- from ipam.tables import PrefixTable
4
- from utilities.tables import register_table_column
5
-
6
- views = tables.ManyToManyColumn(
7
- verbose_name="DNS Views",
8
- linkify_item=True,
9
- )
10
-
11
- register_table_column(views, "netbox_dns_views", PrefixTable)
@@ -1,9 +0,0 @@
1
- {% load perms %}
2
-
3
- {% if perms.netbox_dns.change_view %}
4
- <a href="{{ url }}?return_url={{ object.get_absolute_url }}">
5
- <button type="submit" class="btn btn-primary" name="assign-view">
6
- <i class="mdi mdi-eye-outline" aria-hidden="true"></i> DNS Views
7
- </button>
8
- </a>
9
- {% endif %}
@@ -1,41 +0,0 @@
1
- {% extends 'generic/_base.html' %}
2
-
3
- {% block title %}
4
- Configure DNS views for {{ object|meta:"verbose_name" }} {{ object }} {% if object.vrf %}[{{ object.vrf }}]{% endif %}
5
- {% endblock title %}
6
-
7
- {% block content %}
8
- <div class="tab-pane show active" id="edit-form" role="tabpanel" aria-labelledby="object-list-tab">
9
-
10
- <form action="" method="post" enctype="multipart/form-data" class="object-edit mt-5">
11
- {% csrf_token %}
12
-
13
- <div id="form_fields" hx-disinherit="hx-select hx-swap">
14
- {% if inherited_from %}
15
- <div class="card">
16
- <table class="table table-hover attr-table">
17
- <th>Views inherited from prefix {{ inherited_from }} {% if inherited_from.vrf %}[{{ inherited_from.vrf }}] {% endif %}</th>
18
- {% for view in inherited_views %}
19
- <tr><td>{{ view|linkify }}</td><td>{{ view.description }}</td></tr>
20
- {% endfor %}
21
- </table>
22
- </div>
23
- {% endif %}
24
- {% block form %}
25
- {% include 'htmx/form.html' %}
26
- {% endblock form %}
27
- </div>
28
-
29
- <div class="text-end my-3">
30
- {% block buttons %}
31
- <a href="{{ return_url }}" class="btn btn-outline-secondary">Cancel</a>
32
- <button type="submit" name="_update" class="btn btn-primary">Save</button>
33
- {% endblock buttons %}
34
- </div>
35
- </form>
36
- </div>
37
- {% endblock content %}
38
-
39
- {% block modals %}
40
- {% include 'inc/htmx_modal.html' with size='lg' %}
41
- {% endblock %}
@@ -1,60 +0,0 @@
1
- from django.urls import include, path
2
-
3
- from utilities.urls import get_model_urls
4
-
5
- from netbox_dns.views import (
6
- RegistrationContactView,
7
- RegistrationContactListView,
8
- RegistrationContactEditView,
9
- RegistrationContactDeleteView,
10
- RegistrationContactBulkImportView,
11
- RegistrationContactBulkEditView,
12
- RegistrationContactBulkDeleteView,
13
- )
14
-
15
- registrationcontact_urlpatterns = [
16
- path(
17
- "registrationcontacts/<int:pk>/",
18
- RegistrationContactView.as_view(),
19
- name="registrationcontact",
20
- ),
21
- path(
22
- "registrationcontacts/",
23
- RegistrationContactListView.as_view(),
24
- name="registrationcontact_list",
25
- ),
26
- path(
27
- "registrationcontacts/add/",
28
- RegistrationContactEditView.as_view(),
29
- name="registrationcontact_add",
30
- ),
31
- path(
32
- "registrationcontacts/<int:pk>/edit/",
33
- RegistrationContactEditView.as_view(),
34
- name="registrationcontact_edit",
35
- ),
36
- path(
37
- "registrationcontacts/<int:pk>/delete/",
38
- RegistrationContactDeleteView.as_view(),
39
- name="registrationcontact_delete",
40
- ),
41
- path(
42
- "registrationcontacts/import/",
43
- RegistrationContactBulkImportView.as_view(),
44
- name="registrationcontact_import",
45
- ),
46
- path(
47
- "registrationcontacts/edit/",
48
- RegistrationContactBulkEditView.as_view(),
49
- name="registrationcontact_bulk_edit",
50
- ),
51
- path(
52
- "registrationcontacts/delete/",
53
- RegistrationContactBulkDeleteView.as_view(),
54
- name="registrationcontact_bulk_delete",
55
- ),
56
- path(
57
- "registrationcontacts/<int:pk>/",
58
- include(get_model_urls("netbox_dns", "registrationcontact")),
59
- ),
60
- ]