2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-23 01:53:28 +00:00

Add dns domain to deployment

This permits the deployment profiles
to pull in specified DNS domain.
This commit is contained in:
Jarrod Johnson 2020-05-19 15:07:10 -04:00
parent eec7236110
commit e696566b42
2 changed files with 6 additions and 1 deletions

View File

@ -491,6 +491,9 @@ node = {
'description': ('Fingerprint of the SSH key of the OS running on the '
'system.'),
},
'dns.domain': {
'description': 'DNS Domain searched by default by the system'
},
'dns.servers': {
'description': 'DNS Server or servers to provide to node',
},

View File

@ -64,7 +64,7 @@ def handle_request(env, start_response):
ncfg['ipv4_netmask'] = netutil.cidr_to_mask(ncfg['prefix'])
deployinfo = cfg.get_node_attributes(
nodename, ('deployment.*', 'console.method', 'crypted.rootpassword',
'services.*'))
'dns.*'))
deployinfo = deployinfo.get(nodename, {})
profile = deployinfo.get(
'deployment.pendingprofile', {}).get('value', '')
@ -117,6 +117,8 @@ def handle_request(env, start_response):
for dns in deployinfo.get(
'dns.servers', {}).get('value', '').split(','):
ncfg['nameservers'].append(dns)
dnsdomain = dedployinfo.get('dns.domain', {}).get('value', None)
ncfg['dnsdomain'] = dnsdomain
start_response('200 OK', (('Content-Type', retype),))
yield dumper(ncfg)
elif env['PATH_INFO'] == '/self/sshcert':