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