[openstack-dev] FW: Displaying a flavors extra_specs in horizon

Bhandaru, Malini K malini.k.bhandaru at intel.com
Tue Dec 4 08:01:30 UTC 2012



From: Bhandaru, Malini K
Sent: Monday, December 03, 2012 11:30 PM
To: Dale, StewartX T
Subject: RE: Displaying a flavors extra_specs in horizon

Hello Dale!
You should be able to access the extra-specs associated with an instance if you have the instance's flavor-id,
Ensure you have the latest greatest by updating "horizon". If you want a dictionary, specify raw=True.
<horizon-home>/openstack_dashboard/api/nova.py specifies ..


def flavor_get_extras(request, flavor_id, raw=False):
    """Get flavor extra specs."""
    flavor = novaclient(request).flavors.get(flavor_id)
    extras = flavor.get_keys()
    if raw:
        return extras
    return [FlavorExtraSpec(flavor_id, key, value) for
            key, value in extras.items()]

Regards
Malini

From: openstack-bounces+malini.k.bhandaru=intel.com at lists.launchpad.net<mailto:openstack-bounces+malini.k.bhandaru=intel.com at lists.launchpad.net> [mailto:openstack-bounces+malini.k.bhandaru=intel.com at lists.launchpad.net]<mailto:[mailto:openstack-bounces+malini.k.bhandaru=intel.com at lists.launchpad.net]> On Behalf Of Dale, StewartX T
Sent: Monday, December 03, 2012 3:01 PM
To: openstack at lists.launchpad.net<mailto:openstack at lists.launchpad.net>
Subject: [Openstack] Displaying a flavors extra_specs in horizon

Hi All,

I am currently trying to make some modifications to the nova -> instances dashboard to be able to show the extra_specs field of the flavor each instance is running but am running into an issue of how to obtain the extra_specs field.  I came across the following blueprint (https://blueprints.launchpad.net/horizon/+spec/flavor-extra-specs) which is for adding interfaces to horizon to provide this data but it does not mention any current work around for this.

Is there currently some way for me to access this data?

-Stewart Dale

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20121204/6d0a8951/attachment.html>


More information about the OpenStack-dev mailing list