Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does the Notify method of phosphor-inventory-manager support the com.ibm... interface? #3

Open
lxwinspur opened this issue Dec 30, 2020 · 2 comments

Comments

@lxwinspur
Copy link
Contributor

As far as I know, the Notify method was implemented in phosphor-inventory-manager, and it only supports the xyz.openbmc_project... interface.

https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Inventory/Manager.interface.yaml
https://github.com/openbmc/phosphor-inventory-manager/blob/master/pimgen.py#L574-L575
https://github.com/openbmc/phosphor-inventory-manager/blob/master/manager.cpp#L155-L160

When we built phosphor-inventory-manager, it will be generated a generated.cpp file, and the _makers map will be constructed(_makers only has xyz.openbmc_project interface)

// This file was auto generated.  Do not edit.
#include "manager.hpp"
#include "utils.hpp"
#include "functor.hpp"
#include <xyz/openbmc_project/Memory/MemoryECC/server.hpp>
#include <xyz/openbmc_project/Ipmi/SOL/server.hpp>
#include <xyz/openbmc_project/Ipmi/SessionInfo/server.hpp>
#include <xyz/openbmc_project/Chassis/Intrusion/server.hpp>
#include <xyz/openbmc_project/State/BMC/server.hpp>
#include <xyz/openbmc_project/State/Chassis/server.hpp>
#include <xyz/openbmc_project/State/Drive/server.hpp>
#include <xyz/openbmc_project/State/PowerOnHours/server.hpp>
#include <xyz/openbmc_project/State/ScheduledHostTransition/server.hpp>
#include <xyz/openbmc_project/State/Host/server.hpp>
#include <xyz/openbmc_project/State/Boot/Raw/server.hpp>
#include <xyz/openbmc_project/State/Boot/Progress/server.hpp>
#include <xyz/openbmc_project/State/Decorator/OperationalStatus/server.hpp>
#include <xyz/openbmc_project/State/Decorator/Availability/server.hpp>
#include <xyz/openbmc_project/State/OperatingSystem/Status/server.hpp>
#include <xyz/openbmc_project/Network/EthernetInterface/server.hpp>
#include <xyz/openbmc_project/Network/Client/server.hpp>
#include <xyz/openbmc_project/Network/SystemConfiguration/server.hpp>
#include <xyz/openbmc_project/Network/Neighbor/server.hpp>
#include <xyz/openbmc_project/Network/VLAN/server.hpp>
#include <xyz/openbmc_project/Network/MACAddress/server.hpp>
#include <xyz/openbmc_project/Network/DHCPConfiguration/server.hpp>
#include <xyz/openbmc_project/Network/IP/server.hpp>
#include <xyz/openbmc_project/Network/Experimental/Tunnel/server.hpp>
#include <xyz/openbmc_project/Network/Experimental/Bond/server.hpp>
#include <xyz/openbmc_project/Certs/Entry/server.hpp>
#include <xyz/openbmc_project/Certs/Certificate/server.hpp>
#include <xyz/openbmc_project/Association/Definitions/server.hpp>
#include <xyz/openbmc_project/Nvme/Status/server.hpp>
#include <xyz/openbmc_project/Control/ChassisCapabilities/server.hpp>
#include <xyz/openbmc_project/Control/FanSpeed/server.hpp>
#include <xyz/openbmc_project/Control/PowerSupplyRedundancy/server.hpp>
#include <xyz/openbmc_project/Control/ThermalMode/server.hpp>
#include <xyz/openbmc_project/Control/VoltageRegulatorControl/server.hpp>
#include <xyz/openbmc_project/Control/Mode/server.hpp>
#include <xyz/openbmc_project/Control/FieldMode/server.hpp>
#include <xyz/openbmc_project/Control/CFMLimit/server.hpp>
#include <xyz/openbmc_project/Control/FanPwm/server.hpp>
#include <xyz/openbmc_project/Control/PowerSupplyAttributes/server.hpp>
#include <xyz/openbmc_project/Control/VoltageRegulatorMode/server.hpp>
#include <xyz/openbmc_project/Control/MinimumShipLevel/server.hpp>
#include <xyz/openbmc_project/Control/TPM/Policy/server.hpp>
#include <xyz/openbmc_project/Control/Service/Attributes/server.hpp>
#include <xyz/openbmc_project/Control/Service/SocketAttributes/server.hpp>
#include <xyz/openbmc_project/Control/Boot/Mode/server.hpp>
#include <xyz/openbmc_project/Control/Boot/RebootAttempts/server.hpp>
#include <xyz/openbmc_project/Control/Boot/RebootPolicy/server.hpp>
#include <xyz/openbmc_project/Control/Boot/Source/server.hpp>
#include <xyz/openbmc_project/Control/Host/TurboAllowed/server.hpp>
#include <xyz/openbmc_project/Control/Power/ACPIPowerState/server.hpp>
#include <xyz/openbmc_project/Control/Power/RestorePolicy/server.hpp>
#include <xyz/openbmc_project/Control/Power/Cap/server.hpp>
#include <xyz/openbmc_project/Control/Security/RestrictionMode/server.hpp>
#include <xyz/openbmc_project/Control/Security/SpecialMode/server.hpp>
#include <xyz/openbmc_project/Common/ObjectPath/server.hpp>
#include <xyz/openbmc_project/Common/Progress/server.hpp>
#include <xyz/openbmc_project/Common/UUID/server.hpp>
#include <xyz/openbmc_project/Common/FilePath/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/ManufacturerExt/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/VoltageControl/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/Asset/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/VendorInformation/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/CoolingType/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/Revision/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/CLEI/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/LocationCode/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/Compatible/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/Replaceable/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/MeetsMinimumShipLevel/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/AssetTag/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/Cacheable/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Rotor/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/PCIeSlot/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/DiskBackplane/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Fan/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Panel/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Ethernet/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Chassis/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Dimm/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/PCIeDevice/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Cpu/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/NetworkInterface/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/CpuCore/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Accelerator/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Vrm/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Connector/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/MemoryBuffer/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Board/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/StorageController/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Global/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Tpm/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Bmc/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/PowerSupply/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/PersistentMemory/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/System/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Board/IOBoard/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Board/Motherboard/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/PersistentMemory/PowerManagementPolicy/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/PersistentMemory/SecurityCapabilities/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/PersistentMemory/Partition/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Dimm/MemoryLocation/server.hpp>
#include <xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig/server.hpp>
#include <xyz/openbmc_project/Inventory/Source/PLDM/FRU/server.hpp>
#include <xyz/openbmc_project/Inventory/Source/PLDM/Entity/server.hpp>
#include <xyz/openbmc_project/Led/Physical/server.hpp>
#include <xyz/openbmc_project/Led/Group/server.hpp>
#include <xyz/openbmc_project/Sensor/Value/server.hpp>
#include <xyz/openbmc_project/Sensor/Threshold/Warning/server.hpp>
#include <xyz/openbmc_project/Sensor/Threshold/Critical/server.hpp>
#include <xyz/openbmc_project/User/Attributes/server.hpp>
#include <xyz/openbmc_project/User/PrivilegeMapperEntry/server.hpp>
#include <xyz/openbmc_project/User/AccountPolicy/server.hpp>
#include <xyz/openbmc_project/User/Ldap/Config/server.hpp>
#include <xyz/openbmc_project/PLDM/Event/server.hpp>
#include <xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR/server.hpp>
#include <xyz/openbmc_project/Channel/ChannelAccess/server.hpp>
#include <xyz/openbmc_project/Object/Enable/server.hpp>
#include <xyz/openbmc_project/Dump/Entry/BMC/server.hpp>
#include <xyz/openbmc_project/Dump/Entry/System/server.hpp>
#include <xyz/openbmc_project/Logging/ErrorBlocksTransition/server.hpp>
#include <xyz/openbmc_project/Logging/Entry/server.hpp>
#include <xyz/openbmc_project/Logging/Event/server.hpp>
#include <xyz/openbmc_project/Logging/Settings/server.hpp>
#include <xyz/openbmc_project/VirtualMedia/Stats/server.hpp>
#include <xyz/openbmc_project/VirtualMedia/MountPoint/server.hpp>
#include <xyz/openbmc_project/VirtualMedia/Process/server.hpp>
#include <xyz/openbmc_project/Software/ActivationBlocksTransition/server.hpp>
#include <xyz/openbmc_project/Software/ApplyOptions/server.hpp>
#include <xyz/openbmc_project/Software/ExtendedVersion/server.hpp>
#include <xyz/openbmc_project/Software/Version/server.hpp>
#include <xyz/openbmc_project/Software/ApplyTime/server.hpp>
#include <xyz/openbmc_project/Software/Activation/server.hpp>
#include <xyz/openbmc_project/Software/RedundancyPriority/server.hpp>
#include <xyz/openbmc_project/Software/ActivationProgress/server.hpp>
#include <xyz/openbmc_project/Software/RequestedRedundancyPriority/server.hpp>
#include <xyz/openbmc_project/Time/EpochTime/server.hpp>
#include <xyz/openbmc_project/Time/Synchronization/server.hpp>
#include <xyz/openbmc_project/PFR/Attributes/server.hpp>
#include "gen_serialization.hpp"

