History log of /openbmc/bmcweb/features/redfish/lib/event_service.hpp (Results 51 – 75 of 94)
Revision Date Author Comments
# 1476687d 15-Mar-2022 Ed Tanous <edtanous@google.com>

Remove brace initialization of json objects

Brace initialization of json objects, while quite interesting from an
academic sense, are very difficult for people to grok, and lead to
inconsistencies.

Remove brace initialization of json objects

Brace initialization of json objects, while quite interesting from an
academic sense, are very difficult for people to grok, and lead to
inconsistencies. This patchset aims to remove a majority of them in
lieu of operator[]. Interestingly, this saves about 1% of the binary
size of bmcweb.

This also has an added benefit that as a design pattern, we're never
constructing a new object, then moving it into place, we're always
adding to the existing object, which in the future _could_ make things
like OEM schemas or properties easier, as there's no case where we're
completely replacing the response object.

Tested:
Ran redfish service validator. No new failures.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iae409b0a40ddd3ae6112cb2d52c6f6ab388595fe

show more ...


# eb1c47d3 09-Feb-2022 Ed Tanous <edtanous@google.com>

Remove regex uses in event service and consolidate

As the patch at
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/50994 can attest,
parsing urls with a regex is error prone. We should avoid

Remove regex uses in event service and consolidate

As the patch at
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/50994 can attest,
parsing urls with a regex is error prone. We should avoid it where
possible, and we have boost::urls that implements a full, correct, and
unit tested parser.

Ideally, eventually this helper function would devolve into just the
parse_uri, and setting defaults portion, and we could rely on the
boost::urls::url class to pass into things like http_client.

As a side note, because boost url implements port as a proper type-safe
uint16, some interfaces that previously accepted port by std::string&
needed to be modified, and is included in this patch.

Also, once moved, the branch on the ifdef for HTTP push support was
failing a clang-tidy validation. This is a known limitation of using
ifdefs for our code, and something we've solved with the header file, so
move the http push enabler to the header file.

Also note that given this reorganization, two EXPECT statements are
added to the unit tests for user input behaviors that the old code
previously did not handle properly.

Tested: Unit tests passing

Ran Redfish-Event-Listener, saw subscription create properly:
Subcription is successful for https://192.168.7.2, /redfish/v1/EventService/Subscriptions/2197426973

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia4127c6cbcde6002fe8a50348792024d1d615e8f

show more ...


# 45ca1b86 25-Mar-2022 Ed Tanous <edtanous@google.com>

Add setUpRedfishRoute to all nodes in redfish

For better or worse, the series ahead of this is making use of
setUpRedfishRoute to do the common "redfish specified" things that need
to be done for a

Add setUpRedfishRoute to all nodes in redfish

For better or worse, the series ahead of this is making use of
setUpRedfishRoute to do the common "redfish specified" things that need
to be done for a connection, like header checking, filtering, and other
things. In the current model, where BMCWEB_ROUTE is a common function
for all HTTP routes, this means we need to propagate this injection call
into the whole tree ahead of the requests being handled.

In a perfect world, we would invent something like a REDFISH_ROUTE
macro, but because macros are discouraged, the routes take a variadic
template of parameters, and each call to the route has a .privileges()
call in the middle, there's no good way to effect this change in a less
costly manner. This was messaged both in the prior reviews, and on
discord sourcing improvements on this pattern, to which none arose.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id29cc799e214edad41e48fc7ce6eed0521f90ecb

show more ...


# 55f79e6f 25-Jan-2022 Ed Tanous <edtanous@google.com>

Enable readability checks

clang-tidy readability checks are overall a good thing, and help us to
write consistent and readable code, even if it doesn't change the
result.

All changes done by the ro

Enable readability checks

clang-tidy readability checks are overall a good thing, and help us to
write consistent and readable code, even if it doesn't change the
result.

All changes done by the robot.

