|
@@ -13,6 +13,13 @@ import ipaddress
|
13
|
13
|
# allow owners of a subnet to create reverse dns record?
|
14
|
14
|
|
15
|
15
|
|
|
16
|
+class DSRecordModelMixin(models.Model):
|
|
17
|
+ class Meta:
|
|
18
|
+ abstract = True
|
|
19
|
+
|
|
20
|
+ ds_records = models.TextField(blank=True, verbose_name='DS Records',
|
|
21
|
+ help_text='DS Records in the format of [id] [crypto-algo] [hash-algo] [hash]')
|
|
22
|
+
|
16
|
23
|
class Nameserver(MntdObject):
|
17
|
24
|
handleSuffix = "NS"
|
18
|
25
|
# dns name
|
|
@@ -42,7 +49,7 @@ class Nameserver(MntdObject):
|
42
|
49
|
return []
|
43
|
50
|
|
44
|
51
|
|
45
|
|
-class Domain(MntdObject):
|
|
52
|
+class Domain(DSRecordModelMixin, MntdObject):
|
46
|
53
|
handle = None
|
47
|
54
|
handleSuffix = "DOM"
|
48
|
55
|
name = models.CharField(max_length=67, unique=True, db_index=True)
|
|
@@ -50,9 +57,6 @@ class Domain(MntdObject):
|
50
|
57
|
nameservers = models.ManyToManyField(Nameserver, blank=True)
|
51
|
58
|
admin_c = models.ManyToManyField(Contact)
|
52
|
59
|
|
53
|
|
- ds_records = models.TextField(blank=True, verbose_name='DS Records',
|
54
|
|
- help_text='DS Records in the format of [id] [crypto-algo] [hash-algo] [hash]')
|
55
|
|
-
|
56
|
60
|
def getPK(self):
|
57
|
61
|
return self.name
|
58
|
62
|
|
|
@@ -85,7 +89,7 @@ class Domain(MntdObject):
|
85
|
89
|
return name.lower()
|
86
|
90
|
|
87
|
91
|
|
88
|
|
-class ReverseZone(WhoisObject):
|
|
92
|
+class ReverseZone(DSRecordModelMixin, WhoisObject):
|
89
|
93
|
handle = None
|
90
|
94
|
|
91
|
95
|
parentNet = models.ForeignKey(InetNum)
|