diff --git a/certbot-route53/.gitignore b/certbot-dns-route53/.gitignore similarity index 100% rename from certbot-route53/.gitignore rename to certbot-dns-route53/.gitignore diff --git a/certbot-route53/LICENSE b/certbot-dns-route53/LICENSE similarity index 100% rename from certbot-route53/LICENSE rename to certbot-dns-route53/LICENSE diff --git a/certbot-route53/MANIFEST.in b/certbot-dns-route53/MANIFEST.in similarity index 100% rename from certbot-route53/MANIFEST.in rename to certbot-dns-route53/MANIFEST.in diff --git a/certbot-route53/README.md b/certbot-dns-route53/README.md similarity index 97% rename from certbot-route53/README.md rename to certbot-dns-route53/README.md index 582a0fb35..4af66aa00 100644 --- a/certbot-route53/README.md +++ b/certbot-dns-route53/README.md @@ -30,6 +30,6 @@ To generate a certificate: ``` certbot certonly \ -n --agree-tos --email DEVOPS@COMPANY.COM \ - -a certbot-route53:auth \ + --dns-route53 \ -d MY.DOMAIN.NAME ``` diff --git a/certbot-route53/certbot_route53/__init__.py b/certbot-dns-route53/certbot_dns_route53/__init__.py similarity index 100% rename from certbot-route53/certbot_route53/__init__.py rename to certbot-dns-route53/certbot_dns_route53/__init__.py diff --git a/certbot-dns-route53/certbot_dns_route53/authenticator.py b/certbot-dns-route53/certbot_dns_route53/authenticator.py new file mode 100644 index 000000000..0c612e57c --- /dev/null +++ b/certbot-dns-route53/certbot_dns_route53/authenticator.py @@ -0,0 +1,12 @@ +"""Shim around `~certbot_dns_route53.dns_route53` for backwards compatibility.""" +import warnings + +from certbot_dns_route53 import dns_route53 + + +class Authenticator(dns_route53.Authenticator): + """Shim around `~certbot_dns_route53.dns_route53.Authenticator` for backwards compatibility.""" + def __init__(self, *args, **kwargs): + warnings.warn("The 'authenticator' module was renamed 'dns_route53'", + DeprecationWarning) + super(Authenticator, self).__init__(*args, **kwargs) diff --git a/certbot-route53/certbot_route53/authenticator.py b/certbot-dns-route53/certbot_dns_route53/dns_route53.py similarity index 96% rename from certbot-route53/certbot_route53/authenticator.py rename to certbot-dns-route53/certbot_dns_route53/dns_route53.py index 524f6ab36..67462e369 100644 --- a/certbot-route53/certbot_route53/authenticator.py +++ b/certbot-dns-route53/certbot_dns_route53/dns_route53.py @@ -13,7 +13,7 @@ from certbot.plugins import dns_common logger = logging.getLogger(__name__) INSTRUCTIONS = ( - "To use certbot-route53, configure credentials as described at " + "To use certbot-dns-route53, configure credentials as described at " "https://boto3.readthedocs.io/en/latest/guide/configuration.html#best-practices-for-configuring-credentials " # pylint: disable=line-too-long "and add the necessary permissions for Route53 access.") @@ -91,7 +91,7 @@ class Authenticator(dns_common.DNSAuthenticator): response = self.r53.change_resource_record_sets( HostedZoneId=zone_id, ChangeBatch={ - "Comment": "certbot-route53 certificate validation " + action, + "Comment": "certbot-dns-route53 certificate validation " + action, "Changes": [ { "Action": action, diff --git a/certbot-route53/certbot_route53/authenticator_test.py b/certbot-dns-route53/certbot_dns_route53/dns_route53_test.py similarity index 97% rename from certbot-route53/certbot_route53/authenticator_test.py rename to certbot-dns-route53/certbot_dns_route53/dns_route53_test.py index 6e2896e5d..ff07b6ccd 100644 --- a/certbot-route53/certbot_route53/authenticator_test.py +++ b/certbot-dns-route53/certbot_dns_route53/dns_route53_test.py @@ -1,4 +1,4 @@ -"""Tests for certbot_route53.authenticator""" +"""Tests for certbot_dns_route53.dns_route53.Authenticator""" import unittest @@ -14,7 +14,7 @@ class AuthenticatorTest(unittest.TestCase, dns_test_common.BaseAuthenticatorTest # pylint: disable=protected-access def setUp(self): - from certbot_route53.authenticator import Authenticator + from certbot_dns_route53.dns_route53 import Authenticator super(AuthenticatorTest, self).setUp() @@ -111,7 +111,7 @@ class ClientTest(unittest.TestCase): } def setUp(self): - from certbot_route53.authenticator import Authenticator + from certbot_dns_route53.dns_route53 import Authenticator super(ClientTest, self).setUp() diff --git a/certbot-route53/examples/sample-aws-policy.json b/certbot-dns-route53/examples/sample-aws-policy.json similarity index 91% rename from certbot-route53/examples/sample-aws-policy.json rename to certbot-dns-route53/examples/sample-aws-policy.json index 0b4dcae41..10a17de19 100644 --- a/certbot-route53/examples/sample-aws-policy.json +++ b/certbot-dns-route53/examples/sample-aws-policy.json @@ -1,6 +1,6 @@ { "Version": "2012-10-17", - "Id": "certbot-route53 sample policy", + "Id": "certbot-dns-route53 sample policy", "Statement": [ { "Effect": "Allow", diff --git a/certbot-route53/setup.cfg b/certbot-dns-route53/setup.cfg similarity index 100% rename from certbot-route53/setup.cfg rename to certbot-dns-route53/setup.cfg diff --git a/certbot-route53/setup.py b/certbot-dns-route53/setup.py similarity index 88% rename from certbot-route53/setup.py rename to certbot-dns-route53/setup.py index 40a104a40..8d2632697 100644 --- a/certbot-route53/setup.py +++ b/certbot-dns-route53/setup.py @@ -17,7 +17,7 @@ install_requires = [ ] setup( - name='certbot-route53', + name='certbot-dns-route53', version=version, description="Route53 DNS Authenticator plugin for Certbot", url='https://github.com/certbot/certbot', @@ -52,8 +52,9 @@ setup( keywords=['certbot', 'route53', 'aws'], entry_points={ 'certbot.plugins': [ - 'auth = certbot_route53.authenticator:Authenticator' + 'dns-route53 = certbot_dns_route53.dns_route53:Authenticator', + 'certbot-route53:auth = certbot_dns_route53.dns_route53:Authenticator' ], }, - test_suite='certbot_route53', + test_suite='certbot_dns_route53', ) diff --git a/certbot-route53/tools/tester.pkoch-macos_sierra.sh b/certbot-dns-route53/tools/tester.pkoch-macos_sierra.sh similarity index 100% rename from certbot-route53/tools/tester.pkoch-macos_sierra.sh rename to certbot-dns-route53/tools/tester.pkoch-macos_sierra.sh diff --git a/certbot/cli.py b/certbot/cli.py index 78e4032f1..a74b50636 100644 --- a/certbot/cli.py +++ b/certbot/cli.py @@ -1249,6 +1249,9 @@ def _plugins_parsing(helpful, plugins): helpful.add(["plugins", "certonly"], "--dns-nsone", action="store_true", help=('Obtain certificates using a DNS TXT record (if you are ' 'using NS1 for DNS).')) + helpful.add(["plugins", "certonly"], "--dns-route53", action="store_true", + help=('Obtain certificates using a DNS TXT record (if you are using Route53 for ' + 'DNS).')) # things should not be reorder past/pre this comment: # plugins_group should be displayed in --help before plugin diff --git a/certbot/plugins/disco.py b/certbot/plugins/disco.py index af577564c..9a229d618 100644 --- a/certbot/plugins/disco.py +++ b/certbot/plugins/disco.py @@ -34,6 +34,7 @@ class PluginEntryPoint(object): "certbot-dns-dnsimple", "certbot-dns-google", "certbot-dns-nsone", + "certbot-dns-route53", "certbot-nginx", ] """Distributions for which prefix will be omitted.""" diff --git a/certbot/plugins/selection.py b/certbot/plugins/selection.py index eb41d5b93..15008302d 100644 --- a/certbot/plugins/selection.py +++ b/certbot/plugins/selection.py @@ -134,7 +134,8 @@ def choose_plugin(prepared, question): return None noninstaller_plugins = ["webroot", "manual", "standalone", "dns-cloudflare", "dns-cloudxns", - "dns-digitalocean", "dns-dnsimple", "dns-google", "dns-nsone"] + "dns-digitalocean", "dns-dnsimple", "dns-google", "dns-route53", + "dns-nsone"] def record_chosen_plugins(config, plugins, auth, inst): "Update the config entries to reflect the plugins we actually selected." @@ -250,6 +251,8 @@ def cli_plugin_requests(config): req_auth = set_configurator(req_auth, "dns-google") if config.dns_nsone: req_auth = set_configurator(req_auth, "dns-nsone") + if config.dns_route53: + req_auth = set_configurator(req_auth, "dns-route53") logger.debug("Requested authenticator %s and installer %s", req_auth, req_inst) return req_auth, req_inst diff --git a/tools/venv.sh b/tools/venv.sh index 75ef017be..2d8e4f242 100755 --- a/tools/venv.sh +++ b/tools/venv.sh @@ -20,7 +20,7 @@ fi -e certbot-dns-dnsimple \ -e certbot-dns-google \ -e certbot-dns-nsone \ + -e certbot-dns-route53 \ -e certbot-nginx \ - -e certbot-route53 \ -e letshelp-certbot \ -e certbot-compatibility-test diff --git a/tools/venv3.sh b/tools/venv3.sh index 6f5d96262..943507637 100755 --- a/tools/venv3.sh +++ b/tools/venv3.sh @@ -19,7 +19,7 @@ fi -e certbot-dns-dnsimple \ -e certbot-dns-google \ -e certbot-dns-nsone \ + -e certbot-dns-route53 \ -e certbot-nginx \ - -e certbot-route53 \ -e letshelp-certbot \ -e certbot-compatibility-test diff --git a/tox.cover.sh b/tox.cover.sh index eabe6ba7e..db8a6c500 100755 --- a/tox.cover.sh +++ b/tox.cover.sh @@ -9,7 +9,7 @@ # -e makes sure we fail fast and don't submit coveralls submit if [ "xxx$1" = "xxx" ]; then - pkgs="certbot acme certbot_apache certbot_dns_cloudflare certbot_dns_cloudxns certbot_dns_digitalocean certbot_dns_dnsimple certbot_dns_google certbot_dns_nsone certbot_nginx certbot_route53 letshelp_certbot" + pkgs="certbot acme certbot_apache certbot_dns_cloudflare certbot_dns_cloudxns certbot_dns_digitalocean certbot_dns_dnsimple certbot_dns_google certbot_dns_nsone certbot_dns_route53 certbot_nginx letshelp_certbot" else pkgs="$@" fi @@ -33,10 +33,10 @@ cover () { min=99 elif [ "$1" = "certbot_dns_nsone" ]; then min=99 + elif [ "$1" = "certbot_dns_route53" ]; then + min=99 elif [ "$1" = "certbot_nginx" ]; then min=97 - elif [ "$1" = "certbot_route53" ]; then - min=99 elif [ "$1" = "letshelp_certbot" ]; then min=100 else diff --git a/tox.ini b/tox.ini index 414dac790..8279a687f 100644 --- a/tox.ini +++ b/tox.ini @@ -37,10 +37,10 @@ dns_plugin_commands = nosetests -v certbot_dns_digitalocean --processes=-1 pip install -e certbot-dns-google nosetests -v certbot_dns_google --processes=-1 - pip install -e certbot-route53 - nosetests -v certbot_route53 --processes=-1 --process-timeout=25 -dns_plugin_install_args = -e certbot-dns-cloudflare -e certbot-dns-digitalocean -e certbot-dns-google -e certbot-route53 -dns_plugin_paths = certbot-dns-cloudflare/certbot_dns_cloudflare certbot-dns-digitalocean/certbot_dns_digitalocean certbot-dns-google/certbot_dns_google certbot-route53/certbot_route53 + pip install -e certbot-dns-route53 + nosetests -v certbot_dns_route53 --processes=-1 --process-timeout=25 +dns_plugin_install_args = -e certbot-dns-cloudflare -e certbot-dns-digitalocean -e certbot-dns-google -e certbot-dns-route53 +dns_plugin_paths = certbot-dns-cloudflare/certbot_dns_cloudflare certbot-dns-digitalocean/certbot_dns_digitalocean certbot-dns-google/certbot_dns_google certbot-dns-route53/certbot_dns_route53 lexicon_dns_plugin_commands = pip install -e certbot-dns-cloudxns