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

Jay Pipes jaypipes at gmail.com
Fri Aug 12 13:20:47 UTC 2016


On 08/12/2016 07:49 AM, Jim Rollenhagen wrote:
> On Thu, Aug 11, 2016 at 9:03 PM, Jay Pipes <jaypipes at gmail.com> wrote:
>> On 08/11/2016 05:46 PM, Clay Gerrard wrote:
>>>
>>> On Thu, Aug 11, 2016 at 2:25 PM, Ed Leafe <ed at leafe.com
>>> <mailto:ed at leafe.com>> wrote:
>>>
>>>
>>>     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
>>>     hw:cpu:x86:sse42
>>>
>>>
>>> Just to be clear, this project doesn't *do* anything right?  Like it
>>> won't parse `/proc/cpuinfo` and actually figure out a machines cpu flags
>>> that can then be broadcast as "capabilities"?
>>>
>>> Like, TBH I think it took me longer than I would prefer to honestly
>>> admit to find out about /sys/block/<device>/queue/rotational [1]
>>>
>>> So if there was a library about standardizing how hardware capabilities
>>> are discovered and reported - that maybe seems like a sane sort of thing
>>> for a collection of related projects to agree on.  But I'm not sure if
>>> this does that?
>>
>>
>> Hi Clay!
>>
>> It does not currently do that, but I'm interested in adding this capability
>> (pun intended).
>
> ironic-python-agent does some of this discovery. It isn't
> comprehensive, but it's a good starting point if we want to
> lift some of that code out. The classes are here, and the
> discovery things are in the same file if you grep around. :)
>
> https://github.com/openstack/ironic-python-agent/blob/master/ironic_python_agent/hardware.py#L186-L251

Rock on. Duly noted :)

-jay



More information about the OpenStack-dev mailing list