Update domain namerservers form

This commit is contained in:
Neil Martinsen-Burrell 2023-04-25 12:19:28 -05:00
parent 2c0dac98b5
commit 6e9a8c8792
No known key found for this signature in database
GPG key ID: 6A3C818CC10D0184
9 changed files with 149 additions and 3 deletions

View file

@ -1,6 +1,8 @@
import logging
import re
from typing import List
from django.apps import apps
from django.core.exceptions import ValidationError
from django.db import models
@ -216,6 +218,24 @@ class Domain(TimeStampedModel):
def __str__(self) -> str:
return self.name
def nameservers(self):
"""A list of the nameservers for this domain.
TODO: call EPP to get this info instead of returning fake data.
"""
return [
# reserved example IPs
"192.0.2.1",
"198.51.100.2",
"203.0.113.3",
]
def set_nameservers(self, new_nameservers: List[str]):
"""Set the nameservers for this domain."""
# TODO: call EPP to set these values in the registry instead of doing
# nothing.
pass
@property
def roid(self):
return self._get_property("roid")