Added network mask for ipv6

This commit is contained in:
Antonio J. Delgado 2024-12-03 10:47:38 +02:00
parent 8b2531dd11
commit c7f2b6d18f

View file

@ -121,7 +121,7 @@ the hostname: {data}"
params = { params = {
'fieldType': "AAAA", 'fieldType': "AAAA",
'subDomain': self.config['hostname'], 'subDomain': self.config['hostname'],
'target': ipv6, 'target': f"{ipv6}/128",
'ttl': self.config['ttl'] 'ttl': self.config['ttl']
} }
if record_exists: if record_exists:
@ -193,7 +193,6 @@ same target, doing nothing."""
except Exception as error: except Exception as error:
self._log.debug(f"Exception reaching IPv6 URL. {error}") self._log.debug(f"Exception reaching IPv6 URL. {error}")
return ipv4, ipv6 return ipv4, ipv6
else:
self._log.error( self._log.error(
f"""Unable to determine the IP using f"""Unable to determine the IP using
'{self.config['web_service_url']}'. Returned data: {result.content}""" '{self.config['web_service_url']}'. Returned data: {result.content}"""
@ -203,6 +202,7 @@ same target, doing nothing."""
f"""Selected method '{self.config['ip_method']}' f"""Selected method '{self.config['ip_method']}'
has not been implemented.""" has not been implemented."""
) )
return False
def _init_log(self): def _init_log(self):
''' Initialize log object ''' ''' Initialize log object '''