Remove Akamai (eDNS SOAP API) backend

The Akamai eDNS SOAP API this backend uses no longer exists at Akamai.

Related-Bug: 1946340
Change-Id: I6545781f263c6a3d124364785aedcf2518116485
This commit is contained in:
Gunju Kim 2021-10-11 15:01:45 +09:00 committed by Michael Johnson
parent 897fc7925b
commit 771197c2f3
13 changed files with 14 additions and 718 deletions

View File

@ -1,259 +0,0 @@
# Copyright 2012-2015 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@hpe.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_log import log as logging
from oslo_config import cfg
from oslo_utils import importutils
from designate import exceptions
from designate import utils
from designate.backend import base
try:
SudsClient = importutils.import_class("suds.client.Client")
HttpAuthenticated = importutils.import_class(
"suds.transport.https.HttpAuthenticated")
except ImportError:
SudsClient = None
class HttpAuthenticated(object):
pass
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
class EnhancedDNSException(exceptions.Backend):
pass
class DelegationExists(exceptions.BadRequest, EnhancedDNSException):
"""
Raised when an attempt to delete a zone which is still delegated to Akamai
is made
"""
error_type = 'delegation_exists'
class DuplicateZone(exceptions.DuplicateZone, EnhancedDNSException):
"""
Raised when an attempt to create a zone which is registered to another
Akamai account is made
"""
pass
class Forbidden(exceptions.Forbidden, EnhancedDNSException):
"""
Raised when an attempt to modify a zone which is registered to another
Akamai account is made.
This appears to be returned when creating a new subzone of zone which
already exists in another Akamai account.
"""
pass
class EnhancedDNSHttpAuthenticated(HttpAuthenticated):
def addenhanceddnsheaders(self, request):
request.headers['Pragma'] = ('akamai-x-get-request-id, '
'akamai-x-cache-on, '
'akamai-x-cache-remote-on, '
'akamai-x-get-cache-key')
def logenhanceddnsheaders(self, response):
request_id = response.headers.get('x-akamai-request-id', '-')
cache = response.headers.get('x-cache', '-')
cache_key = response.headers.get('x-cache-key', '-')
cache_remote = response.headers.get('x-cache-remote', '-')
LOG.debug('Akamai Request-ID: %s, Cache-Key: %s, Cache: %s, '
'Cache-Remote: %s', request_id, cache_key, cache,
cache_remote)
def send(self, request):
self.addenhanceddnsheaders(request)
response = HttpAuthenticated.send(self, request)
self.logenhanceddnsheaders(response)
return response
class EnhancedDNSClient(object):
"""EnhancedDNS SOAP API Client"""
def __init__(self, username, password):
# Ensure Suds (or suds-jerko) have been installed
if SudsClient is None:
raise EnhancedDNSException(
"Dependency missing, please install suds or suds-jurko")
# Prepare a SUDS transport with the appropriate credentials
transport = EnhancedDNSHttpAuthenticated(
username=username,
password=password,
proxy=utils.get_proxies())
# Prepare a SUDS client
self.client = SudsClient(CONF['backend:akamai'].enhanceddns_wsdl,
transport=transport)
def buildZone(self, zoneName, masters, endCustomerId, tsigKeyName=None,
tsigKey=None, tsigAlgorithm=None):
zone = self.client.factory.create('ns3:Zone')
# Set some defaults
zone.transferMode = "axfr"
zone.type = "edns"
zone.notify = 1
zone.dnssec = False
# Set the remaining options
zone.zoneName = self._sanitizeZoneName(zoneName)
zone.masters = masters
zone.tsigKeyName = tsigKeyName
zone.tsigKey = tsigKey
zone.tsigAlgorithm = tsigAlgorithm
zone.endCustomerId = endCustomerId
return zone
def getZone(self, zoneName):
LOG.debug("Performing getZone with zoneName: %s", zoneName)
zoneName = self._sanitizeZoneName(zoneName)
try:
return self.client.service.getZone(zoneName=zoneName)
except Exception as e:
raise EnhancedDNSException('Akamai Communication Failure: %s', e)
def setZones(self, zones):
LOG.debug("Performing setZones")
try:
return self.client.service.setZones(zones=zones)
except Exception as e:
if 'You do not have permission to view this zone' in str(e):
raise DuplicateZone()
elif 'You do not have access to edit this zone' in str(e):
raise Forbidden()
elif 'basic auth failed' in str(e):
raise exceptions.ConfigurationError(
'Invalid Akamai credentials')
else:
raise EnhancedDNSException('Akamai Communication Failure: %s'
% e)
def setZone(self, zone):
LOG.debug("Performing setZone with zoneName: %s", zone.zoneName)
try:
self.client.service.setZone(zone=zone)
except Exception as e:
if 'You do not have permission to view this zone' in str(e):
raise DuplicateZone()
elif 'You do not have access to edit this zone' in str(e):
raise Forbidden()
elif 'basic auth failed' in str(e):
raise exceptions.ConfigurationError(
'Invalid Akamai credentials')
else:
raise EnhancedDNSException('Akamai Communication Failure: %s'
% e)
def deleteZone(self, zoneName):
LOG.debug("Performing deleteZone with zoneName: %s", zoneName)
zoneName = self._sanitizeZoneName(zoneName)
self.deleteZones(zoneNames=[zoneName])
def deleteZones(self, zoneNames):
LOG.debug("Performing deleteZones with zoneNames: %r", zoneNames)
zoneNames = [self._sanitizeZoneName(zN) for zN in zoneNames]
try:
self.client.service.deleteZones(zoneNames=zoneNames)
except Exception as e:
# *READ THIS SECTION BEFORE MAKING ANY CHANGES*
# Added 01/2017 by Graham Hayes.
# If you have run a spell checking tool against the repo, and it
# changes the line below - the patch will get -2'd.
# This is matching a string that comes back from the akamai API.
# If the akamai API changes - then this should change, but no
# other reason.
if 'Could not retrive object ID for zone' in str(e):
# The zone has already been purged, ignore and move on
pass
elif 'The following zones are still delegated to Akamai' in str(e):
raise DelegationExists()
elif 'basic auth failed' in str(e):
raise exceptions.ConfigurationError(
'Invalid Akamai credentials')
else:
raise EnhancedDNSException('Akamai Communication Failure: %s'
% e)
def _sanitizeZoneName(self, zoneName):
return zoneName.rstrip('.').lower()
def build_zone(client, target, zone):
masters = [m.host for m in target.masters]
if target.options.get("tsig_key_name", None):
return client.buildZone(
zone.name,
masters,
zone.id,
target.options.get("tsig_key_name", None),
target.options.get("tsig_key_secret", None),
target.options.get("tsig_key_algorithm", None))
else:
return client.buildZone(
zone.name,
masters,
zone.id)
class AkamaiBackend(base.Backend):
__plugin_name__ = 'akamai'
__backend_status__ = 'untested'
def __init__(self, target):
super(AkamaiBackend, self).__init__(target)
self.username = self.options.get('username')
self.password = self.options.get('password')
self.client = EnhancedDNSClient(self.username, self.password)
for m in self.masters:
if m.port != 53:
raise exceptions.ConfigurationError(
"Akamai only supports mDNS instances on port 53")
def create_zone(self, context, zone):
"""Create a DNS zone"""
zone = build_zone(self.client, self.target, zone)
self.client.setZone(zone=zone)
def delete_zone(self, context, zone):
"""Delete a DNS zone"""
self.client.deleteZone(zoneName=zone['name'])

