gandi.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:lexicon 作者: AnalogJ 项目源码 文件源码
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.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号