def alias_username(value, message='Invalid username name'):
  match = USERNAME_ALIAS_COMPILED.match(value)
  if not match:
    raise exception.ValidationError(message)

  return value
Ensure get by flavor raises error with wrong flavorid
dataset/ETHPy150Open CollabQ/CollabQ/common/clean.py/alias_username--crossover with--dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/test_instance_types.py/InstanceTypeTestCase.test_will_not_get_flavor_by_bad_flavor_id