Handling State Sensor Association in Bmcweb

Patrick Williams patrick at stwcx.xyz
Wed Sep 7 06:21:51 AEST 2022


On Tue, Sep 06, 2022 at 03:46:25PM +0000, Rohit Pai wrote:
>                Option 2: There will be an explicit association defined between the inventory object and the state sensor object
> App1 :
>    - /xyz/openbmc_project/inventory/system/processors/CPU0
>         - xyz.openbmc_project.Inventory.Item.Cpu
>         - .Associations
>               - all_states
>                      - /xyz/openbmc_project/State/CPU0_Performance
>             App2 (pldmd) :
> 
>    - /xyz/openbmc_project/State/CPU0_Performance
> 
>         - xyz.openbmc_project.State.ProcessorPerformance
>                New keyword 'all_states'  is used as an association string.
>                Bmcweb will use this association to find the object path of the state sensor which implements the state sensor which belongs to the CPU0 instance.
>                This pattern is very similar to how the numeric sensor code is working today.
> 
> Please provide your thoughts/preferences regarding the options.
> Comment If there are other ways to solve the same problem.

Associations would be the preference.  The inventory tree should be
[mostly] static and non-changing.  Signals from this tree should be
relatively infrequent.

Generally, I think associations should be named using past participle
forms of speech.  So, 'all_states' probably isn't a name in line with
this.

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220906/2aa5c0ee/attachment.sig>


More information about the openbmc mailing list