def validate(value): if not uuidutils.is_uuid_like(value): raise exc.InputException( "Expected a uuid but received %s." % value ) return value