| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Right now there is no limit, so someone could attack
the bmc by adding a very large number of controllers.
Create a limit so this isn't possible.
Tested: Add / Remove functionality still works
Change-Id: Ib408293431250d93b0af71616a1668f6a3d0904a
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This puts a block in to return early if we are asked
to delete something we can't find on D-Bus. This code
path was creating a segfault, but theres no reason to
continue after we can't find an object we are asked to
delete, so we can just avoid it. Also clean up the end
iterator dereference so it doesn't happen in any other
path.
Tested: Segfault goes away
Change-Id: I33622e5e8ab09fba0681e4f86f4a7068f6ef0be7
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds VirtualMedia scheme to Redfish.
Implementation is based on input from virtual-media module
and nbd proxy which is a bmcweb part. The code is used
only in case ndb-proxy is supported in bmcweb
(BMCWEB_ENABLE_VM_NBDPROXY compilation flag).
Tested:
* Manual tests together with nbd proxy and virtual media app
- For requests: Postman and/or HTTPie, started with logs
enabled and Valgrind
- Manual result validation
* Tests ran:
- GET on collection with manual validation
- PUT/POST/DELETE on collection
- GET on item/nonexistent item
- PUT/POST/DELETE on item
* Redfish Service Validator tested, no new issues found.
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Change-Id: I5415dc0ffe52069fd35bc614b0378bbc4ad41ff6
|
|
|
|
|
|
|
|
|
|
| |
Typo correction: 'refish' to "redfish"
Tested:
Checked chassis URI and observed correct spelling.
Change-Id: Ic09ab11acd47fdf45fadc485df9c1fd03c0ee4fb
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
using the list of warnings from here:
https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Seems like a good place to start, and would improve things a bit
type-wise. This patchset attempts to correct all the issues in one
shot.
Tested:
It builds. Will test various subsystems that have been touched
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
|
|
|
|
|
|
|
|
| |
Now we support up to 4 concurrent KVM sessions so this commit fixes
'MaxConcurrentSessions' property of 'GraphicalConsole'.
Change-Id: Id225247dcb2d0b884a8a41253863294385268585
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GraphicalConsole
This is required feature
Tested:
1. Verified by Readfish Service Validator.
2. https://IP_ADDR/redfish/v1/Managers/bmc
"GraphicalConsole": {
"ConnectTypesSupported": ["KVMIP"],
"MaxConcurrentSessions": 1,
"ServiceEnabled": true
}
"SerialConsole": {
"ConnectTypesSupported": ["IPMI", "SSH"],
"MaxConcurrentSessions": 15,
"ServiceEnabled": true
}
Change-Id: I01700085f4d9d7f3a4aa80fa4240ed201e948159
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Implements CertificateCollection schema to upload
CA certificates and to list existing CA certificates
2) Modified CertificateLocatons schema to list CA
certificates
3) Modified ReplaceCertificate action of CertificateService
schema to cater for replacing existing CA certificate
Tested:
1) No validation failure
2) Truststore CertificateCollection
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Managers/bmc/Truststore/Certificates/
{
"@odata.context":
"/redfish/v1/$metadata#CertificateCollection.CertificateCollection",
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/",
"@odata.type": "#CertificateCollection.CertificateCollection",
"Description": "A Collection of TrustStore certificate instances",
"Members": [],
"Members@odata.count": 0,
"Name": "TrustStore Certificates Collection"
}
3) Upload certificate
curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -H "Content-Type:
application/octet-stream" -X POST -T cert.pem
https://${bmc}/redfish/v1/Managers/bmc/Truststore/Certificates
{
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/1",
"@odata.type": "#Certificate.v1_0_0.Certificate",
"CertificateString": ----\n",
"Id": "1",
"Issuer": {
"CommonName": "localhost",
"Organization": "openbmc-project.xyz"
},
}
4) Certificate Locations
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/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
tolocate 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"
},
{
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/1"
}
],
"Certificates@odata.count": 3
},
"Name": "Certificate Locations"
}
5)Replace certificate
curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/CertificateService/Actions/Certificateervice.ReplaceCertificate/
-d @data_auth.json
{
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/1",
"@odata.type": "#Certificate.v1_0_0.Certificate",
"CertificateString": "-----BEGIN CERTIFICATE--------\n",
"Id": "1",
"Issuer": {
"CommonName": "localhost",
"Organization": "openbmc-project.xyz"
},
6)List CertificateCollection
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Managers/bmc/Truststore/Certificates/
{
"@odata.context":
"/redfish/v1/$metadata#CertificateCollection.CertificateCollection",
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/",
"@odata.type": "#CertificateCollection.CertificateCollection",
"Description": "A Collection of TrustStore certificate instances",
"Members": [
{
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/1"
}
],
"Members@odata.count": 1,
"Name": "TrustStore Certificates Collection"
}
Change-Id: Ic9644fadfe6fe89b529e16336cc6bcd804810b3a
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.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 allows adding a threshold as a setpoint offset
so that dynamic thresholds can be used to modify a
setpoint.
Tested: Get and Patch worked
{
"Oem": {
"OpenBmc": {
"Fan": {
"PidControllers": {
"CPU1_DIMM_ABC": {
"SetPointOffset": "UpperThresholdCritical"
}
}
}
}
}
}
Change-Id: If515971778a8041aba0ab51da87ec5b29ebc359d
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tested:
"Links": {
"ManagerInChassis": {
"@odata.id": "/redfish/v1/Chassis/R2000_Chassis"
}
}
Passed the Redfish Service Validator.
Change-Id: I8f57a9a2aca0878c44ecdefc613c9cfecbdc130c
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Utilize the new utility interface to return the actively running BMC
firmware image. The current code just returns the first instance it
finds which is incorrect.
Tested:
cat /etc/os-release
ID="openbmc-phosphor"
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="2.7.0-dev"
VERSION_ID="2.7.0-dev-1010-gb417d47"
Before Change:
curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/Managers/bmc | grep Firmware
"FirmwareVersion": "2.7.0-dev-999-gfbdb73f"
After Change:
curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/Managers/bmc | grep Firmware
"FirmwareVersion": "2.7.0-dev-1010-gb417d47",
Resolves openbmc/bmcweb#38
Change-Id: I50388c7adfaed8938e3a927becbebd801f0f7673
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Look for associations for inventory and compare the
inventory warning / critical and global warning / critical
to get HealthRollup and Health respectively.
Tested:
Used sensor override to set BMC temp to Upper critical
and saw:
{
"@odata.context": "/redfish/v1/$metadata#Chassis.Chassis",
"@odata.id": "/redfish/v1/Chassis/WFP_Baseboard",
"@odata.type": "#Chassis.v1_4_0.Chassis",
"ChassisType": "RackMount",
"Id": "WFP_Baseboard",
"Links": {
"ComputerSystems": [
{
"@odata.id": "/redfish/v1/Systems/system"
}
],
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
]
},
"Manufacturer": "Intel Corporation",
"Model": "S2600WFT",
"Name": "WFP_Baseboard",
"PartNumber": "123456789",
"Power": {
"@odata.id": "/redfish/v1/Chassis/WFP_Baseboard/Power"
},
"PowerState": "Off",
"SerialNumber": "123454321",
"Status": {
"Health": "Warning",
"HealthRollup": "Critical",
"State": "StandbyOffline"
},
"Thermal": {
"@odata.id": "/redfish/v1/Chassis/WFP_Baseboard/Thermal"
}
}
Change-Id: Idd9e832db18bb4769f1452fe243d68339a6f844d
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Query d-bus broker, and if the state is less than
100%, set the bmc state to "Starting".
Tested: Had application that was failing on system,
queried broker and saw Progres was set to 0.97, bmcweb
reported "State": "Starting". Disabled that app, and
state went to "Enabled".
Change-Id: I4123d2f4a6388aff6891a5a02aa98b7a89777d5f
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Manager: Added SerialConsole, Links/ManagerForChassis and Links/ManagerForChassis@odata.count
- System: Added Links/Chassis, Links/ManagedBy, Status, BiosVersion
- Power: Added placeholder for PowerControl
Tested:
GET /redfish/v1/Systems/system HTTP/1.1
Response:
{
"@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem",
"@odata.id": "/redfish/v1/Systems/system",
"@odata.type": "#ComputerSystem.v1_6_0.ComputerSystem",
......
"BiosVersion": "SE5C620.86B.01.00.0361.120520162351",
......
"Description": "Computer System",
"Id": "system",
"IndicatorLED": "Off",
"Links": {
"Chassis": [
{
"@odata.id": "/redfish/v1/Chassis/R1000_Chassis"
}
],
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
]
},
......
"Processors": {
"@odata.id": "/redfish/v1/Systems/system/Processors"
},
"Status": {
"Health": "OK",
"State": "Enabled"
},
"SystemType": "Physical",
"UUID": "13876882-7708-4200-bcf2-2c5681218bc8"
}
GET /redfish/v1/Managers/bmc HTTP/1.1
Response:
{
"@odata.context": "/redfish/v1/$metadata#Manager.Manager",
"@odata.id": "/redfish/v1/Managers/bmc",
"@odata.type": "#Manager.v1_3_0.Manager",
......
"Description": "Baseboard Management Controller",
"Linkn"fces": {
"@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces"
},
"FirmwareVersion": "2.7.0-dev-266-g111d297-d14e857",
"Id": "bmc",
Links: {
"ManagerForChassis": [
{
"@odata.id": "/redfish/v1/Chassis/R1000_Chassis"
}
],
"ManagerForChassis@odata.count": 1,
"ManagerForServers": [
{
"@odata.id": "/redfish/v1/Systems/system"
}
],
"ManagerForServers@odata.count": 1
},
......
"SerialConsole": {
"ConnectTypesSupported": [
"IPMI",
"SSH"
],
"ServiceEnabled": true
},
"Status": {
"Health": "OK",
"State": "Enabled"
},
"UUID": "067b4e8d-6c29-475c-92a1-6590d4e5818c"
}
GET /redfish/v1/Chassis/R1000_Chassis/Power HTTP/1.1
Response:
{
"@odata.context": "/redfish/v1/$metadata#Power.Power",
"@odata.id": "/redfish/v1/Chassis/R1000_Chassis/Power",
"@odata.type": "#Power.v1_2_1.Power",
"Id": "Power",
"Name": "Power",
"PowerControl": []
}
Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Change-Id: I61d8ba493ad689d7062e1f8bfd26d9a0d80230da
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit sets GraphicalConsole's ServiceEnabled property to true.
The ConnectTypesSupported is set to KVMIP.
Tested:
-- Ran redfish service validator. No errors seen.
Manager.v1_0_0.Manager:GraphicalConsole
value: OrderedDict([('ConnectTypesSupported', ['KVMIP']),
('ServiceEnabled', True)]) <class 'collections.OrderedDict'>
has Type: Manager.v1_0_0.GraphicalConsole complex
is Optional
***going into Complex
Manager.v1_0_0.GraphicalConsole:ConnectTypesSupported
value: ['KVMIP'] <class 'list'>
has Type: Collection(Manager.v1_0_0.GraphicalConnectTypesSupported)
enum is Optional
permission OData.Permission/Read
is Collection
Success
-- GET on the manager shows the newly added properties.
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}:${port}/redfish/v1/Managers/bmc
{
"@odata.context": "/redfish/v1/$metadata#Manager.Manager",
"@odata.id": "/redfish/v1/Managers/bmc",
....
....
"GraphicalConsole": {
"ConnectTypesSupported": [
"KVMIP"
],
"ServiceEnabled": true
}
....
....
Change-Id: I169b581b7dd6b2cef96a2a3eb5f2ce3b1089c8b4
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds fan profiles to redfish. This uses the
Thermal Mode interface to allow switching between
different fan profiles. Only the selected fan profile
will be seen. When adding a new controller, they will
also be added to the configuration item for that profile.
Patching of the profile to switch between supported
profiles is also supported.
Tested: Could change profiles in redfish.
Python test script:
def testProfile():
a = {
"Oem": {
"OpenBmc": {
"Fan": {
"Profile" : "Acoustic"
}
}
}
}
return a
def dopatch():
resp = requests.patch(address, json=testProfile(), verify=False,
auth=("root", "0penBmc"))
resp.raise_for_status()
Change-Id: Ie2d8582616ed5bde58e3328b21ba8c59437e88ce
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In redfish, there are 3 UUIDs.
1. Service root. This is unique to Redfish, and not needed outside the
service. It is generated on first startup, and persisted to
nonvolatile in the bmcweb_persistent_data.json file. This is the one
that is present in the ServiceRoot schema, as well as in the Systems
schema under the ServiceEntryPointUUID.
2. Managers. This UUID needs to match the UUID avaialble in IPMI, using
the Get Device GUID command. This is generated via the systemd
sd_id128_get_machine_app_specific call, with a matching application ID
in ipmi.
3. System. This UUID is generated from teh host system. In the case of
Power, it comes from settingsd. In the case of x86, it comes from
MDRv2.
This patchset corrects a few properties to pull from the correct place,
after some regressions in the last few weeks that weren't caught right
away.
Vernon has an oncoming patch to IPMI to correct the IPMI side of this.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I98f3a06ba552c84142aaa749cfd199541a0ae1fd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed the BMCWEB_ENABLE_REDFISH_ONE_CHASSIS #define. The new support
for finding chassis sensors via associations is now used on all systems.
Test Plan:
https://gist.github.com/smccarney/f5b4783d8cf41a486ceff9b941b1ba9a
Tested: Verified the Chassis, Power, and Thermal output was valid on a
Witherspoon system. Verified sensor associations on Witherspoon
work with bmcweb implementation. Ran Redfish Service Validator.
Change-Id: I975f79da2c9de63e4ddd155d39ea872ca9fbffa9
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds PATCH support for the DateTime property.
To set the BMC time, it uses the
xyz.openbmc_project.Time.EpochTime.Elapsed property.
The BMC time can only be set if the BMC owns it's own time *and*
the time is not automatically synced with NTP server(s).
The input JSON for the PATCH request must speicfy datetime in
extended ISO 8601 format.
Tested:
=======
Precondition: Time owner should be BMC and sync method should be
Manual.
busctl get-property xyz.openbmc_project.Settings
/xyz/openbmc_project/time/owner
xyz.openbmc_project.Time.Owner TimeOwner
s "xyz.openbmc_project.Time.Owner.Owners.BMC"
busctl get-property xyz.openbmc_project.Settings
/xyz/openbmc_project/time/sync_method
xyz.openbmc_project.Time.Synchronization TimeSyncMethod
s "xyz.openbmc_project.Time.Synchronization.Method.Manual"
-- Setting date time:
curl -k -H "X-Auth-Token: $bmc_token" -X PATCH
https://${bmc}:${port}/redfish/v1/Managers/bmc -d
'{"DateTime": "2019-03-20T08:47:30.345+00:00"}'
{
"DateTime": "2019-03-20T08:47:30.345+00:00"
}
Invalid date time string:
curl -k -H "X-Auth-Token: $bmc_token" -X PATCH
https://${bmc}:${port}/redfish/v1/Managers/bmc -d
'{"DateTime": "2019-03-20T08:47:30.345+ds:00"}'
{
"DateTime@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The value 2019-03-20T08:47:30.345+ds:00 for the property
DateTime is of a different format than the property can accept.",
"MessageArgs": [
"2019-03-20T08:47:30.345+ds:00",
"DateTime"
],
"MessageId": "Base.1.4.0.PropertyValueFormatError",
"Resolution": "Correct the value for the property in the request body and
resubmit the request if the operation failed.",
"Severity": "Warning"
}
]
}
When the time sync method is NTP, the PATCH request fails as expected:
busctl get-property xyz.openbmc_project.Settings
/xyz/openbmc_project/time/sync_method
xyz.openbmc_project.Time.Synchronization TimeSyncMethod
s "xyz.openbmc_project.Time.Synchronization.Method.NTP"
curl -k -H "X-Auth-Token: $bmc_token" -X PATCH
https://${bmc}:${port}/redfish/v1/Managers/bmc -d '{"DateTime":
"2019-03-20T08:47:30+00:00"}'
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The request failed due to an internal service error. The
service is still operational.",
"MessageArgs": [],
"MessageId": "Base.1.4.0.InternalError",
"Resolution": "Resubmit the request. If the problem persists, consider
resetting the service.",
"Severity": "Critical"
}
],
"code": "Base.1.4.0.InternalError",
"message": "The request failed due to an internal service error. The
service is still operational."
}
}
When the time sync method is Manual, but the time owner is Host,
PATCH fails as expected again:
busctl get-property xyz.openbmc_project.Settings
/xyz/openbmc_project/time/owner
xyz.openbmc_project.Time.Owner TimeOwner
s "xyz.openbmc_project.Time.Owner.Owners.Host"
busctl get-property xyz.openbmc_project.Settings
/xyz/openbmc_project/time/sync_method
xyz.openbmc_project.Time.Synchronization TimeSyncMethod
s "xyz.openbmc_project.Time.Synchronization.Method.Manual"
curl -k -H "X-Auth-Token: $bmc_token" -X PATCH
https://${bmc}:${port}/redfish/v1/Managers/bmc -d '{"DateTime":
"2019-03-20T08:47:30+00:00"}'
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The request failed due to an internal service error. The
service is still operational.",
"MessageArgs": [],
"MessageId": "Base.1.4.0.InternalError",
"Resolution": "Resubmit the request. If the problem persists, consider
resetting the service.",
"Severity": "Critical"
}
],
"code": "Base.1.4.0.InternalError",
"message": "The request failed due to an internal service error. The
service is still operational."
}
}
Change-Id: Ie4a71e639b9a6577fae8627f0f69b6179506eb58
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds SerialConsole property to the
response JSON when doing a GET on the manager resource.
The supported connection types are hard-coded.
Tested:
Performed a GET on the manager object to see the newly added
properties:
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}:${port}/redfish/v1/Managers/bmc
{
"@odata.context": "/redfish/v1/$metadata#Manager.Manager",
"@odata.id": "/redfish/v1/Managers/bmc",
"@odata.type": "#Manager.v1_3_0.Manager",
....
....
"SerialConsole": {
"ConnectTypesSupported": [
"IPMI",
"SSH"
],
"ServiceEnabled": "true"
},
....
....
}
Ran Redfish service validator and ensured no new errors. The newly
added properties PASS validation. Snippet of the verbose output
from the validator:
....
....
Manager.v1_0_0.Manager:SerialConsole
value: OrderedDict([('ConnectTypesSupported', ['IPMI', 'SSH']),
('ServiceEnabled', True)]) <class 'collections.OrderedDict'>
has Type: Manager.v1_0_0.SerialConsole complex
is Optional
***going into Complex
Manager.v1_0_0.SerialConsole:ConnectTypesSupported
value: ['IPMI', 'SSH'] <class 'list'>
has Type: Collection(Manager.v1_0_0.SerialConnectTypesSupported) enum
is Optional
permission OData.Permission/Read
is Collection
Success
Success
Manager.v1_0_0.ManagerService:ServiceEnabled
value: True <class 'bool'>
has Type: Edm.Boolean Edm.Boolean
is Optional
permission OData.Permission/ReadWrite
Success
Manager.v1_0_0.ManagerService:MaxConcurrentSessions
value: n/a <class 'str'>
has Type: Edm.Int64 Edm.Int64
is Optional
prop Does not exist, skip...
***out of Complex
....
....
Change-Id: I659501d5537bfb3eedc8cd2204be98fee742324d
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Should be 8 based on comment.
Tested: Updated patch script using latest zones
and it worked.
Example:
/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Left
Change-Id: Ia56bc6ed4f02a05e91d3638c5b7f470f90d6eba4
Signed-off-by: James Feist <james.feist@linux.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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define a new build option named BMCWEB_ENABLE_REDFISH_ONE_CHASSIS that
is not set by default.
When this build option is set, bmcweb will always return a single
chassis named "chassis".
Setting this option will also cause all sensors to be shown under this
chassis.
This is a short-term solution. Long term, inventory-manager needs to be
enhanced to allow sensors to be under a chassis, or the rest of the
project needs to move to EntityManager.
Currently IBM does not use EntityManager, but EntityManager is called
directly in sensors.hpp. This results in an HTTP 500 Internal Server
Error.
Tested: The URLs /redfish/v1/Chassis/ and /redfish/v1/Chassis/chassis
show correct data on a Witherspoon. /redfish/v1/Managers/bmc/
now has a link to the single chassis.
/redfish/v1/Chassis/chassis/Power and
/redfish/v1/Chassis/chassis/Thermal no longer result in an
HTTP 500 Internal Server Error. Ran Redfish Service Validator.
Change-Id: Iec8f4da333946f19330f37ab084cd9787c52c8ea
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
We now have upper and lower clipping curves, add direction
so we can tell which is which.
Tested-by: GET and PATCH work
Change-Id: I0cdfa159a3a27355a8e67c65e42e765f191f7719
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
This variable was changed in pid-control.
Change-Id: I377057910214085043704af4e076f688212113e2
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now allow regexes to define the inputs for things
like CPU 0 Core \d+, however the inputs were being used
to define the chassis. Change to using the key and or
the zone to define the chassis to put the configuration
on so this isn't an issue.
Tested-by: Created new pid and patched regex pids
and it was successful
Change-Id: I7c054259e9c9118af1dde63fd798a57ca6830678
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patchset attempts to fix all compiler warnings in bmcweb owned
files. There are 2 warnings left, both in sdbusplus, which will be
resolved in a patchset there.
Tested By:
Recompiled, observed warning count went from 30, to zero.
Change-Id: Ife90207aa5773bc28faa8b04c732cafa5a56e4e4
Signed-off-by: Ed Tanous <ed@tanous.net>
|
|
|
|
|
|
|
|
|
| |
Add hysteresis support into the pid controllers.
Tested-by: Get and Patch worked.
Change-Id: I89f1c128a234ebdf4d69aec35956f11b9e189263
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the redfish behavior to move to a single, known name
under the /redfish/v1/Systems/system path. This is advantageous for a
lot of reasons.
1. Lots fewer dbus calls to determine the system name for every path.
This could be optimized in other ways, like checking the system name on
startup, but because redfish paths are not intended to be informative,
this patchset takes the opinion that less code is better.
2. Lots of lowered complexity, given that each endpoint underneath
/system doesn't need an individual "does this system exist, and is the
name right" check.
3. This makes it possible to correctly implement the "Links" property in
Chassis, which is required for the OCP base server profile
Tested By:
Very minimal testing done, but it seems to pass the validator.
Change-Id: Iea3cb5081b92a3843b6877decd009936de00561c
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I9d7069668f91f2ac72d2f4a440f63e0e85dd5269
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
| |
PidControllers should display setpoint.
Tested-by: Saw setpoint in web-browser
Change-Id: I76ee50d832200e39f55312c0a41c91aa13e65af9
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Add ability to set stepwise controllers through redfish.
Also convert all pid control to use readJson.
Tested-by: Set different values using python requests api
Change-Id: Ifa31db7dce3338ec033426641a0185dd3d56b4bc
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add stepwise configuration information into the oem
redfish configuration. Also move the basic configuration
information into the above loop to not set it multiple
times. Only implemented GET thus far, PATCH will be in
follow-on commit.
Tested-by: Navigated to redfish/v1/Managers/bmc/ and saw
Stepwise configuration.
Change-Id: Id4fdf7b6c6708edc56c1ede717b79c50de2b1c94
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
UUID got broken with a botched commit here:
0f74e643ec246c333ef4724af1ecd5adeb1b6658
This should resolve #10
Change-Id: Ic9ff631b56ab02525fadab1ef8013904d36d71c8
Signed-off-by: Ed Tanous <ed.tanous@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>
|
|
|
|
|
|
|
|
| |
Now that sdbusplus variant supports std::get_if, we can remove our
custom, mapbox namespaced implementation that does the same thing.
Change-Id: I854c473003e28e41dd45dba08ca683433f1c1774
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge conflict in: Improve the Redfish error reporting interface
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: I3b37cce1e7f603c0b4cc74a16f8f00da9a7f1373
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows runtime modifying Pid configurations
and zones.
Tested by:
Sent PATCH for:
Modify FanController
Modify FanZone
New FanController
New FanZone
Modify PidController
New PidController
Delete FanController
Delete FanZone
Change-Id: Ie2dd52ea0b09dc4ad1ed016ec4c27b3c39be28de
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
PID was doing every query 8x times.
Change-Id: I11fa064c2f9c416fe15fdfb15c63a6490f0b68dd
Signed-off-by: James Feist <james.feist@linux.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>
|
|
|
|
|
|
|
|
|
| |
Add doGet to managers for PID configuration data.
Make sure passes schema validation.
Change-Id: Ieeb97bf76a3d8a3c06f59f79cc0887aec746675e
Signed-off-by: James Feist <james.feist@linux.intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cherry-picked from:
https://github.com/ampere-openbmc/bmcweb/commit/a92abc99ac6831499ed362aa8e2d14cfe2d99e48
Change-Id: Ie817d8b3aab765e1e9a948c1d3de91cfca1f31ad
Signed-off-by: Tung Vu <tung.vu@amperecomputing.com>
Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Ampere: Correct Cpp coding style on previous commit
Limit column of a line to 80 characters.
cherry-picked from:
https://github.com/ampere-openbmc/bmcweb/commit/7065ea3e9179a6ec5f294e21e6028ed15637262c
Change-Id: I1d8f2cf84ee48f9d4af5176858be00aa6a4f582d
Signed-off-by: Chuong Tran <chuong.tran@amperecomputing.com>
Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Ampere bmcweb: Managers: Add ManagerType property.
Add ManagerType property to "BMC" type.
cherry-picked from:
https://github.com/ampere-openbmc/bmcweb/commit/d589325ed7c5da2f3468ac0d105cfecc6405528a
Tested: Browser and redfishtool
Command test: redfishtool -A Basic -S Always --rhost=$bmc_ip -u
$bmc_user -p $bmc_password Managers -I openbmc
Redmine ID: #2026
Change-Id: I2cee251aa1b47fd06148f96b6b4fba018e0e5f1f
Signed-off-by: Tung Vu <tung.vu@amperecomputing.com>
Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
| |
This commit moves the codebase to the lastest clang-format file from
upstream, as well as clang-format-6.0.
Change-Id: Ice8313468097c0c42317fbb9e10ddf036e8cff4c
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|