Tested: Code compiles, inspection only (changes made by robot)

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iee4a0c74a11eef9f158f0044eae675ebc518b549

show more ...


# fffb8c1f 08-Feb-2022 Ed Tanous <edtanous@google.com>

Change message_registries namespace to registries

The message_registries namespace is overly wordy, and results in very
long defines. Doing this one minor change reduces the code by 50 lines.
This

Change message_registries namespace to registries

The message_registries namespace is overly wordy, and results in very
long defines. Doing this one minor change reduces the code by 50 lines.
This seems worthwhile.

Tested: Unit tests pass. Namespace change only.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ib1401580b3fa47596eb56cdc86e60eeeb1c2f952

show more ...


# ea2e6eec 31-Jan-2022 Willy Tu <wltu@google.com>

json_utils: Add support for multiple level json read

Added support for multiple level direct read. For example, we can now
access `abc/xyz` directly instead of getting `abc` and then abc[`xyz`].

Fo

json_utils: Add support for multiple level json read

Added support for multiple level direct read. For example, we can now
access `abc/xyz` directly instead of getting `abc` and then abc[`xyz`].

For extra element error, it will only be triggered if the element at the
root level is not a parent of any of the requested elements.

For example,

{
"abc": {
"xyz": 12
}
}

Getting "abc/xyz" will satisfy the condition so it does not throw an
error.

This is accomplished in a reasonable way by moving the previously
variadic templated code to a std::span<variant> that contains all
possible types. This is a trick learned from the fmt library to reduce
compile sizes, as the majority of the code doesn't get duplicated at
template level, and is instead operating on the fixed variant type.

This commit drops 7316 bytes (about half a percent of total) from the
bmcweb binary size from the reduction in template usage. Later patches
build on this patchset to simplify call sites even more and reduce the
binary size further, but as is, this is still a win.

Note: now that the UnpackVariant lists all possible unpack types, it was
found that readJson would fail to compile for vector<bool>. This is a
well known C++ deficiency in the std::vector<bool> type when compared to
all other types, and will need special handling in the future. The two
types for vector<bool> are left commented out in the typelist.


Tested: Unit tests passing with reasonable coverage. Functional use in
next commit in this series.

Change-Id: Ifb247c9121c41ad8f1de26eb4bfc3d71484e6bd6
Signed-off-by: Willy Tu <wltu@google.com>
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# 15ed6780 14-Dec-2021 Willy Tu <wltu@google.com>

json_utils: Add support jsonRead Patch/Action

Added support for readJson for Patch and Action. The only difference is
that Patch does not allow empty json input while Action does. Action with
empty

json_utils: Add support jsonRead Patch/Action

Added support for readJson for Patch and Action. The only difference is
that Patch does not allow empty json input while Action does. Action with
empty input will use the default value based on the implementation and
return 200 OK response code.

readJsonPatch will replace the existing readJson and be used for path
requests. It will not allow empty json input and all requested
keys are required in the json input.

readJsonAction will be used for Action requests where it is possible for
all of the properties to be optional and allow empty request.
The optional properties are determined by the requested values type.

All current Action readJson are replaced with readJsonAction. It does
not change the existing behavior since it needs `std::optional`.
This will have to be updated later as we define the default behavior.

Tested:
Added unit tests and readJsonAction allows empty empty json object.

No Change to Redfish Tree.

Change-Id: Ia5e1f81695c528a20f1dc985aee19c920d8adaea
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# e662eae8 25-Jan-2022 Ed Tanous <edtanous@google.com>

Enable readability-implicit-bool-conversion checks

These checks ensure that we're not implicitly converting ints or
pointers into bools, which makes the code easier to read.

Tested:
Ran series thro

Enable readability-implicit-bool-conversion checks

These checks ensure that we're not implicitly converting ints or
pointers into bools, which makes the code easier to read.

