From 1b26f06abf764d75229f30a78132c71c07197545 Mon Sep 17 00:00:00 2001 From: vilit1 Date: Fri, 2 Jul 2021 14:44:42 -0700 Subject: [PATCH 1/2] update help to block arugment --- azext_iot/_params.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/azext_iot/_params.py b/azext_iot/_params.py index d7a6dcd5e..c00500f21 100644 --- a/azext_iot/_params.py +++ b/azext_iot/_params.py @@ -104,11 +104,15 @@ def load_arguments(self, _): validator=mode2_iot_login_handler, help="This command supports an entity connection string with rights to perform action. " 'Use to avoid session login via "az login". ' - "If both an entity connection string and name are provided the connection string takes priority.", + "If both an entity connection string and name are provided the connection string takes priority." + "Required if --hub-name is not provided.", + arg_group="IoT Hub Identifier" ) context.argument("resource_group_name", arg_type=resource_group_name_type) context.argument( - "hub_name", options_list=["--hub-name", "-n"], arg_type=hub_name_type + "hub_name", options_list=["--hub-name", "-n"], arg_type=hub_name_type, + help="IoT Hub name. Required if --login is not provided.", + arg_group="IoT Hub Identifier" ) context.argument( "device_id", options_list=["--device-id", "-d"], help="Target Device." From 728e8a472dcb830a9d75ae49a04fca0bf70662f1 Mon Sep 17 00:00:00 2001 From: vilit1 Date: Fri, 2 Jul 2021 17:01:55 -0700 Subject: [PATCH 2/2] space --- azext_iot/_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azext_iot/_params.py b/azext_iot/_params.py index c00500f21..2cf6bafed 100644 --- a/azext_iot/_params.py +++ b/azext_iot/_params.py @@ -104,7 +104,7 @@ def load_arguments(self, _): validator=mode2_iot_login_handler, help="This command supports an entity connection string with rights to perform action. " 'Use to avoid session login via "az login". ' - "If both an entity connection string and name are provided the connection string takes priority." + "If both an entity connection string and name are provided the connection string takes priority. " "Required if --hub-name is not provided.", arg_group="IoT Hub Identifier" )