mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-13 11:17:49 +00:00
Add textconsole to deploycfg
It turns out that the SPCR is not automatically populated. Provide a hint via deploycfg as to whether the user has configured confluent for text console access.
This commit is contained in:
parent
188467ccf0
commit
485b5e0dce
@ -60,13 +60,16 @@ def handle_request(env, start_response):
|
||||
if ncfg['prefix']:
|
||||
ncfg['ipv4_netmask'] = netutil.cidr_to_mask(ncfg['prefix'])
|
||||
deployinfo = cfg.get_node_attributes(
|
||||
nodename, ('deployment.*', 'crypted.rootpassword', 'services.*'))
|
||||
nodename, ('deployment.*', 'console.method', 'crypted.rootpassword',
|
||||
'services.*'))
|
||||
deployinfo = deployinfo.get(nodename, {})
|
||||
profile = deployinfo.get(
|
||||
'deployment.pendingprofile', {}).get('value', '')
|
||||
ncfg['profile'] = profile
|
||||
protocol = deployinfo.get('deployment.useinsecureprotocols', {}).get(
|
||||
'value', 'never')
|
||||
ncfg['textconsole'] = bool(deployinfo.get(
|
||||
'console.method', {}).get('value', None))
|
||||
if protocol == 'always':
|
||||
ncfg['protocol'] = 'http'
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user