View File

@ -14,7 +14,6 @@
from oslo_config import cfg
from designate.conf import base # noqa
from designate.conf import akamai
from designate.conf import agent
from designate.conf import api
from designate.conf import bind9
@ -41,7 +40,6 @@ from designate.conf import worker
CONF = cfg.CONF
base.register_opts(CONF)
akamai.register_opts(CONF)
agent.register_opts(CONF)
api.register_opts(CONF)
bind9.register_opts(CONF)

View File

@ -1,47 +0,0 @@
# Copyright 2012-2015 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@hpe.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import os
from oslo_config import cfg
WSDL_PATH = os.path.abspath(
os.path.join(
os.path.dirname(__file__), '..', 'resources', 'wsdl', 'EnhancedDNS.xml'
)
)
AKAMAI_GROUP = cfg.OptGroup(
name='backend:akamai',
title='Backend options for Akamai'
)
AKAMAI_OPTS = [
cfg.StrOpt('enhanceddns_wsdl',
default='file://%s' % WSDL_PATH,
sample_default=os.path.join('/path', 'to', 'EnhancedDNS.xml'),
help='Akamai EnhancedDNS WSDL URL'),
]
def register_opts(conf):
conf.register_group(AKAMAI_GROUP)
conf.register_opts(AKAMAI_OPTS, group=AKAMAI_GROUP)
def list_opts():
return {
AKAMAI_GROUP: AKAMAI_OPTS,
}