Tested:
Ran series through redfish service validator. No changes observed.
UUID failing in Qemu both before and after.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1ca0be980d136bd4e5474341f4fd62f2f6bbdbae

show more ...


# 0a4304cf 07-Feb-2022 Ed Tanous <edtanous@google.com>

Remove invalid base log message

The redfish base registry does not include a definition of this
message, which generating type-safe models has teased out. Replace the
MutuallyExclusiveProperties me

Remove invalid base log message

The redfish base registry does not include a definition of this
message, which generating type-safe models has teased out. Replace the
MutuallyExclusiveProperties message with two "PropertyValueConflict"
messages. This seems like the closest thing, but in lieu of the things
not being in the standard, this seems like the best compromise.

Tested:
curl --insecure -X POST --user root:0penBmc
https://192.168.7.2/redfish/v1/EventService/Subscriptions -d
'{"MessageIds":[""],"RegistryPrefixes":[""],"Destination":"","Protocol":""}'

Returns:
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The property 'MessageIds' could not be written because its value would conflict with the value of the 'RegistryPrefixes' property.",
"MessageArgs": [
"MessageIds",
"RegistryPrefixes"
],
"MessageId": "Base.1.8.1.PropertyValueConflict",
"MessageSeverity": "Warning",
"Resolution": "No resolution is required."
}
],
"code": "Base.1.8.1.PropertyValueConflict",
"message": "The property 'MessageIds' could not be written because its value would conflict with the value of the 'RegistryPrefixes' property."
}
}

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1eaf4d06b6f5b85909392c48970e3f353af3a41e

show more ...


# 1ebe3e41 09-Feb-2022 Gayathri Leburu <gayathri.leburu@intel.com>

Fix Event Subscription URI

While performing GET on /redfish/v1/EventService/Subscriptions/ results
in error 405 - Method not allowed.

This commit fixes the subscription URI while registering the RO

Fix Event Subscription URI

While performing GET on /redfish/v1/EventService/Subscriptions/ results
in error 405 - Method not allowed.

This commit fixes the subscription URI while registering the ROUTE i.e.,
during BMCWEB_ROUTE.

TESTED :
- GET on /redfish/v1/EventService/Subscriptions/ successfully returned
all the list of subscribed events.

Signed-off-by: Gayathri Leburu <gayathri.leburu@intel.com>
Change-Id: I0edcfd8403e0178fe84d6b8328dabad71c4d5c98

show more ...


# 6ba8c82e 06-Jul-2021 sunharis_in <sunharis@in.ibm.com>

Send push-style event only if EventService enabled

As per DMTF Redfish, if the event service is disabled, events are not
expected to be posted to the existing subscribers

This commit adds validatio

Send push-style event only if EventService enabled

As per DMTF Redfish, if the event service is disabled, events are not
expected to be posted to the existing subscribers

This commit adds validation to check "ServiceEnabled" property while
sending events. An additional check is made not to attempt sending
events if there are no event subscribers at BMC

Tested by:
Using DMTF Redfish-Event-Listener script with some local modification
to support the latest event subscription specifications

1. With a Push-style event subscriber setup, set "ServiceEnabled" to
false
PATCH /redfish/v1/EventService -d '{"ServiceEnabled":false}'
2. Generate events and check no events are posted to subscriber
2. Set "ServiceEnabled" to true. BMC should resume sending further
events
3. Check if BMC attempts to send events by forming the eventRecords
when there are no subscriptions made - Verified with traces that
events are not sent out
4. With "ServiceEnabled" set to false, verified the SubmitTestEvent
fails

Signed-off-by: Sunitha Harish <sunharis@in.ibm.com>
Change-Id: Icbe7c25ba12bbfb73e59639c484fccdf384ebecf

show more ...


# 26f6976f 25-Jan-2022 Ed Tanous <edtanous@google.com>

Enable readability-container-size-empty tests

This one is a little trivial, but it does help in readability.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5366d4eec8af2f781b3bad804131a

