Skip to content

Commit

Permalink
renamings
Browse files Browse the repository at this point in the history
  • Loading branch information
helgeerbe committed Dec 18, 2020
1 parent ff5aec2 commit f6bc5bc
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 31 deletions.
186 changes: 186 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig

# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,python

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
pytestdebug.log

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
doc/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
pythonenv*

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# profiling data
.prof

### VisualStudioCode ###
.vscode/*
!.vscode/tasks.json
!.vscode/launch.json
*.code-workspace

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)

36 changes: 18 additions & 18 deletions certbot_dns_ispconfig/__init__.py → certbot_dns_ionos/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"""
The `~certbot_dns_ispconfig.dns_ispconfig` plugin automates the process of
The `~certbot_dns_ionos.dns_ionos` plugin automates the process of
completing a ``dns-01`` challenge (`~acme.challenges.DNS01`) by creating, and
subsequently removing, TXT records using the ISPConfig REST API.
subsequently removing, TXT records using the ionos REST API.
Named Arguments
---------------
======================================== =====================================
``--dns-ispconfig-credentials`` ISPConfig Remote API credentials_
``--dns-ionos-credentials`` ionos Remote API credentials_
INI file. (Required)
``--dns-ispconfig-propagation-seconds`` The number of seconds to wait for DNS
``--dns-ionos-propagation-seconds`` The number of seconds to wait for DNS
to propagate before asking the ACME
server to verify the DNS record.
(Default: 120)
Expand All @@ -20,21 +20,21 @@
Credentials
-----------
Use of this plugin requires a configuration file containing ISPConfig Remote API
credentials, obtained from your DNSimple
Use of this plugin requires a configuration file containing ionos Remote API
credentials, obtained from your DNS provider
`System > Remote Users`.
.. code-block:: ini
:name: credentials.ini
:caption: Example credentials file:
# ISPCONFIG API credentials used by Certbot
dns_ispconfig_username = myispremoteuser
dns_ispconfig_password = mysecretpassword
dns_ispconfig_endpoint = https://localhost:8080
# ionos API credentials used by Certbot
dns_ionos_username = myispremoteuser
dns_ionos_password = mysecretpassword
dns_ionos_endpoint = https://localhost:8080
The path to this file can be provided interactively or using the
``--dns-ispconfig-credentials`` command-line argument. Certbot records the path
``--dns-ionos-credentials`` command-line argument. Certbot records the path
to this file for use during renewal, but does not store the file's contents.
.. caution::
Expand All @@ -59,17 +59,17 @@
:caption: To acquire a certificate for ``example.com``
certbot certonly \\
--dns-ispconfig \\
--dns-ispconfig-credentials ~/.secrets/certbot/ispconfig.ini \\
--dns-ionos \\
--dns-ionos-credentials ~/.secrets/certbot/ionos.ini \\
-d example.com
.. code-block:: bash
:caption: To acquire a single certificate for both ``example.com`` and
``www.example.com``
certbot certonly \\
--dns-ispconfig \\
--dns-ispconfig-credentials ~/.secrets/certbot/ispconfig.ini \\
--dns-ionos \\
--dns-ionos-credentials ~/.secrets/certbot/ionos.ini \\
-d example.com \\
-d www.example.com
Expand All @@ -78,9 +78,9 @@
for DNS propagation
certbot certonly \\
--dns-ispconfig \\
--dns-ispconfig-credentials ~/.secrets/certbot/ispconfig.ini \\
--dns-ispconfig-propagation-seconds 240 \\
--dns-ionos \\
--dns-ionos-credentials ~/.secrets/certbot/ionos.ini \\
--dns-ionos-propagation-seconds 240 \\
-d example.com
"""
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from certbot.plugins.dns_test_common import DOMAIN
from certbot.tests import util as test_util

FAKE_USER = "remoteuser"
FAKE_PW = "password"
FAKE_PREFIX = "prefix"
FAKE_SECRET = "secret"
FAKE_ENDPOINT = "mock://endpoint"


Expand All @@ -29,8 +29,8 @@ def setUp(self):
path = os.path.join(self.tempdir, "file.ini")
dns_test_common.write(
{
"ispconfig_username": FAKE_USER,
"ispconfig_password": FAKE_PW,
"ispconfig_prefix": FAKE_PREFIX,
"ispconfig_secret": FAKE_SECRET,
"ispconfig_endpoint": FAKE_ENDPOINT,
},
path,
Expand Down Expand Up @@ -80,7 +80,7 @@ def setUp(self):

self.adapter = requests_mock.Adapter()

self.client = _ISPConfigClient(FAKE_ENDPOINT, FAKE_USER, FAKE_PW)
self.client = _ISPConfigClient(FAKE_ENDPOINT, FAKE_PREFIX, FAKE_SECRET)
self.client.session.mount("mock", self.adapter)

def _register_response(
Expand All @@ -98,8 +98,8 @@ def add_matcher(request):

return (
(
("username" in data and data["username"] == FAKE_USER)
and ("username" in data and data["password"] == FAKE_PW)
("prefix" in data and data["prefix"] == FAKE_PREFIX)
and ("prefix" in data and data["secret"] == FAKE_SECRET)
)
or data["session_id"] == "FAKE_SESSION"
) and add_result
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup
from setuptools import find_packages

version = "0.2.0"
version = "0.0.1"

install_requires = [
"acme>=0.29.0",
Expand All @@ -20,14 +20,14 @@
long_description = f.read()

setup(
name="certbot-dns-ispconfig",
name="certbot-dns-ionos",
version=version,
description="ispconfig DNS Authenticator plugin for Certbot",
description="IONOS DNS Authenticator plugin for Certbot",
long_description=long_description,
long_description_content_type="text/x-rst",
url="https://github.com/m42e/certbot-dns-ispconfig",
author="Matthias Bilger",
author_email="matthias@bilger.info",
url="https://github.com/helgeerbe/certbot-dns-ionos",
author="Helge Erbe",
author_email="helge@erbehome.de",
license="Apache License 2.0",
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
classifiers=[
Expand Down

0 comments on commit f6bc5bc

Please sign in to comment.