83404013cb
Add optional parameters 'limit' and 'marker' to the os-simple-tenant-usage endpoints for pagaination. /os-simple-tenant-usage?limit={limit}&marker={instance_uuid} /os-simple-tenant-usage/{tenant}?limit={limit}&marker={instance_uuid} The aggregate usage totals may no longer reflect all instances for a tenant, but rather just the instances for a given page. API consumers will need to stitch the aggregate data back together (add the totals) if a tenant's instances span several pages. Implements blueprint paginate-simple-tenant-usage Change-Id: Ic8e9f869f1b855f968967bedbf77542f287f26c0
36 lines
1.3 KiB
JSON
36 lines
1.3 KiB
JSON
{
|
|
"tenant_usages": [
|
|
{
|
|
"start": "2012-10-08T20:10:44.587336",
|
|
"stop": "2012-10-08T21:10:44.587336",
|
|
"tenant_id": "6f70656e737461636b20342065766572",
|
|
"total_hours": 1.0,
|
|
"total_local_gb_usage": 1.0,
|
|
"total_memory_mb_usage": 512.0,
|
|
"total_vcpus_usage": 1.0,
|
|
"server_usages": [
|
|
{
|
|
"ended_at": null,
|
|
"flavor": "m1.tiny",
|
|
"hours": 1.0,
|
|
"instance_id": "1f1deceb-17b5-4c04-84c7-e0d4499c8fe0",
|
|
"local_gb": 1,
|
|
"memory_mb": 512,
|
|
"name": "instance-2",
|
|
"started_at": "2012-10-08T20:10:44.541277",
|
|
"state": "active",
|
|
"tenant_id": "6f70656e737461636b20342065766572",
|
|
"uptime": 3600,
|
|
"vcpus": 1
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"tenant_usages_links": [
|
|
{
|
|
"href": "http://openstack.example.com/v2.1/6f70656e737461636b20342065766572/os-simple-tenant-usage?detailed=1&end=2016-10-12+18%3A22%3A04.868106&limit=1&marker=1f1deceb-17b5-4c04-84c7-e0d4499c8fe0&start=2016-10-12+18%3A22%3A04.868106",
|
|
"rel": "next"
|
|
}
|
|
]
|
|
}
|