From ffc745af4c434f05266ee2a388bbbf5b534b0b65 Mon Sep 17 00:00:00 2001 From: navba-MSFT <57353862+navba-MSFT@users.noreply.github.com> Date: Fri, 16 Sep 2022 10:52:31 +0530 Subject: [PATCH] {k8s-extension} fixes Azure/azure-cli-extensions#5356 CLI Command: az k8s-extension extension-types list -g {} --cluster-name {} --cluster-type {} Results in below error: File "/opt/homebrew/Cellar/azure-cli/2.40.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/opt/homebrew/Cellar/azure-cli/2.40.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job result = cmd_copy(params) File "/opt/homebrew/Cellar/azure-cli/2.40.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__ return self.handler(*args, **kwargs) File "/opt/homebrew/Cellar/azure-cli/2.40.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None File "/Users/tbock/.azure/cliextensions/k8s-extension/azext_k8s_extension/_client_factory.py", line 21, in cf_k8s_cluster_extension_types_operation return cf_k8s_extension(cli_ctx, consts.EXTENSION_TYPE_API_VERSION).cluster_extension_types TypeError: cf_k8s_extension() takes 1 positional argument but 2 were given This PR fixes this issue. fixes Azure/azure-cli-extensions#5356 --- src/k8s-extension/azext_k8s_extension/_client_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k8s-extension/azext_k8s_extension/_client_factory.py b/src/k8s-extension/azext_k8s_extension/_client_factory.py index 01fda393236..e507a64b1d8 100644 --- a/src/k8s-extension/azext_k8s_extension/_client_factory.py +++ b/src/k8s-extension/azext_k8s_extension/_client_factory.py @@ -18,7 +18,7 @@ def cf_k8s_extension_operation(cli_ctx, _): def cf_k8s_cluster_extension_types_operation(cli_ctx, _): - return cf_k8s_extension(cli_ctx, consts.EXTENSION_TYPE_API_VERSION).cluster_extension_types + return cf_k8s_extension(cli_ctx).cluster_extension_types def cf_k8s_cluster_extension_type_operation(cli_ctx, _):