View File

@ -1,238 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:akaawsdt="https://control.akamai.com/AWS.xsd" xmlns:akaedns="https://control.akamai.com/2007/May/EnhancedDNS.xsd" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:zoneinfo="https://control.akamai.com/Edns.xsd" targetNamespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd">
<!--WSDL created by Apache Axis version: 1.3
Built on Jan 26, 2006 (05:12:02 PST)-->
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd">
<import namespace="https://control.akamai.com/AWS.xsd" />
<import namespace="https://control.akamai.com/Edns.xsd" />
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<complexType name="ArrayOfString">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]" />
</restriction>
</complexContent>
</complexType>
<complexType name="ArrayOfZone">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="zoneinfo:Zone[]" />
</restriction>
</complexContent>
</complexType>
</schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="https://control.akamai.com/Edns.xsd">
<import namespace="https://control.akamai.com/AWS.xsd" />
<import namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" />
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<complexType name="Zone">
<sequence>
<element name="currentDNSKEYRecord" nillable="true" type="xsd:string" />
<element name="currentDSRecord" nillable="true" type="xsd:string" />
<element name="currentKeyDate" nillable="true" type="xsd:dateTime" />
<element name="deletePending" type="xsd:boolean" />
<element name="deleteRequested" nillable="true" type="xsd:dateTime" />
<element name="dnssec" type="xsd:boolean" />
<element name="endCustomerId" nillable="true" type="xsd:string" />
<element name="lastAttempt" nillable="true" type="xsd:dateTime" />
<element name="lastModifiedDate" nillable="true" type="xsd:dateTime" />
<element name="lastStatus" nillable="true" type="xsd:string" />
<element name="lastSuccess" nillable="true" type="xsd:dateTime" />
<element name="masters" nillable="true" type="akaedns:ArrayOfString" />
<element name="newDNSKEYRecord" nillable="true" type="xsd:string" />
<element name="newDSRecord" nillable="true" type="xsd:string" />
<element name="newKeyDate" nillable="true" type="xsd:dateTime" />
<element name="notify" type="xsd:int" />
<element name="toplevels" nillable="true" type="akaedns:ArrayOfString" />
<element name="transferMode" nillable="true" type="xsd:string" />
<element name="tsigAlgorithm" nillable="true" type="xsd:string" />
<element name="tsigKey" nillable="true" type="xsd:string" />
<element name="tsigKeyName" nillable="true" type="xsd:string" />
<element name="type" nillable="true" type="xsd:string" />
<element name="zoneName" nillable="true" type="xsd:string" />
</sequence>
</complexType>
</schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="https://control.akamai.com/AWS.xsd">
<import namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" />
<import namespace="https://control.akamai.com/Edns.xsd" />
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<complexType name="AWSFault">
<sequence />
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="reassignTopLevelsResponse">
<wsdl:part name="reassignTopLevelsReturn" type="xsd:boolean" />
</wsdl:message>
<wsdl:message name="setZonesRequest">
<wsdl:part name="zones" type="akaedns:ArrayOfZone" />
</wsdl:message>
<wsdl:message name="getZoneResponse">
<wsdl:part name="getZoneReturn" type="zoneinfo:Zone" />
</wsdl:message>
<wsdl:message name="cancelDeleteZonesResponse">
<wsdl:part name="cancelDeleteZonesReturn" type="xsd:boolean" />
</wsdl:message>
<wsdl:message name="deleteZonesResponse">
<wsdl:part name="deleteZonesReturn" type="xsd:boolean" />
</wsdl:message>
<wsdl:message name="getZonesRequest" />
<wsdl:message name="AWSFault">
<wsdl:part name="fault" type="akaawsdt:AWSFault" />
</wsdl:message>
<wsdl:message name="setZoneResponse">
<wsdl:part name="setZoneReturn" type="xsd:boolean" />
</wsdl:message>
<wsdl:message name="reassignTopLevelsRequest">
<wsdl:part name="zones" type="akaedns:ArrayOfZone" />
</wsdl:message>
<wsdl:message name="getZoneRequest">
<wsdl:part name="zoneName" type="xsd:string" />
</wsdl:message>
<wsdl:message name="setZonesResponse">
<wsdl:part name="setZonesReturn" type="xsd:boolean" />
</wsdl:message>
<wsdl:message name="cancelDeleteZonesRequest">
<wsdl:part name="zoneNames" type="akaedns:ArrayOfString" />
</wsdl:message>
<wsdl:message name="deleteZonesRequest">
<wsdl:part name="zoneNames" type="akaedns:ArrayOfString" />
</wsdl:message>
<wsdl:message name="getZonesResponse">
<wsdl:part name="getZonesReturn" type="akaedns:ArrayOfZone" />
</wsdl:message>
<wsdl:message name="setZoneRequest">
<wsdl:part name="zone" type="zoneinfo:Zone" />
</wsdl:message>
<wsdl:portType name="EDNSService">
<wsdl:operation name="getZone" parameterOrder="zoneName">
<wsdl:input message="akaedns:getZoneRequest" name="getZoneRequest" />
<wsdl:output message="akaedns:getZoneResponse" name="getZoneResponse" />
<wsdl:fault message="akaedns:AWSFault" name="AWSFault" />
</wsdl:operation>
<wsdl:operation name="setZone" parameterOrder="zone">
<wsdl:input message="akaedns:setZoneRequest" name="setZoneRequest" />
<wsdl:output message="akaedns:setZoneResponse" name="setZoneResponse" />
<wsdl:fault message="akaedns:AWSFault" name="AWSFault" />
</wsdl:operation>
<wsdl:operation name="getZones">
<wsdl:input message="akaedns:getZonesRequest" name="getZonesRequest" />
<wsdl:output message="akaedns:getZonesResponse" name="getZonesResponse" />
<wsdl:fault message="akaedns:AWSFault" name="AWSFault" />
</wsdl:operation>
<wsdl:operation name="setZones" parameterOrder="zones">
<wsdl:input message="akaedns:setZonesRequest" name="setZonesRequest" />
<wsdl:output message="akaedns:setZonesResponse" name="setZonesResponse" />
<wsdl:fault message="akaedns:AWSFault" name="AWSFault" />
</wsdl:operation>
<wsdl:operation name="reassignTopLevels" parameterOrder="zones">
<wsdl:input message="akaedns:reassignTopLevelsRequest" name="reassignTopLevelsRequest" />
<wsdl:output message="akaedns:reassignTopLevelsResponse" name="reassignTopLevelsResponse" />
<wsdl:fault message="akaedns:AWSFault" name="AWSFault" />
</wsdl:operation>
<wsdl:operation name="deleteZones" parameterOrder="zoneNames">
<wsdl:input message="akaedns:deleteZonesRequest" name="deleteZonesRequest" />
<wsdl:output message="akaedns:deleteZonesResponse" name="deleteZonesResponse" />
<wsdl:fault message="akaedns:AWSFault" name="AWSFault" />
</wsdl:operation>
<wsdl:operation name="cancelDeleteZones" parameterOrder="zoneNames">
<wsdl:input message="akaedns:cancelDeleteZonesRequest" name="cancelDeleteZonesRequest" />
<wsdl:output message="akaedns:cancelDeleteZonesResponse" name="cancelDeleteZonesResponse" />
<wsdl:fault message="akaedns:AWSFault" name="AWSFault" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="EnhancedDNS" type="akaedns:EDNSService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getZone">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="getZoneRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:input>
<wsdl:output name="getZoneResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:output>
<wsdl:fault name="AWSFault">
<wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AWSFault" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="setZone">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="setZoneRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:input>
<wsdl:output name="setZoneResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:output>
<wsdl:fault name="AWSFault">
<wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AWSFault" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getZones">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="getZonesRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:input>
<wsdl:output name="getZonesResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:output>
<wsdl:fault name="AWSFault">
<wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AWSFault" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="setZones">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="setZonesRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:input>
<wsdl:output name="setZonesResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:output>
<wsdl:fault name="AWSFault">
<wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AWSFault" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="reassignTopLevels">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="reassignTopLevelsRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:input>
<wsdl:output name="reassignTopLevelsResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:output>
<wsdl:fault name="AWSFault">
<wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AWSFault" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="deleteZones">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="deleteZonesRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:input>
<wsdl:output name="deleteZonesResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:output>
<wsdl:fault name="AWSFault">
<wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AWSFault" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="cancelDeleteZones">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="cancelDeleteZonesRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:input>
<wsdl:output name="cancelDeleteZonesResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:output>
<wsdl:fault name="AWSFault">
<wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AWSFault" namespace="https://control.akamai.com/2007/May/EnhancedDNS.xsd" use="encoded" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="EnhancedDNS">
<wsdl:port binding="akaedns:EnhancedDNS" name="EnhancedDNS">
<wsdlsoap:address location="https://control.akamai.com/webservices/services/EnhancedDNS" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

