integrated PowerDNS plugin into dns_providers
This commit is contained in:
parent
bddae6e428
commit
c465062673
|
@ -99,6 +99,7 @@ def get_types():
|
||||||
},
|
},
|
||||||
{"name": "dyn"},
|
{"name": "dyn"},
|
||||||
{"name": "ultradns"},
|
{"name": "ultradns"},
|
||||||
|
{"name": "powerdns"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
@ -377,7 +377,7 @@ class AcmeHandler(object):
|
||||||
"dyn": dyn,
|
"dyn": dyn,
|
||||||
"route53": route53,
|
"route53": route53,
|
||||||
"ultradns": ultradns,
|
"ultradns": ultradns,
|
||||||
# "powerdns": powerdns,
|
"powerdns": powerdns
|
||||||
}
|
}
|
||||||
provider = provider_types.get(type)
|
provider = provider_types.get(type)
|
||||||
if not provider:
|
if not provider:
|
||||||
|
@ -437,7 +437,7 @@ class ACMEIssuerPlugin(IssuerPlugin):
|
||||||
"dyn": dyn,
|
"dyn": dyn,
|
||||||
"route53": route53,
|
"route53": route53,
|
||||||
"ultradns": ultradns,
|
"ultradns": ultradns,
|
||||||
# "powerdns": powerdns,
|
"powerdns": powerdns
|
||||||
}
|
}
|
||||||
provider = provider_types.get(type)
|
provider = provider_types.get(type)
|
||||||
if not provider:
|
if not provider:
|
||||||
|
|
|
@ -74,8 +74,8 @@ def create_txt_record(domain, token, account_number):
|
||||||
""" Create a TXT record for the given domain and token and return a change_id tuple """
|
""" Create a TXT record for the given domain and token and return a change_id tuple """
|
||||||
zone_name = _get_zone_name(domain, account_number)
|
zone_name = _get_zone_name(domain, account_number)
|
||||||
server_id = current_app.config.get("ACME_POWERDNS_SERVERID", "")
|
server_id = current_app.config.get("ACME_POWERDNS_SERVERID", "")
|
||||||
zone_id = zone_name.join(".")
|
zone_id = zone_name + "."
|
||||||
domain_id = domain.join(".")
|
domain_id = domain + "."
|
||||||
path = f"/api/v1/servers/{server_id}/zones/{zone_id}"
|
path = f"/api/v1/servers/{server_id}/zones/{zone_id}"
|
||||||
payload = {
|
payload = {
|
||||||
"rrsets": [
|
"rrsets": [
|
||||||
|
@ -170,8 +170,8 @@ def delete_txt_record(change_id, account_number, domain, token):
|
||||||
""" Delete the TXT record for the given domain and token """
|
""" Delete the TXT record for the given domain and token """
|
||||||
zone_name = _get_zone_name(domain, account_number)
|
zone_name = _get_zone_name(domain, account_number)
|
||||||
server_id = current_app.config.get("ACME_POWERDNS_SERVERID", "")
|
server_id = current_app.config.get("ACME_POWERDNS_SERVERID", "")
|
||||||
zone_id = zone_name.join(".")
|
zone_id = zone_name + "."
|
||||||
domain_id = domain.join(".")
|
domain_id = domain + "."
|
||||||
path = f"/api/v1/servers/{server_id}/zones/{zone_id}"
|
path = f"/api/v1/servers/{server_id}/zones/{zone_id}"
|
||||||
payload = {
|
payload = {
|
||||||
"rrsets": [
|
"rrsets": [
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
import unittest
|
import unittest
|
||||||
from requests.models import Response
|
from mock import Mock, patch
|
||||||
|
|
||||||
from mock import MagicMock, Mock, patch
|
|
||||||
|
|
||||||
from lemur.plugins.lemur_acme import plugin, powerdns
|
from lemur.plugins.lemur_acme import plugin, powerdns
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue