| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
need to Log SSB Thermaltrip and NmiDiagInt(NMI Diagnostic Interrupt)
to redfish.
tested:
Press NMI button, host shows NMI BSOD, and see BMC redfish's log.
Trigger SSB Thermaltrip, can see its redfish log.
Change-Id: I8f5b41dd6f381b3a70a45bbb851f2ba1657d2ec0
Signed-off-by: Chen,Yugang <yugang.chen@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit d573bb2a regressed the PATCH operation
on the system redfish node. By initializing
result to no_content, the commit broke the subsequent
json_util::readJson, which checks if the result is "ok"
at the end of the function.
This commit fixes it by making readJsonValues() and its
descendants return a bool status. readJson() no longer
relies on the response object result to indicate success/
failure.
Tested:
-- Verified that PATCH operations on the system node now work.
-- Verified PATCH operations work on manager, accountservice and
ethernetinterfaces nodes.
-- No new errors from the Redfish validator.
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: I54080392297a8f0276161da8b48d8f9518cbdcfe
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds back support to request a single Journal Event
Log Entry.
Tested:
Requested a single valid entry and got it.
Requested an invalid entry and got the correct error message.
Passed the Redfish Service Validator.
Change-Id: Ibd2defee04510c1b52fe010cf3e2c6aced94537f
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Tested:
Checked '/redfish/v1/Registries/OpenBMC/OpenBMC' and confirmed
that the message is listed.
Change-Id: I2ecc00dca46f51cae73db71167cba04c9a7be746
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Log the IPMI watchdog event into redfish.
Tested:
Set a hard reset watchdog:
ipmitool raw 0x06 0x24 0x5 0x1 0x0 0x0 0x64 0x00
Start the timer:
ipmitool mc watchdog reset
Check the below log message in
https://$bmcip/redfish/v1/Systems/system/LogServices/EventLog/Entries
"Message": "Host Watchdog Event: Hard Reset – System reset due to Watchdog timeout",
"MessageArgs": [
"Hard Reset – System reset due to Watchdog timeout"
],
"MessageId": "OpenBMC.0.1.IPMIWatchdog",
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: I652faf3b92489b2dd3216eb0cbaaf375e643c749
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Originally PSU Event Log use PSU number as the parameter, change to PSU name
as the parameter.
Tested:
Plug out AC cable on PSU2, we can see below in Redfish Log Entries.
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
data.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/
Entries/#1562158096",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-07-03T12:48:16+00:00",
"EntryType": "Event",
"Id": "1562158096",
"Message": "Power supply PSU2 AC power lost.",
"MessageArgs": [
"PSU2"
],
"MessageId": "OpenBMC.0.1.PowerSupplyACLost",
"Name": "System Event Log Entry",
"Severity": "Critical"
},
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: I2fc32606bef334c9c5db8b8883ea14bb1e653579
|
|
|
|
|
|
|
|
|
| |
This commit gets the role of the user from the session object and
map it with the redfish privileges and then allow/reject the asked
operation depending on the userprivileges and the entity privileges.
Change-Id: I40be06c28e80b47fe76891cacf863f8495bace88
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the capability to get PCIe device information from
D-Bus and display it in the appropriate Redfish PCIeDevice
and PCIeFunction objects.
Tested: Passed the Redfish validator for the new PCIeDevice
and PCIeFunction objects.
Change-Id: I06f3b0e7d283e48d2235b7d34f78f603b22de79f
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It wasn't immediately clear what some of the classes
did without digging through the implementation. This
should clear up any confusion between the Journal and
DBus implementations of the event log entry classes.
Tested: Verified changes were present in both implementations
of event log enttry.
Change-Id: Id0d6bad5c73feb93608ac1ad457235a1d31fe018
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the DBus implementation of event logging is
completely different than the journal implementation,
moved it to its own class to be consistent.
Tested: Verified both implementations work the same
as before the class split.
Change-Id: I95e3b837f9d99b78034695545ab5791386d94a13
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements CertificateCollection schema to upload/list
existing LDAP certificates
Implements Certificate schema to view existing LDAP
certificate
Implements ReplaceCertificate action to replace existing
LDAP certificate.
Tested:
1. Tested schema with validator and no issues
2. Privilege map for certificate service is not yet pubished
3. POST on /redfish/v1/AccountService/LDAP/Certificates
curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -H "Content-Type: application/octet-stream" -X POST -T testcert.pem https://${bmc}/redfish/v1/AccountServie/LDAP/Certificates
{
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/1",
"@odata.type": "#Certificate.v1_0_0.Certificate",
"CertificateString": "-----BEGIN CERTIFICATE---------END CERTIFICATE-----\n",
"Description": "LDAP Certificate",
"Id": "1",
"Issuer": {
"City": "SomeCity",
"CommonName": "www.company.com",
"Country": "US",
"Organization": "MyCompany",
"State": "VA",
"organizationUnit": "MyDivision"
},
"KeyUsage": [
"KeyAgreement",
"ServerAuthentication"
],
"Name": "LDAP Certificate",
"Subject": {
"City": "SomeCity",
"CommonName": "www.company.com",
"Organization": "MyCompany",
"State": "VA",
"organizationUnit": "MyDivision"
},
"ValidNotAfter": "2029-03-14T02:11:02+00:00",
"ValidNotBefore": "2019-03-17T02:11:02+00:00"
}
4. GET on /redfish/v1/AccountService/LDAP/Certificates/
{
"@odata.context":
"/redfish/v1/$metadata#CertificateCollection.CertificateCollection",
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates",
"@odata.type": "#CertificateCollection.CertificatesCollection",
"Description": "A Collection of LDAP certificate instances",
"Members": [
{
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/1"
}
],
"Members@odata.count": 1,
"Name": "LDAP Certificate Collection"
}
5.GET on /redfish/v1/CertificateService/CertificateLocations/
{
"@odata.context":
"/redfish/v1/$metadata#CertificateLocations.CertificateLocations",
"@odata.id": "/redfish/v1/CertificateService/CertificateLocations",
"@odata.type": "#CertificateLocations.v1_0_0.CertificateLocations",
"Description": "Defines a resource that an administrator can use in order to
locate all certificates installed on a given service",
"Id": "CertificateLocations",
"Links": {
"Certificates": [
{
"@odata.id":
"/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1"
},
{
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/1"
}
],
"Certificates@odata.count": 2
},
"Name": "Certificate Locations"
}
6.GET on /redfish/v1/AccountService/LDAP/Certificates/1
{
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/1",
"@odata.type": "#Certificate.v1_0_0.Certificate",
"CertificateString": "-----BEGINCERTIFICATE-----\n ... -----ENDCERTIFICATE-----\n",
"CertificateType": "PEM",
"Description": "LDAP Certificate",
"Id": "1",
"Issuer": {
"CommonName": "localhost",
"Organization": "openbmc-project.xyz"
},
"KeyUsage": [],
"Name": "LDAP Certificate",
"Subject": {
"CommonName": "localhost"
}
7.Replace certificate
POST on /redfish/v1/CertificateService/Actions/CertificateService.ReplaceCertificate/
{
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/1",
"@odata.type": "#Certificate.v1_0_0.Certificate",
...
}
8.GET on AccountService
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/AccountService
{
"@odata.context": "/redfish/v1/$metadata#AccountService.AccountService",
"@odata.id": "/redfish/v1/AccountService",
"@odata.type": "#AccountService.v1_4_0.AccountService",
"Id": "AccountService",
"LDAP": {
"AccountProviderType": "LDAPService",
"Certificates": {
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates"
},
Change-Id: I056a4cea8b0377e156b660984857cdfadbfe1b2c
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently there is no mechanism for a user to know the status of their
firmware update over redfish.
The primary focus of this commit is to provide status of a firmware
update. There is still some ongoing discussion on using the Health field
to better explain error conditions. A forum post with DMTF has been
opened for clarification in this area but this commit does get things
going in the right direction. It provides a user with the status of
their update and gives them a simple Enabled/Disabled to know if it
worked.
Tested:
- Firmware update in progress
curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/92e57fc7
{
"@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory",
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/92e57fc7",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "BMC update",
"Id": "92e57fc7",
"Members@odata.count": 1,
"Name": "Software Inventory",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
],
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Updating"
},
"Updateable": false,
"Version": "2.7.0-dev-926-g79ca37b3d"
}
- Firmware update complete
curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/92e57fc7
{
"@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory",
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/92e57fc7",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "BMC update",
"Id": "92e57fc7",
"Members@odata.count": 1,
"Name": "Software Inventory",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
],
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": false,
"Version": "2.7.0-dev-926-g79ca37b3d"
}
- Firmware update failed
(xyz.openbmc_project.Software.Activation.Activations.Failed)
curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/3d02a163
{
"@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory",
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/3d02a163",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "BMC update",
"Id": "3d02a163",
"Members@odata.count": 1,
"Name": "Software Inventory",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
],
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Disabled"
},
"Updateable": false,
"Version": "2.7.0-dev-940-geb79ec582"
}
- Firmware update status of Host
curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/9a8028ec
{
"@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory",
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/9a8028ec",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Host update",
"Id": "9a8028ec",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": false,
"Version": "IBM-witherspoon-OP9-v2.0.14-2.6"
}
Redfish validator had no additional errors
Change-Id: I26273227448cab1a20a20a7edd9d85d223727bb8
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is TFTP only since that is all the OpenBMC back end currently
supports
Design Doc Ref:
https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/20700
Tested:
1) Verified BMC image update via new SimpleUpdate interface worked
curl -k -H "X-Auth-Token: $TOKEN" -d '{"ImageURI":"XXX.XX.X.X/obmc-phosphor-image-witherspoon.ubi.mtd.tar","TransferProtocol":"TFTP"}' -X POST https://${BMC_IP}/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate
{
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "Successfully Completed Request",
"MessageArgs": [],
"MessageId": "Base.1.4.0.Success",
"Resolution": "None",
"Severity": "OK"
}
]
}
2) Verified encoding the protocol in ImageURI worked
curl -k -H "X-Auth-Token: $TOKEN" -X POST https://${BMC_IP}/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate -d '{"ImageURI":"tftp://${TFTP_IP}/obmc-phosphor-image-witherspoon.ubi.mtd.tar"}'
{
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "Successfully Completed Request",
"MessageArgs": [],
"MessageId": "Base.1.4.0.Success",
"Resolution": "None",
"Severity": "OK"
}
]
}
Jun 12 20:52:20 witherspoon bmcweb[2470]: (2019-06-12 20:52:20) [DEBUG ] Enter UpdateService.SimpleUpdate doPost
Jun 12 20:52:20 witherspoon bmcweb[2470]: (2019-06-12 20:52:20) [DEBUG ] Encoded transfer protocol tftp
Jun 12 20:52:20 witherspoon bmcweb[2470]: (2019-06-12 20:52:20) [DEBUG ] Adjusted imageUri ${BMC_IP}/obmc-phosphor-image-witherspoon.ubi.mtd.tar
Jun 12 20:52:20 witherspoon bmcweb[2470]: (2019-06-12 20:52:20) [DEBUG ] Server: ${TFTP_IP} File: obmc-phosphor-image-witherspoon.ubi.mtd.tar
Jun 12 20:52:20 witherspoon bmcweb[2470]: (2019-06-12 20:52:20) [DEBUG ] Exit UpdateService.SimpleUpdate doPost
3) Verified if no transfer protocol, error returned
curl -k -H "X-Auth-Token: $TOKEN" -X POST https://${BMC_IP}/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate -d '{"ImageURI":”${TFTP_IP}/obmc-phosphor-image-witherspoon.ubi.mtd.tar"}'
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The value ${TFTP_IP}/obmc-phosphor-image-witherspoon.ubi.mtd.tar for the parameter ImageURI in the action UpdateService.SimpleUpdate is of a different type than the parameter can accept.",
"MessageArgs": [
“${TFTP_IP}/obmc-phosphor-image-witherspoon.ubi.mtd.tar",
"ImageURI",
"UpdateService.SimpleUpdate"
],
"MessageId": "Base.1.4.0.ActionParameterValueTypeError",
"Resolution": "Correct the value for the parameter in the request body and resubmit the request if the operation failed.",
"Severity": "Warning"
}
],
"code": "Base.1.4.0.ActionParameterValueTypeError",
"message": "The value ${TFTP_IP}/obmc-phosphor-image-witherspoon.ubi.mtd.tar for the parameter ImageURI in the action UpdateService.SimpleUpdate is of a different type than the parameter can accept."
}
}
4) Verified no new error in Redfish Validator
5) Verified error return when parameter missing:
curl -k -H "X-Auth-Token: $TOKEN" -d '{"TransferProtocol":"TFTP"}' -X POST https://${BMC_IP}/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate
{
"ImageURI@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The property ImageURI is a required property and must be included in the request.",
"MessageArgs": [
"ImageURI"
],
"MessageId": "Base.1.4.0.PropertyMissing",
"Resolution": "Ensure that the property is in the request body and has a valid value and resubmit the request if the operation failed.",
"Severity": "Warning"
}
]
}
6) Verified that by default, the new Action is not available
Change-Id: I67ea91e181380e6da7ff63a37f02408a318602b7
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A recent commit introduced Service Validator regressions in the
Registries that we use. This was largely because the commits were
structured in a way that was hard to review.
This commit Resolves that, and structures the data memebers in a more
readable way.
Tested:
ran service validator, observed no failures on Registries.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I7e15899187e333f843e5571ac9908b22624c16e9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements CertificateService schema to list the actions
available.
Implements CertificateLocations schema to list the
certificates present in the system.
Implements CertificateCollection schema to upload/list
existing HTTPS certificates
Implements Certificate schema to view existing HTTPS
certificate
Cater for reloading the SSL context after a certificate
is uploaded.
Fix Certificate signature validation failure
At present bmcweb uses the certificate from "/home/root/server.pem"
the same is modified to "/etc/ssl/certs/https/server.pem" as
phosphor-certificate-manager uses the specified path to
install/replace certificates.
Bmcweb creates a self-signed certificate when certificate is not
present. Catered for creating "/etc/ssl/certs/https/" direcotry
structure so that self signed certificate is created in the path.
Implements ReplaceCertificate action of Certificate
Service for replacing existing HTTPS certificates
Cleanup of older self-signed certificate at /home/root/server.pem
1. Tested schema with validator and no issues
2. Privilege map for certificate service is not yet pubished
2. GET on /redfish/v1/CertificateService/
"CertificateService": {
"@odata.id": "/redfish/v1/CertificateService"
},
3. GET on /redfish/v1/CertificateService/CertificateLocations/
"@odata.context":
"/redfish/v1/$metadata#CertificateLocations.CertificateLocations",
"@odata.id": "/redfish/v1/CertificateService/CertificateLocations",
"@odata.type": "#CertificateLocations.v1_0_0.CertificateLocations",
"Description": "Defines a resource that an administrator can use in order to
locate all certificates installed on a given service",
"Id": "CertificateLocations",
"Name": "Certificate Locations"
4.POST on /redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates
{
Returns contents of certificate
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/1",
"@odata.type": "#Certificate.v1A_0_0.Certificate",
"Id": "1",
"Issuer": {
...
...
}
5.GET on /redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/
{
"@odata.context":
"/redfish/v1/$metadata#CertificateCollection.CertificateCollection",
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates",
"@odata.type": "#CertificateCollection.CertificatesCollection",
"Description": "A Collection of HTTPS certificate instances",
"Members": [
{
"@odata.id":
"/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1"
}
],
"Members@odata.count": 1,
"Name": "HTTPS Certificate Collection"
}
6.GET on /redfish/v1/CertificateService/CertificateLocations/
{
"@odata.context":
"/redfish/v1/$metadata#CertificateLocations.CertificateLocations",
"@odata.id": "/redfish/v1/CertificateService/CertificateLocations",
"@odata.type": "#CertificateLocations.v1_0_0.CertificateLocations",
"Description": "Defines a resource that an administrator can use in order to
locate all certificates installed on a given service",
"Id": "CertificateLocations",
"Links": {
"Certificates": [
{
"@odata.id":
"/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1"
}
],
"Certificates@odata.count": 1
},
"Name": "Certificate Locations"
}
7.GET on /redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1
{
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1",
"@odata.type": "#Certificate.v1_0_0.Certificate",
"CertificateString":
"-----BEGINCERTIFICATE-----\n....\n-----ENDCERTIFICATE-----\n",
"CertificateType": "PEM",
"Description": "HTTPS Certificate",
"Id": "1",
"Issuer": {
}
8. Verified SSL context is reloaded after a certificate is installed.
9.curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/CertificateService/Actions/CertificateService.ReplaceCertificate/
-d @data_https.json
{
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1",
"@odata.type": "#Certificate.v1_0_0.Certificate",
"CertificateString": "-----BEGIN CERTIFICATE----END CERTIFICATE-----\n",
"Description": "HTTPS certificate",
"Id": "1",
"Issuer": {
}
4. data_https.json file contents
{
"CertificateString": "-----BEGIN PRIVATE
KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDClW1COSab2O0W\nW0SgTzLxQ1Igl4EpbEmTK8CAQ+wI7loTDZ7sZwYdf6yc9TAs/yNKjlJljgedGszv\nbC7sPNpH4FA63kaM6TbBBKTRshwZ3myXiBOOkOBs6w6V7+c7uEPcMFge6/4W1VXD\nReMi016cnPWZsmQyGzpmPM49YNEDZBfdKZ/pLuCYc9L9t706U7FrUSGfM7swB+mC\n8NH9qMixMuWAV9SBvzUWI6p4OCmN8a/F+4lOdbPMVEUqQ0hCBCjGM4qmiy/5Ng6y\n6rKeJlUdmOSTk8ojrNGcOXKh0nRafNEQFkIuoPHt8k5B/Yw2CX6s2BoGwvF+hS03\n+z3qVSw3AgMBAAECggEBAKpe92kybRGr3/rhMrdCYRJJpZEP1nGUdN89QbGMxxAS\n0h84n9vRYNNXRKWxMNtVEWtoLdDpiNUP8Dv59yO1LFIen2DL2e3rDJv4Gu/YCS7F\nR0NuS+FaDIaRURYLFeV+MzyJv75jVvhbFlqByJxngcGS1KAcSApvOLTnrJSlPpy9\n8ec5gnDhdOUND9PaQt8xCqMs1RPpjqvrgRzMEodZoqT5v+b0K1GmsAdbSHNP2mLM\nrqtpFDefiM1YfsTHUtxQykxG2Ipd2jzJ0a8O0qmVqdXcP9J9aqLcmD/2/r96GEV6\n/5qvIBj3SRFobxCiCwfys2XOXfjz2J+BUZzGoZvKeRECgYEA518hT6mn46LhwrTI\nW+Qpi7iTJgOfeLC+Ng855VHVQFED1P3T2lfyfGDyqKI/wV1DJIJmO8iOXerSPnhi\nb7reQkyHj6ERUtuE+6BQ9oTw2QD3EEvzOK2PEH5UipbhVTDnC3fT62Vz2yb3tR8D\n2h0XVJkj/dng9p1Td5aDGMriRRMCgYEA10vTyYqBPjDIEYw/Sc9aQk2kT6x3hrRQ\ngR4xyuI31RTCRD/KpLh/7z4s11Wkr+F9CyASeLbqu6zymlLOlS5p7IUkJ/x2X027\nJWVY1SR+oF3iF3SHiP4XkOVvWOKwIVUhgTjK1+Di6i3AlwIeAOS7VCCP6W0gbnwJ\nyyAAHZ30NM0CgYAqTur4dj2NEqvVvtkkdIRkWEwQF3mByE//8qjTljM4n5fjysaC\nlrJwrAmzbHfcFAHDG1U2eWYPJnFrmvflFnauCPCBAyL308xtdtNXQNgJ1nNXN4wy\nQQp4KaGr9gseWOLm5fKKiPK2kFmbdSBvMgKiJZ6/PKg2cG5i39L5JaBaoQKBgApw\nqOJ7Du1fHDSNonwHzA6vCSq76Efl8olwV2XJNn/ks87vcPov4DRPxYjjpErLGm8x\nrPOhmxxitJj7Lv1Y9NX9VtWBjpPshwi3M2mSjXllVBNjGTdxat8h4RZkV7omEKvd\nfyicxSQp987a0W2lqdfYhGIDYrE43pi1AoxtHmx5AoGBAJSoRy62oZbW6vjfdkuf\nvVnjNfFZwuiPV/X2NT+BhNPe5ZKFtC6gGedHLaIBBD3ItRhGuHZxgWXccPjGHofi\n6DlPdp2NePJgDT2maSjGSiAcHxyXdmW+Ev27NblvAxktoTUcVqSENrKFb+Fh4FXN\nlXiJzOEwAXiP2ZFbMRyNF/MI\n-----END
PRIVATE KEY-----\n-----BEGIN
CERTIFICATE-----\nMIIDNzCCAh+gAwIBAgIJAI1Wr/fK5F0GMA0GCSqGSIb3DQEBCwUAMDIxHDAaBgNV\nBAoME29wZW5ibWMtcHJvamVjdC54eXoxEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0x\nOTAyMDExMzIyMDhaFw0yOTAxMjkxMzIyMDhaMDIxHDAaBgNVBAoME29wZW5ibWMt\ncHJvamVjdC54eXoxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEB\nBQADggEPADCCAQoCggEBAMKVbUI5JpvY7RZbRKBPMvFDUiCXgSlsSZMrwIBD7Aju\nWhMNnuxnBh1/rJz1MCz/I0qOUmWOB50azO9sLuw82kfgUDreRozpNsEEpNGyHBne\nbJeIE46Q4GzrDpXv5zu4Q9wwWB7r/hbVVcNF4yLTXpyc9ZmyZDIbOmY8zj1g0QNk\nF90pn+ku4Jhz0v23vTpTsWtRIZ8zuzAH6YLw0f2oyLEy5YBX1IG/NRYjqng4KY3x\nr8X7iU51s8xURSpDSEIEKMYziqaLL/k2DrLqsp4mVR2Y5JOTyiOs0Zw5cqHSdFp8\n0RAWQi6g8e3yTkH9jDYJfqzYGgbC8X6FLTf7PepVLDcCAwEAAaNQME4wHQYDVR0O\nBBYEFDDohRZ1+QlC3WdIkOAdBHXVyW/SMB8GA1UdIwQYMBaAFDDohRZ1+QlC3WdI\nkOAdBHXVyW/SMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFN0DWy6\nYPXHzidWMKKyQiJ5diqUv6LbujKOHUk+/LGSoCqcUp8NvmFDKWYP9MxjOAi9TVbs\nRGlIHBl38oSwKUayXBTY/vVeSLls90giUAOjswoRbBBQZvKyfEuFpc1zUsrhGLDC\n/6DuRt9l0DWcMcmP6Yh3jePIIwTr3bpxBGrwNLly8fPf16q4bWRIAcI3ZgLOhsrN\nLfD2kf56oYViM44d54Wa0qjuCfeTnJ46x/lo6w2kB9IzF7lwpipMU7+AG8ijDdaQ\nn8t0nADpv6tNNargLcOTTfJ0/P2PaKxwA1B88NhjlymBnNbz4epIn4T3KyysgS62\nzwqs66LPWoDerzc=\n-----END
CERTIFICATE-----",
"CertificateType": "PEM",
"CertificateUri":
{
"@odata.id":
"/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1"
}
}
Change-Id: I2acbf8afa06bbf7d029d4971f7ab3b3988f5f060
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add registry entries to aid parsing logs.
Tested: Removed entity manager persistence file and
got logs like the following:
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/#1557855925",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-05-14T17:45:25+00:00",
"EntryType": "Event",
"Id": "1557855925",
"Message": "F1UL16RISER1 Board with serial number BQWK63400247 was installed.",
"MessageArgs": [
"F1UL16RISER1",
"Board",
"BQWK63400247"
],
"MessageId": "OpenBMC.0.1.InventoryAdded",
"Name": "System Event Log Entry",
"Severity": "OK"
}
Change-Id: Id111872121b47395335d8c9e118dc6809a1b7574
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fan names aren't always fan %d, sometimes there are numbers
too, or identifiers like CPU Fan 1. Change the argument to
a string.
Tested: Launched bmcweb and saw:
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/#1556037042",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-04-23T16:30:42+00:00",
"EntryType": "Event",
"Id": "1556037042",
"Message": "Fan 1 removed.",
"MessageArgs": [
"Fan 1"
],
"MessageId": "OpenBMC.0.1.FanRemoved",
"Name": "System Event Log Entry",
"Severity": "OK"
},
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/#1556037055",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-04-23T16:30:55+00:00",
"EntryType": "Event",
"Id": "1556037055",
"Message": "Fan 1 inserted.",
"MessageArgs": [
"Fan 1"
],
"MessageId": "OpenBMC.0.1.FanInserted",
"Name": "System Event Log Entry",
"Severity": "OK"
},
Change-Id: Ic0d07ea1c96ee6a61caa912ecd091c2783f1d963
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds support for the LogService.ClearLog action to
clear the Redfish Event Log.
Tested:
1. Added entries to the EventLog
2. Sent the ClearLog action using Postman:
/redfish/v1/Systems/system/LogServices/EventLog/Actions/LogService.ClearLog
3. Confirmed that the EventLog was empty
4. Added entries to the EventLog
5. Confirmed that the new entries logged successfully
Change-Id: I6ac4ea4aff8d7defbea693a2c8a755a712fb39a6
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change removes the static OpenBMC Message Registry file and
replaces it with a compile-time structure.
Tested:
Verified the OpenBMC Message registry is correctly returned from
the existing endpoints without using the static files.
Change-Id: I60ab3ce0d23c9ac7e91ebb85f445fb9ca731983d
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This extends the Message Registry parsing to include header
details that are part of the redfish resource.
Tested:
Verified that the MessageRegistry info all returns correctly
in the redfish response.
Change-Id: I6179c07f4067cd4520fce3e774d18530fede0a95
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change removes the static Base Message Registry file and
replaces it with a compile-time structure.
A script is used to pull the Base Message Registry file from
the DMTF and parse it into the .hpp structure.
Tested:
Verified that after running the script, I can get the same
Redfish data back from the existing endpoints without using
the static files.
Change-Id: Ide3c61ecff62801c06619d5c3edc2229c945d8e7
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/redfish/v1/Managers/{ManagerId}schema
- Created a common utiity file called, systemd_utils.hpp to hold the function getUuid.
- Added json field support for ServiceEntryPointUUID field to retrieve it from system_utils.hpp.
- Amended the header file, service_root.hpp to get the uuid from the newly created system_utils.hpp file.
Changes tested with QEMU emulator and Witherspoon image => Passed
Redfish Validator => Passed
Change-Id: If7f2aba49942a0b315fb012da29af194ebd0ea6f
Signed-off-by: Bernard Wong <trials13@hotmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Crashdump is the preferred name, so replace all uses of
CPU Log with Crashdump.
Tested: On-demand crashdump functions correctly
Change-Id: I6cf8fb81bc8f2e85dd4a3561835f3fafbff764e5
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The name "Immediate" was confusing, so changing the name to
"OnDemand" to make it's purpose more clear.
Tested:
Used Postman to send a POST to "/redfish/v1/Systems/system/
LogServices/CpuLog/Actions/Oem/CpuLog.OnDemand" and verified
that the expected On-Demand data was returned.
Change-Id: If9b6b30e1c424227601fb6b7381470f571afca9e
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Created a new fw_utils.hpp to reduce more indentation code in
systems.hpp and also as a base for some future refactoring for common
use cases to access firmware information.
Tested:
- Verified RedfishServiceValidator.py shows no new errors
VERBO - ComputerSystem.v1_0_0.ComputerSystem:BiosVersion
VERBO - value: IBM-witherspoon-OP9-v2.0.10-2.22 <class 'str'>
VERBO - has Type: Edm.String Edm.String
VERBO - is Optional
VERBO - permission OData.Permission/Read
VERBO - Success
- BiosVersion now correctly returned in data
$ curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/Systems/system
{
"@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem",
"@odata.id": "/redfish/v1/Systems/system",
"@odata.type": "#ComputerSystem.v1_5_1.ComputerSystem",
"Actions": {
"#ComputerSystem.Reset": {
"ResetType@Redfish.AllowableValues": [
"On",
"ForceOff",
"GracefulRestart",
"GracefulShutdown"
],
"target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset"
}
},
"BiosVersion": "IBM-witherspoon-OP9-v2.0.10-2.22",
...
}
Change-Id: I2d7792c724f88aa13bd7b40c0d7f70dd4aa1c807
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was imported from a fork:
https://github.com/ampere-openbmc/bmcweb/commits/ampere-next/redfish-core/lib/logservices.hpp
Which had a series of commits from TungVuX and hyche
The initial patch is that code verbatim.
Follow up patches on top of this make the necessary changes
for current bmcweb:
- Move to sdbusplus
- C++ naming convention changes
- Clang format
- Some refactoring
Tested:
Verified new services work correctly when queried
e.g. curl -k -H "X-Auth-Token: $bmc_token" -X GET \
https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/Entries
displays the entries properly.
RedfishServiceValidator results:
/redfish/v1/Systems/system/LogServices
pass: 3
passGet: 1
skipOptional: 1
/redfish/v1/Systems/system/LogServices/EventLog
pass: 5
passGet: 1
skipOptional: 8
/redfish/v1/Systems/system/LogServices/EventLog/Entries
pass: 3
passGet: 1
skipOptional: 1
/redfish/v1/Systems/system/LogServices/EventLog/<str>
pass: 6
passGet: 1
skipOptional: 16
Sample Output: curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/Entries
{
"@odata.context": "/redfish/v1/$metadata#LogEntryCollection.LogEntryCollection",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries",
"@odata.type": "#LogEntryCollection.LogEntryCollection",
"Description": "Collection of System Event Log Entries",
"Members": [
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-02-22T17:11:00+00:00",
"EntryType": "Event",
"Id": "1",
"Message": "example.xyz.openbmc_project.Example.Elog.AutoTestSimple",
"Name": "System DBus Event Log Entry",
"Severity": "Critical"
}
],
"Members@odata.count": 1,
"Name": "System Event Log Entries"
}
Change-Id: I422b0d0ec577ea734fecfb6f49101ec5ff45a556
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patchset is the beginings of the infrastructure to allow
separate registrations, and map privileges to the actual node in the
url table rather than having each registration manage privileges
manually.
Tested by:
Running redfish compliance tool. All things still pass.
Change-Id: I72d278cc19c60ba5b6e563fbd705b0551faf9a6a
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
| |
This reverts commit 6ea007a2faec52ad62680015d2a3f00371a1e351.
Reason for revert: Reports of bmcweb seg faults.
Change-Id: I408f1bb29c2f8e427a6621cdaac8c31b847ebf06
|
|
|
|
|
|
|
|
|
|
|
|
| |
bmcweb classically has not taken a strong opinion on warnings. With
this commit, that policy is changing, and bmcweb will invoke the best
warnings we are able to enable, and turn on -Werror for all builds.
This is intended to reduce the likelihood of hard-to-debug situations
that the compiler coulve caught early on.
Change-Id: I57474410821e82666b3a108cfd0db7d070e8900a
Signed-off-by: Ed Tanous <ed@tanous.net>
|
|
|
|
|
|
|
| |
Tested by:
Code still compiles
Change-Id: I95d443f5c21e9839b6338fb72c5a940d0d91d479
|
|
|
|
|
|
|
|
|
|
|
| |
Adding boolean support in json_utils.
Test:
Validated by sending redfish POST/PATCH
request with boolean value in data.
Change-Id: Iddc7daebb3507a468cbb2187806908f821bd6da7
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Add support of reading floating point numbers.
Tested-by: Successfully unpacked doubles
Change-Id: I9cf5e33dbb99367a53013be28b8f905eae2e4518
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
Add std::array support to readJson.
Change-Id: I32bb28908f195fd3443556c40b71eaabd105db25
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In certain cases, redfish wants to unpack specialized types that might
be more complex than just simple structs. This commit adds the ability
to unpack a nlohman json object directly, and moves the ethernet schema
over to the new api
Change-Id: Ib3c25e6c4d8f0a163647092adfb454355d329170
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
| |
This change is largely a sed replace, and gets us closer to standards
compliance.
Change-Id: Ie60437eff43de830ef19389344a55430dabd9d16
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the original incarnation of bmcweb, route registration was done
automatically. This has proved to be a terrible idea, wraught with
corner cases and issues.
The route registration is currently the only user of the
redfish::Node::json element. Unfortunately, as written, this structure
consumes a lot of memory that's duplicated and not very useful. From a
performance perspective, there is almost no difference between
rebuilding the structure for each GET request, and having the "cache"
that needs to be copied into the response and modified before it can be
useful.
In the programming tradeoffs for bmc, lower memory usage is more important
than latency, especially at these levels.
Change-Id: I785e8352123e5e886acf05cd59cb23648f93839d
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds vector handling to the new json interface
and modifies the SendRawPECI Redfish command to utilize it.
Tested: Executed raw PECI commands with good and bad input
to check that it will work and error out correctly.
Change-Id: Ic1c837f5823d28555f727849156b4dabf1b8acef
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change allows numerical types to be passed to readJson
with the desired type. They will then be automatically
range-checked and cast to that type.
Tested: Requested variables of type uint64_t, uint8_t, int,
int16_t, and int8_t and confirmed that the range was correctly
checked for each.
Change-Id: Ia55cb03ba2c4321a7de35a7c7b566980a72c5449
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change renames the existing BMC LogService that displays all
entries in the journal to a BMC Journal LogService.
The new standard BMC LogService is modified to only display messages
from the registry. The registry MessageId and MessageArgs must
be included in the journal metadata as "REDFISH_MESSAGE_ID" and
"REDFISH_MESSAGE_ARG_<x>" respectively, where <x> is the arg
number from the registry.
Change-Id: I4556cbea5032ec639ad1fda084571144defe23dc
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The error message code used a json_pointer object which must
begin with a '/' character and had to be sent as an extra
parameter. This change simplifies the interface by using a
string so there doesn't have to be a '/'. This allowed the
same property argument passed for the message to be used
for the property field path.
Tested: Sent an error with a property and verified that it is
correctly displayed.
Change-Id: I0571e2eee627cedf29d751588a4f1bceee66f084
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
| |
A merge conflict deleted the VLAN. Add it back to the main flow.
Change-Id: Ie0f5d61a9377b7f2a0e89ca5b00e54e2d32c2df8
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an initial implementations of GET methods for
several schemas:
* ProcessorCollection
* Processor
* MemoryCollection
* Memory
It fetches data from Smbios service.
Tested:
* Compiance report
* Manual walk through selected schemas.
Change-Id: I11e00d0982248f2307e24b9a246ac60672dda8a1
Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cherry-picked from:
https://github.com/ampere-openbmc/bmcweb/commit/dfb534ab5db1bb0bcdc9a6519f1e1ccfede6f363
Add URI of Reset Actions:
/redfish/v1/Managers/openbmc/Actions/Manager.Reset for handling the HTTP POST
method.
We're only able to issue GracefulRestart for OpenBMC therefore the
bmcweb supports for ResetType property with "GracefulRestart" value.
Tested: Using redfishtool command to test:
python3 redfishtool.py -A Basic -S Always --rhost=$bmc_ip -u $bmc_user
-p $bmc_password -d '{"ResetType": "GracefulRestart"}' raw POST
/redfish/v1/Managers/openbmc/Actions/Manager.Reset
Change-Id: I2bbc172d43c3244cc304934618c0c5d1e21d9c08
Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
| |
Update the Redfish error_messages from Base.1.2.0 to Base.1.4.0
from the Redfish standard registries.
Change-Id: I771b119372fd995bd1dc4065830485b6a848f086
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang-format doesn't automatically merge multi-line string
literals, so this change updates the formatting to merge some
multi-line strings into fewer lines.
This change also corrects the <argx> numbering in the error message
descriptions to match the function parameter numbers.
Change-Id: Ibedcaf5793a607acacdb3bc83081599ba508c989
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
A small logic error caused bugs in the required-ness of optional params.
In the error case, a bad_request return code would be returned with no
error message. This commit allows the request to suceed unharmed.
Change-Id: I1c1cbaf08e79bc1f52485ae12d73701d74e0e2aa
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sensors information.
cherry-picked from:
https://github.com/ampere-openbmc/bmcweb/commit/a20f8b17c1efb92b9a8e95e8867d945bc6177804
Sensor module adds sensorType:"power" to retrieve power supply sensor
information.
This applicable to Power schema version 1.2.1
Limit:
- Not retrieve PowerControl information yet.
- Need to get UpperThresholdFatal and LowerThresholdFatal value.
Tested: Browser and redfishtool
Command test: redfishtool -A Basic -S Always --rhost=$bmc_ip -u
$bmc_user -p $bmc_password Chassis -I 1 Power
Redmine ID: #2145.
Change-Id: Ifd4a7495c216f894f46610c02d3e8a8e3988dfaa
Signed-off-by: Tung Vu <tung.vu@amperecomputing.com>
Chassis: Thermal and Power: Correct @odata.id information
cherry-picked from:
https://github.com/ampere-openbmc/bmcweb/commit/ae95b0db60e5e680819c9f9b0c6d61caf66b14cf
Allocate @odata.id of schema in correct way.
Sensor module is general interface not used for specific schema.
Tested: Browser and redfishtool
Command test:
- redfishtool -A Basic -S Always --rhost=$bmc_ip -u $bmc_user -p
$bmc_password Chassis -I 1 Power
- redfishtool -A Basic -S Always --rhost=$bmc_ip -u $bmc_user -p
$bmc_password Chassis -I 1 Thermal
Redmine ID: #2145 & #2146
Change-Id: I265bbb366c323f39fb6d4ac4f7cccfed4382e98d
Signed-off-by: Tung Vu <tung.vu@amperecomputing.com>
Chassis: Correct @odata.id for specific Chassis sub-node.
cherry-picked from:
https://github.com/ampere-openbmc/bmcweb/commit/3eaa53a395ad9275042893413cbefc78f52310e5
Currently there are Thermal and Power sub-nodes of Chassis node, correct
@odata.id information for each sub-node in JSON payload.
Tested: Browser and redfishtool
Command test:
- redfishtool -A Basic -S Always --rhost=$bmc_ip -u $bmc_user -p
$bmc_password Chassis Thermal -I 1
- redfishtool -A Basic -S Always --rhost=$bmc_ip -u $bmc_user -p
$bmc_password Chassis Power -I 1
Change-Id: I2f831ed40926e85c0b6d1cfa7d759eb0b9321daa
Signed-off-by: Tung Vu <tung.vu@amperecomputing.com>
Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Makes the Redfish error reporting interface automatically handle
setting the http status and JSON content in the response object.
When using an AsyncResp object, this allows for simply calling
the Redfish error and returning.
Change-Id: Icfdce2de763225f070e8dd61e591f296703f46bb
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing way of decoding json structures, while fast has some disadvantages.
1. it's very verbose to write.
2. It requires in depth knowlege of redfish error messages to get
correct.
3. It _can_ lead to undesired behavior, like half of a patch being
applied, if only some of the values have bad types.
This commit implements a new interface for decoding redfish json
named.... readJson. It is a templated function, that lets you decode
json values based on type easily, while still handling all the correct
error codes that were handled previously. Use is done similar to the
example below:
std::string required;
boost::optional<std::string> optional;
if (!json_util::readJson(req, res, "OptionalParam", optional,
"RequiredParam", required))
{
return;
}
if (optional){
// optional param was given, take action.
}
As part of this patchset, the systems schema is moved to the new
interface, which deletes some of the code involved and shows the
improvement in clarity.
Change-Id: I041a97c84d294df8cd4de4c2702e5ee22c0bc120
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a redfish LogService that provides the contents of the
BMC journald instance available over readfish.
This should be considered a prototype at this time, and suggestions on
how this could be done better are welcome.
At some point in the future, we could make this available over the
redfish TaskService via SSE.
Change-Id: Ibca0d473dcef545763256cc1df5574571a3af414
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|