mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 03:02:15 +02:00
Make the contents of the DNS plugins private (#7580)
Part of #5775. ``` modify_item () { mkdir certbot-dns-$1/certbot_dns_$1/_internal git grep -l "from certbot_dns_$1 import dns_$1" | xargs sed -i "s/from certbot_dns_$1 import dns_$1/from certbot_dns_$1._internal import dns_$1/g" git grep -l "certbot_dns_$1\.dns_$1" | xargs sed -i "s/certbot_dns_$1\.dns_$1/certbot_dns_$1._internal.dns_$1/g" git checkout -- certbot-dns-$1/certbot_dns_$1/__init__.py echo '"""Internal implementation of \`~certbot_dns_$1.dns_$1\` plugin."""' > certbot-dns-$1/certbot_dns_$1/_internal/__init__.py mv certbot-dns-$1/certbot_dns_$1/dns_$1.py certbot-dns-$1/certbot_dns_$1/_internal git checkout -- CHANGELOG.md git status git add -A git commit -m "Move certbot-dns-$1 to _internal structure" } ``` Structure now looks like this: ``` certbot-dns-cloudflare/ ├── certbot_dns_cloudflare │ ├── dns_cloudflare_test.py │ ├── __init__.py │ └── _internal │ ├── dns_cloudflare.py │ └── __init__.py ``` * Move certbot-dns-cloudflare to _internal structure * Move certbot-dns-cloudxns to _internal structure * Move certbot-dns-digitalocean to _internal structure * Move certbot-dns-dnsimple to _internal structure * Move certbot-dns-dnsmadeeasy to _internal structure * Move certbot-dns-gehirn to _internal structure * Move certbot-dns-google to _internal structure * Move certbot-dns-linode to _internal structure * Move certbot-dns-luadns to _internal structure * Move certbot-dns-nsone to _internal structure * Move certbot-dns-ovh to _internal structure * Move certbot-dns-rfc2136 to _internal structure * Move certbot-dns-sakuracloud to _internal structure * Init file comments need to be comments * Move certbot-dns-route53 to _internal structure * Fix comment in route53 init
This commit is contained in:
@@ -0,0 +1 @@
|
||||
"""Internal implementation of `~certbot_dns_nsone.dns_nsone` plugin."""
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Tests for certbot_dns_nsone.dns_nsone."""
|
||||
"""Tests for certbot_dns_nsone._internal.dns_nsone."""
|
||||
|
||||
import unittest
|
||||
|
||||
@@ -20,7 +20,7 @@ class AuthenticatorTest(test_util.TempDirTestCase,
|
||||
def setUp(self):
|
||||
super(AuthenticatorTest, self).setUp()
|
||||
|
||||
from certbot_dns_nsone.dns_nsone import Authenticator
|
||||
from certbot_dns_nsone._internal.dns_nsone import Authenticator
|
||||
|
||||
path = os.path.join(self.tempdir, 'file.ini')
|
||||
dns_test_common.write({"nsone_api_key": API_KEY}, path)
|
||||
@@ -40,7 +40,7 @@ class NS1LexiconClientTest(unittest.TestCase, dns_test_common_lexicon.BaseLexico
|
||||
LOGIN_ERROR = HTTPError('401 Client Error: Unauthorized for url: {0}.'.format(DOMAIN))
|
||||
|
||||
def setUp(self):
|
||||
from certbot_dns_nsone.dns_nsone import _NS1LexiconClient
|
||||
from certbot_dns_nsone._internal.dns_nsone import _NS1LexiconClient
|
||||
|
||||
self.client = _NS1LexiconClient(API_KEY, 0)
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ setup(
|
||||
},
|
||||
entry_points={
|
||||
'certbot.plugins': [
|
||||
'dns-nsone = certbot_dns_nsone.dns_nsone:Authenticator',
|
||||
'dns-nsone = certbot_dns_nsone._internal.dns_nsone:Authenticator',
|
||||
],
|
||||
},
|
||||
test_suite='certbot_dns_nsone',
|
||||
|
||||
Reference in New Issue
Block a user