Development
This commit is contained in:
parent
59ac3c5973
commit
3d0dc265ba
31 changed files with 1093 additions and 2794 deletions
|
|
@ -1,11 +1,12 @@
|
|||
import json
|
||||
from config_utils import collect_layout_tokens
|
||||
|
||||
|
||||
def collect_tokens(cfg):
|
||||
tokens = collect_layout_tokens(cfg)
|
||||
dns = cfg.get('upstream_dns', {})
|
||||
servers = dns.get('upstream_servers', [])
|
||||
return {
|
||||
'DNS_STRICT_ORDER': 'true' if dns.get('strict_order') else 'false',
|
||||
'DNS_CACHE_SIZE': str(dns.get('cache_size', '-')),
|
||||
'DNS_UPSTREAM_SERVERS_JSON': json.dumps(servers),
|
||||
}
|
||||
tokens['DNS_STRICT_ORDER'] = 'true' if dns.get('strict_order') else 'false'
|
||||
tokens['DNS_CACHE_SIZE'] = str(dns.get('cache_size', '-'))
|
||||
tokens['DNS_UPSTREAM_SERVERS_JSON'] = json.dumps(servers)
|
||||
return tokens
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue