certbot.plugins.dns_common module

Common code for DNS Authenticator Plugins.

class certbot.plugins.dns_common.DNSAuthenticator(config, name)[source]

Bases: certbot.plugins.common.Plugin

Base class for DNS Authenticators

classmethod add_parser_arguments(add, default_propagation_seconds=10)[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.
get_chall_pref(unused_domain)[source]
prepare()[source]
perform(achalls)[source]
cleanup(achalls)[source]
class certbot.plugins.dns_common.CredentialsConfiguration(filename, mapper=<function CredentialsConfiguration.<lambda>>)[source]

Bases: object

Represents a user-supplied filed which stores API credentials.

require(required_variables)[source]

Ensures that the supplied set of variables are all present in the file.

Parameters:required_variables (dict) – Map of variable which must be present to error to display.
Raises:errors.PluginError – If one or more are missing.
conf(var)[source]

Find a configuration value for variable var, as transformed by mapper.

Parameters:var (str) – The variable to get.
Returns:The value of the variable.
Return type:str
certbot.plugins.dns_common.validate_file(filename)[source]

Ensure that the specified file exists.

certbot.plugins.dns_common.validate_file_permissions(filename)[source]

Ensure that the specified file exists and warn about unsafe permissions.

certbot.plugins.dns_common.base_domain_name_guesses(domain)[source]

Return a list of progressively less-specific domain names.

One of these will probably be the domain name known to the DNS provider.

Example:
>>> base_domain_name_guesses('foo.bar.baz.example.com')
['foo.bar.baz.example.com', 'bar.baz.example.com', 'baz.example.com', 'example.com', 'com']
Parameters:domain (str) – The domain for which to return guesses.
Returns:The a list of less specific domain names.
Return type:list