multiports
This commit is contained in:
parent
f8a5ca2263
commit
56f808951e
@ -28,21 +28,22 @@ def resolve(app, conf):
|
|||||||
group = service['group']
|
group = service['group']
|
||||||
|
|
||||||
# Port name from app config
|
# Port name from app config
|
||||||
port_name = None
|
ports = None
|
||||||
try:
|
try:
|
||||||
port_name = service['port_name']
|
ports = service['ports']
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# This is fast fix for port naming
|
# This is fast fix for port naming
|
||||||
# Will be rewrite later
|
# Will be rewrite later
|
||||||
fqdn = ''
|
fqdn = ''
|
||||||
if port_name is not None:
|
if ports is not None:
|
||||||
fqdn = '_' + port_name + '.' + '_' + service['name'] + '.' + group + '._tcp.' + domain
|
for port_name in ports:
|
||||||
|
fqdn = '_' + port_name + '.' + '_' + service['name'] + '.' + group + '._tcp.' + domain
|
||||||
|
hosts[service['name']]['ports'][port_name] = do_query(fqdn, conf['loglevel'])
|
||||||
else:
|
else:
|
||||||
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'])
|
|
||||||
|
|
||||||
return hosts
|
return hosts
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user