Comment 16 for bug 1582693

Revision history for this message
Matt Riedemann (mriedem) wrote :

You can see the glance metadef prefixes defined here:

https://github.com/openstack/glance/blob/master/etc/metadefs/compute-libvirt.json#L7

    "resource_type_associations": [
        {
            "name": "OS::Glance::Image",
            "prefix": "hw_"
        },
        {
            "name": "OS::Nova::Flavor",
            "prefix": "hw:"
        }
    ],

So that's why for an image the prefix is hw_ and we get hw_boot_menu, but for a flavor extra spec we get hw:boot_menu. But if you look at the watchdog action, it's not the same:

https://github.com/openstack/glance/blob/master/etc/metadefs/compute-watchdog.json#L7

There is no prefix defined in resource_type_associations so the prefix is built into the property name:

    "properties": {
        "hw_watchdog_action": {
            "title": "Watchdog Action",
            "description": "For the libvirt driver, you can enable and set the behavior of a virtual hardware watchdog device for each flavor. Watchdog devices keep an eye on the guest server, and carry out the configured action, if the server hangs. The watchdog uses the i6300esb device (emulating a PCI Intel 6300ESB). If hw_watchdog_action is not specified, the watchdog is disabled. Watchdog behavior set using a specific image's properties will override behavior set using flavors.",
            "type": "string",
            "enum": [
                "disabled",
                "reset",
                "poweroff",
                "pause",
                "none"
            ]
        }
    }

Which is why we don't get hw:watchdog_action.