diff options
| author | Dan Prince <dprince@redhat.com> | 2012-12-10 15:58:39 -0500 |
|---|---|---|
| committer | Dan Prince <dprince@redhat.com> | 2012-12-10 15:58:39 -0500 |
| commit | c4cafdbc76295d72caa4119be707b5acd1d00796 (patch) | |
| tree | 03f48928ded04b1099359ae50c3150d7420473ee /nova | |
| parent | af28110cf69ed1e409e3e9b539ad74b48cb17a40 (diff) | |
Make DNS drivers inherit interface.
Updates the DNS driver implementations so they inherit
the interface. Should help catch things that aren't
implemented in the future.
Change-Id: Ic8b269c8525236c65b492c889d4530a09836bb13
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/network/ldapdns.py | 3 | ||||
| -rw-r--r-- | nova/network/minidns.py | 4 | ||||
| -rw-r--r-- | nova/network/noop_dns_driver.py | 5 |
3 files changed, 9 insertions, 3 deletions
diff --git a/nova/network/ldapdns.py b/nova/network/ldapdns.py index affa976f0..c5ae62899 100644 --- a/nova/network/ldapdns.py +++ b/nova/network/ldapdns.py @@ -16,6 +16,7 @@ import ldap import time from nova import exception +from nova.network import dns_driver from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import utils @@ -300,7 +301,7 @@ class HostEntry(DNSEntry): parent = property(_parent) -class LdapDNS(object): +class LdapDNS(dns_driver.DNSDriver): """Driver for PowerDNS using ldap as a back end. This driver assumes ldap-method=strict, with all domains diff --git a/nova/network/minidns.py b/nova/network/minidns.py index a008c5c36..435cca3b7 100644 --- a/nova/network/minidns.py +++ b/nova/network/minidns.py @@ -17,14 +17,16 @@ import shutil import tempfile from nova import exception +from nova.network import dns_driver from nova.openstack.common import cfg from nova.openstack.common import log as logging + CONF = cfg.CONF LOG = logging.getLogger(__name__) -class MiniDNS(object): +class MiniDNS(dns_driver.DNSDriver): """ Trivial DNS driver. This will read/write to a local, flat file and have no effect on your actual DNS system. This class is strictly for testing purposes, and should keep you out of dependency diff --git a/nova/network/noop_dns_driver.py b/nova/network/noop_dns_driver.py index 82ca0fb2f..23d1d1f3e 100644 --- a/nova/network/noop_dns_driver.py +++ b/nova/network/noop_dns_driver.py @@ -15,7 +15,10 @@ # under the License. -class NoopDNSDriver(object): +from nova.network import dns_driver + + +class NoopDNSDriver(dns_driver.DNSDriver): """ No-op DNS manager. Does nothing. """ def __init__(self): |
