get discovery group from OS environment
This commit is contained in:
parent
9120d723a2
commit
2e4758a3e8
@ -8,12 +8,18 @@ def resolve(app, conf):
|
|||||||
services = app['services']
|
services = app['services']
|
||||||
domain = conf['domain']
|
domain = conf['domain']
|
||||||
group = None
|
group = None
|
||||||
|
|
||||||
|
if app['env'].get('SUROK_DISCOVERY_GROUP') is not None:
|
||||||
|
group = app['env']['SUROK_DISCOVERY_GROUP']
|
||||||
|
|
||||||
for service in services:
|
for service in services:
|
||||||
hosts[service['name']] = []
|
hosts[service['name']] = []
|
||||||
if app['env'].get('SUROK_GROUP') is not None:
|
|
||||||
group = app['env']['SUROK_GROUP']
|
if group is not None:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
group = service['group']
|
group = service['group']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for rdata in dns.resolver.query('_' +
|
for rdata in dns.resolver.query('_' +
|
||||||
service['name'] + '.' +
|
service['name'] + '.' +
|
||||||
|
Loading…
Reference in New Issue
Block a user