I just wanted to retrieve server's uptime. I mean real uptime for the time the server has been UP, not since its creation.
- I created a new machine, the machine was running and I was getting some update value; this was nicely incremented
- Then I stopped the machine and issued the request again: The response correctly reports "state": "stopped", but the uptime attr. is still being incremented. ==> Again, in this extension it is not uptime, it is time from creation
Request to the os-simple-tenant-usage extension (after obtaining an auth. token):
GET http://rdo:8774/v2/4e1900cf21924a098709c23480e157c0/os-simple-tenant-usage/4e1900cf21924a098709c23480e157c0
(with the correct tenant ID)
Response (notice the machine is stopped and uptime is a non-zero value):
{
"tenant_usage": {
"total_memory_mb_usage": 0.000007111111111111112,
"total_vcpus_usage": 1.388888888888889e-8,
"start": "2014-02-25T14:20:19.660179",
"tenant_id": "4e1900cf21924a098709c23480e157c0",
"stop": "2014-02-25T14:20:19.660184",
"server_usages": [
{
"instance_id": "ca4465a8-38ca-40de-b138-82efcc88c7cf",
"uptime": 1199,
"started_at": "2014-02-25T14:00:20.000000",
"ended_at": null,
"memory_mb": 512,
"tenant_id": "4e1900cf21924a098709c23480e157c0",
"state": "stopped",
"hours": 1.388888888888889e-8,
"vcpus": 1,
"flavor": "m1.tiny",
"local_gb": 1,
"name": "m1"
}
],
"total_hours": 1.388888888888889e-8,
"total_local_gb_usage": 1.388888888888889e-8
}
}
So despite its name uptime it is just time since the server creation.