Skip to content

Commit 3e5cbe5

Browse files
{Compute} Migrate vm size completer of calling Compute module to aaz-based implementation (#32938)
1 parent 0e95b56 commit 3e5cbe5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,10 @@ def _load_extension_images_from_publisher(publisher):
298298

299299

300300
def get_vm_sizes(cli_ctx, location):
301-
return list(_compute_client_factory(cli_ctx).virtual_machine_sizes.list(location))
301+
from .operations.vm import VMListSizes
302+
return VMListSizes(cli_ctx=cli_ctx)(command_args={
303+
'location': location
304+
})
302305

303306

304307
def _matched(pattern, string, partial_match=True):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_vm_size_completion_list(cmd, prefix, namespace): # pylint: disable=unus
2121
if not location:
2222
location = get_one_of_subscription_locations(cmd.cli_ctx)
2323
result = get_vm_sizes(cmd.cli_ctx, location)
24-
return [r.name for r in result]
24+
return [r.get('name') for r in result]
2525

2626

2727
@Completer

0 commit comments

Comments
 (0)