Skip to content

Commit

Permalink
{k8s-extension} fixes Azure#5356
Browse files Browse the repository at this point in the history
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#5356
  • Loading branch information
navba-MSFT authored Sep 16, 2022
1 parent 75d25f0 commit ffc745a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/k8s-extension/azext_k8s_extension/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, _):
Expand Down

0 comments on commit ffc745a

Please sign in to comment.