Enable readability-container-size-empty tests

This one is a little trivial, but it does help in readability.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5366d4eec8af2f781b3bad804131ae2eb806e3aa

show more ...


# 1e270c5f 04-Dec-2021 Patrick Williams <patrick@stwcx.xyz>

span: clean up stray boost headers.

We recently switched from boost::beast::span to std::span, but a few
header tweaks were not complete and we were still including beast::span.
Remove the header fi

span: clean up stray boost headers.

We recently switched from boost::beast::span to std::span, but a few
header tweaks were not complete and we were still including beast::span.
Remove the header file and add a '#include <span>' for one header which
uses span but was missing.

Tested: Compiles and unit tests pass.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I675c55df1abf78dfa244fced3d50679ffe1b6d91

show more ...


# 26702d01 03-Nov-2021 Ed Tanous <edtanous@google.com>

/s/boost::beast::span/std::span

std::span is now available in c++ 20 builds, and should be a drop in
replacement for boost::span we were using previously. This commit sed
replaces it, and changes r

/s/boost::beast::span/std::span

std::span is now available in c++ 20 builds, and should be a drop in
replacement for boost::span we were using previously. This commit sed
replaces it, and changes reference to cbegin and cend to begin and end
respectively.

Tested:
Ran redfish-service-validator. No new failures, and all nodes within
/redfish/v1/Registries that would be effected by this change respond
with 200 and the same content as previously.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iace89473b7c20f32106eae9d872c16cfae5f17f6

show more ...


# 0fda0f12 15-Nov-2021 George Liu <liuxiwei@inspur.com>

Update clang-format

refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format
`Don't break long string literals`

Tested: built bmcweb successfully and RedfishValidator Passed.

Sig

Update clang-format

refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format
`Don't break long string literals`

Tested: built bmcweb successfully and RedfishValidator Passed.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ib58f7c942fd3838592e043c57e0b6ffcdc3d963b

show more ...


# 601c71ae 08-Sep-2021 Ed Tanous <edtanous@google.com>

Improve HttpHeaders in EventService

This commit moves the internal data structures to use
boost::beast::http::fields as its internal data structure. fields is a
hyper-optimized map implementation f

Improve HttpHeaders in EventService

This commit moves the internal data structures to use
boost::beast::http::fields as its internal data structure. fields is a
hyper-optimized map implementation for http headers, and has a lot of
nice escaping properties. It is what boost::beast::http::request uses
under the covers, so this has some niceties in reducing the amount of
code, and means we can completely remove the headers structure, and
simply rely on req. When this conversion was done, now the type safety
of the incoming data needs to have better checking, as loading into the
keys has new requirements (like values must be strings), so that type
conversion code for to and from json was added, and the POST and PATCH
handler updated to put into the new structure.

Tested:
curl -vvvv --insecure -u root:0penBmc
"https://192.168.7.2:443/redfish/v1/EventService/Subscriptions" -X POST
-d
"{\"Destination\":\"http://192.168.7.2:443/\",\"Context\":\"Public\",\"Protocol\":\"Redfish\",\"HttpHeaders\":[{\"Foo\":\"Bar\"}]}"
returned 200.

Tested various "bad" headers, and observed the correct type errors.

Issued: systemctl restart bmcweb.
Subscription restored properly verified with.
GET https://localhost:8001/redfish/v1/EventService/Subscriptions/183211400

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I331f65e1a3960f1812c9baac27dbdcb1d54f112c

show more ...


# ad22fefe 13-Sep-2021 Ed Tanous <edtanous@google.com>

Nullify HttpHeaders per the specification

Per the definition of HttpHeaders in the schema "This object shall be
null or an empty array in responses." This commit does as the
specification commands.

Nullify HttpHeaders per the specification

Per the definition of HttpHeaders in the schema "This object shall be
null or an empty array in responses." This commit does as the
specification commands.

