certbot_dns_digitalocean.dns_digitalocean
¶
DNS Authenticator for DigitalOcean.
-
class
certbot_dns_digitalocean.dns_digitalocean.
Authenticator
(*args, **kwargs)[source]¶ Bases:
certbot.plugins.dns_common.DNSAuthenticator
DNS Authenticator for DigitalOcean
This Authenticator uses the DigitalOcean API to fulfill a dns-01 challenge.
-
classmethod
add_parser_arguments
(add)[source]¶ Add plugin arguments to the CLI argument parser.
NOTE: If some of your flags interact with others, you can use cli.report_config_interaction to register this to ensure values are correctly saved/overridable during renewal.
Parameters: add (callable) – Function that proxies calls to argparse.ArgumentParser.add_argument
prepending options with unique plugin name prefix.
-
_perform
(domain, validation_name, validation)[source]¶ Performs a dns-01 challenge by creating a DNS TXT record.
Parameters: - domain (str) – The domain being validated.
- validation_domain_name (str) – The validation record domain name.
- validation (str) – The validation record content.
Raises: errors.PluginError – If the challenge cannot be performed
-
_cleanup
(domain, validation_name, validation)[source]¶ Deletes the DNS TXT record which would have been created by
_perform_achall
.Fails gracefully if no such record exists.
Parameters: - domain (str) – The domain being validated.
- validation_domain_name (str) – The validation record domain name.
- validation (str) – The validation record content.
-
classmethod
-
class
certbot_dns_digitalocean.dns_digitalocean.
_DigitalOceanClient
(token)[source]¶ Bases:
object
Encapsulates all communication with the DigitalOcean API.
-
add_txt_record
(domain_name, record_name, record_content)[source]¶ Add a TXT record using the supplied information.
Parameters: - domain_name (str) – The domain to use to associate the record with.
- record_name (str) – The record name (typically beginning with ‘_acme-challenge.’).
- record_content (str) – The record content (typically the challenge validation).
Raises: certbot.errors.PluginError – if an error occurs communicating with the DigitalOcean API
-
del_txt_record
(domain_name, record_name, record_content)[source]¶ Delete a TXT record using the supplied information.
Note that both the record’s name and content are used to ensure that similar records created concurrently (e.g., due to concurrent invocations of this plugin) are not deleted.
Failures are logged, but not raised.
Parameters: - domain_name (str) – The domain to use to associate the record with.
- record_name (str) – The record name (typically beginning with ‘_acme-challenge.’).
- record_content (str) – The record content (typically the challenge validation).
-