Comment 17 for bug 1541691

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/288260
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=923cf20eca35b551ae1fb4a77835f8104ea6cbed
Submitter: Jenkins
Branch: master

commit 923cf20eca35b551ae1fb4a77835f8104ea6cbed
Author: He Jie Xu <email address hidden>
Date: Wed Feb 17 16:26:19 2016 +0800

    Generate better validation error message when using name regexes

    There are some regexes used in the json-schema for complex string validation.
    When the validation failed, json-schema lib didn't generate a useful error
    info for the user, it shows the regex to the user. But regex is really
    unreadable for normal user. This patch override the default FormatChecker to
    support passed in custom error message. This required using custom format
    checker instead of using 'pattern'.

    For aggregates API, it enabled 'null' in the name input. As the 'format'
    keyword works for all allowed types and name format check will only validate
    string type, so this patch change the schema to use 'oneOf' keyword, then
    the 'format' will only against on string type.

    Change-Id: Ic0e608b8a18b635bfcd936f57f14c9f54e1ef8b4
    Partial-Bug: #1541691