But I found that openpower-vpd-parse uses the Notify method and passes the com.ibm... interface, so I don’t know if this interface will be added to inventory-manager
https://gerrit.openbmc-project.xyz/c/openbmc/openpower-vpd-parser/+/29981/23/ibm_vpd_app.cpp#225

Please correct me if I am wrong, Thanks.

@williamspatrick
Copy link
Member

The inventory-manager build process simply imports any and all dbus YAML that it finds when it is built.

https://github.com/openbmc/phosphor-inventory-manager/blob/84b99d990c98897df049493eb73aa41b9b9b7adb/Makefile.am#L46
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb#L42

The YAML gets installed in to that path by the phosphor-dbus-interfaces package based on the OBMC_ORG_YAML_SUBDIRS bitbake variable:

https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb#L25

If your inventory-manager is missing those header files, it is likely your whole system is missing them because phosphor-dbus-interfaces wasn't told that you wanted them. By default it only selects the xyz.openbmc_project ones.

https://github.com/openbmc/openbmc/blob/master/meta-phosphor/conf/distro/include/phosphor-base.inc#L150

If you want com.ibm you'll need to add to that OBMC_ORG_YAML_SUBDIRS variable. It is likely that you also want org.open_power too.

meta-ibm/conf/distro/include/ibm-distrovars.inc:OBMC_ORG_YAML_SUBDIRS += " com/ibm"
meta-openpower/conf/distro/include/openpower-distrovars.inc:OBMC_ORG_YAML_SUBDIRS += " org/open_power"

@lxwinspur
Copy link
Contributor Author

@williamspatrick Thanks for your reply :)

Yes, we need to add com/ibm and org/open_power to the OBMC_ORG_YAML_SUBDIRS variable, and I did.
https://gerrit.openbmc-project.xyz/c/openbmc/meta-inspur/+/39255

But in the get_interfaces method of the pimgen.py script, I found that it parses only phosphor dbus related interface files(xyz) and instead of com or org.
https://github.com/openbmc/phosphor-inventory-manager/blob/master/pimgen.py#L574

Therefore, through my testing, I still do not see that it includes the com.ibm interface in the generated.cpp file.
Perhaps I still do not understand this, could you help me?

LuluTHSu pushed a commit to wistron-corporation/openpower-vpd-parser that referenced this issue Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants