def __init__(self, options, provider_options=None):
"""Initialize Gandi DNS provider."""
super(Provider, self).__init__(options)
if provider_options is None:
provider_options = {}
api_endpoint = provider_options.get('api_endpoint') or 'https://rpc.gandi.net/xmlrpc/'
self.apikey = self.options['auth_token']
self.api = xmlrpclib.ServerProxy(api_endpoint, allow_none=True)
self.default_ttl = 3600
# self.domain_id is required by test suite
self.domain_id = None
self.zone_id = None
self.domain = self.options['domain'].lower()
# Authenicate against provider,
# Make any requests required to get the domain's id for this provider,
# so it can be used in subsequent calls. Should throw an error if
# authentication fails for any reason, or if the domain does not exist.
评论列表
文章目录