changed UpdateDomain on nameserver.setter to be called with all the added/removed hosts in one call

This commit is contained in:
Alysia Broddrick 2023-10-09 21:13:49 -07:00
parent 65cf774e84
commit ffede9817f
No known key found for this signature in database
GPG key ID: 03917052CD0F06B7
4 changed files with 122 additions and 105 deletions

View file

@ -35,6 +35,7 @@ class NameserverErrorCodes(IntEnum):
GLUE_RECORD_NOT_ALLOWED = 2
INVALID_IP = 3
TOO_MANY_HOSTS = 4
UNABLE_TO_UPDATE_DOMAIN = 5
class NameserverError(Exception):
@ -52,6 +53,10 @@ class NameserverError(Exception):
NameserverErrorCodes.TOO_MANY_HOSTS: (
"Too many hosts provided, you may not have more than " "13 nameservers."
),
NameserverErrorCodes.UNABLE_TO_UPDATE_DOMAIN: (
"Unable to update domain, changes were not applied."
"Check logs as a Registry Error is the likely cause"
),
}
def __init__(self, *args, code=None, nameserver=None, ip=None, **kwargs):