mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
dns-route53: deprecate --dns-route53-propagation-seconds (#9619)
This commit is contained in:
@@ -8,17 +8,6 @@ subsequently removing, TXT records using the Amazon Web Services Route 53 API.
|
||||
`certbot.eff.org <https://certbot.eff.org/instructions#wildcard>`_, choosing your system and
|
||||
selecting the Wildcard tab.
|
||||
|
||||
Named Arguments
|
||||
---------------
|
||||
|
||||
======================================== =====================================
|
||||
``--dns-route53-propagation-seconds`` The number of seconds to wait for DNS
|
||||
to propagate before asking the ACME
|
||||
server to verify the DNS record.
|
||||
(Default: 10)
|
||||
======================================== =====================================
|
||||
|
||||
|
||||
Credentials
|
||||
-----------
|
||||
Use of this plugin requires a configuration file containing Amazon Web Sevices
|
||||
|
||||
@@ -3,6 +3,7 @@ import collections
|
||||
import logging
|
||||
import time
|
||||
from typing import Any
|
||||
from typing import Callable
|
||||
from typing import DefaultDict
|
||||
from typing import Dict
|
||||
from typing import List
|
||||
@@ -12,9 +13,11 @@ from botocore.exceptions import ClientError
|
||||
from botocore.exceptions import NoCredentialsError
|
||||
|
||||
from acme.challenges import ChallengeResponse
|
||||
from certbot import achallenges
|
||||
from certbot import errors
|
||||
from certbot.achallenges import AnnotatedChallenge
|
||||
from certbot.plugins import dns_common
|
||||
from certbot.util import add_deprecated_argument
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -44,6 +47,17 @@ class Authenticator(dns_common.DNSAuthenticator):
|
||||
def more_info(self) -> str:
|
||||
return "Solve a DNS01 challenge using AWS Route53"
|
||||
|
||||
@classmethod
|
||||
def add_parser_arguments(cls, add: Callable[..., None], # pylint: disable=arguments-differ
|
||||
default_propagation_seconds: int = 10) -> None:
|
||||
add_deprecated_argument(add, 'propagation-seconds', 1)
|
||||
|
||||
def auth_hint(self, failed_achalls: List[achallenges.AnnotatedChallenge]) -> str:
|
||||
return (
|
||||
'The Certificate Authority failed to verify the DNS TXT records created by '
|
||||
'--dns-route53. Ensure the above domains have their DNS hosted by AWS Route53.'
|
||||
)
|
||||
|
||||
def _setup_credentials(self) -> None:
|
||||
pass
|
||||
|
||||
|
||||
@@ -85,6 +85,13 @@ class AuthenticatorTest(unittest.TestCase, dns_test_common.BaseAuthenticatorTest
|
||||
|
||||
self.auth.cleanup([self.achall])
|
||||
|
||||
def test_parser_arguments(self) -> None:
|
||||
from certbot.util import DeprecatedArgumentAction
|
||||
m = mock.MagicMock()
|
||||
self.auth.add_parser_arguments(m) # pylint: disable=no-member
|
||||
m.assert_any_call('propagation-seconds', action=DeprecatedArgumentAction,
|
||||
help=mock.ANY, nargs=1)
|
||||
|
||||
|
||||
class ClientTest(unittest.TestCase):
|
||||
# pylint: disable=protected-access
|
||||
|
||||
Reference in New Issue
Block a user