090ab8e1 | 18-May-2024 |
Ed Tanous <ed@tanous.net> |
Generate metadata at runtime
In the initial implementation of metadata indexing the bmc knew at compile time what schemas it could potentially publish. bmcweb took the approach of adding all schema
Generate metadata at runtime
In the initial implementation of metadata indexing the bmc knew at compile time what schemas it could potentially publish. bmcweb took the approach of adding all schemas of all versions to the $metadata resource. Since that was made, two major changes have happened. First, Redfish has added significantly more versions of each schema, as well as significantly more schemas to the point where the metadata index is now 213KB. While this file compresses fairly well, the size is obvious from the large amount of time that redfish service validator takes to parse the schemas, compared to actually acquiring BMC redfish resources. Second, aggregation was added, where an aggregated Redfish service might implement any number of schemas, including OEM ones.
In an effort to fix this, this patch takes the compile-time algorithm in update_schemas.py, and moves it into bmcweb itself, parsing the files on disk as needed on demand. This has some immediate benefits; First, is that now schemas can be potentially installed from anywhere, not only from within the bmcweb build, and they will be resolved at runtime.
Second, patches that want to add support for a given schema need to only symlink the schema into the correct folder, without needing to rerun update_schemas.py. This saves time in review.
Finally, this opens to door to reducing the schema versions present in the metadata to the unique set of only what this bmcweb instance, and its aggregated BMCs expose.
Tested: Redfish service validator passes. Need A/B checking to verify the file is byte for byte the same. GET /redfish/v1/$metadata returns what looks like sane results, with a correct content-type. Unit tests require the use of TemporaryFileHandle, so that class is moved into a more general folder, outside of test/http.
Change-Id: I326159099c6b6c4056023b2e173c5f074ed88ce1 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
5c5804dd | 13-Feb-2023 |
Ed Tanous <edtanous@google.com> |
Fix bad namespaces
This was missed by me; At the same time as we were resolving the redfish-service-validator failure[1], I was trying to fix this. So in the result I saw:
ERROR - Validation has
Fix bad namespaces
This was missed by me; At the same time as we were resolving the redfish-service-validator failure[1], I was trying to fix this. So in the result I saw:
ERROR - Validation has failed: 2 problems found
Which I thought was the existing false-positive, but turns out was hiding the namespace issue.
Mea Culpa.
[1]: https://github.com/DMTF/Redfish-Service-Validator/issues/533
Tested: Redfish service validator actually passes.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I51de9d508539756394ead1bca437ca37b61f5e40
show more ...
|
5d3a59d3 | 13-Feb-2023 |
Ed Tanous <edtanous@google.com> |
Fix casing on OpenBMC
f041387d5912db27e0317805e5c341c9c472887a didn't quite fix the issue due to testing problems, which luckily CI caught. This actually fixes it.
Tested: redfish service validato
Fix casing on OpenBMC
f041387d5912db27e0317805e5c341c9c472887a didn't quite fix the issue due to testing problems, which luckily CI caught. This actually fixes it.
Tested: redfish service validator passes.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ieac721477b3e78165559f857c0683d0520b7fcc2
show more ...
|
5e6386c4 | 02-Feb-2023 |
Ed Tanous <edtanous@google.com> |
Retab OEMManager to two space tabs
We use two space tabs elsewhere. This was done automatically in vim using the instructions here [1]:
[1] https://stackoverflow.com/questions/16888658/change-2-sp
Retab OEMManager to two space tabs
We use two space tabs elsewhere. This was done automatically in vim using the instructions here [1]:
[1] https://stackoverflow.com/questions/16888658/change-2-space-indent-to-4-space-in-vim
Tested: Whitespace only. No functional changes.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I95e1de853b0834aa5e14378b19e632830e73941b
show more ...
|