New Feature(s)
Proxy Support & TLS Validation (PR#6)
-
Added support for making requests through a proxy.
-
Introduced a parameter to explicitly disable TLS validation when needed.
>>> proxy_dict = { ... "http": "http://192.168.1.243:9080", ... "https": "http://192.168.1.243:9080" ... } >>> from ultra_rest_client import RestApiClient >>> client = RestApiClient('username', 'password', proxy=proxy_dict, verify_\ https=False) >>> print(client.get_zones()) {'queryInfo': {'q': '' ... } }
mitmproxy | [05:43:22.823][192.168.1.211:47424] client connect mitmproxy | [05:43:22.849][192.168.1.211:47424] server connect api.ultradns.com:443 (3.86.127.106:443) mitmproxy | 192.168.1.211:47424: POST https://api.ultradns.com/v1/authorization/token mitmproxy | << 200 OK 304b mitmproxy | [05:43:23.489][192.168.1.211:47424] client disconnect mitmproxy | [05:43:23.490][192.168.1.211:47424] server disconnect api.ultradns.com:443 (3.86.127.106:443) mitmproxy | [05:43:42.830][192.168.1.211:56532] client connect mitmproxy | [05:43:42.857][192.168.1.211:56532] server connect api.ultradns.com:443 (35.175.76.156:443) mitmproxy | 192.168.1.211:56532: GET https://api.ultradns.com/v1/zones mitmproxy | << 200 OK 1.7k
-
TLS validation warnings are now suppressed by default.
-
Updated
README.md
with details on proxy usage and TLS validation options.
Resign Zone Method (PR#8)
- Added a method to resign DNSSEC-signed zones in the client wrapper.
Support for RD Pools (PR#7)
-
Added a method for creating RD pools.
Example Usage:
# Demonstration of creating an A record RD pool client.create_rd_pool( "example.com", # Zone name "foo", # Hostname (owner) 300, # TTL [ "1.1.1.1", # List of rdata "2.2.2.2", "3.3.3.3" ] ) # Demonstration of creating an AAAA pool client.create_rd_pool( "example.com", "bar", 300, [ "2001:db8::1", "2001:db8::2", "2001:db8::3" ], ipv6=True, # Set AAAA to True order="RANDOM", # (Optional) Order of record distribution description="lorem ipsum" # (Optional) Description of pool )
-
Added a method for replacing existing RD pools (PUT).
Example Usage:
client.edit_rd_pool( "example.com", "bar", 600, [ "2001:db8::2", "2001:db8::3" ], ipv6=True, order="FIXED", description="ipsum" )
-
Added a method for retrieving all RD pools.
Example Usage:
client.get_rd_pools("example.com")
-
Added a delete method for removing an RD pool.
Example Usage:
client.delete_rd_pool("example.com", "foo") client.delete_rd_pool("example.com", "bar", ipv6=True)
-
Updated
README.md
with RD pool example.