Skip to contentSkip to conversation

Some questions about recipes-phosphor/inventory

DISCUSSION Tony Lee (李文富) 2 participants 2 messages Jun 20, 2019 – Jul 8, 2019

lore
Share & tools
lore
#0 lore raw

Hi Brad,

As our phosphor-nvme proposal, https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/19061
it will set properties to D-bus "xyz.openbmc_project.Inventory.Manager" and object paths are "/xyz/openbmc_project/inventory/system/chassis/motherboard/nvme(index)"

I have found two ways to achieve the above goals, but I have some problems with these two methods.

1.Add a yaml file to openbmc/meta-phosphor/recipes-phosphor/inventory to create those object paths.

Creating a bb file named “phosphor-inventory-manager-nvme.bb” and follow the way like “phosphor-inventory-manager-assettag.bb”.

One of the problems is that not every developer needs these paths.
Another question is that it doesn't know how many NVMe drives were used for other projects.

2.Add a description of how to create object paths to D-bus "xyz.openbmc_project.Inventory.Manager" and give an example in README file.

Which approach do you think is better or do you have any other suggestions?

Thanks
Best Regards,
Tony

#1 lore raw
Quoted 1 line · Tony Lee (李文富)

Hi Brad,

Hi Tony

It took me about three weeks to reply to this - so if you've picked one approach already I understand.

Quoted 8 lines

As our phosphor-nvme proposal, https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/19061
it will set properties to D-bus "xyz.openbmc_project.Inventory.Manager" and object paths are "/xyz/openbmc_project/inventory/system/chassis/motherboard/nvme(index)"

I have found two ways to achieve the above goals, but I have some problems with these two methods.

1.Add a yaml file to openbmc/meta-phosphor/recipes-phosphor/inventory to create those object paths.

I'm not sure you need any yaml files at all. In your design you mentioned a json config file to be read by a new nvme manager application. That seems suitable.

Quoted 2 lines

Creating a bb file named “phosphor-inventory-manager-nvme.bb” and follow the way like “phosphor-inventory-manager-assettag.bb”.

I wouldn't recommend this...and I don't see how it fits into your design (19061)?

Quoted 2 lines

One of the problems is that not every developer needs these paths.

I'm not sure what you are meaning or why you are worried about here.
Developers can always leave nvme-manager out of their configuration if they don't need it. What am I not understanding?

Quoted 1 line

Another question is that it doesn't know how many NVMe drives were used for other projects

It seems like the new nvme manager application would know how many
nvme drives there are, and thus knows how many times to call xyz.openbmc_project.Inventory.Mananger.Notify.

Quoted 2 lines

2.Add a description of how to create object paths to D-bus "xyz.openbmc_project.Inventory.Manager" and give an example in README file.

Adding documentation is always a good idea and very appreciated.

Quoted 2 lines

Which approach do you think is better or do you have any other suggestions?

I think the third option would be to have your new nvme manager application call xyz.openbmc_project.Inventory.Mananger.Notify when it finds new nvme drives and their corresponding inventory information (serial number, etc). Have you looked at that and could it meet your needs?

thx - brad