Revert stupid resolve code
This commit is contained in:
parent
74baa35a21
commit
f0a509049c
1
surok.py
1
surok.py
@ -68,7 +68,6 @@ while 1:
|
|||||||
conf['loglevel'] = 'info'
|
conf['loglevel'] = 'info'
|
||||||
|
|
||||||
# Resolve services
|
# Resolve services
|
||||||
if resolve(app_conf, conf) != 404:
|
|
||||||
app_hosts = resolve(app_conf, conf)
|
app_hosts = resolve(app_conf, conf)
|
||||||
|
|
||||||
# Populate my dictionary
|
# Populate my dictionary
|
||||||
|
@ -45,30 +45,8 @@ def resolve(app, conf):
|
|||||||
if ports is not None:
|
if ports is not None:
|
||||||
for port_name in ports:
|
for port_name in ports:
|
||||||
fqdn = '_' + port_name + '.' + '_' + service['name'] + '.' + group + '._tcp.' + domain
|
fqdn = '_' + port_name + '.' + '_' + service['name'] + '.' + group + '._tcp.' + domain
|
||||||
|
|
||||||
# Fast fix of empty query result
|
|
||||||
# ------------------------------
|
|
||||||
try:
|
|
||||||
do_query_test = do_query(fqdn, conf['loglevel'])
|
|
||||||
if do_query_test['state'] == 404:
|
|
||||||
return 404
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
# ------------------------------
|
|
||||||
|
|
||||||
hosts[service['name']][port_name] = do_query(fqdn, conf['loglevel'])
|
hosts[service['name']][port_name] = do_query(fqdn, conf['loglevel'])
|
||||||
else:
|
else:
|
||||||
|
|
||||||
# Fast fix of empty query result
|
|
||||||
# ------------------------------
|
|
||||||
try:
|
|
||||||
do_query_test = do_query(fqdn, conf['loglevel'])
|
|
||||||
if do_query_test['state'] == 404:
|
|
||||||
return 404
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
# ------------------------------
|
|
||||||
|
|
||||||
fqdn = '_' + service['name'] + '.' + group + '._tcp.' + domain
|
fqdn = '_' + service['name'] + '.' + group + '._tcp.' + domain
|
||||||
hosts[service['name']] = do_query(fqdn, conf['loglevel'])
|
hosts[service['name']] = do_query(fqdn, conf['loglevel'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user