View File

@ -1,150 +0,0 @@
# Configure the Akamai backend
# Requirements:
# An active Akamai account / contract will be requied to use this DevStack
# plugin.
# Enable with:
# DESIGNATE_BACKEND_DRIVER=akamai
# Dependencies:
# ``functions`` file
# ``designate`` configuration
# install_designate_backend - install any external requirements
# configure_designate_backend - make configuration changes, including those to other services
# init_designate_backend - initialize databases, etc.
# start_designate_backend - start any external services
# stop_designate_backend - stop any external services
# cleanup_designate_backend - remove transient data and cache
# Save trace setting
DP_AKAMAI_XTRACE=$(set +o | grep xtrace)
set +o xtrace
# Defaults
# --------
DESIGNATE_AKAMAI_USERNAME=${DESIGNATE_AKAMAI_USERNAME:-username}
DESIGNATE_AKAMAI_PASSWORD=${DESIGNATE_AKAMAI_PASSWORD:-password}
DESIGNATE_AKAMAI_MASTERS=${DESIGNATE_AKAMAI_MASTERS:-"$DESIGNATE_SERVICE_HOST:$DESIGNATE_SERVICE_PORT_MDNS"}
DESIGNATE_AKAMAI_NAMESERVERS=${DESIGNATE_AKAMAI_NAMESERVERS:-""}
DESIGNATE_AKAMAI_ALSO_NOTIFIES=${DESIGNATE_AKAMAI_ALSO_NOTIFIES:-"193.108.155.34,23.73.134.141,80.67.64.148,23.73.134.237,23.73.133.141,23.73.133.237,80.67.64.10,72.246.0.10,72.247.45.157,72.246.192.168,193.108.152.143,60.254.128.45,72.247.45.110,72.247.45.65,72.247.45.25"}
# Pull in DESIGNATE_3RDPARTY_CREDS user/pass if set
if [ -n "$DESIGNATE_3RDPARTY_CREDS" ]; then
DESIGNATE_AKAMAI_USERNAME=`echo $DESIGNATE_3RDPARTY_CREDS | cut -f1 -d:`
DESIGNATE_AKAMAI_PASSWORD=`echo $DESIGNATE_3RDPARTY_CREDS | cut -f2- -d:`
fi
# Sanity Checks
# -------------
if [ -z "$DESIGNATE_AKAMAI_NAMESERVERS" ]; then
die $LINENO "You must configure DESIGNATE_AKAMAI_NAMESERVERS"
fi
if [ "$DESIGNATE_SERVICE_PORT_MDNS" != "53" ]; then
die $LINENO "Akamai requires DESIGNATE_SERVICE_PORT_MDNS is set to '53'"
fi
# Entry Points
# ------------
# install_designate_backend - install any external requirements
function install_designate_backend {
:
}
# configure_designate_backend - make configuration changes, including those to other services
function configure_designate_backend {
# Generate Designate pool.yaml file
sudo tee $DESIGNATE_CONF_DIR/pools.yaml > /dev/null <<EOF
---
- name: default
description: DevStack Akamai Pool
attributes: {}
targets:
- type: akamai
description: Akamai API
options:
username: $DESIGNATE_AKAMAI_USERNAME
password: $DESIGNATE_AKAMAI_PASSWORD
masters:
EOF
# Create a Pool Master for each of the Akamai Masters
IFS=',' read -a masters <<< "$DESIGNATE_AKAMAI_MASTERS"
for master in "${masters[@]}"; do
sudo tee -a $DESIGNATE_CONF_DIR/pools.yaml > /dev/null <<EOF
- host: $master
port: 53
EOF
done
# Create a Pool NS Record for each of the Akamai Nameservers
IFS=',' read -a nameservers <<< "$DESIGNATE_AKAMAI_NAMESERVERS"
sudo tee -a $DESIGNATE_CONF_DIR/pools.yaml > /dev/null <<EOF
ns_records:
EOF
for nameserver in "${nameservers[@]}"; do
sudo tee -a $DESIGNATE_CONF_DIR/pools.yaml > /dev/null <<EOF
- hostname: $nameserver
priority: 1
EOF
done
# Create a Pool Nameserver for each of the Akamai Nameservers
sudo tee -a $DESIGNATE_CONF_DIR/pools.yaml > /dev/null <<EOF
nameservers:
EOF
for nameserver in "${nameservers[@]}"; do
sudo tee -a $DESIGNATE_CONF_DIR/pools.yaml > /dev/null <<EOF
- host: `dig +short A $nameserver | head -n 1`
port: 53
EOF
done
# Create a Pool Also Notifies for each of the Akamai Also Notifies
IFS=',' read -a also_notifies <<< "$DESIGNATE_AKAMAI_ALSO_NOTIFIES"
sudo tee -a $DESIGNATE_CONF_DIR/pools.yaml > /dev/null <<EOF
also_notifies:
EOF
for also_notify in "${also_notifies[@]}"; do
sudo tee -a $DESIGNATE_CONF_DIR/pools.yaml > /dev/null <<EOF
- host: $also_notify
port: 53
EOF
done
}
# init_designate_backend - initialize databases, etc.
function init_designate_backend {
:
}
# start_designate_backend - start any external services
function start_designate_backend {
:
}
# stop_designate_backend - stop any external services
function stop_designate_backend {
:
}
# cleanup_designate_backend - remove transient data and cache
function cleanup_designate_backend {
:
}
# Restore xtrace
$DP_AKAMAI_XTRACE

