mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 03:41:53 +02:00
route53: rename to match other DNS plugins (#4747)
This change renames certbot-route53 to certbot-dns-route53 and updates the package's setup.py file to maintain backwards compatibility. Testing Done: * Run `certbot` with `-a certbot-route53:auth`, verify the plugin runs. * Run `certbot` with `--dns-route53`, verify the plugin runs.
This commit is contained in:
committed by
Brad Warren
parent
7531c98916
commit
e749937465
@@ -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
|
||||
```
|
||||
@@ -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)
|
||||
+2
-2
@@ -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,
|
||||
+3
-3
@@ -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()
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Id": "certbot-route53 sample policy",
|
||||
"Id": "certbot-dns-route53 sample policy",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
@@ -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',
|
||||
)
|
||||
@@ -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
|
||||
|
||||
@@ -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."""
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user