From fa0ff87a98d82618c78b063d69f19a225c66a57b Mon Sep 17 00:00:00 2001 From: Xing Zhou Date: Tue, 30 Mar 2021 10:20:52 +0800 Subject: [PATCH] [hpc-cache] Improve help for nfs3_usage_model (#3130) * Improve help for nfs3_usage_model * Update src/hpc-cache/azext_hpc_cache/_params.py * Update src/hpc-cache/azext_hpc_cache/_params.py --- src/hpc-cache/HISTORY.rst | 6 +++++- src/hpc-cache/azext_hpc_cache/_params.py | 10 +++++++--- src/hpc-cache/setup.py | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/hpc-cache/HISTORY.rst b/src/hpc-cache/HISTORY.rst index 7c6448c39dc..8f38da8b555 100644 --- a/src/hpc-cache/HISTORY.rst +++ b/src/hpc-cache/HISTORY.rst @@ -3,9 +3,13 @@ Release History =============== +0.1.4 +++++++ +* Fix #2695: Improve the help description of parameter `--nfs3-usage-model`. + 0.1.3 ++++++ -* GA hpc-cache extension +* GA hpc-cache extension. 0.1.2 ++++++ diff --git a/src/hpc-cache/azext_hpc_cache/_params.py b/src/hpc-cache/azext_hpc_cache/_params.py index 6b75f5e2433..2e653545bd6 100644 --- a/src/hpc-cache/azext_hpc_cache/_params.py +++ b/src/hpc-cache/azext_hpc_cache/_params.py @@ -31,6 +31,11 @@ storage_target_type = CLIArgumentType(help='Name of the Storage Target.') +nfs3_usage_model_type = CLIArgumentType( + help='Identify the primary usage model to be used for this Storage Target. ' + 'You can use command `az hpc-cache usage-model list` to see the names of usage models. ' + 'For more details about usage models, please refer to https://docs.microsoft.com/azure/hpc-cache/hpc-cache-add-storage?tabs=azure-cli#choose-a-usage-model') + def load_arguments(self, _): @@ -94,12 +99,11 @@ def load_arguments(self, _): c.argument('junctions', junction_type, required=True) c.argument('nfs3_target', help='IP address or host name of an NFSv3 host (e.g., 10.0.44.44).', required=True) - c.argument('nfs3_usage_model', help='Identifies the primary usage model to be used for this Storage Target.', - required=True) + c.argument('nfs3_usage_model', nfs3_usage_model_type, required=True) with self.argument_context('hpc-cache nfs-storage-target update') as c: c.argument('cache_name', cache_name_type) c.argument('name', storage_target_type) c.argument('junctions', junction_type) c.argument('nfs3_target', help='IP address or host name of an NFSv3 host (e.g., 10.0.44.44).') - c.argument('nfs3_usage_model', help='Identifies the primary usage model to be used for this Storage Target.') + c.argument('nfs3_usage_model', nfs3_usage_model_type) diff --git a/src/hpc-cache/setup.py b/src/hpc-cache/setup.py index bfee5822ff9..481d7570252 100644 --- a/src/hpc-cache/setup.py +++ b/src/hpc-cache/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.3' +VERSION = '0.1.4' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers