def validate_linux_host_name(namespace):
    "Validates a string as a legal host name component.\n\n    This validation will also occur server-side in the ARM API, but that may take\n    a minute or two before the user sees it. So it's more user-friendly to validate\n    in the CLI pre-flight.\n    "
    rfc1123_regex = re.compile('^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])(\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9]))*$')
    found = rfc1123_regex.findall(namespace.name)
    if (not found):
        raise CLIError('--name cannot exceed 63 characters and can only contain letters, numbers, or dashes (-).')
Validates a string as a legal host name component.

This validation will also occur server-side in the ARM API, but that may take
a minute or two before the user sees it. So it's more user-friendly to validate
in the CLI pre-flight.
def validate_linux_host_name(namespace):
    "Validates a string as a legal host name component.\n\n    This validation will also occur server-side in the ARM API, but that may take\n    a minute or two before the user sees it. So it's more user-friendly to validate\n    in the CLI pre-flight.\n    "
    rfc1123_regex = re.compile('^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])(\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9]))*$')
    found = rfc1123_regex.findall(namespace.name)
    if (not found):
        raise CLIError('--name cannot exceed 63 characters and can only contain letters, numbers, or dashes (-).')