From 6b50880c6e9e01c4f4b12579592155dfd94b4b96 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 4 Dec 2012 13:09:09 -0500 Subject: Raise NotImplementedError in dns_driver.DNSDriver. Updates dns_driver.DNSDriver so that we raise NotImplementedError instead of returning empty result sets or passing. Since this class is the default dns_driver for Nova it can be quite confusing when it returns empty results (which actually causes some HTTP 500 errors as well). We really need to switch the default floating/instance dns managers to MiniDNS as smoketests fail otherwise we currently use nova.network.dns_driver.DNSDriver which is not correct Fixes LP Bug #1040236 Fixes LP Bug #1027998 Change-Id: Id818bb00e0689d96db948872842c07d2cf1edd57 --- nova/config.py | 4 ++-- nova/network/dns_driver.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'nova') diff --git a/nova/config.py b/nova/config.py index 9ce068e58..b17520033 100644 --- a/nova/config.py +++ b/nova/config.py @@ -182,13 +182,13 @@ global_opts = [ default='nova.cert.manager.CertManager', help='full class name for the Manager for cert'), cfg.StrOpt('instance_dns_manager', - default='nova.network.dns_driver.DNSDriver', + default='nova.network.minidns.MiniDNS', help='full class name for the DNS Manager for instance IPs'), cfg.StrOpt('instance_dns_domain', default='', help='full class name for the DNS Zone for instance IPs'), cfg.StrOpt('floating_ip_dns_manager', - default='nova.network.dns_driver.DNSDriver', + default='nova.network.minidns.MiniDNS', help='full class name for the DNS Manager for floating IPs'), cfg.StrOpt('network_manager', default='nova.network.manager.VlanManager', diff --git a/nova/network/dns_driver.py b/nova/network/dns_driver.py index cd2001b64..09335b7cc 100644 --- a/nova/network/dns_driver.py +++ b/nova/network/dns_driver.py @@ -20,25 +20,25 @@ class DNSDriver(object): pass def get_domains(self): - return [] + raise NotImplementedError() def create_entry(self, _name, _address, _type, _domain): - pass + raise NotImplementedError() def delete_entry(self, _name, _domain): - pass + raise NotImplementedError() def modify_address(self, _name, _address, _domain): - pass + raise NotImplementedError() def get_entries_by_address(self, _address, _domain): - return [] + raise NotImplementedError() def get_entries_by_name(self, _name, _domain): - return [] + raise NotImplementedError() def create_domain(self, _fqdomain): - pass + raise NotImplementedError() def delete_domain(self, _fqdomain): - pass + raise NotImplementedError() -- cgit