diff --git a/doc/api_samples/os-instance-actions/instance-action-get-resp.json b/doc/api_samples/os-instance-actions/instance-action-get-resp.json index d5a2ff96c81e..f259deefdb26 100644 --- a/doc/api_samples/os-instance-actions/instance-action-get-resp.json +++ b/doc/api_samples/os-instance-actions/instance-action-get-resp.json @@ -4,16 +4,16 @@ "events": [ { "event": "schedule", - "finish_time": "2012-12-05 01:02:00.000000", + "finish_time": "2012-12-05T01:02:00.000000", "result": "Success", - "start_time": "2012-12-05 01:00:02.000000", + "start_time": "2012-12-05T01:00:02.000000", "traceback": "" }, { "event": "compute_create", - "finish_time": "2012-12-05 01:04:00.000000", + "finish_time": "2012-12-05T01:04:00.000000", "result": "Success", - "start_time": "2012-12-05 01:03:00.000000", + "start_time": "2012-12-05T01:03:00.000000", "traceback": "" } ], @@ -21,7 +21,7 @@ "message": "", "project_id": "147", "request_id": "req-3293a3f1-b44c-4609-b8d2-d81b105636b8", - "start_time": "2012-12-05 00:00:00.000000", + "start_time": "2012-12-05T00:00:00.000000", "user_id": "789" } } \ No newline at end of file diff --git a/doc/api_samples/os-instance-actions/instance-actions-list-resp.json b/doc/api_samples/os-instance-actions/instance-actions-list-resp.json index 22d29d076b0a..91289589a067 100644 --- a/doc/api_samples/os-instance-actions/instance-actions-list-resp.json +++ b/doc/api_samples/os-instance-actions/instance-actions-list-resp.json @@ -6,7 +6,7 @@ "message": "", "project_id": "842", "request_id": "req-25517360-b757-47d3-be45-0e8d2a01b36a", - "start_time": "2012-12-05 01:00:00.000000", + "start_time": "2012-12-05T01:00:00.000000", "user_id": "789" }, { @@ -15,7 +15,7 @@ "message": "", "project_id": "147", "request_id": "req-3293a3f1-b44c-4609-b8d2-d81b105636b8", - "start_time": "2012-12-05 00:00:00.000000", + "start_time": "2012-12-05T00:00:00.000000", "user_id": "789" } ] diff --git a/doc/api_samples/os-volumes/os-volumes-detail-resp.json b/doc/api_samples/os-volumes/os-volumes-detail-resp.json index 95be0419ec06..6a92f5e0d57f 100644 --- a/doc/api_samples/os-volumes/os-volumes-detail-resp.json +++ b/doc/api_samples/os-volumes/os-volumes-detail-resp.json @@ -10,7 +10,7 @@ } ], "availabilityZone": "zone1:host1", - "createdAt": "1999-01-01T01:01:01", + "createdAt": "1999-01-01T01:01:01.000000", "displayDescription": "Volume Description", "displayName": "Volume Name", "id": "a26887c6-c47b-4654-abb5-dfadf7d3f803", @@ -21,4 +21,4 @@ "volumeType": "Backup" } ] -} \ No newline at end of file +} diff --git a/nova/tests/integrated/api_samples/OS-SRV-USG/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/OS-SRV-USG/server-get-resp.json.tpl index 49e4a75122ed..2b2121d34bc6 100644 --- a/nova/tests/integrated/api_samples/OS-SRV-USG/server-get-resp.json.tpl +++ b/nova/tests/integrated/api_samples/OS-SRV-USG/server-get-resp.json.tpl @@ -1,6 +1,6 @@ { "server": { - "OS-SRV-USG:launched_at": "%(timestamp)s", + "OS-SRV-USG:launched_at": "%(strtime)s", "OS-SRV-USG:terminated_at": null, "accessIPv4": "", "accessIPv6": "", diff --git a/nova/tests/integrated/api_samples/OS-SRV-USG/servers-detail-resp.json.tpl b/nova/tests/integrated/api_samples/OS-SRV-USG/servers-detail-resp.json.tpl index 561dcc66aa78..bef5a2002afa 100644 --- a/nova/tests/integrated/api_samples/OS-SRV-USG/servers-detail-resp.json.tpl +++ b/nova/tests/integrated/api_samples/OS-SRV-USG/servers-detail-resp.json.tpl @@ -3,7 +3,7 @@ { "status": "ACTIVE", "updated": "%(isotime)s", - "OS-SRV-USG:launched_at": "%(timestamp)s", + "OS-SRV-USG:launched_at": "%(strtime)s", "user_id": "fake", "addresses": { "private": [ diff --git a/nova/tests/integrated/api_samples/all_extensions/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/all_extensions/server-get-resp.json.tpl index 8c6e7c980ddc..c83ab9106821 100644 --- a/nova/tests/integrated/api_samples/all_extensions/server-get-resp.json.tpl +++ b/nova/tests/integrated/api_samples/all_extensions/server-get-resp.json.tpl @@ -8,7 +8,7 @@ "OS-EXT-STS:power_state": 1, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", - "OS-SRV-USG:launched_at": "%(timestamp)s", + "OS-SRV-USG:launched_at": "%(strtime)s", "OS-SRV-USG:terminated_at": null, "accessIPv4": "", "accessIPv6": "", diff --git a/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.json.tpl b/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.json.tpl index 5a0e09bcf625..d2aea3114976 100644 --- a/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.json.tpl +++ b/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.json.tpl @@ -9,7 +9,7 @@ "OS-EXT-STS:power_state": 1, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", - "OS-SRV-USG:launched_at": "%(timestamp)s", + "OS-SRV-USG:launched_at": "%(strtime)s", "OS-SRV-USG:terminated_at": null, "accessIPv4": "", "accessIPv6": "", diff --git a/nova/tests/integrated/api_samples/os-aggregates/aggregate-post-resp.json.tpl b/nova/tests/integrated/api_samples/os-aggregates/aggregate-post-resp.json.tpl index c5139950ac45..935643d03cdb 100644 --- a/nova/tests/integrated/api_samples/os-aggregates/aggregate-post-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-aggregates/aggregate-post-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": false, "deleted_at": null, "id": %(aggregate_id)s, diff --git a/nova/tests/integrated/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl b/nova/tests/integrated/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl index 119f78ad20c6..2e229a473a3d 100644 --- a/nova/tests/integrated/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova2", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": false, "deleted_at": null, "hosts": [], @@ -10,6 +10,6 @@ "availability_zone": "nova2" }, "name": "newname", - "updated_at": "%(timestamp)s" + "updated_at": "%(strtime)s" } } diff --git a/nova/tests/integrated/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl b/nova/tests/integrated/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl index b311bb18e34a..e5775c206d97 100644 --- a/nova/tests/integrated/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": false, "deleted_at": null, "hosts": [ diff --git a/nova/tests/integrated/api_samples/os-aggregates/aggregates-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-aggregates/aggregates-get-resp.json.tpl index 6b94465c4299..b91781fae2e4 100644 --- a/nova/tests/integrated/api_samples/os-aggregates/aggregates-get-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-aggregates/aggregates-get-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": false, "deleted_at": null, "hosts": [], diff --git a/nova/tests/integrated/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl index bed47e730095..642653d1e6e5 100644 --- a/nova/tests/integrated/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl @@ -2,7 +2,7 @@ "aggregates": [ { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": false, "deleted_at": null, "hosts": [], diff --git a/nova/tests/integrated/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl b/nova/tests/integrated/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl index f3493261776d..b15c40fa5dc9 100644 --- a/nova/tests/integrated/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": false, "deleted_at": null, "hosts": [], diff --git a/nova/tests/integrated/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl b/nova/tests/integrated/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl index 6b94465c4299..b91781fae2e4 100644 --- a/nova/tests/integrated/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": false, "deleted_at": null, "hosts": [], diff --git a/nova/tests/integrated/api_samples/os-extended-services-delete/services-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-extended-services-delete/services-get-resp.json.tpl index 93091e5a3696..d91fe367f98d 100644 --- a/nova/tests/integrated/api_samples/os-extended-services-delete/services-get-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-extended-services-delete/services-get-resp.json.tpl @@ -6,7 +6,7 @@ "host": "host1", "state": "up", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "internal" }, { @@ -15,7 +15,7 @@ "host": "host1", "state": "up", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "nova" }, { @@ -24,7 +24,7 @@ "host": "host2", "state": "down", "status": "enabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "internal" }, { @@ -33,7 +33,7 @@ "host": "host2", "state": "down", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "nova" } ] diff --git a/nova/tests/integrated/api_samples/os-instance-actions/instance-action-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-instance-actions/instance-action-get-resp.json.tpl index 2e83b7344f27..7cd532523906 100644 --- a/nova/tests/integrated/api_samples/os-instance-actions/instance-action-get-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-instance-actions/instance-action-get-resp.json.tpl @@ -5,20 +5,20 @@ "request_id": "%(request_id)s", "user_id": "%(integer_id)s", "project_id": "%(integer_id)s", - "start_time": "%(timestamp)s", + "start_time": "%(strtime)s", "message": "", "events": [ { "event": "%(event)s", - "start_time": "%(timestamp)s", - "finish_time": "%(timestamp)s", + "start_time": "%(strtime)s", + "finish_time": "%(strtime)s", "result": "%(result)s", "traceback": "" }, { "event": "%(event)s", - "start_time": "%(timestamp)s", - "finish_time": "%(timestamp)s", + "start_time": "%(strtime)s", + "finish_time": "%(strtime)s", "result": "%(result)s", "traceback": "" } diff --git a/nova/tests/integrated/api_samples/os-instance-actions/instance-actions-list-resp.json.tpl b/nova/tests/integrated/api_samples/os-instance-actions/instance-actions-list-resp.json.tpl index 9f64a1b2982c..0fdc33916a80 100644 --- a/nova/tests/integrated/api_samples/os-instance-actions/instance-actions-list-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-instance-actions/instance-actions-list-resp.json.tpl @@ -6,7 +6,7 @@ "request_id": "%(request_id)s", "user_id": "%(integer_id)s", "project_id": "%(integer_id)s", - "start_time": "%(timestamp)s", + "start_time": "%(strtime)s", "message": "" }, { @@ -15,7 +15,7 @@ "request_id": "%(request_id)s", "user_id": "%(integer_id)s", "project_id": "%(integer_id)s", - "start_time": "%(timestamp)s", + "start_time": "%(strtime)s", "message": "" } ] diff --git a/nova/tests/integrated/api_samples/os-networks/network-show-resp.json.tpl b/nova/tests/integrated/api_samples/os-networks/network-show-resp.json.tpl index 5c3630c5d593..66e7122105de 100644 --- a/nova/tests/integrated/api_samples/os-networks/network-show-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-networks/network-show-resp.json.tpl @@ -6,7 +6,7 @@ "broadcast": "%(ip)s", "cidr": "10.0.0.0/29", "cidr_v6": null, - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": false, "deleted_at": null, "dhcp_start": "%(ip)s", @@ -24,7 +24,7 @@ "priority": null, "project_id": "1234", "rxtx_base": null, - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "vlan": 100, "vpn_private_address": "%(ip)s", "vpn_public_address": "%(ip)s", diff --git a/nova/tests/integrated/api_samples/os-networks/networks-list-resp.json.tpl b/nova/tests/integrated/api_samples/os-networks/networks-list-resp.json.tpl index 6da3fb2e2b0e..4e359c6171fd 100644 --- a/nova/tests/integrated/api_samples/os-networks/networks-list-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-networks/networks-list-resp.json.tpl @@ -6,7 +6,7 @@ "broadcast": "%(ip)s", "cidr": "10.0.0.0/29", "cidr_v6": null, - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": false, "deleted_at": null, "dhcp_start": "%(ip)s", @@ -24,7 +24,7 @@ "priority": null, "project_id": "1234", "rxtx_base": null, - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "vlan": 100, "vpn_private_address": "%(ip)s", "vpn_public_address": "%(ip)s", @@ -36,7 +36,7 @@ "broadcast": "%(ip)s", "cidr": "10.0.0.10/29", "cidr_v6": null, - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": false, "deleted_at": null, "dhcp_start": "%(ip)s", diff --git a/nova/tests/integrated/api_samples/os-services/services-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-services/services-get-resp.json.tpl index 39eda4e72fb3..b3688c28f7a2 100644 --- a/nova/tests/integrated/api_samples/os-services/services-get-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-services/services-get-resp.json.tpl @@ -6,7 +6,7 @@ "disabled_reason": "test1", "state": "up", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "internal" }, { @@ -15,7 +15,7 @@ "disabled_reason": "test2", "state": "up", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "nova" }, { @@ -24,7 +24,7 @@ "disabled_reason": "", "state": "down", "status": "enabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "internal" }, { @@ -33,7 +33,7 @@ "disabled_reason": "test4", "state": "down", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "nova" } ] diff --git a/nova/tests/integrated/api_samples/os-services/services-list-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-services/services-list-get-resp.json.tpl index cc61013385de..09564520e769 100644 --- a/nova/tests/integrated/api_samples/os-services/services-list-get-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-services/services-list-get-resp.json.tpl @@ -5,7 +5,7 @@ "host": "host1", "state": "up", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "internal" }, { @@ -13,7 +13,7 @@ "host": "host1", "state": "up", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "nova" }, { @@ -21,7 +21,7 @@ "host": "host2", "state": "down", "status": "enabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "internal" }, { @@ -29,7 +29,7 @@ "host": "host2", "state": "down", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "nova" } ] diff --git a/nova/tests/integrated/api_samples/os-simple-tenant-usage/simple-tenant-usage-get-specific.json.tpl b/nova/tests/integrated/api_samples/os-simple-tenant-usage/simple-tenant-usage-get-specific.json.tpl index a12dd7157f32..f37083013d6a 100644 --- a/nova/tests/integrated/api_samples/os-simple-tenant-usage/simple-tenant-usage-get-specific.json.tpl +++ b/nova/tests/integrated/api_samples/os-simple-tenant-usage/simple-tenant-usage-get-specific.json.tpl @@ -9,15 +9,15 @@ "local_gb": 1, "memory_mb": 512, "name": "new-server-test", - "started_at": "%(timestamp)s", + "started_at": "%(strtime)s", "state": "active", "tenant_id": "openstack", "uptime": 3600, "vcpus": 1 } ], - "start": "%(timestamp)s", - "stop": "%(timestamp)s", + "start": "%(strtime)s", + "stop": "%(strtime)s", "tenant_id": "openstack", "total_hours": 1.0, "total_local_gb_usage": 1.0, diff --git a/nova/tests/integrated/api_samples/os-simple-tenant-usage/simple-tenant-usage-get.json.tpl b/nova/tests/integrated/api_samples/os-simple-tenant-usage/simple-tenant-usage-get.json.tpl index 082e6bc90927..25b5ff2b84f5 100644 --- a/nova/tests/integrated/api_samples/os-simple-tenant-usage/simple-tenant-usage-get.json.tpl +++ b/nova/tests/integrated/api_samples/os-simple-tenant-usage/simple-tenant-usage-get.json.tpl @@ -1,8 +1,8 @@ { "tenant_usages": [ { - "start": "%(timestamp)s", - "stop": "%(timestamp)s", + "start": "%(strtime)s", + "stop": "%(strtime)s", "tenant_id": "openstack", "total_hours": 1.0, "total_local_gb_usage": 1.0, diff --git a/nova/tests/integrated/api_samples/os-volumes/os-volumes-detail-resp.json.tpl b/nova/tests/integrated/api_samples/os-volumes/os-volumes-detail-resp.json.tpl index eeca4489e5bf..82a63eda5f27 100644 --- a/nova/tests/integrated/api_samples/os-volumes/os-volumes-detail-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-volumes/os-volumes-detail-resp.json.tpl @@ -10,7 +10,7 @@ } ], "availabilityZone": "zone1:host1", - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "%(volume_desc)s", "displayName": "%(volume_name)s", "id": "%(uuid)s", diff --git a/nova/tests/integrated/api_samples/os-volumes/os-volumes-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-volumes/os-volumes-get-resp.json.tpl index 4343e6c0acc0..84bfdd2a5b2d 100644 --- a/nova/tests/integrated/api_samples/os-volumes/os-volumes-get-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-volumes/os-volumes-get-resp.json.tpl @@ -9,7 +9,7 @@ } ], "availabilityZone": "zone1:host1", - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "%(volume_desc)s", "displayName": "%(volume_name)s", "id": "%(uuid)s", diff --git a/nova/tests/integrated/api_samples/os-volumes/os-volumes-index-resp.json.tpl b/nova/tests/integrated/api_samples/os-volumes/os-volumes-index-resp.json.tpl index eeca4489e5bf..82a63eda5f27 100644 --- a/nova/tests/integrated/api_samples/os-volumes/os-volumes-index-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-volumes/os-volumes-index-resp.json.tpl @@ -10,7 +10,7 @@ } ], "availabilityZone": "zone1:host1", - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "%(volume_desc)s", "displayName": "%(volume_name)s", "id": "%(uuid)s", diff --git a/nova/tests/integrated/api_samples/os-volumes/os-volumes-post-resp.json.tpl b/nova/tests/integrated/api_samples/os-volumes/os-volumes-post-resp.json.tpl index f1a3d3ca365a..d13ce20cc388 100644 --- a/nova/tests/integrated/api_samples/os-volumes/os-volumes-post-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-volumes/os-volumes-post-resp.json.tpl @@ -15,7 +15,7 @@ "snapshotId": null, "metadata": {}, "id": "%(uuid)s", - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "size": 100 } } diff --git a/nova/tests/integrated/api_samples/os-volumes/snapshot-create-resp.json.tpl b/nova/tests/integrated/api_samples/os-volumes/snapshot-create-resp.json.tpl index ddffd97a380d..6153e8140e60 100644 --- a/nova/tests/integrated/api_samples/os-volumes/snapshot-create-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-volumes/snapshot-create-resp.json.tpl @@ -1,6 +1,6 @@ { "snapshot": { - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "%(description)s", "displayName": "%(snapshot_name)s", "id": 100, diff --git a/nova/tests/integrated/api_samples/os-volumes/snapshots-detail-resp.json.tpl b/nova/tests/integrated/api_samples/os-volumes/snapshots-detail-resp.json.tpl index f6b4a3abf3c8..1b509d54f880 100644 --- a/nova/tests/integrated/api_samples/os-volumes/snapshots-detail-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-volumes/snapshots-detail-resp.json.tpl @@ -1,7 +1,7 @@ { "snapshots": [ { - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "Default description", "displayName": "Default name", "id": 100, @@ -10,7 +10,7 @@ "volumeId": 12 }, { - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "Default description", "displayName": "Default name", "id": 101, @@ -19,7 +19,7 @@ "volumeId": 12 }, { - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "Default description", "displayName": "Default name", "id": 102, diff --git a/nova/tests/integrated/api_samples/os-volumes/snapshots-list-resp.json.tpl b/nova/tests/integrated/api_samples/os-volumes/snapshots-list-resp.json.tpl index 5cfbd72830b9..c65d073ad768 100644 --- a/nova/tests/integrated/api_samples/os-volumes/snapshots-list-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-volumes/snapshots-list-resp.json.tpl @@ -1,7 +1,7 @@ { "snapshots": [ { - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "%(text)s", "displayName": "%(text)s", "id": 100, @@ -10,7 +10,7 @@ "volumeId": 12 }, { - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "%(text)s", "displayName": "%(text)s", "id": 101, @@ -19,7 +19,7 @@ "volumeId": 12 }, { - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "%(text)s", "displayName": "%(text)s", "id": 102, diff --git a/nova/tests/integrated/api_samples/os-volumes/snapshots-show-resp.json.tpl b/nova/tests/integrated/api_samples/os-volumes/snapshots-show-resp.json.tpl index 0690ed8b66b6..a9ab6240d620 100644 --- a/nova/tests/integrated/api_samples/os-volumes/snapshots-show-resp.json.tpl +++ b/nova/tests/integrated/api_samples/os-volumes/snapshots-show-resp.json.tpl @@ -1,6 +1,6 @@ { "snapshot": { - "createdAt": "%(timestamp)s", + "createdAt": "%(strtime)s", "displayDescription": "%(description)s", "displayName": "%(snapshot_name)s", "id": "100", diff --git a/nova/tests/integrated/api_samples_test_base.py b/nova/tests/integrated/api_samples_test_base.py index e8bf32b33b46..8e228f381351 100644 --- a/nova/tests/integrated/api_samples_test_base.py +++ b/nova/tests/integrated/api_samples_test_base.py @@ -267,6 +267,7 @@ class ApiSampleTestBase(integrated_helpers._IntegratedTestBase): else: text = r'[^<]*' isotime_re = '\d{4}-[0,1]\d-[0-3]\dT\d{2}:\d{2}:\d{2}Z' + strtime_re = '\d{4}-[0,1]\d-[0-3]\dT\d{2}:\d{2}:\d{2}\.\d{6}' # NOTE(treinish): Could result in a false positive, but it # shouldn't be an issue for this case. timestamp_re = ('\d{4}-[0,1]\d-[0-3]\d[ ,T]' @@ -274,8 +275,9 @@ class ApiSampleTestBase(integrated_helpers._IntegratedTestBase): '(Z|(\+|-)\d{2}:\d{2}|\.\d{6}|)') return { 'isotime': isotime_re, + 'strtime': strtime_re, + 'strtime_or_none': r'None|%s' % strtime_re, 'timestamp': timestamp_re, - 'timestamp_or_none': r'None|%s' % timestamp_re, 'password': '[0-9a-zA-Z]{1,12}', 'ip': '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}', 'ip6': '([0-9a-zA-Z]{1,4}:){1,7}:?[0-9a-zA-Z]{1,4}', diff --git a/nova/tests/integrated/v3/api_samples/all_extensions/server-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/all_extensions/server-get-resp.json.tpl index fb101ec90440..e00029691071 100644 --- a/nova/tests/integrated/v3/api_samples/all_extensions/server-get-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/all_extensions/server-get-resp.json.tpl @@ -59,7 +59,7 @@ "os-extended-status:vm_state": "active", "os-extended-volumes:volumes_attached": [], "os-pci:pci_devices": [{"id": 1}], - "os-server-usage:launched_at": "%(timestamp)s", + "os-server-usage:launched_at": "%(strtime)s", "os-server-usage:terminated_at": null, "progress": 0, "os-security-groups:security_groups": [ diff --git a/nova/tests/integrated/v3/api_samples/all_extensions/servers-details-resp.json.tpl b/nova/tests/integrated/v3/api_samples/all_extensions/servers-details-resp.json.tpl index e76726d2c673..652714cf0f27 100644 --- a/nova/tests/integrated/v3/api_samples/all_extensions/servers-details-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/all_extensions/servers-details-resp.json.tpl @@ -60,7 +60,7 @@ "os-extended-status:vm_state": "active", "os-extended-volumes:volumes_attached": [], "os-pci:pci_devices": [{"id": 1}], - "os-server-usage:launched_at": "%(timestamp)s", + "os-server-usage:launched_at": "%(strtime)s", "os-server-usage:terminated_at": null, "progress": 0, "os-security-groups:security_groups": [ diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-resp.json.tpl index c1657b84811b..40418501eaa2 100644 --- a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": 0, "deleted_at": null, "id": %(aggregate_id)s, diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl index c5481c041d7c..e7d32bf20e42 100644 --- a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova2", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": 0, "deleted_at": null, "hosts": [], @@ -10,6 +10,6 @@ "availability_zone": "nova2" }, "name": "newname", - "updated_at": "%(timestamp)s" + "updated_at": "%(strtime)s" } } diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl index aae068526b3b..217dd9e29fe4 100644 --- a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": 0, "deleted_at": null, "hosts": [ diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-get-resp.json.tpl index 348414a7579d..9e2c4aa1e9c4 100644 --- a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-get-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-get-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": 0, "deleted_at": null, "hosts": [], diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl index 9b5fe1fdd213..21e598ff5574 100644 --- a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl @@ -2,7 +2,7 @@ "aggregates": [ { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": 0, "deleted_at": null, "hosts": [], diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl index 92ab5b6241a1..6feec2d16540 100644 --- a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": 0, "deleted_at": null, "hosts": [], diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl index 348414a7579d..9e2c4aa1e9c4 100644 --- a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl @@ -1,7 +1,7 @@ { "aggregate": { "availability_zone": "nova", - "created_at": "%(timestamp)s", + "created_at": "%(strtime)s", "deleted": 0, "deleted_at": null, "hosts": [], diff --git a/nova/tests/integrated/v3/api_samples/os-availability-zone/availability-zone-detail-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-availability-zone/availability-zone-detail-resp.json.tpl index 948f8f12a25c..bb9f01c1e09e 100644 --- a/nova/tests/integrated/v3/api_samples/os-availability-zone/availability-zone-detail-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-availability-zone/availability-zone-detail-resp.json.tpl @@ -6,42 +6,42 @@ "nova-consoleauth": { "active": true, "available": true, - "updated_at": %(timestamp_or_none)s + "updated_at": %(strtime_or_none)s } }, "cert": { "nova-cert": { "active": true, "available": true, - "updated_at": %(timestamp_or_none)s + "updated_at": %(strtime_or_none)s } }, "conductor": { "nova-conductor": { "active": true, "available": true, - "updated_at": %(timestamp_or_none)s + "updated_at": %(strtime_or_none)s } }, "cells": { "nova-cells": { "active": true, "available": true, - "updated_at": %(timestamp_or_none)s + "updated_at": %(strtime_or_none)s } }, "scheduler": { "nova-scheduler": { "active": true, "available": true, - "updated_at": %(timestamp_or_none)s + "updated_at": %(strtime_or_none)s } }, "network": { "nova-network": { "active": true, "available": true, - "updated_at": %(timestamp_or_none)s + "updated_at": %(strtime_or_none)s } } }, @@ -56,7 +56,7 @@ "nova-compute": { "active": true, "available": true, - "updated_at": %(timestamp_or_none)s + "updated_at": %(strtime_or_none)s } } }, diff --git a/nova/tests/integrated/v3/api_samples/os-server-actions/server-action-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-server-actions/server-action-get-resp.json.tpl index bb702f3e26cd..b4ccd8768072 100644 --- a/nova/tests/integrated/v3/api_samples/os-server-actions/server-action-get-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-server-actions/server-action-get-resp.json.tpl @@ -5,20 +5,20 @@ "request_id": "%(request_id)s", "user_id": "%(integer_id)s", "project_id": "%(integer_id)s", - "start_time": "%(timestamp)s", + "start_time": "%(strtime)s", "message": "", "events": [ { "event": "%(event)s", - "start_time": "%(timestamp)s", - "finish_time": "%(timestamp)s", + "start_time": "%(strtime)s", + "finish_time": "%(strtime)s", "result": "%(result)s", "traceback": "" }, { "event": "%(event)s", - "start_time": "%(timestamp)s", - "finish_time": "%(timestamp)s", + "start_time": "%(strtime)s", + "finish_time": "%(strtime)s", "result": "%(result)s", "traceback": "" } diff --git a/nova/tests/integrated/v3/api_samples/os-server-actions/server-actions-list-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-server-actions/server-actions-list-resp.json.tpl index 088bad44cf17..542b9e73bc39 100644 --- a/nova/tests/integrated/v3/api_samples/os-server-actions/server-actions-list-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-server-actions/server-actions-list-resp.json.tpl @@ -6,7 +6,7 @@ "request_id": "%(request_id)s", "user_id": "%(integer_id)s", "project_id": "%(integer_id)s", - "start_time": "%(timestamp)s", + "start_time": "%(strtime)s", "message": "" }, { @@ -15,7 +15,7 @@ "request_id": "%(request_id)s", "user_id": "%(integer_id)s", "project_id": "%(integer_id)s", - "start_time": "%(timestamp)s", + "start_time": "%(strtime)s", "message": "" } ] diff --git a/nova/tests/integrated/v3/api_samples/os-server-usage/server-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-server-usage/server-get-resp.json.tpl index 6c66e06cd284..67325562240d 100644 --- a/nova/tests/integrated/v3/api_samples/os-server-usage/server-get-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-server-usage/server-get-resp.json.tpl @@ -1,6 +1,6 @@ { "server": { - "os-server-usage:launched_at": "%(timestamp)s", + "os-server-usage:launched_at": "%(strtime)s", "os-server-usage:terminated_at": null, "addresses": { "private": [ diff --git a/nova/tests/integrated/v3/api_samples/os-server-usage/servers-detail-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-server-usage/servers-detail-resp.json.tpl index a5c07d2a6866..1adbde9767f0 100644 --- a/nova/tests/integrated/v3/api_samples/os-server-usage/servers-detail-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-server-usage/servers-detail-resp.json.tpl @@ -3,7 +3,7 @@ { "status": "ACTIVE", "created": "%(isotime)s", - "os-server-usage:launched_at": "%(timestamp)s", + "os-server-usage:launched_at": "%(strtime)s", "user_id": "fake", "addresses": { "private": [ diff --git a/nova/tests/integrated/v3/api_samples/os-services/services-list-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-services/services-list-get-resp.json.tpl index ee7f4181e3f0..7a5c586d5d93 100644 --- a/nova/tests/integrated/v3/api_samples/os-services/services-list-get-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/os-services/services-list-get-resp.json.tpl @@ -7,7 +7,7 @@ "id": 1, "state": "up", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "internal" }, { @@ -17,7 +17,7 @@ "id": 2, "state": "up", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "nova" }, { @@ -27,7 +27,7 @@ "id": 3, "state": "down", "status": "enabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "internal" }, { @@ -37,7 +37,7 @@ "id": 4, "state": "down", "status": "disabled", - "updated_at": "%(timestamp)s", + "updated_at": "%(strtime)s", "zone": "nova" } ]