<commit_before># pylint: disable=line-too-long
import argparse
import getpass
import os

from azure.mgmt.compute.models import VirtualHardDisk

from azure.cli.command_modules.vm._validators import MinMaxValue
from azure.cli.command_modules.vm._actions import (VMImageFieldAction,
                                                   VMSSHFieldAction,
                                                   VMDNSNameAction,
                                                   load_images_from_aliases_doc,
                                                   get_subscription_locations)
from azure.cli.commands.parameters import location_type
from azure.cli.commands import register_cli_argument, CliArgumentType, register_extra_cli_argument

def get_location_completion_list(prefix, **kwargs):#pylint: disable=unused-argument
    result = get_subscription_locations()
    return [l.name for l in result]

def get_urn_aliases_completion_list(prefix, **kwargs):#pylint: disable=unused-argument
    images = load_images_from_aliases_doc()
    return [i['urn alias'] for i in images]

# BASIC PARAMETER CONFIGURATION
name_arg_type = CliArgumentType(options_list=('--name', '-n'), metavar='NAME')
instance_ids_type = CliArgumentType(
    nargs='+'
)

admin_username_type = CliArgumentType(options_list=('--admin-username',), default=getpass.getuser(), required=False)

register_cli_argument('vm', 'vm_name', name_arg_type)
register_cli_argument('vm scaleset', 'vm_scale_set_name', name_arg_type)
register_cli_argument('vm scaleset', 'virtual_machine_scale_set_name', name_arg_type)
register_cli_argument('vm scaleset', 'instance_ids', instance_ids_type)
register_cli_argument('vm', 'diskname', CliArgumentType(options_list=('--name', '-n')))
register_cli_argument('vm', 'disksize', CliArgumentType(help='Size of disk (Gb)', default=1023, type=MinMaxValue(1, 1023)))
register_cli_argument('vm', 'lun', CliArgumentType(
    type=int, help='0-based logical unit number (LUN). Max value depends on the Virutal Machine size.'))
register_cli_argument('vm', 'vhd', CliArgumentType(type=VirtualHardDisk))

register_cli_argument('vm availability-set', 'availability_set_name', name_arg_type)

register_cli_argument('vm access', 'username', CliArgumentType(options_list=('--username', '-u'), help='The user name'))
register_cli_argument('vm access', 'password', CliArgumentType(options_list=('--password', '-p'), help='The user name'))<commit_msg>fix parameter naming bugs mentioned by #373 (#376)<commit_after># pylint: disable=line-too-long
import argparse
import getpass
import os

from azure.mgmt.compute.models import VirtualHardDisk

from azure.cli.command_modules.vm._validators import MinMaxValue
from azure.cli.command_modules.vm._actions import (VMImageFieldAction,
                                                   VMSSHFieldAction,
                                                   VMDNSNameAction,
                                                   load_images_from_aliases_doc,
                                                   get_subscription_locations)
from azure.cli.commands.parameters import location_type
from azure.cli.commands import register_cli_argument, CliArgumentType, register_extra_cli_argument

def get_location_completion_list(prefix, **kwargs):#pylint: disable=unused-argument
    result = get_subscription_locations()
    return [l.name for l in result]

def get_urn_aliases_completion_list(prefix, **kwargs):#pylint: disable=unused-argument
    images = load_images_from_aliases_doc()
    return [i['urn alias'] for i in images]

# BASIC PARAMETER CONFIGURATION
name_arg_type = CliArgumentType(options_list=('--name', '-n'), metavar='NAME')
instance_ids_type = CliArgumentType(
    nargs='+'
)

admin_username_type = CliArgumentType(options_list=('--admin-username',), default=getpass.getuser(), required=False)

register_cli_argument('vm', 'vm_name', name_arg_type, help='The name of the virtual machine')
register_cli_argument('vm scaleset', 'vm_scale_set_name', name_arg_type)
register_cli_argument('vm scaleset', 'virtual_machine_scale_set_name', name_arg_type)
register_cli_argument('vm scaleset', 'instance_ids', instance_ids_type)
register_cli_argument('vm', 'diskname', CliArgumentType(options_list=('--name', '-n')))
register_cli_argument('vm', 'disksize', CliArgumentType(help='Size of disk (Gb)', default=1023, type=MinMaxValue(1, 1023)))
register_cli_argument('vm', 'lun', CliArgumentType(
    type=int, help='0-based logical unit number (LUN). Max value depends on the Virutal Machine size.'))
register_cli_argument('vm', 'vhd', CliArgumentType(type=VirtualHardDisk))

register_cli_argument('vm availability-set', 'availability_set_name', name_arg_type)

register_cli_argument('vm access', 'username', CliArgumentType(options_list=('--username', '-u'), help='The user name'))
register_cli_argument('vm access', 'password', CliArgumentType(options_list=('--password', '-p'), help='The user password'))
{'fraction_non_alphanumeric': 0.11406535417089507, 'fraction_numerical': 0.005277044854881266, 'mean_word_length': 4.690531177829099, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3752590', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1416, 'n_words': 296}