summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelvakumar S <selvakumar.s2@hpe.com>2016-09-28 05:19:12 -0400
committerGraham Hayes <graham.hayes@hpe.com>2016-09-29 14:56:46 +0000
commit0c9ffbf17c20750d95d3d8b7e6f1602e64406c0c (patch)
treee15578832740a3c0d07e3aceb3f8c76487aa6a5d
parentb9446fc9d1723ac2c952fb384f0e7d49520c0210 (diff)
downloaddesignate-0c9ffbf17c20750d95d3d8b7e6f1602e64406c0c.tar.gz
Infoblox: Reverse lookup zone creation fails
Zone creation with reverse lookup fails with infoblox as backend server. currently it is handled for default zone_format i.e 'FORWARD' and it is not handled for 'IPV4' and 'IPV6'. This patch handles the IPV4 and IPV6 formats along with default one. Change-Id: Iad44842fc1e3e691268182514e14a6d0f60fdc1d Closes-Bug: #1628057 Reference: https://ipam.illinois.edu/wapidoc/objects/zone_forward.html#zone-format
-rw-r--r--designate/backend/impl_infoblox/object_manipulator.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/designate/backend/impl_infoblox/object_manipulator.py b/designate/backend/impl_infoblox/object_manipulator.py
index 8871e72d..9d696a67 100644
--- a/designate/backend/impl_infoblox/object_manipulator.py
+++ b/designate/backend/impl_infoblox/object_manipulator.py
@@ -111,11 +111,17 @@ class InfobloxObjectManipulator(object):
def create_zone_auth(self, fqdn, dns_view):
try:
+ if fqdn.endswith("in-addr.arpa"):
+ zone_format = 'IPV4'
+ elif fqdn.endswith("ip6.arpa"):
+ zone_format = 'IPV6'
+ else:
+ zone_format = 'FORWARD'
self._create_infoblox_object(
'zone_auth',
{'fqdn': fqdn, 'view': dns_view},
{'ns_group': self.connector.ns_group,
- 'restart_if_needed': True},
+ 'restart_if_needed': True, 'zone_format': zone_format},
check_if_exists=True)
except exc.InfobloxCannotCreateObject as e:
LOG.warning(e)