def execute_dns_entry(self, method: str, rest_path: str, dnsentry: dict):
    'Execute the requested action, with retry on 409.\n\n        409: ~ "DNS Entries are currently being saved"\n        409: ~ "is locked"\n\n\n        :param method: get, post, patch, delete\n        :type method: str\n        :param zone_name: respective DNS zone\n        :type zone_name: str\n        :param dnsentry: DNS entry to manage\n        :type dnsentry: dict\n        :raises requests.exceptions.HTTPError: Raise an error\n                                               if a 400 or 500 response is returned\n        :return: the requests response\n        :rtype: requests.models.Response\n        '
    endpoint = f'{self.root_endpoint}{rest_path}'
    request = getattr(requests, method)
    response = None
    for attempt in range(1, (self.attempts + 1)):
        response = request(url=endpoint, json=dnsentry, headers=self.headers, timeout=self.connection_timeout)
        if (response.status_code != 409):
            response.raise_for_status()
            logger.debug(f'API request returned {response.status_code}')
            return response
        logger.debug(f'API request returned {response.status_code}: {response.text}, atttempt {attempt} of {self.attempts}')
        sleep(self.retry_delay)
    response.raise_for_status()
Execute the requested action, with retry on 409.

409: ~ "DNS Entries are currently being saved"
409: ~ "is locked"


:param method: get, post, patch, delete
:type method: str
:param zone_name: respective DNS zone
:type zone_name: str
:param dnsentry: DNS entry to manage
:type dnsentry: dict
:raises requests.exceptions.HTTPError: Raise an error
                                       if a 400 or 500 response is returned
:return: the requests response
:rtype: requests.models.Response
def execute_dns_entry(self, method: str, rest_path: str, dnsentry: dict):
    'Execute the requested action, with retry on 409.\n\n        409: ~ "DNS Entries are currently being saved"\n        409: ~ "is locked"\n\n\n        :param method: get, post, patch, delete\n        :type method: str\n        :param zone_name: respective DNS zone\n        :type zone_name: str\n        :param dnsentry: DNS entry to manage\n        :type dnsentry: dict\n        :raises requests.exceptions.HTTPError: Raise an error\n                                               if a 400 or 500 response is returned\n        :return: the requests response\n        :rtype: requests.models.Response\n        '
    endpoint = f'{self.root_endpoint}{rest_path}'
    request = getattr(requests, method)
    response = None
    for attempt in range(1, (self.attempts + 1)):
        response = request(url=endpoint, json=dnsentry, headers=self.headers, timeout=self.connection_timeout)
        if (response.status_code != 409):
            response.raise_for_status()
            logger.debug(f'API request returned {response.status_code}')
            return response
        logger.debug(f'API request returned {response.status_code}: {response.text}, atttempt {attempt} of {self.attempts}')
        sleep(self.retry_delay)
    response.raise_for_status()