From 98a176a5af4df16e7e5bea84e06fd3343d3d9e2f Mon Sep 17 00:00:00 2001 From: SidneyAn Date: Mon, 25 Mar 2019 00:58:46 +0800 Subject: [PATCH] enable N/Y as valiable input for Distributed Cloud Configuration During the initial setup using config_controller, the question about Configuring a Distributed Cloud Controller requests a [y/N], "N" is not a valid choice, while later similar requests accepts a "N" as a valid response. The input should be validated in a consistent fashion if a y/N response is requested. Closes-bug: 1815643 Change-Id: Ib3206266d8aabe4ae025336a20485f56e1033b78 Signed-off-by: SidneyAn --- .../controllerconfig/controllerconfig/configassistant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllerconfig/controllerconfig/controllerconfig/configassistant.py b/controllerconfig/controllerconfig/controllerconfig/configassistant.py index 79621bea0a..68cdb39c7a 100644 --- a/controllerconfig/controllerconfig/controllerconfig/configassistant.py +++ b/controllerconfig/controllerconfig/controllerconfig/configassistant.py @@ -702,7 +702,7 @@ class ConfigAssistant(): } user_input = prompt_for( "Configure Distributed Cloud System Controller [y/N]: ", 'n', - lambda text: "Invalid choice" if text not in value_mapping + lambda text: "Invalid choice" if text.lower() not in value_mapping else None ) self.system_dc_role = value_mapping[user_input.lower()]