[openstack-dev] [nova] os-capabilities library created

Ed Leafe ed at leafe.com
Thu Aug 11 21:25:12 UTC 2016

On Aug 3, 2016, at 6:47 PM, Jay Pipes <jaypipes at gmail.com> wrote:

> Please see the README for examples of how the library works and how I'm thinking of structuring these capability strings and symbols. I intend os-capabilities to be the place where the OpenStack community catalogs and collates standardized features for hardware, devices, networks, storage, hypervisors, etc.

Overall this looks good, although it seems a bit odd to have ALL_CAPS_STRINGS to represent all:caps:strings throughout. The example you gave:

>>> print os_caps.HW_CPU_X86_SSE42

begs the question: is the rule going to be that capability for any constant will always be: CONST.lower().replace(“_”, “:”) ? If so, I’m not sure I see how the capabilities are not themselves constants.

The namespacing is ugly, but I guess it’s necessary given that names are not simple tags, but nested data structures in string form.

-- Ed Leafe

More information about the OpenStack-dev mailing list