From af28110cf69ed1e409e3e9b539ad74b48cb17a40 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Mon, 10 Dec 2012 14:24:09 -0500 Subject: Set default DNS driver to No-op. In 522ac62 we set the default network DNS driver to MiniDNS which was primarily meant for testing only. This patch adds a NoopDNSDriver and updates the Nova default to use it. Fixes LP Bug #1088603. Change-Id: Id3bdf86e0ea16fc6d4490436afbabc7a95cf820b --- nova/config.py | 4 ++-- nova/network/noop_dns_driver.py | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 nova/network/noop_dns_driver.py (limited to 'nova') diff --git a/nova/config.py b/nova/config.py index b17520033..86eb5bf62 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.minidns.MiniDNS', + default='nova.network.noop_dns_driver.NoopDNSDriver', 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.minidns.MiniDNS', + default='nova.network.noop_dns_driver.NoopDNSDriver', 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/noop_dns_driver.py b/nova/network/noop_dns_driver.py new file mode 100644 index 000000000..82ca0fb2f --- /dev/null +++ b/nova/network/noop_dns_driver.py @@ -0,0 +1,46 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2012 Red Hat, Inc. +# +# 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. + + +class NoopDNSDriver(object): + """ No-op DNS manager. Does nothing. """ + + def __init__(self): + pass + + def get_domains(self): + return [] + + def create_entry(self, _name, _address, _type, _domain): + pass + + def delete_entry(self, _name, _domain): + pass + + def modify_address(self, _name, _address, _domain): + pass + + def get_entries_by_address(self, _address, _domain): + return [] + + def get_entries_by_name(self, _name, _domain): + return [] + + def create_domain(self, _fqdomain): + pass + + def delete_domain(self, _fqdomain): + pass -- cgit