History log of /openbmc/phosphor-psu-code-mgmt/src/version.cpp (Results 1 – 7 of 7)
Revision Date Author Comments
# bab5ed99 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I08efc0671773edfae814ebcda5c01389155e2cac
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 5670b188 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Idb72665dbadfa8afd569a2e0e254d84f0a2108d3
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# d0f8bbb3 18-Oct-2019 Lei YU <mine260309@gmail.com>

Version: support CRLF line feed in MANIFEST

When a MANIFEST is generated from Windows and it contains CRLF as line
feed, the code was getting each line with '\r' at the end, and thus the
parsed stri

Version: support CRLF line feed in MANIFEST

When a MANIFEST is generated from Windows and it contains CRLF as line
feed, the code was getting each line with '\r' at the end, and thus the
parsed string contains '\r' and it incorrectly parses the string.

Add a piece of code to support CRLF line feed so support such MANIFEST
files.

Tested: Added a unit test case to verify CRLF is correctly handled.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I99e146717b815e3e40c232376555b2b48d77bc56

show more ...


# 58c26e3f 27-Sep-2019 Lei YU <mine260309@gmail.com>

Scan directories that store PSU images on start

When the service starts, scan the directories that store PSU images,
including the built-in images, and the saved images during PSU update.

When the

Scan directories that store PSU images on start

When the service starts, scan the directories that store PSU images,
including the built-in images, and the saved images during PSU update.

When the scanned image is different than the running images, create
activation/version object;
When the scanned image is the same as the running images, update the
version object's path to indicate the PSU image path, so it could be
used for future update in case a PSU is replaced with a different
software.

Tested: On Witherspoon, fake create a dummy PSU image with a different
version than running PSU, verify a new object is created on
restart;
fake creating a dummy PSU image with a same version as a running
PSU, verify no new object is created, but the "Path" property is
set to the PSU image directory.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I860b978250a718eb82d948a1c88bd8f41bb2b2e3

show more ...


# 9edb7330 19-Sep-2019 Lei YU <mine260309@gmail.com>

Activation: check compatiblity of uploaded software

Before activation, check if the PSU inventory's manufacturer and model
matches the uploaded software, to make sure the software is not updated
to

Activation: check compatiblity of uploaded software

Before activation, check if the PSU inventory's manufacturer and model
matches the uploaded software, to make sure the software is not updated
to a incompatible PSU.

The model check is mandatory, and if the PSU manufacturer is empty,
ignore the manufacturer check.

Tested: Upload a dummy tarball with incompatible model, verify the
activation fails;
Upload a dummy tarball with compatible model, verify the
activation succeeds with a dummy update service.
Also added unit tests for several cases:
* Update on a PSU that model is incompatible;
* Update on a PSU that the manufacture is incompatible;
* Update on a PSU that the menufacture is empty;
* Update on 4 PSUs that the second one is incompatible.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ia1b6a3fa6c98cdea1ea93c917c0938d4a60f0911

show more ...


# fda15a33 19-Sep-2019 Lei YU <mine260309@gmail.com>

Refactor Version::getValue()

Rename the function to getValues() and change the parameter and return
value types, and add a test case for it.
It will be used in future commits.

Tested: Verify the un

Refactor Version::getValue()

Rename the function to getValues() and change the parameter and return
value types, and add a test case for it.
It will be used in future commits.

Tested: Verify the unit test case passes.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I57ccf857737ef13f4e2f27c5f2fb7400a2170e91

show more ...


# 01539e7e 30-Jul-2019 Lei YU <mine260309@gmail.com>

Add activation, item_updater and version

Implement part of functions of Activation, ItemUpdater and Version.

Tested: Upload a dummy PSU tarball, and verify the activation object is
created

Add activation, item_updater and version

Implement part of functions of Activation, ItemUpdater and Version.

Tested: Upload a dummy PSU tarball, and verify the activation object is
created with expected ExtendedVersion, and the object is deleted
when Delete is invoked.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I7b9d29f46914ace93d27a715b32c80957e88a0aa

show more ...