How can I get VM instance running time in openstack via python API? -
i need small billing report usage of vms inside openstack after stopped, far find way flavor information (vcpu, disk, memory) instance name.
and want know vm's startup time calculate now.
are there ways fetch openstack python api ?
it nice if can paste code well.
(i got answer china-openstack community, , shared here)
in novaclient usage module, instance (active or terminated) can fetched list
api, detail information fetched via get
api, not clear information exposed via python document.
fortunately openstack api : os-simple-tenant-usage tells data structure, uptime
want.
"tenant_usage": { "server_usages": [ { ... (skipped) "uptime": 3600, "vcpus": 1 } ],
openstack dashboard (at least folsom version) use api well.
Comments
Post a Comment