Home
last modified time | relevance | path

Searched refs:psuInventoryPath (Results 1 – 21 of 21) sorted by relevance

/openbmc/phosphor-power/tools/power-utils/
H A Dversion.cpp53 PsuVersionInfo getVersionInfo(const std::string& psuInventoryPath) in getVersionInfo() argument
68 auto devicePath = devices->find(psuInventoryPath); in getVersionInfo()
72 entry("PATH=%s", psuInventoryPath.c_str())); in getVersionInfo()
107 std::string getVersionJson(const std::string& psuInventoryPath) in getVersionJson() argument
110 const auto [devicePath, type, fileName] = getVersionInfo(psuInventoryPath); in getVersionJson()
135 const std::string& psuInventoryPath) in getVersionDbus() argument
138 const auto [i2cbus, i2caddr] = getPsuI2c(bus, psuInventoryPath); in getVersionDbus()
171 const std::string& psuInventoryPath) in getVersion() argument
179 version = internal::getVersionJson(psuInventoryPath); in getVersion()
184 version = internal::getVersionDbus(bus, psuInventoryPath); in getVersion()
H A Dmodel.cpp55 std::string getModelJson(const std::string& psuInventoryPath) in getModelJson() argument
67 auto device = it->find(psuInventoryPath); in getModelJson()
71 "Unable to find device path for PSU {}", psuInventoryPath)}; in getModelJson()
77 std::format("Empty device path for PSU {}", psuInventoryPath)}; in getModelJson()
123 const std::string& psuInventoryPath) in getModelDbus() argument
126 const auto [i2cBus, i2cAddr] = getPsuI2c(bus, psuInventoryPath); in getModelDbus()
138 std::string getModel(sdbusplus::bus_t& bus, const std::string& psuInventoryPath) in getModel() argument
146 model = internal::getModelJson(psuInventoryPath); in getModel()
151 model = internal::getModelDbus(bus, psuInventoryPath); in getModel()
H A Dupdater.cpp50 const std::string& model, const std::string& psuInventoryPath, in getClassInstance() argument
55 return std::make_unique<aeiUpdater::AeiUpdater>(psuInventoryPath, in getClassInstance()
58 return std::make_unique<Updater>(psuInventoryPath, devPath, imageDir); in getClassInstance()
184 bool update(sdbusplus::bus_t& bus, const std::string& psuInventoryPath, in update() argument
187 auto devPath = utils::getDevicePath(bus, psuInventoryPath); in update()
197 fsPath.filename().string(), psuInventoryPath, devPath, imageDir); in update()
202 psuInventoryPath); in update()
213 Updater::Updater(const std::string& psuInventoryPath, in Updater() argument
215 bus(sdbusplus::bus::new_default()), psuInventoryPath(psuInventoryPath), in Updater()
264 auto service = util::getService(psuInventoryPath, INVENTORY_IFACE, bus); in setPresent()
[all …]
H A Dupdater.hpp53 bool update(sdbusplus::bus_t& bus, const std::string& psuInventoryPath,
73 Updater(const std::string& psuInventoryPath, const std::string& devPath,
114 return psuInventoryPath; in getPsuInventoryPath()
268 std::string psuInventoryPath; member in updater::Updater
321 const std::string& model, const std::string& psuInventoryPath,
H A Dutils.cpp49 PsuI2cInfo getPsuI2c(sdbusplus::bus_t& bus, const std::string& psuInventoryPath) in getPsuI2c() argument
78 if (path.back() == psuInventoryPath.back()) in getPsuI2c()
191 const std::string& psuInventoryPath) in getDevicePath() argument
202 auto devicePath = data["psuDevices"][psuInventoryPath]; in getDevicePath()
211 const auto [i2cbus, i2caddr] = getPsuI2c(bus, psuInventoryPath); in getDevicePath()
H A Dutils.hpp48 const std::string& psuInventoryPath);
108 const std::string& psuInventoryPath);
H A Daei_updater.hpp48 AeiUpdater(const std::string& psuInventoryPath, const std::string& devPath, in AeiUpdater() argument
50 Updater(psuInventoryPath, devPath, imageDir) in AeiUpdater()
H A Dmodel.hpp34 const std::string& psuInventoryPath);
H A Dversion.hpp36 const std::string& psuInventoryPath);
/openbmc/phosphor-psu-code-mgmt/src/
H A Dactivation.cpp124 bool Activation::doUpdate(const std::string& psuInventoryPath) in doUpdate() argument
126 currentUpdatingPsu = psuInventoryPath; in doUpdate()
139 "PSU", psuInventoryPath, "ERROR", e); in doUpdate()
337 bool Activation::isPresent(const std::string& psuInventoryPath) in isPresent() argument
343 utils::getService(bus, psuInventoryPath.c_str(), ITEM_IFACE); in isPresent()
345 psuInventoryPath.c_str(), ITEM_IFACE, in isPresent()
353 "PSU", psuInventoryPath, "ERROR", e); in isPresent()
358 bool Activation::isCompatible(const std::string& psuInventoryPath) in isCompatible() argument
364 utils::getService(bus, psuInventoryPath.c_str(), ASSET_IFACE); in isCompatible()
366 bus, service.c_str(), psuInventoryPath.c_str(), ASSET_IFACE, in isCompatible()
[all …]
H A Ditem_updater.cpp210 const std::string& psuInventoryPath) in onUpdateDone() argument
216 utils::isAssociated(psuInventoryPath, it->second->associations())) in onUpdateDone()
218 removePsuObject(psuInventoryPath); in onUpdateDone()
231 psuPathActivationMap.emplace(psuInventoryPath, it->second); in onUpdateDone()
245 void ItemUpdater::createPsuObject(const std::string& psuInventoryPath, in createPsuObject() argument
258 ACTIVATION_REV_ASSOCIATION, psuInventoryPath)); in createPsuObject()
260 psuPathActivationMap.emplace(psuInventoryPath, it->second); in createPsuObject()
270 ACTIVATION_REV_ASSOCIATION, psuInventoryPath)); in createPsuObject()
275 psuPathActivationMap.emplace(psuInventoryPath, activations[versionId]); in createPsuObject()
287 void ItemUpdater::removePsuObject(const std::string& psuInventoryPath) in removePsuObject() argument
[all …]
H A Dutils.hpp126 bool isAssociated(const std::string& psuInventoryPath,
165 virtual bool isAssociated(const std::string& psuInventoryPath,
205 bool isAssociated(const std::string& psuInventoryPath,
250 inline bool isAssociated(const std::string& psuInventoryPath, in isAssociated() argument
253 return getUtils().isAssociated(psuInventoryPath, assocs); in isAssociated()
H A Dactivation.hpp218 bool doUpdate(const std::string& psuInventoryPath);
239 bool isPresent(const std::string& psuInventoryPath);
242 bool isCompatible(const std::string& psuInventoryPath);
255 std::string getUpdateService(const std::string& psuInventoryPath);
H A Ditem_updater.hpp113 const std::string& psuInventoryPath) override;
171 void createPsuObject(const std::string& psuInventoryPath,
180 void removePsuObject(const std::string& psuInventoryPath);
H A Dutils.cpp252 bool Utils::isAssociated(const std::string& psuInventoryPath, in isAssociated() argument
256 [&psuInventoryPath](const auto& assoc) { in isAssociated()
257 return psuInventoryPath == std::get<2>(assoc); in isAssociated()
H A Dactivation_listener.hpp22 const std::string& psuInventoryPath) = 0;
/openbmc/phosphor-psu-code-mgmt/test/
H A Dmocked_utils.hpp34 std::string(const std::string& psuInventoryPath));
37 std::string(const std::string& psuInventoryPath));
42 MOCK_CONST_METHOD2(isAssociated, bool(const std::string& psuInventoryPath,
H A Dmocked_activation_listener.hpp20 const std::string& psuInventoryPath));
H A Dtest_activation.cpp68 std::string getUpdateService(const std::string& psuInventoryPath) const in getUpdateService()
70 return activation->getUpdateService(psuInventoryPath); in getUpdateService()
104 std::string psuInventoryPath = "/com/example/inventory/powersupply1"; in TEST_F() local
114 auto service = getUpdateService(psuInventoryPath); in TEST_F()
/openbmc/phosphor-power/tools/power-utils/test/
H A Dtest_updater.cpp75 std::string psuInventoryPath = "/com/example/psu"; member in TestUpdater
81 updater = std::make_unique<Updater>(psuInventoryPath, devPath, imageDir); in TEST_F()
86 updater = std::make_unique<Updater>(psuInventoryPath, devPath, imageDir); in TEST_F()
/openbmc/phosphor-power/phosphor-power-supply/
H A Dpsu_manager.cpp926 auto psuInventoryPath = psu->getInventoryPath(); in updateMissingPSUs() local
928 psuInventoryPath.substr(strlen(INVENTORY_OBJ_PATH)); in updateMissingPSUs()
935 presProperty = getPresence(bus, psuInventoryPath); in updateMissingPSUs()
945 psuInventoryPath) in updateMissingPSUs()