Age | Commit message (Collapse) | Author | Files | Lines |
|
SoftwareImages was added in Manager in 1_6_0 and Bios in 1_1_0.
Use the existing getActiveFwVersion function but rename to
populateFirmwareInformation. Changed the mapper call from a GetObject to a
GetSubTree. Added some debug to the function.
Tested: Validator passes.
curl -k https://$bmc/redfish/v1/Managers/bmc
....
"Links": {
"ActiveSoftwareImage": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/e4e1c69d"
},
"ManagerForChassis": [
....
"@odata.id": "/redfish/v1/Chassis/chassis"
},
"SoftwareImages": [
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/730944ed"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/e4e1c69d"
}
],
"SoftwareImages@odata.count": 2
},
...
Change-Id: I20798852a2f62575854820bff36175dda38c7dbc
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Add ForceRestart in Action/#Manager.Reset/ResetType@AllowableValues,
as it is a mandatory parameter in the OCP Redfish Profile v1.0.
Tested:
1. Verified redfish validator passed
2. Verified details from Redfish
GET: https://<BMC-IP>/redfish/v1/Managers/bmc/ResetActionInfo
Response:
{
"@odata.id": "/redfish/v1/Managers/bmc/ResetActionInfo",
"@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
"Id": "ResetActionInfo",
"Name": "Reset Action Info",
"Parameters": [
{
"AllowableValues": [
"GracefulRestart",
"ForceRestart"
],
"DataType": "String",
"Name": "ResetType",
"Required": true
}
]
}
Case 1: ForceRestart:
POST: https://<BMC-IP>/redfish/v1/Managers/bmc/Actions/Manager.Reset
Body:
{
"ResetType": "ForceRestart"
}
Response:
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"Message": "Successfully Completed Request",
"MessageArgs": [],
"MessageId": "Base.1.4.0.Success",
"Resolution": "None",
"Severity": "OK"
}
]
}
Case 2: GracefulRestart:
POST: https://<BMC-IP>/redfish/v1/Managers/bmc/Actions/Manager.Reset
Body:
{
"ResetType": "GracefulRestart"
}
Response: Success
Case 3: Negative test case
POST: https://<BMC-IP>/redfish/v1/Managers/bmc/Actions/Manager.Reset
Body:
{
"ResetType": "Test1"
}
Response:
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"Message": "The parameter Test1 for the action ResetType is not
supported on the target resource.",
"MessageArgs": [
"Test1",
"ResetType"
],
"MessageId": "Base.1.4.0.ActionParameterNotSupported",
"Resolution": "Remove the parameter supplied and resubmit the
request if the operation failed.",
"Severity": "Warning"
}
"code": "Base.1.4.0.ActionParameterNotSupported",
"message": "The parameter Test1 for the action ResetType is not
supported on the target resource."
}
}
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I84f4942ddabc564a267d7db8e582ad8c11b5399b
|
|
In some situations a firmware requires activation rather than
update. These messages are intended to cover those situations.
Tested:
Logged these events and confirmed that they appear correctly in
Redfish.
Change-Id: I6171b9584626e049349a26c414146f37c04768c7
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
clang-tidy warned on some data structures that, if they throw, the
exceptions can't be caught.
Move these data structures to constexpr equivalents to save some memory.
Tested:
Loaded webui. Worked as intended, and static files loaded properly.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I331ebfc2451f0cc0a82a1b70d325008c9c80401a
|
|
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ibeedbe61fa1575af2599c63e6513ddb7d1feff58
|
|
Unused param errors are throwing from this sources by the recent
CMake changes. Looks like CI build didn't catch these errors then.
Tested: Build is verified.
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
Change-Id: I139c01a78babc1c370c0c5de787291726ea42b53
|
|
- When bmcweb is compiled with clang compiler, Cmake throws a warning
as the expressions of IF and ENDIF are mismatched.
- This commit would fix the warning.
Tested By:
- When cmake is triggered with clang compiler, the warning goes away.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I836df40b80b7a230a3d24f51e741ba88e6652b9c
|
|
std::exception doesn't have a direct conversion to iostream. This only
shows up when building for debug.
Tested:
Forced -DCMAKE_BUILD_TYPE=Debug, and verified code builds.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I6fdd0e561f1cecc5f40f0e8b9c624f746ce6456f
|
|
Refer to https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/29734
and implement Modified Event log property
Tested:
curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/Entries/1
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1",
"@odata.type": "#LogEntry.v1_6_0.LogEntry",
"Created": "1970-01-01T00:01:35+00:00",
"EntryType": "Event",
"Id": "1",
"Message": "xyz.openbmc_project.Common.Device.Error.ReadFailure",
"Modified": "1970-01-01T00:01:35+00:00",
"Name": "System Event Log Entry",
"Severity": "Critical"
}
Passed the validator:
VERBO - ServiceRoot -> Systems.Systems -> Members.ComputerSystem#0 ->
LogServices.LogServices -> Members.LogService#0 -> Entries.Entries ->
Members.LogEntry#0, LogEntry.v1_6_1, LogEntry
VERBO - @odata.id PASS
VERBO - @odata.type PASS
VERBO - Created PASS
VERBO - EntryType PASS
VERBO - Id PASS
VERBO - Message PASS
VERBO - Modified PASS
VERBO - Name PASS
VERBO - Severity PASS
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I5a59a298e95e78acaad11a99558f9046675820d3
|
|
In order to demarcate separate FW boots within a continuous stream of
Redfish event logs, add a BMCBootReason message which is logged during
every BMC FW bootup. This message also provides the current FW version
string, as well as a reason describing why the boot happened (e.g. power
loss, user request, watchdog timeout).
Tested: Inserted message into journal using logger-systemd and observed
Redfish event at redfish/v1/Systems/system/LogServices/EventLog/Entries.
Change-Id: I0f0a10ebf300e1a9f2e18bb6735d95e96aeb8473
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
|
|
There were a couple places in code where we still use index based for
loops. Move these to the more modern range based for loops.
Tested: Needs testing. Changes made by clang-tidy.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I30bf6fae6b2540434d5c98900a8f6bd0c8f2be93
|
|
Boost 1.74.0 got released the yesterday and deprecated some more stuff
that we use. This patchset prepares us so we will build for it when
meta-oe picks it up.
Tested:
Code builds under boost 1.74.0
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Icc6c54da6705098fc76e3ee6dbdc6c3b5c57fbda
|
|
Add support to increase timeoutTimeSeconds to 10 secs to allow firmware
object to create successfully to proceed for firmware update.
Tested:
Redfish validator passed.
Updated the firmware using redfish for 16 times continuously.
POST: https://<BMC_IP>/redfish/v1/UpdateService/
with <BMC_signed_cap> binary file
firmware updated.
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"Id": "0",
"TaskState": "Running",
"TaskStatus": "OK"
}
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Change-Id: If86862c0c6519b3591bfa7e04cbb1ff13659b0d5
|
|
This shows up as a warning in clang
Tested:
Code compiles in clang now
Change-Id: Icb2bed0a489c4bbaa85ad365602a3cd547a4fe6c
Signed-off-by: Ed Tanous <ed@tanous.net>
|
|
The static IPv4 configuration on the Hypervisor interface was
failing. The user setting value for the prefixlength was not
getting set to the DBus property.
This commit fixes the async DBus interface call to set the user
setting value of the prefixlength property at the DBus interface
xyz.openbmc_project.Network.IP
Tested by :
PATCH -D patch.txt -d '{ "IPv4StaticAddresses": [{"Address": <>,"SubnetMask": <>,"Gateway":<>}]}'
https://${bmc}/redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0
Verify the DBus property gets set by the values patched.
Signed-off-by: Sunitha Harish <sunharis@in.ibm.com>
Change-Id: Ife6283ba491ec421a95803b841d8c73a35aea9f2
|
|
There are a number of common coding, design, and implementation mistakes
that bmcweb users tend to make. This attempts to document them so we
have a single source to point users to when making gerrit comments. The
hope is that this alleviates some of the early mistakes that new users
tend to make.
Tested:
Documentation only. No functional changes.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Icc0081c94403c937d9a1ce44b7d6e81a5716a32e
|
|
IBM, the only user of TFTP, has a system with 200MB images.
https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/bmcweb/bmcweb_%25.bbappend#L2
In the future this system's images might grow even larger.
Currently timed the TFTP transfer time at 2 min 37 sec on this system.
Bumped to 10 min though for room for the image to grow and pad the
timeout in case an even slower network.
Considered a parameter, can add if it would ever get set to a different
value.
Tested: TFTP update from GUI works with
https://gerrit.openbmc-project.xyz/c/openbmc/webui-vue/+/35738
Change-Id: I1eed110c9605ee1e116670e46f561c66676e5eed
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
The commit implements the Push style events when a Task
goes through its life cycle.
Tested by: (Used https://github.com/DMTF/Redfish-Event-Listener)
1. Create a subscription by passing "ResourceTypes" as ["Task"]
POST -D headers.txt https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination" : "https://<host:port>, "ResourceTypes":["Task"], "Protocol":"Redfish"}'
2. Run a command which starts the Task
3. Verify if the task state changes are reported as events
Signed-off-by: Sunitha Harish <sunharis@in.ibm.com>
Change-Id: I4cea83f221e6f4f40cfbdc3da3e95cd920744316
|
|
Url_view can throw more exceptions.
Tested:
I wish I knew of a good way to test this, but because it relies on
breaking the protocol, it's difficult to use existing things to test.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Iccaf864221cd1389574106316d3049283b44d08c
|
|
Despite error code checking generally being a good thing, this seems to
cause a regression on systems that don't have an asset interface.
See https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/35711
for more details
Tested:
Expecting CI to test, as it was the one that found the last corner case.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Iae013b1d240852908dd5b0107aad8a0089b5961e
|
|
Index the decode array with an unsigned char rather than a signed int
(which could accees outside the bounds of decodingData, leading to
undefined behavior).
Add unit tests for basic decoding functionality.
Remove duplicate unused base64 functions.
Tested: ran webtest and observed that previously failing
Base64DecodeNonAscii now passes. Also tested basic auth:
$ curl -vku root:0penBmc https://<ip>/redfish/v1/Managers/bmc
...
< HTTP/1.1 200 OK
...
Change-Id: I9f9e32650b1796f9fc0b2b25d482dffa35fac72d
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
|
|
This causes a strange condition where the webserver crashes on bad urls.
Tested:
Loaded on RPI. Verified that this particular crash no longer breaks the
fuzzer.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I459421e27c8d07c2bc45099b5942f7c7c929610d
|
|
Crashdump.SendRawPeci redfish interface supports two input
data formats. Removing the support for deprecated format.
Change-Id: I86db8694d94f1dbabf2852dbde04c414c846b1d1
Signed-off-by: Karthick Sundarrajan <karthick.sundarrajan@intel.com>
|
|
This commit enables the "unused variables" warning in clang. Throughout
this, it did point out several issues that would've been functional
bugs, so I think it was worthwhile. It also cleaned up several unused
variable from old constructs that no longer exist.
Tested:
Built with clang. Code no longer emits warnings.
Downloaded bmcweb to system and pulled up the webui, observed webui
loads and logs in properly.
Change-Id: I51505f4222cc147d6f2b87b14d7e2ac4a74cafa8
Signed-off-by: Ed Tanous <ed@tanous.net>
|
|
This commit enables clang warnings, and fixes all warnings that were
found. Most of these fall into a couple categories:
Variable shadow issues were fixed by renaming variables
unused parameter warnings were resolved by either checking error codes
that had been ignored, or removing the name of the variable from the
scope.
Other various warnings were fixed in the best way I was able to come up
with.
Note, the redfish Node class is especially insidious, as it causes all
imlementers to have variables for parameters, regardless of whether or
not they are used. Deprecating the Node class is on my list of things
to do, as it adds extra overhead, and in general isn't a useful
abstraction. For now, I have simply fixed all the handlers.
Tested:
Added the current meta-clang meta layer into bblayers.conf, and added
TOOLCHAIN_pn-bmcweb = "clang" to my local.conf
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Ia75b94010359170159c703e535d1c1af182fe700
|
|
Middlewares, while kinda cool from an academic standpoint, make our
build times even worse than they already are. Given that we only really
use 1 real middleware today (token auth) and it needs to move into the
parser mode anyway (for security limiting buffer sizes), we might as well
use this as an opportunity to delete some code.
Some other things that happen:
1. Persistent data now moves out of the crow namespace
2. App is no longer a template
3. All request_routes implementations no longer become templates. This
should be a decent (unmeasured) win on compile times.
This commit was part of a commit previously called "various cleanups".
This separates ONLY the middleware deletion part of that.
Note, this also deletes about 400 lines of hard to understand code.
Change-Id: I4c19e25491a153a2aa2e4ef46fc797bcb5b3581a
Signed-off-by: Ed Tanous <ed@tanous.net>
|
|
Removes all warnings and errors for VirtualMedia
- rework for OemVirtualMedia
- minor adjustments for jsons
Tested:
Redfish Service Validator ran with no errors and/or warnings
Change-Id: Ic027166153a807a8bd3a6c04f042969f16e0dc6a
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
|
|
Supports offloading a dump to the client
Tested-By:
* curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Managers/bmc/LogServices/
Dump/attachment/<dump-id>
* curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/LogServices/
Dump/attachment/<dump-id>
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I99bbb50bc171408273744f89220a46bfe64ba4c4
|
|
Free memory during failed case inside
pamFunctionConversation() function.
Tested:
- Pam authentication works as normal.
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Change-Id: I81c06a3d674b0806c96e5847cda6f208795bd02c
|
|
ActiveSoftwareImage was added to Manager in v1_6_0.
It is a Readwrite property.
This supports only switching the BMC running image.
This assumes the BMC updater is
xyz.openbmc_project.Software.BMC.Updater.
This assumes the switch is Immediate and calls a BMC
reboot after setting the priority to 0.
Patch set 1 had a new Redfish.Settings for the Manager at
/redfish/v1/Managers/bmc/Settings and a new setting,
ActiveSoftwareImageApplyTime.
This was removed due to complexity.
A future commit could add support to allow this Setting to be
exposed and PATCHed.
From https://redfish.dmtf.org/schemas/v1/Manager.v1_9_0.json
"ActiveSoftwareImage": {
...
"description": "The link to the software inventory resource that
represents the active firmware image for this manager.",
"longDescription": "This property shall contain a link to a resource
of type SoftwareInventory that represents the active firmware image for
this manager.",
"readonly": false,
"versionAdded": "v1_6_0"
Tested: Validator passes
curl -k -X PATCH -d \
'{ "Links": { "ActiveSoftwareImage": { "@odata.id":"/redfish/v1/UpdateService/FirmwareInventory/82d3ec86"}}}' \
https://$bmc/redfish/v1/Managers/bmc
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"Message": "Successfully Completed Request",
Change-Id: Id9d29af5332f9e76ec172e1e4351980a6772477c
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
This pulls more information from the dimm interface,
and the persistent memory interface.
Tested: Ran validator, verified interfaces were there
Change-Id: I1083c78d6ab758fb94e4f145c7c5aff3a43b1683
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
Regions come from the new partition interface.
Tested: Validator passed. Saw new properties.
Change-Id: Ifbfddc69187ab1612d759d12165f0c3fdfda5dca
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
When redfish log file(/var/log/redfish) is recreated
by rsyslog daemon, EventService stops sending events
to subscribers.
The rsyslog service take redfish log files to back up
as per design. EventService has inotify on redfish log
file modifications. It needs to be removed from inotify
watcher list and added with new File descriptor.
Corrected code to handle remove & add of new descriptor.
Also corrected code to properly handle last event timestamp.
Tested:
- Ran stress test on redfish log file to create multiple
backup files and events sends to clients properly, in
all switching scenarios.
Change-Id: Ic0378edfc2cae86d1f69f6df4c429d07c2744bdf
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
The metric reports are not sending when user configures
the MetricReportDefinitions filter. This is of odata json
object type. Corrected code to properly handle odata type
object and store it as string array to make filters faster.
Tested:
- Created metric report EventService subscription type
with MetricReportDefinitions and events properly sent to
Event listener.
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Change-Id: If96564219da7d38a2ee5e415b89824ba25cd686d
|
|
This commit implements the broadcast of the messages from one
connected client to other connected clients via BMC. When the
management console creates a subscription on the BMC, they will
be provided with the broadcast message service.
Tested by: (Used https://github.com/DMTF/Redfish-Event-Listener)
1. Create a subscription
POST -D headers.txt https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination":"https://<host:port>","Protocol":"Redfish"}'
2. Send the message
POST https://${bmc}/ibm/v1/HMC/BroadcastService -d '{"Message":"<msg>"}'
3. Verify the event is generated and posted to the subscriber:
bodydata: {"Message":"<The message from HMC to be forwarded>",
"Name":"Broadcast Event","OriginOfCondition":
"/ibm/v1/HMC/BroadcastService",
"Timestamp":"2020-07-15T12:03:30+00:00"}
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: Ib36b4f25505cf66251adc5aeda282312996c25af
|
|
The commit implements the sending of push style events to the IBM's management client
when a configFile is updated.
Tested-By:
1. Create a subscription by passing "ResourceTypes" as ["IBMConfigFile"]
POST -D headers.txt https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination" : "https://<host:port>,"ResourceTypes":["IBMConfigFile"],"Protocol":"Redfish"}'
2. Update an existing ConfigFile
PUT https://${bmc}/ibm/v1/Host/ConfigFiles/<filename> --data-binary "@<local_path>"
3. Verify the event is generated and posted to the subscriber as the following example:
bodydata: {
"@odata.type":"#Event.v1_4_0.Event",
"Events":[
{
"EventId":1,
"EventTimestamp":"2020-06-26T08:40:04+00:00",
"EventType":"ResourceChanged",
"MemberId":0,
"Message" :"One or more resource properties have changed.",
"MessageArgs":null,
"MessageId":"ResourceEvent.1.0.3.ResourceChanged",
"OriginOfCondition":"/ibm/v1/Host/ConfigFiles/<filename>",
"MessageSeverity":"OK"
}
],
"Id":1,
"Name":"Event Log"
}
4. Verified the event is sent to the subscriber when the resourceType list is empty.
5. Verified the client subscribes for other resource - not ConfigFile ; then
the event is not sent to the subscriber.
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I785c2a5a6e4e721cf722e94693db3a832f69fa50
|
|
QueryString is an error-prone library that was
leftover from crow. Replace it with boost::url,
a header only library based and written by the
one of the authors of boost beast.
Tested: Verified logging paging still worked
as expected
Change-Id: I47c225089aa7d0f7d2299142f91806294f879381
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
This commit contains changes that replaces the error messages
in the response's body with the appropriate one.
This change was made based on the comment in the following commit:
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/32033/35/
redfish-core/lib/log_services.hpp#501
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I56a63f1cde27776b86d588695ce9505bf38d7f38
|
|
The method 'getTimestampStr' is not used elsewhere in the code,
hence it is removed and replaced by 'crow::utility::getDateTime'
method.
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I094fe8ca741bf36755a722e72fadd14ed8df7287
|
|
This implements the sendEvent when the IBM management console
creates the ConfigFile at BMC using the PUT operation on the
url /ibm/v1/Host/ConfigFiles
Tested by: (Used https://github.com/DMTF/Redfish-Event-Listener)
1. Create a subscription by passing "ResourceTypes" as ["IBMConfigFile"]
POST -D headers.txt https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination" : "https://<host:port>,"ResourceTypes":["IBMConfigFile"],"Protocol":"Redfish"}'
2. Create a ConfigFile
PUT https://${bmc}/ibm/v1/Host/ConfigFiles/<filename> --data-binary "@<local_path>"
3. Verify the event is generated and posted to the subscriber as below example
bodydata: {
"@odata.type":"#Event.v1_4_0.Event",
"Events":[
{
"EventId":1,
"EventTimestamp":"2020-06-26T08:40:04+00:00",
"EventType":"ResourceAdded",
"MemberId":0,
"Message":"The resource has been created successfully.",
"MessageArgs":null,
"MessageId":"ResourceEvent.1.0.3.ResourceCreated",
"OriginOfCondition":"/ibm/v1/Host/ConfigFiles/<filename>",
"MessageSeverity":"OK"
}
],
"Id":1,
"Name":"Event Log"
}
4. Verified the event is sent to the subscriber when the resourceType list is empty.
5. Verified the client subscribes for other resource - not ConfigFile ; then
the event is not sent to the subscriber.
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: Ic9b195266fe2df67a3160197d03d9ac155ef0cd1
|
|
This commit adds support to set the DHCP configuration
on the Hypervisor's Ethernet Interface
Tested By:
Configure the DHCPEnabled parameter and check the value is set.
1. curl -k -H "X-Auth-Token: $bmc_token" -X PATCH
-d '{"DHCPv4": {"DHCPEnabled": true}}'
https://${bmc}/redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0
2. curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: Ie1ac5659ef6af0f29cd91bda96574424a86fd095
|
|
Add an event log in redfish when fw completed writing to staging area
during firmware update.
Tested:
Update BMC firmware
POST: https://<BMC_IP>/redfish/v1/UpdateService/
with <BMC_Update_Capsule> binary file
After BMC reboots with successful update check for Event log in
Redfish
Command: GET: https://<BMC_IP>/redfish/v1/Systems/system/LogServices/
EventLog/Entries
Response:
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/
Entries/1595803968",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2020-07-26T22:52:48+00:00",
"EntryType": "Event",
"Id": "1595803968",
"Message": "BMC firmware update to version 00.74 staged
successfully.",
"MessageArgs": [
"BMC",
"00.74"
],
"MessageId": "OpenBMC.0.1.FirmwareUpdateStaged",
"Name": "System Event Log Entry",
"Severity": "OK"
},
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Change-Id: I62aad007c7fc8d311a351d1c5ec4e84d6b4a77ad
|
|
strncpy has range checks, which reduce the possibility of overrunning
the buffer in the case of a bug.
Tested: clang-tidy cert check now passes. Needs functional testing.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I2fab19ca40f97cc0574146883ee19b573285a59c
|
|
We use std::filesystem now, so use that directly instead of having the
using at the top of the file.
Tested: Code compiles. No functional change.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Iab977f08a2a61dcc9f2c82c705e5bcc55304e81a
|
|
This commit adds support to GET the DHCP configuration
details on the Hypervisor's Ethernet Interface
Tested by:
Set the DHCPEnabled property on /xyz/openbmc_project/network/hypervisor/eth0
Run the redfish GET command below to check the value set.
GET https://${bmc}/redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0
Successfully ran the Redfish Validator
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: Iacfc2b975fc6e4b759082419aa8f0b9c193d7787
|
|
Change-Id: I241d260209090dc4a01a96449657b270649d6643
Signed-off-by: Adam Stankiewicz <sheerun@sher.pl>
|
|
This reverts commit afd77a536ce84c934f56eae4f69d831fbd238d9a.
Reason for revert: Broke basic auth
Change-Id: I6510a3f8e1df95daba68b8124e2825c05e923b15
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
Handle the case if "Functional" and/or "Present" properties are
not sent by the host
Test: Tested on a witherspoon which has all 6 GV cards attached.
alpana07> curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0 {
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}
"State" --> Enabled, interprets "Present" --> true
"Health"--> OK, interprets either "Functional" not present OR present&true.
Change-Id: If967623d1c85f837195c88c2b3704f326d371c13
Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
|
|
This commit supports sending the ResourceTypes list while subscribing
to the events. The "Task" resource is added as a supported type to receive
the task life cycle events.
For IBM's management console along with the Task resource, the support
is provided to subscribe to the "IBMConfigFile" ResourceType to receive
events while creating/updating the ConfigFiles.
Tested by:
1. GET https://${bmc}/redfish/v1/EventService
2. Create subscription :
POST https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination" : <>, "Protocol":"Redfish", "ResourceTypes": ["Task"]}'
3. GET https://${bmc}/redfish/v1/EventService/Subscriptions/<id>
3. Redfish validator was run successfully
Signed-off-by: Sunitha Harish <sunharis@in.ibm.com>
Change-Id: Ibaf3f4f5f005a1beedf0a1cd049ae11d93a3af36
|
|
Use size_t type and check for out of bounds when index
into static const decodingData.
Tested:
Build with change and BMC web run as before.
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: Ib891d36f79f80b579423b40da493ae6749db5a54
|