Skip to content

Commit df40099

Browse files
authored
Drop code for azure stack profiles (#31354)
1 parent 73a5d8a commit df40099

File tree

465 files changed

+1
-158368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

465 files changed

+1
-158368
lines changed

src/azure-cli/azure/cli/command_modules/vm/__init__.py

Lines changed: 1 addition & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -65,79 +65,4 @@ def load_arguments(self, command):
6565
pass
6666

6767

68-
class AzureStackComputeCommandsLoader(AzCommandsLoader):
69-
70-
def __init__(self, cli_ctx=None):
71-
from azure.cli.core.commands import CliCommandType
72-
compute_custom = CliCommandType(
73-
operations_tmpl='azure.cli.command_modules.vm.azure_stack.custom#{}',
74-
operation_group='virtual_machines'
75-
)
76-
super().__init__(cli_ctx=cli_ctx,
77-
resource_type=ResourceType.MGMT_COMPUTE,
78-
operation_group='virtual_machines',
79-
custom_command_type=compute_custom)
80-
81-
def load_command_table(self, args):
82-
from azure.cli.command_modules.vm.azure_stack.commands import load_command_table
83-
from azure.cli.core.aaz import load_aaz_command_table
84-
try:
85-
from . import aaz
86-
except ImportError:
87-
aaz = None
88-
89-
if aaz:
90-
load_aaz_command_table(
91-
loader=self,
92-
aaz_pkg_name=aaz.__name__,
93-
args=args
94-
)
95-
load_command_table(self, args)
96-
try:
97-
# When generated commands are required uncomment the following two lines.
98-
from .generated.commands import load_command_table as load_command_table_generated
99-
load_command_table_generated(self, args)
100-
from .manual.commands import load_command_table as load_command_table_manual
101-
load_command_table_manual(self, args)
102-
except ImportError:
103-
pass
104-
105-
profile = self.get_module_by_profile("commands")
106-
if profile and hasattr(profile, 'load_command_table'):
107-
profile.load_command_table(self, args)
108-
109-
return self.command_table
110-
111-
def load_arguments(self, command):
112-
from azure.cli.command_modules.vm.azure_stack._params import load_arguments
113-
load_arguments(self, command)
114-
try:
115-
from .generated._params import load_arguments as load_arguments_generated
116-
load_arguments_generated(self, command)
117-
from .manual._params import load_arguments as load_arguments_manual
118-
load_arguments_manual(self, command)
119-
except ImportError:
120-
pass
121-
122-
profile = self.get_module_by_profile("_params")
123-
if profile and hasattr(profile, 'load_arguments'):
124-
profile.load_arguments(self, command)
125-
126-
def get_module_name_by_profile(self, module_name):
127-
from azure.cli.core.aaz.utils import get_aaz_profile_module_name
128-
profile_module_name = get_aaz_profile_module_name(profile_name=self.cli_ctx.cloud.profile)
129-
if module_name:
130-
return f'azure.cli.command_modules.vm.azure_stack.{profile_module_name}.{module_name}'
131-
return f'azure.cli.command_modules.vm.azure_stack.{profile_module_name}'
132-
133-
def get_module_by_profile(self, name):
134-
import importlib
135-
module_name = self.get_module_name_by_profile(name)
136-
return importlib.import_module(module_name)
137-
138-
139-
def get_command_loader(cli_ctx):
140-
if cli_ctx.cloud.profile.lower() != "latest":
141-
return AzureStackComputeCommandsLoader
142-
143-
return ComputeCommandsLoader
68+
COMMAND_LOADER_CLS = ComputeCommandsLoader

src/azure-cli/azure/cli/command_modules/vm/aaz/profile_2018_03_01_hybrid/__init__.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/azure-cli/azure/cli/command_modules/vm/aaz/profile_2018_03_01_hybrid/capacity/__cmd_group.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/azure-cli/azure/cli/command_modules/vm/aaz/profile_2018_03_01_hybrid/capacity/__init__.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/azure-cli/azure/cli/command_modules/vm/aaz/profile_2018_03_01_hybrid/capacity/reservation/__cmd_group.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/azure-cli/azure/cli/command_modules/vm/aaz/profile_2018_03_01_hybrid/capacity/reservation/__init__.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/azure-cli/azure/cli/command_modules/vm/aaz/profile_2018_03_01_hybrid/capacity/reservation/group/__cmd_group.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/azure-cli/azure/cli/command_modules/vm/aaz/profile_2018_03_01_hybrid/capacity/reservation/group/__init__.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)