15b63e12 | 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: I07372e75f12f406bd0555dd27e249bc7dd0958d4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
d4554f2a | 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I153217f4ae8454e3546a59da9fcfe3f83fd04b39 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
c0d66eb7 | 26-Feb-2024 |
John Wedig <johnwedig@google.com> |
Populate Protocol property in Item.Drive interface
By populating this property, bmcweb can populate the "Protocol" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.eS
Populate Protocol property in Item.Drive interface
By populating this property, bmcweb can populate the "Protocol" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Protocol s "xyz.openbmc_project.Inventory.Item.Drive.DriveProtocol.eMMC"
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I2bd19190c445ce57f3d867ffbb437c1a4a370b51
show more ...
|
d7be42bd | 19-Jan-2024 |
John Wedig <johnwedig@google.com> |
Populate the Type property in Item.Drive interface
By populating this property, bmcweb can populate the "MediaType" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.e
Populate the Type property in Item.Drive interface
By populating this property, bmcweb can populate the "MediaType" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Type s "xyz.openbmc_project.Inventory.Item.Drive.DriveType.SSD"
$ curl http://localhost:80/redfish/v1/Chassis/DCSCM/Drives/mmcblk0 { ... "MediaType": "SSD", ... }
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I2cb6c7d3ec3b49e8d666da940d873f1117a0aa85
show more ...
|
043af59f | 23-Nov-2023 |
Tom Tung <shes050117@gmail.com> |
Get eraseMaxGeometry and eraseMinGeometry from dbus
Also, make findDevice return output parameters based on RVO.
With the change like in EntityManager JSON: ``` { "Name": "example_emmc", "T
Get eraseMaxGeometry and eraseMinGeometry from dbus
Also, make findDevice return output parameters based on RVO.
With the change like in EntityManager JSON: ``` { "Name": "example_emmc", "Type": "EmmcDevice", "LocationCode": "location" "EraseMaxGeometry": 10000000000, "EraseMinGeometry": 5000000000, } ``` and geometry values will be set to estoraged.
Tested: - unit test pass: ``` 5/7 util_test OK 0.05s ```
Change-Id: Ia8499af2168c7e740558978273fc80456eb29282 Signed-off-by: Tom Tung <shes050117@gmail.com>
show more ...
|
ff1b64f0 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 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-17 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: Idc09d9211b70f7afc008f32e8cb66485ebe0510c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
19825057 | 26-May-2023 |
Rahul Kapoor <rahulkpr@google.com> |
Add support for LocationCode
LocationCode is needed to populate ServiceLabel by BMCWeb for Redfish resource associated with eStorage. LocationCode is derived from config object exported by Entity Ma
Add support for LocationCode
LocationCode is needed to populate ServiceLabel by BMCWeb for Redfish resource associated with eStorage. LocationCode is derived from config object exported by Entity Manager in the the following interface: "xyz.openbmc_project.Configuration.EmmcDevice
To surface LocationCode, the "Exposes" entry in board's Entity Manager config can add "LocationCode" property as follows: { "Name": "example_emmc", "Type": "EmmcDevice", "LocationCode": "U1000" }
Here the LocationCode is the silk screen label.
Tested:
busctl introspect xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Decorator.LocationCode
NAME TYPE SIGNATURE RESULT/VALUE FLAGS .LocationCode property s "U1000" emits-change
wget -qO- localhost:80/redfish/v1/Chassis/DCSCM/Drives/mmcblk0 { "@odata.id": "/redfish/v1/Chassis/DCSCM/Drives/mmcblk0", "@odata.type": "#Drive.v1_7_0.Drive", "Id": "mmcblk0", "Links": { "Chassis": { "@odata.id": "/redfish/v1/Chassis/DCSCM" } }, "Name": "mmcblk0", "PhysicalLocation": { "PartLocation": { "LocationType": "Embedded", "ServiceLabel": "U1000" }, "PartLocationContext": "DC_SCM" }, "PredictedMediaLifeLeftPercent": 100, "Status": { "State": "Enabled" } }
Change-Id: Ibf53ede5ee65787f9cef53d4bad4cb8fccba3606 Signed-off-by: Rahul Kapoor <rahulkpr@google.com>
show more ...
|
ba000b95 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-tidy: resolve 'readability-redundant-string-cstr'
Eliminate needless `c_str()` call.
``` ../src/test/erase/crypto_test.cpp:67:20: error: redundant call to 'c_str' [readability-redundant-strin
clang-tidy: resolve 'readability-redundant-string-cstr'
Eliminate needless `c_str()` call.
``` ../src/test/erase/crypto_test.cpp:67:20: error: redundant call to 'c_str' [readability-redundant-string-cstr,-warnings-as-errors] CryptErase(testFileName.c_str(), std::move(mockCryptIface)); ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I1dce56443ca25172796f31e31d51f526c24fa18f
show more ...
|
04c28fad | 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: Ia968a74764d3bda33160a8a9890629ed3cc94d0e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
0e2a46f5 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use new namespace format
As mentioned in [1], the namespace preferred by the sdbus++ tool has changed. Update this repository accordingly.
[1]: https://lore.kernel.org/openbmc/ZFLepbxKK
sdbusplus: use new namespace format
As mentioned in [1], the namespace preferred by the sdbus++ tool has changed. Update this repository accordingly.
[1]: https://lore.kernel.org/openbmc/ZFLepbxKKXVGAwRB@heinlein.vulture-banana.ts.net/
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9d60c68ce5ca1c38aebdddb365b2a3d6f260c981
show more ...
|
2443a021 | 17-Mar-2023 |
John Wedig <johnwedig@google.com> |
Improve accuracy of 'Locked' property
The 'Locked' property in the volume interface is supposed to indicate whether the LUKS volume is currently activated, but this property is often inaccurate beca
Improve accuracy of 'Locked' property
The 'Locked' property in the volume interface is supposed to indicate whether the LUKS volume is currently activated, but this property is often inaccurate because it always defaults to false upon startup (i.e. unlocked). However, the LUKS volume is usually locked at startup. So, client daemons can get confused when looking at the Locked property.
This commit reworks the functionality for the 'Locked' property, so that it checks whether the mapped virtual crypt device exists, e.g. whether /dev/mapper/<luks_device> exists. This way, the Locked property should better reflect the actual state.
The one caveat to keep in mind is that 'Locked' will be True even if the device isn't formatted as a LUKS volume. If client daemons need to know whether it's already formatted, we may want to add another property to the Volume interface for that purpose. But in the meantime, eStoraged already exports an EncryptionStatus property as part of the Drive interface. So, the information is already available, if needed.
Tested: Checked 'Locked' property at startup $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b true Formatted the LUKS volume, then checked 'Locked' property again $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ --timeout=60 $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b false Restarted eStoraged and checked 'Locked' again. $ systemctl restart xyz.openbmc_project.eStoraged $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b false Locked the LUKS volume, and checked 'Locked' again. $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Lock $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b true Restarted eStoraged, and checked 'Locked' again. $ systemctl restart xyz.openbmc_project.eStoraged $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b true
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I5cd6bac4b4426c0e2579c3fc8cf7a27b4f2ccc08
show more ...
|
8d5a3a07 | 29-Sep-2022 |
John Wedig <johnwedig@google.com> |
Implement the changePassword method
With this commit, it is now possible to change the password for the LUKS-encrypted volume, using the changePassword D-Bus method for eStoraged.
Tested: $ busctl
Implement the changePassword method
With this commit, it is now possible to change the password for the LUKS-encrypted volume, using the changePassword D-Bus method for eStoraged.
Tested: $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ --timeout=60 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume ChangePassword \ ayay 3 1 2 3 3 4 5 6 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Lock Attempted to unlock using the old password. It failed as expected. $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3 Unlocked with the new password $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 4 5 6
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: If1395fb04f51b1fb1a3d26731422d21476205207
show more ...
|
be47c8fe | 30-Sep-2022 |
John Wedig <johnwedig@google.com> |
Fix zero_test and pattern_test
The zero_test and pattern_test are failing to compile because some mocks are returning vectors instead of spans.
Signed-off-by: John Wedig <johnwedig@google.com> Chan
Fix zero_test and pattern_test
The zero_test and pattern_test are failing to compile because some mocks are returning vectors instead of spans.
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: Iaf8166f265ef6a67d96e1507abeaca47459e24d3
show more ...
|
b4838308 | 22-Jul-2022 |
John Wedig <johnwedig@google.com> |
Export the part number and serial number
This commit exposes the eMMC's part name and serial number over the appropriate D-Bus interface, so that it can be exposed over Redfish in bmcweb.
Tested: $
Export the part number and serial number
This commit exposes the eMMC's part name and serial number over the appropriate D-Bus interface, so that it can be exposed over Redfish in bmcweb.
Tested: $ busctl introspect xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 ... xyz.openbmc_project.Inventory.Decorator.Asset interface - - - .PartNumber property s "ABCDEF" emits-change .SerialNumber property s "123456abcd" emits-change ... $ wget -qO- http://localhost:80/redfish/v1/Chassis/DC_SCM/Drives/mmcblk0 { "@odata.id": "/redfish/v1/Chassis/DC_SCM/Drives/mmcblk0", "@odata.type": "#Drive.v1_7_0.Drive", "CapacityBytes": 15634268160, "Id": "mmcblk0", "Links": { "Chassis": { "@odata.id": "/redfish/v1/Chassis/DC_SCM" } }, "Name": "Name", "PartNumber": "ABCDEF", "PhysicalLocation": { "PartLocation": { "LocationType": "Embedded" } }, "SerialNumber": "123456abcd", "Status": { "State": "Enabled" } }
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I1d17f08b99907620b5f2c73fdaeacc84950ce64e
show more ...
|
9e639820 | 10-Jun-2022 |
John Edward Broadbent <jebr@google.com> |
Update utils_test explicit unsigned literals
There exist a combination of gmock, and std::filesystem that creates an error of the from:
``` if (lhs == rhs) {
'const int' and 'const long long uns
Update utils_test explicit unsigned literals
There exist a combination of gmock, and std::filesystem that creates an error of the from:
``` if (lhs == rhs) {
'const int' and 'const long long unsigned int'
``` for the follow block ``` EXPECT_EQ(3, std::filesystem::remove_all("mmcblk0")); ```
We don't see it in CI testing, but we do see it in builds. Possibly an architecture related issue.
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: I8170567494082914e338104e7e126b54d86ddc5e
show more ...
|
f78215fd | 07-Jun-2022 |
John Wedig <johnwedig@google.com> |
Fix code to search for MMC device
The findDevice() function is broken currently because it's looking for a device in sysfs with the name of mmcblk*. The problem is that the boot partitions are also
Fix code to search for MMC device
The findDevice() function is broken currently because it's looking for a device in sysfs with the name of mmcblk*. The problem is that the boot partitions are also showing up in sysfs (mmcblk0boot0 and mmcblk0boot1), and the findDevice() function is getting confused.
Instead of relying on the name of the device to find the MMC device, we now look at the following entry in sysfs, to make sure we found an MMC device:
/sys/block/<dev_name>/device/type
The contents of that file should be MMC.
Tested: Ran eStoraged on a machine to confirm that it created a D-Bus object with the mmcblk0 device, instead of mmcblk0boot0. $ busctl tree xyz.openbmc_project.eStoraged `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/inventory `-/xyz/openbmc_project/inventory/storage `-/xyz/openbmc_project/inventory/storage/mmcblk0
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I786934fcdc950b55c62bc7e3784e29d5ba73099f
show more ...
|
4906f4ef | 28-Apr-2022 |
John Edward Broadbent <jebr@google.com> |
span: switch to std
Reduce the dependency on stdplus' version of span now that we are using C++20 and use the one out of the STL instead.
See:https://gerrit.openbmc-project.xyz/c/openbmc/stdplus/+/
span: switch to std
Reduce the dependency on stdplus' version of span now that we are using C++20 and use the one out of the STL instead.
See:https://gerrit.openbmc-project.xyz/c/openbmc/stdplus/+/53308
Change-Id: I2a35670ab50c40fed093474c4986dd6d2cb79011 Signed-off-by: John Edward Broadbent <jebr@google.com>
show more ...
|
6c0d8ce1 | 22-Apr-2022 |
John Wedig <johnwedig@google.com> |
Add association between chassis and drive
This commit adds an association between the storage device ("drive") and the associated chassis. Specifically, the new association is the following: ["cha
Add association between chassis and drive
This commit adds an association between the storage device ("drive") and the associated chassis. Specifically, the new association is the following: ["chassis", "drive", <chassis_path>]
This association will be used in bmcweb to add Redfish links between drive and chassis.
Tested: $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Association.Definitions Associations $ busctl get-property xyz.openbmc_project.ObjectMapper \ /xyz/openbmc_project/inventory/system/board/dcscm/drive \ xyz.openbmc_project.Association endpoints $ busctl get-property xyz.openbmc_project.ObjectMapper \ /xyz/openbmc_project/inventory/storage/mmcblk0/chassis \ xyz.openbmc_project.Association endpoints
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: Ie21725e9ceb5134ac94854dcb06f3b86a48eeabd
show more ...
|
d32b9667 | 13-Apr-2022 |
John Wedig <johnwedig@google.com> |
Initial integration with Entity Manager
This commit changes eStoraged so that it doesn't take a specific device as an argument. Instead, it looks for a config object from Entity Manager and creates
Initial integration with Entity Manager
This commit changes eStoraged so that it doesn't take a specific device as an argument. Instead, it looks for a config object from Entity Manager and creates a D-Bus object corresponding to the config object.
The config objects need to expose the following interface: "xyz.openbmc_project.Configuration.EmmcDevice"
To support more types of storage devices in the future, we can introduce a new interface for each one.
In addition, eStoraged currently only supports 1 eMMC device. If we want to support more than one in the future, we will need to add more information to the Entity Manager config, to distinguish between them.
Assuming the eMMC is located on a FRU-detectable board, an "Exposes" entry can be added to that board's Entity Manager config, for example: { "Name": "example_emmc", "Type": "EmmcDevice" }
Doing so will tell Entity Manager to create a config object with the EmmcDevice interface mentioned above. Then, eStoraged will find the config object with that interface and create its own D-Bus object that can be used to manage the eMMC.
Tested: Updated the Entity Manager config (as described above), started eStoraged, then tested most of its methods and properties using busctl. $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ --timeout=60 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Lock $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3 $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Capacity $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VerifyGeometry $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalOverWrite \ --timeout=1200 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalVerify \ --timeout=1200
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: If137d02e185c366f4a1437076512b4883ba6d595
show more ...
|
34a75f05 | 14-Apr-2022 |
John Edward Broadbent <jebr@google.com> |
Fix shadowed variable improperly scoped
These variables were outside of the function that used them. Every other function that set the "size" variable was shadowing the improperly scoped variables.
Fix shadowed variable improperly scoped
These variables were outside of the function that used them. Every other function that set the "size" variable was shadowing the improperly scoped variables.
Change-Id: I45b20606492987c7a09105c33847bc5b35b9e0ec Signed-off-by: John Edward Broadbent <jebr@google.com>
show more ...
|
d6071fc2 | 31-Mar-2022 |
John Edward Broadbent <jebr@google.com> |
Fix Short read/write issue
It was possible for "short" reads and writes to cause the pattern and zero steps to not work correctly. This change adds logic to deal with the short reads.
Tested: unit
Fix Short read/write issue
It was possible for "short" reads and writes to cause the pattern and zero steps to not work correctly. This change adds logic to deal with the short reads.
Tested: unit test and machine test root@bmc# time busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ > /xyz/openbmc_project/inventory/storage/mmcblk0 \ > xyz.openbmc_project.Inventory.Item.Volume Erase s \ > xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.ZeroOverWrite \ > --timeout=1200 real 6m0.815s user 0m0.010s sys 0m0.010s
Change-Id: If8df9bdba159a3bcfa77104a4c17b8d352794db2 Signed-off-by: John Edward Broadbent <jebr@google.com>
show more ...
|
5d799bb9 | 22-Mar-2022 |
John Edward Broadbent <jebr@google.com> |
Add lifetime property for drives interface
This will set the lifetime property when the eStoraged object is created. This change does not expect the lifetime to change.
Tested: busctl introspect x
Add lifetime property for drives interface
This will set the lifetime property when the eStoraged object is created. This change does not expect the lifetime to change.
Tested: busctl introspect xyz.openbmc_project.eStoraged.mmcblk0 /xyz/openbmc_project/inventory/storage/mmcblk0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.Inventory.Item.Drive interface - - - .Capacity property t (top secret) emits-change .PredictedMediaLifeLeftPercent property y 100 emits-change xyz.openbmc_project.Inventory.Item.Volume interface - - - .ChangePassword method ayay - - .Erase method s - - .FormatLuks method ays - - .Lock method - - - .Unlock method ay - -
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: Ifbbed7d81c55e3edbe519c2b1048b5d1731fbb0e
show more ...
|
67a47446 | 05-Apr-2022 |
John Wedig <johnwedig@google.com> |
Switch eStoraged to asio interface
Switching the D-Bus interface to asio makes it easier to integrate with EntityManager. In addition, this switch to asio makes sense since some of the erase operati
Switch eStoraged to asio interface
Switching the D-Bus interface to asio makes it easier to integrate with EntityManager. In addition, this switch to asio makes sense since some of the erase operations take a long time, about 6 minutes.
This commit also removes one of the clang-tidy checks because clang was flagging an error in one of the boost asio files, inside the constructor for sdbusplus::asio::connection.
Tested: Tested most of the methods and properties using busctl. $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ --timeout=60 $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Lock $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3 $ busctl get-property xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked $ busctl get-property xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Capacity $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VerifyGeometry $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalOverWrite \ --timeout=1200 $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalVerify \ --timeout=1200
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I99cb371871bfa68eb0193f614f899221afd9013a
show more ...
|
605085a6 | 05-Nov-2021 |
John Edward Broadbent <jebr@google.com> |
Add erase sanitize
Sanitize uses the eMMC firmware to erase all blocks.
Tested: $ cat /dev/urandom > /dev/mmcblk0
$ time busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/in
Add erase sanitize
Sanitize uses the eMMC firmware to erase all blocks.
Tested: $ cat /dev/urandom > /dev/mmcblk0
$ time busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VendorSanitize \ --timeout=1200
real 0m1.793s user 0m0.021s sys 0m0.009s
root@ytbaz20-nfd01:/# cat /dev/mmcblk0 | hexdump
0000000 0000 0000 0000 0000 0000 0000 0000 0000 *
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: I31bc21c0b6d31cbba0db752d94a93eb004dbbde6
show more ...
|
e35e7361 | 22-Mar-2022 |
John Edward Broadbent <jebr@google.com> |
Add implementation capacity for drive interface
This will set the capacity property when the eStoraged object is created. This change does not expect the drive size to change.
Change-Id: I72cd68c50
Add implementation capacity for drive interface
This will set the capacity property when the eStoraged object is created. This change does not expect the drive size to change.
Change-Id: I72cd68c5045e9ef49939f4655a223a02234c7434 Signed-off-by: John Edward Broadbent <jebr@google.com>
show more ...
|