commit | 5e577bc13511acc8b9f98c042ad3e4bb72e2a5b5 | [log] [tgz] |
---|---|---|
author | Willy Tu <wltu@google.com> | Tue Jul 26 00:41:55 2022 +0000 |
committer | Ed Tanous <ed@tanous.net> | Mon Jun 12 20:54:06 2023 +0000 |
tree | e1df9ab0cedcf42238df72098fe3fcbb9cf1919c | |
parent | 36d5233493623768bbea0e4d33248b2736240a3e [diff] |
storage: add support for multiple storages Updated Storage resource to `#Storage.v1_9_1.Storage` to support the change. Follow the Swordfish spec to setup the Storage relationship[1]. There will now be two Storage Collection `/redfish/v1/Stroage` and `/redfish/v1/Systems/system/Storage`. The storage in `/Storage` will be treated as a subsystem and only link to the `/Systems/system/Storage` under `Links/StorageServices` resource. The `/Storage` won't contain Drives or StorageControllers. Tested: Passed Redfish Validator for related resources. ``` *** /redfish/v1/Storage/storage_1 INFO - Type (Storage.v1_7_1.Storage), GET SUCCESS (time: 0) WARNING - StorageControllers: The given property is deprecated: This property has been deprecated in favor of Controllers to allow for storage controllers to be represented as their own resources. INFO - Attempt 1 of /redfish/v1/Chassis/chassis0/Drives/drive0 INFO - Response Time for GET to /redfish/v1/Chassis/chassis_0/Drives/drive_0: 0.07591272401623428 seconds. INFO - PASS INFO - ``` Chassis ``` wget -qO- http://localhost:80/redfish/v1/Chassis/chassis0 { "@odata.id": "/redfish/v1/Chassis/chassis0", "@odata.type": "#Chassis.v1_14_0.Chassis", "Id": "chassis0", "Links": { "Storage": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/storage0" } ], "Storage@odata.count": 1 }, "Name": "chassis0", }} ``` Storage Collection ``` wget -qO- http://localhost:80/redfish/v1/Storage { "@odata.id": "/redfish/v1/Storage", "@odata.type": "#StorageCollection.StorageCollection", "Members": [ { "@odata.id": "/redfish/v1/Storage/storage0" } ], "Members@odata.count": 1, "Name": "Storage Collection" } wget -qO- http://localhost:80/redfish/v1/Systems/system/Storage { "@odata.id": "/redfish/v1/Systems/system/Storage", "@odata.type": "#StorageCollection.StorageCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/storage0" } ], "Members@odata.count": 1, "Name": "Storage Collection" } ``` Storage ``` wget -qO- http://localhost:80/redfish/v1/Storage/storage0 { "@odata.id": "/redfish/v1/Storage/storage0", "@odata.type": "#Storage.v1_9_1.Storage", "Id": "storage0", "Links": { "StorageServices": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/storage0" } ], "StorageServices@odata.count": 1 }, "Name": "Storage", "Status": { "State": "Enabled" } } wget -qO- http://localhost:80/redfish/v1/Systems/system/Storage/storage0 { "@odata.id": "/redfish/v1/Systems/system/Storage/storage0", "@odata.type": "#Storage.v1_9_1.Storage", "Drives": [ { "@odata.id": "/redfish/v1/Chassis/chassis0/Drives/drive0" } ], "Drives@odata.count": 1, "Id": "storage0", "Name": "Storage",[1] "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "StorageControllers": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/storage0#/StorageControllers/0", "@odata.type": "#Storage.v1_7_0.StorageController", "MemberId": "controller", "Name": "controller", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } } ] } ``` [1] https://www.snia.org/sites/default/files/technical-work/swordfish/draft/v1.2.2/pdf/Swordfish_v1.2.2_NVMeMappingGuide.pdf#page=17 Change-Id: Ib81b68e7f61b817d4dfa4ed2f27afd6e74e8ce58 Signed-off-by: Tom Tung <shes050117@gmail.com> Signed-off-by: Willy Tu <wltu@google.com> Signed-off-by: Ed Tanous <edtanous@google.com>
This component attempts to be a "do everything" embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson setup builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects
.
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data
namespace.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.