In theory, this could break clients that were checking the HttpHeaders
after posting it, but it's not being put behind an option flag in this
patchset for a couple reasons:
1. This has the potential to leak security secrets, as the normal use
case for this is to put in Authorization headers.
2. Given that the most likely client that would "break" is the one doing
the POST to this API, and it already has the data, it seems unlikely
that there's any implementation that would explicitly check that the
returned object is identical to the sent one, especially if error codes
are handled properly.

Tested:
curl -vvvv --insecure -u root:0penBmc "https://192.168.7.2:443/redfish/v1/EventService/Subscriptions" -X POST -d "{\"Destination\":\"http://192.168.7.2/foo\",\"Context\":\"Public\",\"Protocol\":\"Redfish\",\"HttpHeaders\": [{\"Foo\": \"Bar\"}]}"
Succeeded with 200

curl -vvvv --insecure -u root:0penBmc "https://192.168.7.2/redfish/v1/EventService/Subscriptions/405645225"
Returned

"HttpHeaders": [],

As part of its object

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I32181044d0af6b4395daea3f6ca4480022fc7553

show more ...


# 7eeafa76 28-Jul-2021 Abhishek Patel <Abhishek.Patel@ibm.com>

Fix event_service privileges

Post method:
1) redfish/v1/EventService/Subscriptions/
ConfigureManager -> [ConfigureManager or ConfigureComponents]

This change allows Admin and Operator bot

Fix event_service privileges

Post method:
1) redfish/v1/EventService/Subscriptions/
ConfigureManager -> [ConfigureManager or ConfigureComponents]

This change allows Admin and Operator both users to subscribe to the
particular event, where only admin user has the ability before this
change.

Tested: manually tested on Witherspoon system. Only ConfigureManager or
ConfigureComponents privilege users can subscribe to an event.

TestURL:
curl -k -H "X-Auth-Token: $bmc_token" -X POST -d
'{"Context": "9.3.147.232",
"DeliveryRetryPolicy": "TerminateAfterRetries",
"Destination": "https://9.3.147.232:17443/redfish/events",
"EventFormatType": "Event",
"MessageIds": [],
"MetricReportDefinitions": [],
"Protocol": "Redfish",
"RegistryPrefixes": [],
"ResourceTypes": [],
"SubscriptionType": "RedfishEvent"}'
https://${BMC_IP}/redfish/v1/EventService/Subscriptions

Signed-off-by: Abhishek Patel <Abhishek.Patel@ibm.com>
Change-Id: I4d3bcfaab7f5a00ada99a30fdb8f17d85531a2a8

show more ...


# 28afb49c 24-Feb-2021 JunLin Chen <Jun-Lin.Chen@quantatw.com>

EventService: Move subscription persistent data

This commit resolves https://github.com/openbmc/bmcweb/issues/168
Current store mechanism makes it very difficult to keep in sync with
the existing fi

EventService: Move subscription persistent data

This commit resolves https://github.com/openbmc/bmcweb/issues/168
Current store mechanism makes it very difficult to keep in sync with
the existing files, and has caused several bugs because the path it
uses different than the existing bmcweb_persistent_data.json, and it's
missing several error checks.

If there has old config in /var/lib/bmcweb/eventservice_config.json.
Restart bmcweb will move old config to bmcweb_presistent_data.json and
delete the old config.


Tested:
- Create new Subscription via POST
https://${bmc}/redfish/v1/EventService/Subscriptions/

The subscription is successfully created and GET succussfully.
Restart bmcweb or reboot.
The subscription will restore.

- Delete the Subscription via DELETE
https://${bmc}/redfish/v1/EventService/Subscriptions/${subscription_id}

The subscription is successfully delete.
bmcweb_persistent_data.json will delete subscription content.

- Modify EventService config via PATCH
https://{{bmc}}/redfish/v1/EventService