View File

@ -47,11 +47,6 @@ source $SCRIPT_DIR/settings
# Used with dig to look up in DNS
DIG_TIMEOUT=30
if [ "$DESIGNATE_BACKEND_DRIVER" == "akamai" ]; then
# Akamai can be slow to propagate changes out
DIG_TIMEOUT=300
fi
# used with dig to look up in DNS
DIG_FLAGS="-p $DESIGNATE_SERVICE_PORT_DNS @$DESIGNATE_SERVICE_HOST"

View File

@ -180,9 +180,6 @@ function configure_designate_tempest() {
bind9)
nameservers="$DESIGNATE_SERVICE_HOST:$DESIGNATE_SERVICE_PORT_DNS"
;;
akamai)
nameservers="$DESIGNATE_AKAMAI_NAMESERVERS"
;;
dynect)
nameservers="$DESIGNATE_DYNECT_NAMESERVERS"
;;

View File

@ -75,7 +75,8 @@ status=untested
status=untested
[backends.backend-impl-akamai]
status=known-broken
status=end-of-life
in-tree=False
notes=Akamai has turned off the eDNS API - see https://community.akamai.com/customers/s/article/Big-Changes-Coming-to-Fast-DNS-in-2018
[backends.backend-impl-akamai_v2]
@ -117,7 +118,7 @@ type=agent
status=untested
[grades]
valid-grades=integrated,master-compatible,release-compatible,untested,failing,known-broken,experimental,deprecated
valid-grades=integrated,master-compatible,release-compatible,untested,failing,known-broken,experimental,deprecated,end-of-life
[grades.integrated]
title=Integrated
@ -166,3 +167,9 @@ title=Deprecated
notes=Backends have been superseded, and will be removed in the future
in-tree=optional
css-class=warning
[grades.end-of-life]
title=End of Life
notes=A backend that has reached it's end of life and has been removed from the code.
in-tree=optional
css-class=danger

