commit | 212f6bcd9eaeb196f6d883344c49bf35fef6931b | [log] [tgz] |
---|---|---|
author | Kuiying Wang <kuiying.wang@intel.com> | Fri Sep 04 19:24:25 2020 +0800 |
committer | Asmitha Karunanithi <asmitk01@in.ibm.com> | Wed Mar 10 10:54:19 2021 -0600 |
tree | 941f07ff9dfd1356b022624b207b7ab55b30a534 | |
parent | 0daf14e053114a8e3b6da669a5240556ced9184a [diff] |
Define Redfish interface "/Registries/Bios" and enable Attributes property 1. Define Redfish interface "/Registries/Bios" for BIOS Attribute Registry RBC Daemon provide method to get BIOS attribute registry. 2. Enable Attributes property for BIOS resource 3. Define Redfish interface "/Systems/system/Bios/Settings" for BIOS settings 4. RBC daemon is at https://gerrit.openbmc-project.xyz/#/c/openbmc/bios-settings-mgr/+/35563/ 5. IPMI command implementation is at https://gerrit.openbmc-project.xyz/#/c/openbmc/intel-ipmi-oem/+/30827/ 6. Property design is at https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/xyz/openbmc_project/BIOSConfig 7. Design doc is at https://github.com/openbmc/docs/blob/master/designs/remote-bios-configuration.md 8. There will be 95 test cases for this feature in the validation team. Tested: 1. Use postman could get all the attributes in bios resouce, get bios settings, get bios attribute registry. https://IP_ADDR/redfish/v1/Systems/system/Bios { "@Redfish.Settings": { "@odata.type": "#Settings.v1_3_0.Settings", "SettingsObject": { "@odata.id": "/redfish/v1/Systems/system/Bios/Settings" } }, "@odata.id": "/redfish/v1/Systems/system/Bios", "@odata.type": "#Bios.v1_1_0.Bios", "Actions": { "#Bios.ChangePassword": { "target": "/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword" }, "#Bios.ResetBios": { "target": "/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios" } }, "AttributeRegistry": "BiosAttributeRegistry", "Attributes": { "attr0": "current value" }, "Description": "BIOS Configuration Service", "Id": "BIOS", "Links": { "ActiveSoftwareImage": { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/bios_active" }, "SoftwareImages": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/bios_active" } ], "SoftwareImages@odata.count": 1 }, "Name": "BIOS Configuration" } Redfish interface: https://BMCIP/redfish/v1/Registries/BiosAttributeRegistry { "@odata.id": "/redfish/v1/Registries/BiosAttributeRegistry", "@odata.type": "#MessageRegistryFile.v1_1_0.MessageRegistryFile", "Description": "BiosAttributeRegistry Message Registry File Location", "Id": "BiosAttributeRegistry", "Languages": [ "en" ], "Languages@odata.count": 1, "Location": [ { "Language": "en", "Uri": "/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry" } ], "Location@odata.count": 1, "Name": "BiosAttributeRegistry Message Registry File", "Registry": "BiosAttributeRegistry.1.0.0" } Redfish interface: https://BMCIP/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry { "@odata.id": "/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry", "@odata.type": "#AttributeRegistry.v1_3_2.AttributeRegistry", "Id": "BiosAttributeRegistry", "Language": "en", "Name": "Bios Attribute Registry", "OwningEntity": "OpenBMC", "RegistryEntries": { "Attributes": [ { "AttributeName": "attr0", "CurrentValue": "current value", "DefaultValue": "default value", "DisplayName": "display name for attr0", "HelpText": "description for attr0", "MenuPath": "./menu/path/for/attr0", "ReadOnly": false, "Type": "String", "Value": [ { "ValueName": "..." }, . . ] }, . . ] }, "RegistryVersion": "1.0.0" } https://BMC_IPADDR/redfish/v1/Systems/system/Bios/Settings { "@odata.id": "/redfish/v1/Systems/system/Bios/Settings", "@odata.type": "#Bios.v1_1_0.Bios", "AttributeRegistry": "BiosAttributeRegistry", "Attributes": { "QuietBoot": "0x0" }, "Id": "BiosSettingsV1", "Name": "Bios Settings Version 1" } 2. Passed Validator check for bios resource and bios attribute registry *** /redfish/v1/Systems/system/Bios INFO - Type (#Bios.v1_1_0.Bios), GET SUCCESS (time: 1.57377) INFO - PASS *** /redfish/v1/Registries/BiosAttributeRegistry INFO - Type (#MessageRegistryFile.v1_1_0.MessageRegistryFile), GET SUCCESS (time: 0.075438) INFO - PASS INFO - *** /redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry INFO - Type (#AttributeRegistry.v1_3_2.AttributeRegistry), GET SUCCESS (time: 0.075751) INFO - PASS @odata.id /redfish/v1/Systems/system/Bios odata Exists PASS @odata.type #Settings.v1_3_0.Settings odata Exists PASS Links [JSON Object] Bios.v1_1_0.Links Yes complex Links.ActiveSoftwareImage Link: /redfish/v1/UpdateService/FirmwareInventory/bios_active link to: SoftwareInventory Yes PASS Links.SoftwareImages Array (size: 1) array of: SoftwareInventory Yes ... Links.SoftwareImages[0] Link: /redfish/v1/UpdateService/FirmwareInventory/bios_active SoftwareInventory Yes PASS Links.Oem - Resource.Oem No Optional SoftwareImages@odata.count 1 odata Exists PASS AttributeRegistry BiosAttributeRegistry string Yes PASS Actions [JSON Object] Bios.v1_0_0.Actions Yes complex Actions.#Bios.ResetBios Action - Yes PASS Actions.#Bios.ChangePassword Action - Yes PASS Attributes [JSON Object] Bios.v1_0_0.Attributes Yes complex Attributes.attr0 current value primitive Yes PASS Id BIOS string Yes PASS Description BIOS Configuration Service string Yes PASS Name BIOS Configuration string Yes PASS Oem - Resource.Oem No Optional @Redfish.Settings [JSON Object] Settings.Settings Yes complex @Redfish.Settings.MaintenanceWindowResource - link to: ItemOrCollection No Optional @Redfish.Settings.SupportedApplyTimes - string (enum) No Optional @Redfish.Settings.Time - date No Optional @Redfish.Settings.ETag - string No Optional @Redfish.Settings.SettingsObject Link: /redfish/v1/Systems/system/Bios/Settings link to: Item Yes PASS @Redfish.Settings.Messages - Message No Optional @odata.id /redfish/v1/Registries/BiosAttributeRegistry odata Exists PASS @odata.type #MessageRegistryFile.v1_1_0.MessageRegistryFile odata Exists PASS Languages@odata.count 1 odata Exists PASS Location@odata.count 1 odata Exists PASS Actions - MessageRegistryFile.v1_1_0.Actions No Optional Languages Array (size: 1) string Yes ... Languages[0] en string Yes PASS Registry BiosAttributeRegistry.1.0.0 string Yes PASS Location Array (size: 1) array of: Location Yes ... Location[0] [JSON Object] Location Yes complex Location[0].Language en string Yes PASS Location[0].Uri /redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry string Yes PASS Location[0].ArchiveUri - string No Optional Location[0].PublicationUri - string No Optional Location[0].ArchiveFile - string No Optional Id BiosAttributeRegistry string Yes PASS Description BiosAttributeRegistry Message Registry File Location string Yes PASS Name BiosAttributeRegistry Message Registry File string Yes PASS Oem - Resource.Oem No Optional @odata.id /redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry odata Exists PASS @odata.type #AttributeRegistry.v1_3_2.AttributeRegistry odata Exists PASS Actions - AttributeRegistry.v1_1_0.Actions No Optional Language en string Yes PASS RegistryVersion 1.0.0 string Yes PASS OwningEntity OpenBMC string Yes PASS SupportedSystems - SupportedSystems No Optional RegistryEntries [JSON Object] AttributeRegistry.v1_0_0.RegistryEntries Yes complex RegistryEntries.Attributes Array (size: 1) array of: Attributes Yes ... RegistryEntries.Attributes[0] [JSON Object] Attributes Yes complex RegistryEntries.Attributes[0].Oem - Resource.Oem No Optional RegistryEntries.Attributes[0].ResetRequired - boolean No Optional RegistryEntries.Attributes[0].UefiDevicePath - string No Optional RegistryEntries.Attributes[0].UefiKeywordName - string No Optional RegistryEntries.Attributes[0].UefiNamespaceId - string No Optional RegistryEntries.Attributes[0].AttributeName attr0 string Yes PASS RegistryEntries.Attributes[0].Type String string (enum) Yes PASS RegistryEntries.Attributes[0].Value Array (size: 0) array of: AttributeValue Yes ... RegistryEntries.Attributes[0].DisplayName display name for attr0 string Yes PASS RegistryEntries.Attributes[0].HelpText description for attr0 string Yes PASS RegistryEntries.Attributes[0].WarningText - string No Optional RegistryEntries.Attributes[0].CurrentValue current value primitive Yes PASS RegistryEntries.Attributes[0].DefaultValue default value primitive Yes PASS RegistryEntries.Attributes[0].DisplayOrder - number No Optional RegistryEntries.Attributes[0].MenuPath ./menu/path/for/attr0 string Yes PASS RegistryEntries.Attributes[0].ReadOnly False boolean Yes PASS RegistryEntries.Attributes[0].WriteOnly - boolean No Optional RegistryEntries.Attributes[0].GrayOut - boolean No Optional RegistryEntries.Attributes[0].Hidden - boolean No Optional RegistryEntries.Attributes[0].Immutable - boolean No Optional RegistryEntries.Attributes[0].IsSystemUniqueProperty - boolean No Optional RegistryEntries.Attributes[0].MaxLength - number No Optional RegistryEntries.Attributes[0].MinLength - number No Optional RegistryEntries.Attributes[0].ScalarIncrement - number No Optional RegistryEntries.Attributes[0].UpperBound - number No Optional RegistryEntries.Attributes[0].LowerBound - number No Optional RegistryEntries.Attributes[0].ValueExpression - string No Optional RegistryEntries.Menus - Menus No Optional RegistryEntries.Dependencies - Dependencies No Optional Id BiosAttributeRegistry string Yes PASS Description - string No Optional Name Bios Attribute Registry string Yes PASS Oem - Resource.Oem No Optional Change-Id: Iecc61018c350f0b8c89df59b2864b941508b1916 Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D
flags that correspond to options in bmcweb/meson_options.txt
and then compiling. For example, meson <builddir> -Dkvm=disabled ...
followed by ninja
in build directory. The option names become C++ preprocessor symbols that control which code is compiled into the program.
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C buildir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in bmcweb/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja coverage -C builddir test
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the secp384r1
algorithm. The certificate
C=US, O=OpenBMC, CN=testhost
,SHA-256
algorithm.