GET https://{{bmc}}/redfish/v1/EventService and the changes applied.
bmcweb_persistent_data.json will apply modification after PATCH.
Restart bmcweb or reboot
The config maintains the changed.

Signed-off-by: JunLin Chen <Jun-Lin.Chen@quantatw.com>
Change-Id: Ic29385ea8231ba976bbf415af2803df2d30cb10a

show more ...


# 9d41aec6 23-Jul-2021 Ravi Teja <raviteja28031990@gmail.com>

Fix EventService Subscriptions URI

GET on subscriptions URI returns NotFound error
this commit fixes URI issues

Tested by:
GET https://${bmc}/redfish/v1/EventService/Subscriptions/3800595217

Signe

Fix EventService Subscriptions URI

GET on subscriptions URI returns NotFound error
this commit fixes URI issues

Tested by:
GET https://${bmc}/redfish/v1/EventService/Subscriptions/3800595217

Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Change-Id: I2952694e4786dc78248335559c8aec795bfabd6e

show more ...


# ed398213 09-Jun-2021 Ed Tanous <edtanous@google.com>

Automate PrivilegeRegistry to code

This commit attempts to automate the creation of our privileges
structures from the redfish privilege registry. It accomplishes this by
updating parse_registries.

Automate PrivilegeRegistry to code

This commit attempts to automate the creation of our privileges
structures from the redfish privilege registry. It accomplishes this by
updating parse_registries.py to also pull down the privilege registry
from DMTF.
The script then generates privilege_registry.hpp, which include const
defines for all the privilege registry entries in the same format that
the Privileges struct accepts. This allows new clients to simply
reference the variable to these privilege structures, instead of having
to manually (ie error pronely) put the privileges in themselves.

This commit updates all the routes.

For the moment, override and OEM schemas are not considered. Today we
don't have any OEM-specific Redfish routes, so the existing ones inherit
their parents schema. Overrides have other issues, and are already
incorrect as Redfish defines them.

Binary size remains unchanged after this patchset.

Tested:
Ran redfish service validator

Ran test case from f9a6708c4c6490257e2eb6a8c04458f500902476 to ensure
that the new privileges constructor didn't cause us to regress the brace
construction initializer.

Checked binary size with:
gzip -c
$BBPATH/tmp/work/s7106-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/rootfs/usr/bin/bmcweb
| wc -c
1244048

(tested on previous patchset)

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ideede3d5b39d50bffe7fe78a0848bdbc22ac387f

show more ...


# 432a890c 14-Jun-2021 Ed Tanous <edtanous@google.com>

Remove ambiguous privileges constructor

There are a number of endpoints that assume that a given routes
privileges are governed by a single set of privileges, instead of
multiple sets ORed together.

Remove ambiguous privileges constructor

There are a number of endpoints that assume that a given routes
privileges are governed by a single set of privileges, instead of
multiple sets ORed together. To handle this, there were two overloads
of the privileges() method, one that took a vector of Privileges, and
one that took an initializer_list of const char*. Unfortunately, this
leads some code in AccountService to pick the wrong overload when it's
called like this
.privileges( {{"ConfigureUsers"}, {"ConfigureManager"},
{"ConfigureSelf"}})

This is supposed to be "User must have ConfigureUsers, or
ConfigureManager, or ConfigureSelf". Currently, because it selects the
wrong overload, it computes to "User must have ConfigureUsers AND
ConfigureManager AND ConfigureSelf.

The double braces are supposed to cause this to form a vector of
Privileges, but it appears that the initializer list gets consumed, and
the single invocation of initializer list is called. Interestingly,
trying to put in a privileges overload of
intializer_list<initializer_list<const char*>> causes the compilation to
fail with an ambiguous call error, which is what I would've expected to
see previously in this case, but alas, I'm only a novice when it comes
to how the C++ standard works in these edge cases. This is likely due
in part to the fact that they were templates of an unused template param
(seemingly copied from the previous method) and SFINAE rules around
templates.

