Frage

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.

War es hilfreich?

Lösung

This information is now supported in libcloud API (ver - 0.13) driver for openstack. You can call flavor.vcpus to get the vCPU information.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top