Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
0cf61ca
Drop Zerigo DNS support
Mar 26, 2025
26cc840
Deprecate DNSimple DNS driver
Mar 27, 2025
8b6b835
Deprecate RcodeZero DNS driver
Apr 2, 2025
d3581ab
test: Add optional request history to MockHttp
Mar 27, 2025
d5297ac
dns: buddyns: Add API request checking
Mar 27, 2025
dde99d3
dns: cloudflare: Add API request checking
Mar 27, 2025
72c3999
fixup: cloudflare: f-string
Apr 3, 2025
d0aee37
dns: digitalocean: Add API request checking
Mar 27, 2025
20fb38f
dns: dnspod: Add API request checking
Mar 27, 2025
f6dd97d
dns: durabledns: Add API request checking
Mar 27, 2025
ef33880
dns: gandi: Add API request checking
Mar 27, 2025
25c7764
dns: godaddy: Add API request checking
Mar 27, 2025
b40c1c2
dns: google: Add API request checking
Mar 27, 2025
728fd5f
dns: liquidweb: Implement test_create_record_success()
Mar 28, 2025
dd0c4c4
dns: liquidweb: Add API request checking
Mar 28, 2025
7e461ae
dns: luadns: Add API request checking
Mar 28, 2025
098a504
dns: nsone: Fix test_get_record_success()
Mar 28, 2025
7f11904
dns: nsone: Fix test_list_records_success()
Mar 28, 2025
f64c3c9
dns: nsone: Make NsOneResponse lists instance variables
Apr 1, 2025
96061b4
dns: Add hostname helpers to Zone class
Mar 29, 2025
d0bb79c
dns: Add {to,from}_default_id() to DNSDriver class
Apr 2, 2025
00bc615
dns: nsone: Use locally-relevant zone and record IDs
Apr 1, 2025
72d4571
dns: onapp: Add API request checking
Mar 29, 2025
5915071
dns: pointdns: Add API request checking
Mar 29, 2025
7271045
dns: rackspace: Add API request checking
Mar 29, 2025
4b9d364
dns: route53: Fix test_update_record() record type
Mar 31, 2025
47f9ca5
dns: route53: Add API request checking
Mar 31, 2025
fda0d81
dns: worldwidedns: Fix create_zone() reseller suppport
Mar 31, 2025
a5cd569
dns: worldwidedns: Add API request checking
Mar 31, 2025
7a420e1
dns: worldwidedns: Fix update_zone() reseller support
Mar 31, 2025
2330fa7
dns: worldwidedns: Leverage "slot" ID from Record.id
Mar 31, 2025
d135f6e
dns: zonomi: Add API request checking
Apr 1, 2025
468f10b
dns: zonomi: Drop redundant api_key in list_zones()
Apr 1, 2025
d80b61d
dns: nsone: Add test_get_zone_success()
Apr 1, 2025
2d8a8a8
dns: nsone: Add API request checking
Apr 1, 2025
df8cb84
linode: Drop deprecated v3 API support
Apr 2, 2025
0da5453
dns: linode: Add API request checking
Apr 2, 2025
4cab9f7
vultr: Drop deprecated v1 API support
Apr 2, 2025
78dd1d6
dns: vultr: Add API request checking
Apr 2, 2025
b1fba06
dns: powerdns: Add API request checking
Apr 2, 2025
41fb505
dns: nfsn: Add API request checking
Apr 2, 2025
b9a323d
dns: gandi_live: Add API request checking
Apr 2, 2025
a4edc49
dns: zonomi: Switch to default local ID format
Apr 2, 2025
1a988f0
dns: pointdns: Make records agree with zone
Apr 2, 2025
aa3d081
dns: luadns: Make records agree with zones
Apr 2, 2025
f5e39a5
dns: Add common code for domain/host naming
Apr 2, 2025
cf68aa8
dns: google: Leverage {to,from}_default_id()
Apr 2, 2025
59e3125
dns: google: Drop FQDN from inputs
Apr 2, 2025
f21850b
dns: gandi: Leverage {to,from}_default_id()
Apr 3, 2025
2ec65db
dns: route53: Leverage common code
Apr 3, 2025
3a7c27f
dns: gandi_live: Leverage {to,from}_default_id()
Apr 3, 2025
fcaf113
dns: rackspace: Leverage common host naming code
Apr 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed docs/_static/images/provider_logos/zerigo.png
Binary file not shown.
2 changes: 0 additions & 2 deletions docs/dns/_supported_methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Provider list zones list records create zone update zone create record
`Route53 DNS`_ yes yes yes no yes yes yes yes
`Vultr DNS`_ yes yes yes no yes yes yes yes
`World Wide DNS`_ yes yes yes yes yes yes yes yes
`Zerigo DNS`_ yes yes yes yes yes yes yes yes
`Zonomi DNS`_ yes yes yes no yes no yes yes
================= ========== ============ =========== =========== ============= ============= =========== =============