This commit functionally removes one of the privileges overloads, and
adds a second set of braces to every privileges call that previously had
a single set of braces. Previous code will not compile now, which is
IMO a good thing.

This likely popped up in the Node class removal, because the Node class
explicitly constructs a vector of Privilege objects, ensuing it can hit
the right overload

Tested:
Ran Redfish service validator

Tested the specific use case outlined on discord with:
Creating a new user with operator privilege:
```
redfishtool -S Always -u root -p 0penBmc -vvvvvvvvv -r 192.168.7.2
AccountService adduser foo mysuperPass1 Operator
```

Then attempting to list accounts:
```
curl -vvvv --insecure --user foo:mysuperPass1
https://192.168.7.2/redfish/v1/AccountService/Accounts/foo
```

Which succeeded and returned the account in question.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I83e62b70e97f56dc57d43b9081f333a02fe85495

show more ...


# 9552547c 11-Jun-2021 Chicago Duan <duanzhijia01@inspur.com>

Redfish: Fix issue of EventDestination

Fix the bug that can't get/patch/delete EventDestination

Tested: It works good and validation has succeeded.

Signed-off-by: Chicago Duan <duanzhijia01@inspur

Redfish: Fix issue of EventDestination

Fix the bug that can't get/patch/delete EventDestination

Tested: It works good and validation has succeeded.

Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: Ideb743f9f2a7900a444bc912bfedbb75dfe7c8e7

show more ...


# 7e860f15 08-Apr-2021 John Edward Broadbent <jebr@google.com>

Remove Redfish Node class

Reduces the total number of lines and will allow for easier testing of
the redfish responses.

A main purpose of the node class was to set app.routeDynamic(). However
now a

Remove Redfish Node class

Reduces the total number of lines and will allow for easier testing of
the redfish responses.

A main purpose of the node class was to set app.routeDynamic(). However
now app.routeDynamic can handle the complexity that was once in critical
to node. The macro app.routeDynamic() provides a shorter cleaner
interface to the unerlying app.routeDyanic call. The old pattern set
permissions for 6 interfaces (get, head, patch, put, delete_, and post)
even if only one interface is created. That pattern creates unneeded
code that can be safely removed with no effect.
Unit test for the responses would have to mock the node the class in
order to fully test responses.

see https://github.com/openbmc/bmcweb/issues/181

The following files still need node to be extracted.

virtual_media.hpp
account_service.hpp
redfish_sessions.hpp
ethernet.hpp

The files above use a pattern that is not trivial to address. Often their
responses call an async lambda capturing the inherited class. ie
(https://github.com/openbmc/bmcweb/blob/ffed87b5ad1797ca966d030e7f979770
28d258fa/redfish-core/lib/account_service.hpp#L1393)
At a later point I plan to remove node from the files above.

Tested:
I ran the docker unit test with the following command.
WORKSPACE=$(pwd) UNIT_TEST_PKG=bmcweb
./openbmc-build-scripts/run-unit-test-docker.sh

I ran the validator and this change did not create any issues.
python3 RedfishServiceValidator.py -c config.ini

Signed-off-by: John Edward Broadbent <jebr@google.com>
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I147a0289c52cb4198345b1ad9bfe6fdddf57f3df

show more ...


# b304bd79 29-Jan-2021 P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>

Added Validation on MessageId and RegistryPrefix

Message ID's and Registry prefixes used to subscribe to an event
will be checked against allowed values.
Corrected "Task" registry prefix to "TaskEve

Added Validation on MessageId and RegistryPrefix

Message ID's and Registry prefixes used to subscribe to an event
will be checked against allowed values.
Corrected "Task" registry prefix to "TaskEvent".

Tested:
- Validated POST action with different combinations of
Message id's and Registry Prefix.
- Redfish validator passed.

Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Change-Id: I921cafeca8b2a1813f4aa4c41ecd01c831e3465b

show more ...


1234