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.
Reviewed: https:/ /review. openstack. org/304441 /git.openstack. org/cgit/ openstack/ tempest/ commit/ ?id=f9ded353664 6bb3998325f3417 ef4ed588e05b7d
Committed: https:/
Submitter: Jenkins
Branch: master
commit f9ded3536646bb3 998325f3417ef4e d588e05b7d
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 timeutils date-time' format.
which checks the format as per ISO 8601 with help of oslo_utils.
and validate all the date time attributes against JSON schema
'iso8601-
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: Ief7729975daea3 73dcfa54a23ec76 c3ec7754a70
Closes-Bug: #1567640