From 485b5e0dce1f3d53c11769d8bce0d9a7c7d4d71e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 18 May 2020 10:41:04 -0400 Subject: [PATCH] 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. --- confluent_server/confluent/selfservice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index 4c4a176a..d012617e 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -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: