Skip to content

Commit cec4354

Browse files
committed
DNS: introduce NS records
1 parent 5f78c98 commit cec4354

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

genesis_core/user_api/dns/dm/models.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,25 @@ class TXTRecord(AbstractRecord):
168168
)
169169

170170

171+
class NSRecord(AbstractRecord):
172+
KIND = "NS"
173+
174+
name = properties.property(
175+
types_network.RecordName(),
176+
required=True,
177+
)
178+
content = properties.property(
179+
types_network.FQDN(),
180+
required=True,
181+
)
182+
183+
171184
class Record(CommonModel):
172185
__tablename__ = "dns_records"
173186
domain = relationships.relationship(Domain, required=True)
174187
domain_id = properties.property(types.Integer())
175188
type = properties.property(
176-
types.Enum(("A", "SOA", "TXT")), # "AAAA", "CNAME", "MX",
189+
types.Enum(("A", "NS", "SOA", "TXT")), # "AAAA", "CNAME", "MX",
177190
read_only=True,
178191
required=True,
179192
)
@@ -185,6 +198,7 @@ class Record(CommonModel):
185198
types_dynamic.KindModelType(ARecord),
186199
types_dynamic.KindModelType(SOARecord),
187200
types_dynamic.KindModelType(TXTRecord),
201+
types_dynamic.KindModelType(NSRecord),
188202
),
189203
required=True,
190204
)

0 commit comments

Comments
 (0)