Provide a more friendly error message.

This commit is contained in:
rallytime 2015-09-15 14:10:56 -06:00
parent 36555856c7
commit 55312ea03f

View file

@ -2023,9 +2023,8 @@ def create(vm_=None, call=None):
if not GCE_VM_NAME_REGEX.match(vm_['name']):
raise SaltCloudSystemExit(
'The allowed VM names must match the following regular expression: {0}'.format(
GCE_VM_NAME_REGEX.pattern
)
'VM names must start with a letter, only contain letters, numbers, or dashes '
'and cannot end in a dash.'
)
conn = get_conn()