Skip to content

Commit

Permalink
Merge pull request #8 from aperim/dev
Browse files Browse the repository at this point in the history
Fixing debugging
  • Loading branch information
troykelly authored Apr 1, 2021
2 parents 3bd33a2 + a37182f commit 15459fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

Set the forward and reverse DNS entries for a host with DNS services provided by Constellix. Supports IPv6 and IPv4.

## Super Super Important

As you will see below - this is a slow, very painful process. Constellix's API sucks. If you can use any other DNS hosting service - do it - don't waste your time here. If you are stuck with constellix (like we are) and you find this script useful - great. Please contact constellix and ask them to take their API seriously.

## Docker
You can run this inside a docker container:
```bash
Expand Down Expand Up @@ -62,6 +66,7 @@ Forward and reverse records can only be set for domains in your account.
This is a slow process.
Constellix doesn't have any way to find a domain record with a simple search, so we have to look for parts of the domain until we find a match - for IPv6 records - this takes a lot of API requests.
Further hindering the process is authentication errors with Constellix's API. Over 50% of valid API requests fail against the API with a `401` error. Once Constellix fix this - it will double the speed of these updates.
Constellix's API now take 20+ seconds to respond to most requests. Expect updating the forward and reverse records for one domain to take well in excess of 5½ minutes (sometimes up to 20).

## Examples

Expand Down
4 changes: 2 additions & 2 deletions constellix/constellix.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ def _send(self, endpoint, data = {}, method = "GET", use_get_cache = True):
try:
response_data = response.json()
except JSONDecodeError as e:
print(response.data)
print(e)
logging.warning("Received invalid JSON in response: %s", str(response.content))
logging.error(e)
elif response.status_code == 404:
pass
else:
Expand Down

0 comments on commit 15459fd

Please sign in to comment.