Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
199d3d8
commit 8340401
Showing
30 changed files
with
608 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
doc/api_samples/os-simple-tenant-usage/v2.40/simple-tenant-usage-get-detail.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"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" | ||
} | ||
] | ||
} |
33 changes: 33 additions & 0 deletions
33
doc/api_samples/os-simple-tenant-usage/v2.40/simple-tenant-usage-get-specific.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"tenant_usage": { | ||
"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 | ||
} | ||
], | ||
"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 | ||
}, | ||
"tenant_usage_links": [ | ||
{ | ||
"href": "http://openstack.example.com/v2.1/6f70656e737461636b20342065766572/os-simple-tenant-usage/6f70656e737461636b20342065766572?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" | ||
} | ||
] | ||
} |
19 changes: 19 additions & 0 deletions
19
doc/api_samples/os-simple-tenant-usage/v2.40/simple-tenant-usage-get.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"tenant_usages": [ | ||
{ | ||
"start": "2012-10-08T21:10:44.587336", | ||
"stop": "2012-10-08T22: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 | ||
} | ||
], | ||
"tenant_usages_links": [ | ||
{ | ||
"href": "http://openstack.example.com/v2.1/6f70656e737461636b20342065766572/os-simple-tenant-usage?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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.