forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
44 lines (32 loc) · 1.85 KB
/
__init__.py
File metadata and controls
44 lines (32 loc) · 1.85 KB
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
34
35
36
37
38
39
40
41
42
43
44
# --------------------------------------------------------------------------------------------
# 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 azure.cli.core.profiles import register_resource_type
# pylint: disable=unused-import
import azext_aks_preview._help
from azext_aks_preview._client_factory import CUSTOM_MGMT_AKS_PREVIEW
class ContainerServiceCommandsLoader(AzCommandsLoader):
def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
register_resource_type('latest', CUSTOM_MGMT_AKS_PREVIEW, '2019-04-01')
acs_custom = CliCommandType(operations_tmpl='azext_aks_preview.custom#{}')
super(ContainerServiceCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=acs_custom,
resource_type=CUSTOM_MGMT_AKS_PREVIEW,
min_profile='2017-03-10-profile')
def load_command_table(self, args):
super(ContainerServiceCommandsLoader, self).load_command_table(args)
from .commands import load_command_table
load_command_table(self, args)
return self.command_table
def load_arguments(self, command):
from sys import version_info
if version_info[0] < 3:
super(ContainerServiceCommandsLoader, self).load_arguments(command)
else:
super().load_arguments(command)
from ._params import load_arguments
load_arguments(self, command)
COMMAND_LOADER_CLS = ContainerServiceCommandsLoader