| commit | a1978347588642a9677eca4d96d2a89e93d225a0 | [log] [tgz] | 
|---|---|---|
| author | Ali Ahmed <ama213000@gmail.com> | Tue Aug 31 14:59:58 2021 -0500 | 
| committer | Ali Ahmed <ama213000@gmail.com> | Fri Sep 03 02:46:31 2021 -0500 | 
| tree | 8468b1f65609852551437bf76247517c1a990d4a | |
| parent | 877044644f53d4dd93499d3a99d8c227694fd3a5 [diff] | 
Have ProcessorSummary correctly set Status
Remove unnecessary condition, and correctly get Status
from Present and Functional properties.
Removal of if, else code:
1. If condition never evaluates to false ('else' branch is never taken)
   Properties size will always be 7 as that's how it's defined here [1]
Context:
The 'if' code branch was originally there for a company that was NOT
following the d-bus interfaces. See commit 57e8c9b [2] & gerrit [3].
Later, properties were added to the Inventory.Item.Cpu interface,
so now everyone is hitting this 'if' branch. See commit 259f49e [4].
The code in the 'else' condition uses Inventory.Item Present and
State.Decorator.OperationalStatus Function to determine Redfish "Count",
"Status""State", "Status""Health", since this is the correct way to
determine Redfish Status.
Summary:
1) Removes the if/else condition, and
2) Retains the code that was in the else condition
[1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master
/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
[2] https://github.com/openbmc/bmcweb/commit/57e8c9b
[3] https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/20572/4
[4] https://github.com/openbmc/phosphor-dbus-interfaces/commit/259f49e
Tested:
curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Systems/system
Before:
...
  "ProcessorSummary": {
    "Count": 0,
    "Status": {
      "Health": "OK",
      "HealthRollup": "OK",
      "State": "Disabled"
    }
  },
...
After:
...
  "ProcessorSummary": {
    "Count": 2,
    "Status": {
      "Health": "OK",
      "HealthRollup": "OK",
      "State": "Enabled"
    }
  },
...
Signed-off-by: Ali Ahmed <ama213000@gmail.com>
Change-Id: I1a38086b87f4f1e2ebbfa3b5058d95158d29002a
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 -Dbuildtype=debug 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.