Comment 4 for bug 1567640

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

Reviewed: https://review.openstack.org/304441
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=f9ded3536646bb3998325f3417ef4ed588e05b7d
Submitter: Jenkins
Branch: master

commit f9ded3536646bb3998325f3417ef4ed588e05b7d
Author: ghanshyam <email address hidden>
Date: Tue Apr 12 17:03:01 2016 +0900

    Fix date-time format checking in response schema

    Currently datetime attributes in response schema like
    'created_at' etc are being validated against type 'string' only
    not with ISO 8601 date time format.

    Another issue is with jsonschema validation for built-in 'date-time'
    format. It needs 'strict_rfc3339' or 'isodate' module to be installed
    for proper date-time validation as per rfc3339.
    Otherwise it returns True wihtout doing any validation.

    This patch define the new format checker for 'iso8601-date-time' format
    which checks the format as per ISO 8601 with help of oslo_utils.timeutils
    and validate all the date time attributes against JSON schema
    'iso8601-date-time' format.

    NOTE: date in image API header is returned in different format than
    ISO 8601 date time format which is not consistent with other date-time
    format in nova. So validating this as string only.
    This API is already deprecated so not worth to fix on nova side.

    Change-Id: Ief7729975daea373dcfa54a23ec76c3ec7754a70
    Closes-Bug: #1567640