Skip to content

Commit 5169006

Browse files
authored
[Compute] az vm list-sizes: Remove unused parameter --ids (#30652)
1 parent cc56708 commit 5169006

File tree

12 files changed

+5903
-5197
lines changed

12 files changed

+5903
-5197
lines changed

src/azure-cli/azure/cli/command_modules/vm/azure_stack/profile_2018_03_01_hybrid/commands.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ def load_command_table(self, _):
2525

2626
from .operations.capacity_reservation_group import CapacityReservationGroupList
2727
self.command_table['capacity reservation group list'] = CapacityReservationGroupList(loader=self)
28+
29+
from .operations.vm import VMListSizes
30+
self.command_table['vm list-sizes'] = VMListSizes(loader=self)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# pylint: disable=no-self-use, line-too-long, protected-access, too-few-public-methods, unused-argument
6+
from knack.log import get_logger
7+
8+
from ._util import import_aaz_by_profile
9+
10+
logger = get_logger(__name__)
11+
12+
_VM = import_aaz_by_profile("vm")
13+
14+
15+
class VMListSizes(_VM.ListSizes):
16+
@classmethod
17+
def _build_arguments_schema(cls, *args, **kwargs):
18+
args_schema = super()._build_arguments_schema(*args, **kwargs)
19+
args_schema.location._id_part = None
20+
21+
return args_schema

src/azure-cli/azure/cli/command_modules/vm/azure_stack/profile_2019_03_01_hybrid/commands.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ def load_command_table(self, _):
2525

2626
from .operations.capacity_reservation_group import CapacityReservationGroupList
2727
self.command_table['capacity reservation group list'] = CapacityReservationGroupList(loader=self)
28+
29+
from .operations.vm import VMListSizes
30+
self.command_table['vm list-sizes'] = VMListSizes(loader=self)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# pylint: disable=no-self-use, line-too-long, protected-access, too-few-public-methods, unused-argument
6+
from knack.log import get_logger
7+
8+
from ._util import import_aaz_by_profile
9+
10+
logger = get_logger(__name__)
11+
12+
_VM = import_aaz_by_profile("vm")
13+
14+
15+
class VMListSizes(_VM.ListSizes):
16+
@classmethod
17+
def _build_arguments_schema(cls, *args, **kwargs):
18+
args_schema = super()._build_arguments_schema(*args, **kwargs)
19+
args_schema.location._id_part = None
20+
21+
return args_schema

src/azure-cli/azure/cli/command_modules/vm/azure_stack/profile_2020_09_01_hybrid/commands.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ def load_command_table(self, _):
3535
from .operations.sig_image_definition import SigImageDefinitionUpdate
3636
self.command_table['sig image-definition update'] = SigImageDefinitionUpdate(loader=self)
3737

38+
from .operations.vm import VMListSizes
39+
self.command_table['vm list-sizes'] = VMListSizes(loader=self)
40+
3841
# pylint: disable=line-too-long
3942
SigImageVersion = import_aaz_by_profile("sig.image_version")
4043
self.command_table['sig image-version show'] = SigImageVersion.Show(loader=self,
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# pylint: disable=no-self-use, line-too-long, protected-access, too-few-public-methods, unused-argument
6+
from knack.log import get_logger
7+
8+
from ._util import import_aaz_by_profile
9+
10+
logger = get_logger(__name__)
11+
12+
_VM = import_aaz_by_profile("vm")
13+
14+
15+
class VMListSizes(_VM.ListSizes):
16+
@classmethod
17+
def _build_arguments_schema(cls, *args, **kwargs):
18+
args_schema = super()._build_arguments_schema(*args, **kwargs)
19+
args_schema.location._id_part = None
20+
21+
return args_schema

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ def load_command_table(self, _):
339339
g.generic_update_command('update', getter_name='get_vm_to_update', setter_name='update_vm', setter_type=compute_custom, command_type=compute_custom, supports_no_wait=True, validator=process_vm_update_namespace)
340340
g.wait_command('wait', getter_name='get_instance_view', getter_type=compute_custom)
341341
g.custom_command('auto-shutdown', 'auto_shutdown_vm')
342+
from .operations.vm import VMListSizes
343+
self.command_table['vm list-sizes'] = VMListSizes(loader=self)
342344

343345
with self.command_group('vm', compute_vm_sdk, client_factory=cf_vm) as g:
344346
g.custom_command('install-patches', 'install_vm_patches', supports_no_wait=True, min_api='2020-12-01')
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# pylint: disable=no-self-use, line-too-long, protected-access, too-few-public-methods, unused-argument
6+
from knack.log import get_logger
7+
8+
from ..aaz.latest.vm import ListSizes as _VMListSizes
9+
10+
logger = get_logger(__name__)
11+
12+
13+
class VMListSizes(_VMListSizes):
14+
@classmethod
15+
def _build_arguments_schema(cls, *args, **kwargs):
16+
args_schema = super()._build_arguments_schema(*args, **kwargs)
17+
args_schema.location._id_part = None
18+
19+
return args_schema

0 commit comments

Comments
 (0)