Files
nova/doc/api_samples/os-instance-actions/instance-actions-list-resp.json
Mark McLoughlin e6cfc7b890 Use strtime() specific timestamp regexp
Any datetime objects that get serialized via jsonutils.dumps() get
stringified using strtime() which includes decimal seconds and is
timezone naive.

Use a specific regexp to check the use of this format.

Note that included in here is a fixup to the doc samples for the
instance actions extension - the sample shows it using the
str(datetime) format when in fact it is using strtime. This came
about because before commit 68288b9 we were using a pre-serialized
timestamp in the fake instance actions. I just regenerated the samples
for this.

Full context here:

  http://lists.openstack.org/pipermail/openstack-dev/2014-April/033971.html

Change-Id: If52a2a664eccc8aed8a39d1a9dfb0209337c3c79
2014-04-29 14:52:00 +01:00

22 lines
707 B
JSON

{
"instanceActions": [
{
"action": "resize",
"instance_uuid": "b48316c5-71e8-45e4-9884-6c78055b9b13",
"message": "",
"project_id": "842",
"request_id": "req-25517360-b757-47d3-be45-0e8d2a01b36a",
"start_time": "2012-12-05T01:00:00.000000",
"user_id": "789"
},
{
"action": "reboot",
"instance_uuid": "b48316c5-71e8-45e4-9884-6c78055b9b13",
"message": "",
"project_id": "147",
"request_id": "req-3293a3f1-b44c-4609-b8d2-d81b105636b8",
"start_time": "2012-12-05T00:00:00.000000",
"user_id": "789"
}
]
}