I prefer to use apache-libcloud instead of openstack python API to access openstack instance.
How can I get the flavor's vcpu information using libcloud ?
#nc= get_openstack()
flavors = nc.list_sizes()
for flavor in flavors:
print flavor.id, flavor.name, flavor.ram, flavor.disk, flavor.bandwidth
# print flavor.vcpus # this is not supported.
It is supported in Openstack API.
This information is now supported in libcloud API (ver - 0.13) driver for openstack. You can call flavor.vcpus
to get the vCPU information.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.