forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 22
/
__init__.py
33 lines (24 loc) · 1.26 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from azure.cli.core import AzCommandsLoader
from . import consts
from ._help import helps # pylint: disable=unused-import
class K8sExtensionCommandsLoader(AzCommandsLoader):
def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from ._client_factory import cf_k8s_extension
k8s_extension_custom = CliCommandType(
operations_tmpl=consts.EXTENSION_PACKAGE_NAME + '.custom#{}',
client_factory=cf_k8s_extension)
super().__init__(cli_ctx=cli_ctx,
custom_command_type=k8s_extension_custom)
def load_command_table(self, args):
from .commands import load_command_table
load_command_table(self, args)
return self.command_table
def load_arguments(self, command):
from ._params import load_arguments
load_arguments(self, command)
COMMAND_LOADER_CLS = K8sExtensionCommandsLoader