#
478b7adf |
| 15-Jul-2024 |
Ed Tanous <etanous@nvidia.com> |
Remove IWYU pragmas
These were added as part of d5c80ad9c07b94465d8ea62d2b6f87c30cac765e: test treewide: iwyu
Since then, Nan hasn't been very active on the project, and to my knowledge, since the
Remove IWYU pragmas
These were added as part of d5c80ad9c07b94465d8ea62d2b6f87c30cac765e: test treewide: iwyu
Since then, Nan hasn't been very active on the project, and to my knowledge, since the initial run, we've never used IWYU again.
clang-include-cleaner seems to work well without needing these pragmas, and is what we're using, even if it's less useful than IWYU.
Remove all mention of IWYU.
Tested: Code compiles.
Change-Id: I06feedeeac9a114f5bdec81d59ca83223efd8aa7 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
41fe81c2 |
| 02-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix includes
This commit is automatically generated by enabling clang-include-fixer.
Tested: Code compiles.
Change-Id: I475d7b9d43e95bbdeeaadf11905d3b2a60aa8ef3 Signed-off-by: Ed Tanous <etanous@n
Fix includes
This commit is automatically generated by enabling clang-include-fixer.
Tested: Code compiles.
Change-Id: I475d7b9d43e95bbdeeaadf11905d3b2a60aa8ef3 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
bd79bce8 |
| 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: Iceec1dc95b6c908ec6c21fb40093de9dd18bf11a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
25991f7d |
| 13-Jun-2024 |
Ed Tanous <ed@tanous.net> |
Add filter parameter support
$filter is a parameter documented in the Redfish specification, section 7.3.4. It defines a mechanism for filtering arbitrary collections of parameters based on a set o
Add filter parameter support
$filter is a parameter documented in the Redfish specification, section 7.3.4. It defines a mechanism for filtering arbitrary collections of parameters based on a set of arbitrary language expressions.
From the specification, it supports the following language operators:
() Precedence grouping operator. (Status/State eq 'Enabled' and Status/Health eq 'OK') or SystemType eq 'Physical'
and Logical and operator. ProcessorSummary/Count eq 2 and MemorySummary/TotalSystemMemoryGiB gt 64
eq Equal comparison operator. ProcessorSummary/Count eq 2
ge Greater than or equal to comparison operator. ProcessorSummary/Count ge 2
gt Great than comparison operator. ProcessorSummary/Count gt 2
le Less than or equal to comparison operator MemorySummary/TotalSystemMemoryGiB le 64
lt Less than comparison operator. MemorySummary/TotalSystemMemoryGiB lt 64
ne Not equal comparison operator. SystemType ne 'Physical'
not Logical negation operator. not (ProcessorSummary/Count eq 2)
or Logical or operator. ProcessorSummary/Count eq 2 or ProcessorSummary/Count eq 4
Support for these operators have been added in previous commits. This commit enables them behind the insecure-enable-redfish-query meson option. This is an arbitrary language, so the likelihood there's some improper implementation in the patch is high. This gives folks the ability to test it.
Tested: Lots of unit tests included in this patch.
Functionally tested the basic operators: ``` GET /redfish/v1/Managers/bmc/LogServices/Journal/Entries?\$filter=EntryType+eq+'Oem' GET /redfish/v1/Managers/bmc/LogServices/Journal/Entries?\$filter=EntryType+ne+'Oem' ```
Function as expected, producing multiple results or no results respectively.
GET /redfish/v1 reports "FilterQuery": true
Redfish service validator passes.
Change-Id: Id568acc5dcfce868af12da5ee16c4f0caae8060a Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
16d95ec6 |
| 17-Jun-2024 |
Ed Tanous <ed@tanous.net> |
Make aggregator unit tests pass
When enabled, redfish aggregation causes unit tests to fail.
Tested: Unit tests now pass with redfish aggregation enabled.
Change-Id: Ieb92a4ad0a4be3ce757c816a676e0
Make aggregator unit tests pass
When enabled, redfish aggregation causes unit tests to fail.
Tested: Unit tests now pass with redfish aggregation enabled.
Change-Id: Ieb92a4ad0a4be3ce757c816a676e0a641cd7c85a Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
25b54dba |
| 17-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options usi
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options using a config file. This history has led to a lot of different ways to configure code in the codebase itself, which has led to problems, and issues in consistency.
ifdef options do no compile time checking of code not within the branch. This is good when you have optional dependencies, but not great when you're trying to ensure both options compile.
This commit moves all internal configuration options to: 1. A namespace called bmcweb 2. A naming scheme matching the meson option. hyphens are replaced with underscores, and the option is uppercased. This consistent transform allows matching up option keys with their code counterparts, without naming changes. 3. All options are bool true = enabled, and any options with _ENABLED or _DISABLED postfixes have those postfixes removed. (note, there are still some options with disable in the name, those are left as-is) 4. All options are now constexpr booleans, without an explicit compare.
To accomplish this, unfortunately an option list in config/meson.build is required, given that meson doesn't provide a way to dump all options, as is a manual entry in bmcweb_config.h.in, in addition to the meson_options. This obsoletes the map in the main meson.build, which helps some of the complexity.
Now that we've done this, we have some rules that will be documented. 1. Runtime behavior changes should be added as a constexpr bool to bmcweb_config.h 2. Options that require optionally pulling in a dependency shall use an ifdef, defined in the primary meson.build. (note, there are no options that currently meet this class, but it's included for completeness.)
Note, that this consolidation means that at configure time, all options are printed. This is a good thing and allows direct comparison of configs in log files.
Tested: Code compiles Server boots, and shows options configured in the default build. (HTTPS, log level, etc)
Change-Id: I94e79a56bcdc01755036e4e7278c7e69e25809ce Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
f0b59af4 |
| 20-Mar-2024 |
Ed Tanous <ed@tanous.net> |
Add misc-include-cleaner
And fix the includes that are wrong.
Note, there is a very large ignore list included in the .clang-tidy configcfile. These are things that clang-tidy doesn't yet handle w
Add misc-include-cleaner
And fix the includes that are wrong.
Note, there is a very large ignore list included in the .clang-tidy configcfile. These are things that clang-tidy doesn't yet handle well, like knowing about a details include.
Change-Id: Ie3744f2c8cba68a8700b406449d6c2018a736952 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
faf100f9 |
| 25-May-2023 |
Ed Tanous <edtanous@google.com> |
Fix some includes
System includes should be included with <>, in-tree includes should be included with "". This was found manually, with the help of the following grep statement[1].
git grep -o -h
Fix some includes
System includes should be included with <>, in-tree includes should be included with "". This was found manually, with the help of the following grep statement[1].
git grep -o -h "#include .*" | sort | uniq
Tested: Code compiles
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I1a6b2a5ba35ccbbb61c67b7c4b036a2d7b3a36a3
show more ...
|
#
c16e292c |
| 15-Jul-2022 |
Ed Tanous <edtanous@google.com> |
Update RedfishVersion to 1.17.0
The latest version of the specification is 1.17.0, and arguably, we should be updating this every time we pull in any new feature, but that hasn't happened.
So far a
Update RedfishVersion to 1.17.0
The latest version of the specification is 1.17.0, and arguably, we should be updating this every time we pull in any new feature, but that hasn't happened.
So far as I'm aware, there are no tools that actually look at this parameter to make branching decisions in the client about supported features, so the likelihood this has impact is basically nil.
Tested: GET /redfish/v1 returns RedfishVersion of 1.17.0
Redfish service validator passes.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I055b6010329599b7b39c587fa85faf51a38c9b57
show more ...
|
#
e68d1be0 |
| 27-Jan-2023 |
Ed Tanous <edtanous@google.com> |
Add ManagerProvidingService implementation
This property was added in Redfish 2022.3 to allow clients to determine which manager is hosting the ServiceRoot, such that they can find uptime statistics
Add ManagerProvidingService implementation
This property was added in Redfish 2022.3 to allow clients to determine which manager is hosting the ServiceRoot, such that they can find uptime statistics, and other metrics from that resource, without needing to attach them directly to serviceroot.
Tested: Redfish service validator passes. GET /redfish/v1/Managers/bmc returns the expected response.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If2b78528d1499fbdae46120e1a1792ecf7ceb1d3
show more ...
|
#
77665bda |
| 12-Oct-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
header cleanups
This commit fixed several places (but not all) where wrong include directory is specified and prevent the clean up in the chidren changes.
Signed-off-by: Nan Zhou <nanzhoumails@gmai
header cleanups
This commit fixed several places (but not all) where wrong include directory is specified and prevent the clean up in the chidren changes.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ibbba62e2c0cfe3583a65f1befa1b233bd3eebf19
show more ...
|
#
c33a039b |
| 10-Sep-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
treewide: reorganize unit tests
Like other C++ projects, unit tests normally are in a separate repo and respect the folder structure of the file under test.
This commit deleted all "ut" folder and
treewide: reorganize unit tests
Like other C++ projects, unit tests normally are in a separate repo and respect the folder structure of the file under test.
This commit deleted all "ut" folder and move tests to a "test" folder. The test folder also has similar structure as the main folder.
This commit also made neccessary include changes to make codes compile. Unused tests are untouched.
Tested: unit test passed.
Reference: [1] https://github.com/grpc/grpc/tree/master/test [2] https://github.com/boostorg/core/tree/414dfb466878af427d33b36e6ccf84d21c0e081b/test [3] Many other OpenBMC repos: https://github.com/openbmc/entity-manager/tree/master/test [4] https://stackoverflow.com/questions/2360734/whats-a-good-directory-structure-for-larger-c-projects-using-makefile
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I4521c7ef5fa03c47cca5c146d322bbb51365ee96
show more ...
|