mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Add ntp to deploycfg data
This commit is contained in:
parent
771c3a2984
commit
2bfbfeb4d3
@ -443,6 +443,12 @@ node = {
|
||||
'See information on net.switch for more on the '
|
||||
'flexibility of net.* attributes.'
|
||||
},
|
||||
'ntp.servers': {
|
||||
'description': 'NTP server or servers to provide to node during '
|
||||
'deployment. An OS profile may default to internet NTP, '
|
||||
'depending on default configuration of the respective '
|
||||
'operating system',
|
||||
},
|
||||
# 'id.modelnumber': {
|
||||
# 'description': 'The manufacturer dictated model number for the node',
|
||||
# },
|
||||
|
@ -73,7 +73,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.*',
|
||||
'dns.*'))
|
||||
'dns.*', 'ntp.*'))
|
||||
deployinfo = deployinfo.get(nodename, {})
|
||||
profile = deployinfo.get(
|
||||
'deployment.pendingprofile', {}).get('value', '')
|
||||
@ -136,6 +136,13 @@ def handle_request(env, start_response):
|
||||
for dns in deployinfo.get(
|
||||
'dns.servers', {}).get('value', '').split(','):
|
||||
ncfg['nameservers'].append(dns)
|
||||
ntpsrvs = deployinfo.get('ntp.servers', {}).get('value', '')
|
||||
if ntpsrvs:
|
||||
ntpsrvs = ntpsrvs.split(',')
|
||||
if ntpsrvs:
|
||||
ncfg['ntpservers'] = []
|
||||
for ntpsrv in ntpsrvs:
|
||||
ncfg['ntpservers'].append(ntpsrv)
|
||||
dnsdomain = deployinfo.get('dns.domain', {}).get('value', None)
|
||||
ncfg['dnsdomain'] = dnsdomain
|
||||
start_response('200 OK', (('Content-Type', retype),))
|
||||
|
Loading…
Reference in New Issue
Block a user