Expand All @@ -53,5 +52,4 @@ Provider list zones list records create zone update zone create record
.. _`Route53 DNS`: http://aws.amazon.com/route53/
.. _`Vultr DNS`: https://www.vultr.com
.. _`World Wide DNS`: https://www.worldwidedns.net/
.. _`Zerigo DNS`: http://www.zerigo.com/
.. _`Zonomi DNS`: https://zonomi.com
2 changes: 0 additions & 2 deletions docs/dns/_supported_providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Provider Documentation Provider Constant Su
`Route53 DNS`_ ROUTE53 single region driver :mod:`libcloud.dns.drivers.route53` :class:`Route53DNSDriver`
`Vultr DNS`_ :doc:`Click </dns/drivers/vultr>` VULTR single region driver :mod:`libcloud.dns.drivers.vultr` :class:`VultrDNSDriver`
`World Wide DNS`_ :doc:`Click </dns/drivers/worldwidedns>` WORLDWIDEDNS single region driver :mod:`libcloud.dns.drivers.worldwidedns` :class:`WorldWideDNSDriver`
`Zerigo DNS`_ ZERIGO single region driver :mod:`libcloud.dns.drivers.zerigo` :class:`ZerigoDNSDriver`
`Zonomi DNS`_ :doc:`Click </dns/drivers/zonomi>` ZONOMI single region driver :mod:`libcloud.dns.drivers.zonomi` :class:`ZonomiDNSDriver`
================= ========================================= ================= ==================== ======================================== ==============================

Expand All @@ -53,5 +52,4 @@ Provider Documentation Provider Constant Su
.. _`Route53 DNS`: http://aws.amazon.com/route53/
.. _`Vultr DNS`: https://www.vultr.com
.. _`World Wide DNS`: https://www.worldwidedns.net/
.. _`Zerigo DNS`: http://www.zerigo.com/
.. _`Zonomi DNS`: https://zonomi.com
6 changes: 3 additions & 3 deletions libcloud/common/nsone.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@


class NsOneResponse(JsonResponse):
errors = [] # type: List[Dict]
objects = [] # type: List[Dict]

def __init__(self, response, connection):
self.errors = [] # type: List[Dict]
self.objects = [] # type: List[Dict]

super().__init__(response=response, connection=connection)
self.errors, self.objects = self.parse_body_and_errors()
if not self.success():
Expand Down
89 changes: 0 additions & 89 deletions libcloud/common/vultr.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@

__all__ = [
"API_HOST",
"VultrConnection",
"VultrException",
"VultrResponse",
"DEFAULT_API_VERSION",
"VultrResponseV2",
"VultrConnectionV2",
Expand All @@ -37,93 +35,6 @@
DEFAULT_API_VERSION = "2"


class VultrResponse(JsonResponse):
objects = None
error_dict = {} # type: Dict[str, str]
errors = None
ERROR_CODE_MAP = {
400: "Invalid API location. Check the URL that you are using.",
403: "Invalid or missing API key. Check that your API key is present"
+ " and matches your assigned key.",
405: "Invalid HTTP method. Check that the method (POST|GET) matches"
+ " what the documentation indicates.",
412: "Request failed. Check the response body for a more detailed" + " description.",
500: "Internal server error. Try again at a later time.",
503: "Rate limit hit. API requests are limited to an average of 1/s."
+ " Try your request again later.",
}

def __init__(self, response, connection):
self.errors = []
super().__init__(response=response, connection=connection)
self.objects, self.errors = self.parse_body_and_errors()
if not self.success():
raise self._make_excp(self.errors[0])

def parse_body_and_errors(self):
"""
Returns JSON data in a python list.
"""
json_objects = []
errors = []

if self.status in self.ERROR_CODE_MAP:
self.error_dict["ERRORCODE"] = self.status
self.error_dict["ERRORMESSAGE"] = self.ERROR_CODE_MAP[self.status]
errors.append(self.error_dict)

js = super().parse_body()
if isinstance(js, dict):
js = [js]

json_objects.append(js)

return (json_objects, errors)

def _make_excp(self, error):
"""
Convert API error to a VultrException instance
"""

return VultrException(error["ERRORCODE"], error["ERRORMESSAGE"])

def success(self):
return len(self.errors) == 0


class VultrConnection(ConnectionKey):
"""
A connection to the Vultr API
"""

host = API_HOST
responseCls = VultrResponse

def add_default_params(self, params):
"""
Returns default params such as api_key which is
needed to perform an action.Returns a dictionary.
Example:/v1/server/upgrade_plan?api_key=self.key
"""
params["api_key"] = self.key

return params

def add_default_headers(self, headers):
"""
Returns default headers such as content-type.
Returns a dictionary.
"""
headers["Content-Type"] = "application/x-www-form-urlencoded"
headers["Accept"] = "text/plain"

return headers

def set_path(self):
self.path = "/v/"
return self.path


class VultrResponseV2(JsonResponse):
valid_response_codes = [
httplib.OK,
Expand Down
Loading