Move dnsclient into ipa-python so that I will be able to use it in ipaconfig

This commit is contained in:
Simo Sorce 2007-12-10 16:31:21 -05:00
parent f169641aae
commit c0b809efd5
5 changed files with 9 additions and 10 deletions

View File

@ -3,7 +3,6 @@ NULL =
appdir = $(IPA_DATA_DIR)/ipaclient
app_PYTHON = \
__init__.py \
dnsclient.py \
ipachangeconf.py \
ipadiscovery.py \
ntpconf.py \

View File

@ -18,5 +18,5 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
__all__ = ["ipadiscovery", "ipachangeconf", "dnsclient"]
__all__ = ["ipadiscovery", "ipachangeconf"]

View File

@ -20,7 +20,7 @@
import socket
import logging
import dnsclient
import ipa.dnsclient
import ldap
from ldap import LDAPError
@ -191,10 +191,10 @@ class IPADiscovery:
# terminate the name
if not qname.endswith("."):
qname += "."
results = dnsclient.query(qname, dnsclient.DNS_C_IN, dnsclient.DNS_T_SRV)
results = ipa.dnsclient.query(qname, ipa.dnsclient.DNS_C_IN, ipa.dnsclient.DNS_T_SRV)
for result in results:
if result.dns_type == dnsclient.DNS_T_SRV:
if result.dns_type == ipa.dnsclient.DNS_T_SRV:
rserver = result.rdata.server.rstrip(".")
if result.rdata.port and result.rdata.port != 389:
rserver += ":" + str(result.rdata.port)
@ -214,10 +214,10 @@ class IPADiscovery:
# terminate the name
if not qname.endswith("."):
qname += "."
results = dnsclient.query(qname, dnsclient.DNS_C_IN, dnsclient.DNS_T_TXT)
results = ipa.dnsclient.query(qname, ipa.dnsclient.DNS_C_IN, ipa.dnsclient.DNS_T_TXT)
for result in results:
if result.dns_type == dnsclient.DNS_T_TXT:
if result.dns_type == ipa.dnsclient.DNS_T_TXT:
realm = result.rdata.data
if realm:
break
@ -228,9 +228,9 @@ class IPADiscovery:
# terminate the name
if not qname.endswith("."):
qname += "."
results = dnsclient.query(qname, dnsclient.DNS_C_IN, dnsclient.DNS_T_SRV)
results = ipa.dnsclient.query(qname, ipa.dnsclient.DNS_C_IN, ipa.dnsclient.DNS_T_SRV)
for result in results:
if result.dns_type == dnsclient.DNS_T_SRV:
if result.dns_type == ipa.dnsclient.DNS_T_SRV:
qname = result.rdata.server.rstrip(".")
if result.rdata.port and result.rdata.port != 88:
qname += ":" + str(result.rdata.port)

View File

@ -1,3 +1,3 @@
include *.conf
include freeipa-python.spec*
include ipa-python.spec*