View File

@ -12,15 +12,6 @@ Backend Base
:undoc-members:
:show-inheritance:
Backend Akamai
==============
.. automodule:: designate.backend.impl_akamai
:members:
:undoc-members:
:show-inheritance:
Backend Bind9
=============

View File

@ -132,7 +132,6 @@ sqlparse==0.2.4
statsd==3.2.2
stestr==2.0.0
stevedore==1.20.0
suds-jurko==0.6
tempest==21.0.0
Tempita==0.5.2
tenacity==6.0.0

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The Akamai eDNS backend has reached it's end of life and has been removed.
Please upgrade to the Akamai v2 backend.

View File

@ -33,7 +33,6 @@ tenacity>=6.0.0 # Apache-2.0
SQLAlchemy>=1.2.19 # MIT
sqlalchemy-migrate>=0.11.0 # Apache-2.0
stevedore>=1.20.0 # Apache-2.0
suds-jurko>=0.6 # LGPLv3+
WebOb>=1.7.1 # MIT
dnspython>=1.16.0 # http://www.dnspython.org/LICENSE
oslo.db>=8.3.0 # Apache-2.0

View File

@ -74,7 +74,6 @@ designate.backend =
designate = designate.backend.impl_designate:DesignateBackend
pdns4 = designate.backend.impl_pdns4:PDNS4Backend
dynect = designate.backend.impl_dynect:DynECTBackend
akamai = designate.backend.impl_akamai:AkamaiBackend
akamai_v2 = designate.backend.impl_akamai_v2:AkamaiBackend
nsd4 = designate.backend.impl_nsd4:NSD4Backend
infoblox = designate.backend.impl_infoblox:InfobloxBackend