summaryrefslogtreecommitdiffstats
path: root/redfish-core/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Support Processors and its collection for ProcessorType AcceleratorAlpana Kumari2019-06-061-13/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interface- phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/ Inventory/Item/Accelerator.interface.yaml Redfish schema Status/state is mapped to two properties- Functional and Present xyz.openbmc_project.State.Decorator.OperationalStatus xyz.openbmc_project.Inventory.Item Tested: -- ran Redfish-Service-Validator, All 6 GPUs shows Success -- ran GET on Processors Collection curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors { "@odata.context": "/redfish/v1/$metadata#ProcessorCollection.ProcessorCollection", "@odata.id": "/redfish/v1/Systems/system/Processors/", "@odata.type": "#ProcessorCollection.ProcessorCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0" }, { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu1" }, { "@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0" }, { "@odata.id": "/redfish/v1/Systems/system/Processors/gv100card1" }, { "@odata.id": "/redfish/v1/Systems/system/Processors/gv100card2" }, { "@odata.id": "/redfish/v1/Systems/system/Processors/gv100card3" }, { "@odata.id": "/redfish/v1/Systems/system/Processors/gv100card4" }, { "@odata.id": "/redfish/v1/Systems/system/Processors/gv100card5" } ], "Members@odata.count": 8, "Name": "Processor Collection" 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": "Absent" } Change-Id: I5315df80d88d3a04de4b62435a200a718a10cd4c Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
* Redfish(Network): Add support for IPv6Addresses and IPv6StaticAddressesRavi Teja2019-06-061-60/+445
| | | | | | | | | | | | | | | | | | | Added GET support for IPv6Addresses Added GET and PATCH support for IPv6StaticAddresses Tested by: GET PATCH -D patch.txt -d '{"IPv6StaticAddresses": [{"Address": "2002:905:150e:301:72e2:84ff:fe14:222","PrefixLength": 64}]}' PATCH -D patch.txt -d '{"IPv6StaticAddresses": [{},{"Address": "2002:905:150e:301:72e2:84ff:fe14:333","PrefixLength": 64}]}' PATCH -D patch.txt -d '{"IPv6StaticAddresses": [null,{},{"Address": "2002:905:150e:301:72e2:84ff:fe14:444","PrefixLength": 64}]}' PATCH -D patch.txt -d '{"IPv6StaticAddresses": [{"Address": "2002:905:150e:301:72e2:84ff:fe14:555","PrefixLength": 64},{}]}' PATCH -D patch.txt -d '{"IPv6StaticAddresses": [{},{"Address": "2002:905:150e:301:72e2:84ff:fe14:666"}]}' PATCH -D patch.txt -d '{"IPv6StaticAddresses": [{},{"PrefixLength": 64}]}' Tested with validator and no errors. Change-Id: I7d1314a0c7843aae8425d66119f0d205a5cfac55 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
* bmcweb: Fix sensor name identification methodRichard Marian Thomaiyar2019-06-061-7/+5
| | | | | | | | | | | | | Sensor name was calculated based on 5th elemennt is not applicable any more. Get the last token in the path, which is the sensor name, which is used as member_id. Tested: 1. Verified the PATCH method for thermal & power overriding, temperatures, fans & voltages. Overriding works as expected. Change-Id: I08291171496a979f120a57ac0802733007e11871 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Add basic PowerControl and PowerLimit propertiesEddie James2019-06-052-4/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add code in the power-specific response handler to fetch the Power Limit value for the chassis that implements the Chassis inventory item. Add a special case to the generic sensor handling code to place the total_power value into the PowerControl PowerConsumedWatts field. curl -k https://${bmc}/redfish/v1/Chassis/chassis/Power { "@odata.context": "/redfish/v1/$metadata#Power.Power", "@odata.id": "/redfish/v1/Chassis/chassis/Power", "@odata.type": "#Power.v1_5_2.Power", "Id": "Power", "Name": "Power", "PowerControl": [ { "@odata.id": "/redfish/v1/Chassis/chassis/Power#/PowerControl/", "MemberId": "total_power", "Name": "total power", "PowerConsumedWatts": 269.0, "Status": { "Health": "OK", "State": "Enabled" } } ], "PowerLimit": [ { "LimitInWatts": null } ], Signed-off-by: Eddie James <eajames@linux.ibm.com> Change-Id: I447de59fb44a4ecbe7b47610d915ac22aef90250
* Fix DBUS Name For BootSource CdSantosh Puranik2019-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9f16b2c1b6b6884482bca304fcaa573caf91d0d6 changed the mapping for redfish boot source 'Cd' to 'xyz.openbmc_project.Control.Boot.Source.Sources.DVD'. However, that mapping does not match what we have in phosphor-dbus-interfaces: 'xyz.openbmc_project.Control.Boot.Source.Sources.ExternalMedia' This commit reverts that mapping back to ExternalMedia. Tested: -- Ran redfish service validator - no errors seen. -- Tested PATCH on BootSourceOverrideTarget with value "Cd" curl -k -H "X-Auth-Token: $bmc_token" -X PATCH https://${bmc}:${port}/redfish/v1/Systems/system -d '{"Boot": {"BootSourceOverrideEnabled": "Continuous", "BootSourceOverrideTarget": "Cd"}}' { "@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" } ] curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}:${port}/redfish/v1/Systems/system { "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", "@odata.id": "/redfish/v1/Systems/system", .... .... .... "Boot": { "BootSourceOverrideEnabled": "Continuous", "BootSourceOverrideMode": "Legacy", "BootSourceOverrideTarget": "Cd", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "Hdd", "Cd", "Diags", "BiosSetup" ] }, Change-Id: Ibd1fe3bc2c98dc97422b8dd71f9f95f6e9e25285 Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
* [Redfish] Fixed PATCH behavior of IndicatorLED in ComputerSystemJennifer Lee2019-05-301-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patching IndicatorLED to "Lit" was not working. Also modified the response code to 204 no-content for successful PATCH request. Tested: PATCH /redfish/v1/Systems/system HTTP/1.1 { "IndicatorLED": "Lit" } Response: 204 No Content 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", "Actions": { "#ComputerSystem.Reset": { "ResetType@Redfish.AllowableValues": [ "On", "ForceOff", "GracefulRestart", "GracefulShutdown" ], "target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset" } }, "Boot": { "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "Legacy", "BootSourceOverrideTarget": "None", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "Hdd", "Cd", "Diags", "BiosSetup" ] }, "Description": "Computer System", "Id": "system", "IndicatorLED": "Lit", "LogServices": { "@odata.id": "/redfish/v1/Systems/system/LogServices" }, "Memory": { "@odata.id": "/redfish/v1/Systems/system/Memory" }, "MemorySummary": { "Status": { "State": "Disabled" }, "TotalSystemMemoryGiB": 0 }, "Name": "Computer System", "PowerState": "On", "ProcessorSummary": { "Count": 4, "Model": "Intel Xeon processor", "Status": { "State": "Enabled" } }, "Processors": { "@odata.id": "/redfish/v1/Systems/system/Processors" }, "Status": { "State": "Enabled" }, "SystemType": "Physical", "UUID": "13876882-7708-4200-bcf2-2c5681218bc8" } Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com> Change-Id: I8ae152190ee9f122e8580903a9d5e687b2fd9e13
* [Redfish] Enable PATCH for DHCPv4 properties in EthernetInterface schemaJennifer Lee2019-05-291-1/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DHCPv4 were read-only properties, this code change make following properties to be PATCHable: - DHCPEnabled - UseDNSServers - UseDomainName - UseNTPServers Tested: 1. Check DHCPv4 properties value GET /redfish/v1/Managers/bmc/EthernetInterfaces/<ethID> HTTP/1.1 Response: { ...... "DHCPv4": { "DHCPEnabled": true, "UseDNSServers": true, "UseDomainName": true, "UseNTPServers": true }, ...... } 2. PATCH DHCPv4 PATCH /redfish/v1/Managers/bmc/EthernetInterfaces/eth1 HTTP/1.1 { "DHCPv4": { "DHCPEnabled":false, "UseDNSServers": false, "UseDomainName": false, "UseNTPServers": false } } 3. Check whether DHCPv4 properties are set GET /redfish/v1/Managers/bmc/EthernetInterfaces/<ethID> HTTP/1.1 Response: { ...... "DHCPv4": { "DHCPEnabled": false, "UseDNSServers": false, "UseDomainName": false, "UseNTPServers": false }, ...... } Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com> Change-Id: I125029ae4cdef329edabd18f6aa6a16db6e27d3d
* Add ClearLog support for the Redfish Event Log ServiceJason M. Bills2019-05-291-0/+55
| | | | | | | | | | | | | | | | 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>
* Fix a trailing slash on LogServicesEd Tanous2019-05-291-2/+2
| | | | | | | | | | | | | Redfish takes a not-so-strong opinion on trailing slashes, and while they're kind of allowed, the validator does mention them. This fixes the URI endpoint to not contain a slash. Tested: Ran redfish service validator, and observed no new errors. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I697f99e17fd4564f5f9648b972a1168de78c271d
* Set GraphicalConsole to enabledSantosh Puranik2019-05-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Redfish: Move checkDbusPathExist function to dbus utilityRatan Gupta2019-05-231-18/+1
| | | | | | | | | | This function is a utility function which would be needed by other files. TestedBy: ran the redfish validator: PASS Change-Id: I2a0d07f264952f47a724da11f72b15ca5e019d62 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Redfish(Account): Support the patch for individual properties for LDAPRatan Gupta2019-05-231-0/+477
| | | | | | | | | | | | | | | | | | | | | | | This commit supports the patch of individual properties under LDAP. Tested by: Ldap Config not exist 1) Run the redfish validator tool 2) PATCH the authentication, auth type, username property Keep getting the message what is missing. 3) PATCH with all the required properties. Ldap Config Exist 4) Run the redfish validator tool 5) PATCH the service address property 6) PATCH Auth type, account providertype 7) PATCH user name 8) PATCH multiple properties Detailed test reults are at the following location https://pastebin.com/ibX5nyAc Change-Id: Ib09c7765f86f626d3b74b5ba7a3e7a97cedb4acf Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Redfish: Populate the LDAP property in AccountService schemaRatan Gupta2019-05-231-1/+181
| | | | | | | | | | | | | | | | | | | | With this commit get request on account service gets the LDAP/AD configuration. RemoteRoleMapping under LDAP property will be supported by other commit. TestedBy: 1) Run the redfish - validator => when there is no LDAP configuration => After LDAP Configuration. 2) GET request through redfish /redfish/v1/AccountService Detailed test cases are at the following location. https://pastebin.com/ibX5nyAc Change-Id: I718d1eb4b40d3a626440487ac9a63d8c96721cee Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* PID: Add fan profile supportJames Feist2019-05-231-266/+596
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [Redfish] Add OCP required properties for ChassisJennifer Lee2019-05-232-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Thermal - Redundancy - Fans Tested: GET /redfish/v1/Chassis/<chassis id>/Thermal HTTP/1.1 Response: { "@odata.context": "/redfish/v1/$metadata#Thermal.Thermal", "@odata.id": "/redfish/v1/Chassis/<chassis id>/Thermal", "@odata.type": "#Thermal.v1_4_0.Thermal", "Fans": [], "Id": "Thermal", "Name": "Thermal", "Redundancy": [], "Temperatures": [ { "@odata.id": "/redfish/v1/Chassis/<chassis id>/Thermal#/Temperatures/0", "@odata.type": "#Thermal.v1_3_0.Temperature", "LowerThresholdCritical": 0, "LowerThresholdNonCritical": 5, "MaxReadingRangeTemp": 127, "MemberId": "BMC_Temp", "MinReadingRangeTemp": -128, "Name": "BMC_Temp", "ReadingCelsius": 34.6870002746582, "Status": { "Health": "OK", "State": "Enabled" }, "UpperThresholdCritical": 115, "UpperThresholdNonCritical": 110 }, ... } Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com> Change-Id: I8fe41e698ef55b02779b04468dee51ebe5561762
* Fix 404 handling in Redfish EthernetInterfacesEd Tanous2019-05-201-16/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when a user requested a network interface that was non-sensical, like: /redfish/v1/Managers/bmc/EthernetInterfaces/foobar/VLANs OR /redfish/v1/Managers/bmc/EthernetInterfaces/foobar They would be presented with a 200-OK, and a partially filled in object. While this doesn't matter much for the casual redfish user, who uses the collection to properly enumerate devices, this causes an issue with security scanners, which think they've found some vulnerability when they can throw whatever injection text they want to in the message, and it shows up in the response. This patchset corrects this, and causes the urls referenced above to properly return 404, and the appropriate "ResourceNotFound" error message. Tested: Attempted both URLs shown above. Both return 404. Ran redfish service validator, observed no errors related to EthernetInterface, or sub nodes. Attempted good URLs, and observed no change to the payload. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: Idb2758858d4dbaf421c0cef28b1d5d02402e0ad8
* Redfish: Fix managers UUID mixupEd Tanous2019-05-132-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Improve Redfish log entry parsingJason M. Bills2019-05-101-9/+25
| | | | | | | | | | | | | This change makes the log entry parsing more robust by checking only for the first space to get the timestamp instead of splitting on all spaces. Tested: Added log entries using sensor override and confirmed that all of them can be correctly displayed in the EventLog LogService. Change-Id: Ic0374f6bf8d5ec052dae84b36ab48d16041c614f Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* [Redfish] Fix incorrect mapping of dbus and Redfish API strings for BootSourceJennifer Lee2019-05-101-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - "Cd" should be mapped to "xyz.openbmc_project.Control.Boot.Source.Sources.DVD" - Adding mapping "Usb" to "xyz.openbmc_project.Control.Boot.Source.Sources.Removable" Tested: PATCH /redfish/v1/Systems/system HTTP/1.1 { "Boot": { "BootSourceOverrideTarget": "Cd" (or "Usb") } } Response: { "@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" } ] } GET /redfish/v1/Systems/system HTTP/1.1 Response: ... Boot: { ... "BootSourceOverrideTarget": "Cd", (or "Usb") ... } ... Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com> Change-Id: Ib5f69fe93d45b4012c089bd48e484ef978a4e57a
* Redfish: Make sensor names more friendlyEd Tanous2019-05-091-1/+2
| | | | | | | | | | | | | | | The primary goal of this patchset is to make sensor names more approachable, in the same way that IPMI does. This replaces the underscores from the sensor path name with spaces. Tested: GET /redfish/v1/Chassis/Solum_1300W_PSU_1/Power Observed sensor "Name" property changed from PSU1_Input_Power to PSU1 Input Power Service validator shows no issues on Thermal or Power Nodes. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I0862f180700502d401cf5a0746a639db5133e631
* Redfish(Network): Implemented PATCH of Nameservers arrayRAJESWARAN THILLAIGOVINDAN2019-05-091-2/+11
| | | | | | | | | | | | | | | | | | | | | Testing: "NameServers": [], "NameServers@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The property NameServers is a read only property and cannot be assigned a value.", "MessageArgs": [ "NameServers" ], "MessageId": "Base.1.4.0.PropertyNotWritable", "Resolution": "Remove the property from the request body and resubmit the request if the operation failed.", "Severity": "Warning" } ] Change-Id: I12b8cb0ad9b8ad83371ee1d834f38e7537cc7b61 Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com>
* simpleupdate: Move code around for future re-useAndrew Geissler2019-05-091-140/+143
| | | | | | | | | | | | A lot of the existing code for the UpdateService path can be used for SimpleUpdate. Move the common code into static functions so that both paths can call them. Tested: Verified good path code update still works against UpdateService Change-Id: Ie69b2bdc7b286b9d0596a2ca193810270a3f7dbb Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Redfish: Remove BMCWEB_ENABLE_REDFISH_ONE_CHASSISShawn McCarney2019-05-096-118/+3
| | | | | | | | | | | | | | | 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>
* Acquire chassis sensors using the sensor association DBus itemJohnathan Mantey2019-05-094-173/+304
| | | | | | | | | | | | | | | | | | | | | | Each entry in the Chassis Collection has, or will have, a sensors DBus item that lists the sensors that Chassis node contains. This change queries that DBus entry, and uses the information to collect the Thermal or Power sensor information. Tested: GET https://10.243.48.59/redfish/v1/Chassis/WP_Baseboard GET https://10.243.48.59/redfish/v1/Chassis/WP_Baseboard/Power GET https://10.243.48.59/redfish/v1/Chassis/WP_Baseboard/Thermal On 2 representative systems, one with a chassis, and one without. Observed correct behavior for both. Ran Redfish service validator. Observed no errors in Chassis, Thermal, Power, or ChassisCollection schemas. Change-Id: I01fcb3707396e2e33345bf125d8ae95170088a2a Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Use syslog for Redfish messagesJason M. Bills2019-05-081-140/+131
| | | | | | | | | | | | | | | | | | | Limitations were discovered after the journal was made persistent that reduce the benefits of using it directly for persistent event logs. As an alternative, we will leave the journal volatile and use rsyslog to persist only the event logs. This change switches to the syslog files for Redfish event messages instead of looking directly in the journal. Tested: Navigated to "/redfish/v1/Systems/system/LogServices/EventLog/Entries" and confirmed that all of the stored Event Log Entries are returned. Change-Id: Ib0aebda68eb95bb171fccd208350c3d073787a13 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* Construct Redfish messages using the Message RegistryJason M. Bills2019-05-081-19/+72
| | | | | | | | | | | | | | | | Instead of using the message and severity from the journal, this change allows Redfish to search for the MessageId in the Message Registries to construct the message. This will provide more accurate Redfish messages and severities since they come from a single source. Tested: Logged Redfish events using new MessageIds and confirmed that the correct message from the Message Registry is displayed rather than the message from the journal. Change-Id: I294593647998c988b36ffccaf95a69cbeab3f92e Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* Remove the static OpenBMC Message Registry fileJason M. Bills2019-05-081-0/+119
| | | | | | | | | | | | 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>
* Parse Message Registry header info from the fileJason M. Bills2019-05-081-11/+18
| | | | | | | | | | | | 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>
* Remove the static Base Message Registry fileJason M. Bills2019-05-081-0/+189
| | | | | | | | | | | | | | | | 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>
* bmcweb: /s/boost::beast::string_view/std::string_view/gAdriana Kobylak2019-05-021-2/+2
| | | | | | | | | | Follow-on to https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/18891 Tested: Checked that the host console and virtual media endpoints still worked as expected. Change-Id: Ifdc5f21f3668bdf9bd24189504aaeb17b232c921 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Redfish: Supporting ServiceRootUUID field for ↵Bernard Wong2019-05-022-23/+4
| | | | | | | | | | | | | | | | | /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>
* Redfish(Network): Implement IPv6DefaultGateway supportRavi Teja2019-04-301-1/+22
| | | | | | | | | | | | | | Added GET support for IPv6DefaultGateway.its read only property On Patch operation display "PropertyNotWritable" message. Tested by: GET PATCH -D patch.txt -d '{"IPv6DefaultGateway": "fe80::226:88ff:feac:8401"}' Tested with validator and no errors. Change-Id: Ib67234496b70ec53508a9be36cd86c1859b5d895 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
* Fix empty IPV4 gateway errorGunnar Mills2019-04-261-1/+8
| | | | | | | | | | | | | | | If an IPV4 gateway is empty use "0.0.0.0". The RedfishServiceValidator throws the following error on a Witherspoon system: "IPv4Addresses[0].Gateway: String '' does not match pattern ''^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$''" Tested: Ran RedfishServiceValidator and no longer observe the error. IPV4 addresses with gateways are untouched. Change-Id: I423aeeb0bec46fa5cc0c8cf5a017c16d20314984 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Change application and interface names to CrashdumpJason M. Bills2019-04-221-58/+62
| | | | | | | | | | 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>
* Remove references to experimental filesystemJames Feist2019-04-151-1/+1
| | | | | | | | | | We're at CPP17 everywhere now, no need to keep the experimental refrerence. Tested: It builds Change-Id: I5f6571eb411bf055e9715f7d96d1be5a3cb2e119 Signed-off-by: James Feist <james.feist@linux.intel.com>
* fw-update: Support host image updateAndrew Geissler2019-04-101-50/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per the Redfish schema for the UpdateService, it supports all SoftwareInventory targets. On OpenBMC this is currently the BMC and the Host (BIOS) firmware. Introduced a new fwUpdateInProgress static variable so that the signal subscription could be disabled once the required interface was added. This prevented multiple call backs and multiple activations of the same image. Tested: Verified that a host and BMC image update worked as expected on a witherspoon system. $ curl -k -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/octet-stream" -X POST -T ./obmc-phosphor-image-witherspoon.ubi.mtd.tar https://${BMC_IP}/redfish/v1/UpdateService { "@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" } ] } Change-Id: I7bb9381f1b79bf65604464b628ef98646951d840 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* fw-inventory: Add RelatedItem to inventoryAndrew Geissler2019-04-101-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added TODO reference for BIOS reference. This commit is required: https://gerrit.openbmc-project.xyz/#/c/openbmc/bmcweb/+/16775/ Tested: VERBO - SoftwareInventory.v1_1_0.SoftwareInventory:RelatedItem VERBO - value: [OrderedDict([('@odata.id', '/redfish/v1/Managers/bmc')])] <class 'list'> VERBO - has Type: Collection(Resource.Item) entity VERBO - is Optional VERBO - permission OData.Permission/Read VERBO - is Collection VERBO - Success curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/969635f8 { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/969635f8", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "BMC update", "Id": "969635f8", "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.6.0-rc1-312-g8d6abcd6d" } With the TODO code un-commented, this is the output: curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/ace821ef { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/ace821ef", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Host update", "Id": "ace821ef", "Members@odata.count": 1, "Name": "Software Inventory", "RelatedItem": [ { "@odata.id": "/redfish/v1/Systems/system/BIOS" } ], "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "IBM-witherspoon-OP9-v2.0.10-2.22" } Change-Id: Iae563a938532c6f53f41c8fc5c758693155be1a0 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* PATCH support for DateTimeSantosh Puranik2019-04-101-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Change the name from Immediate to On-Demand for CPU LogJason M. Bills2019-04-051-32/+31
| | | | | | | | | | | | | 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>
* fw-inventory: Provide BiosVersion in system objAndrew Geissler2019-04-051-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add SerialConsole to Manager nodeSantosh Puranik2019-04-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Redfish(Network): Implemented PATCH of StaticNameServers arrayRAJESWARAN THILLAIGOVINDAN2019-04-051-3/+38
| | | | | | | | | | | Testing: PATCH -D patch.txt -d '{"StaticNameServers": ["3.3.3.3"]}' PATCH -D patch.txt -d '{"StaticNameServers": ["3.3.3.3","6.6.6.6"]}' PATCH -D patch.txt -d '{"StaticNameServers": []}' Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com> Change-Id: I3ffb7f5b704437b31ddfeb6a74eae3e6a582164a
* Redfish(Network): VLAN PATCH fixSunitha Harish2019-04-051-64/+46
| | | | | | | | | | | | | | | This patch set fixes the issue at the Patch operation on VLAN resource. Before this for any new value of VLANId , the patch command used to apply value 1 as the new VLANId Tested by : GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_10 PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_10 -d '{ "VLANId" : 12, "VLANEnable": true}' PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_10 -d '{ "VLANId" : 20, "VLANEnable": false}' Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com> Change-Id: Ia18e58816e6c78c8609e0daa558bc66d6914568e
* Initial redfish logging supportAndrew Geissler2019-04-042-28/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pid: fix zone string lengthJames Feist2019-04-031-1/+5
| | | | | | | | | | | | | 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>
* Bump ManagerNetworkProtocol to fix errorGunnar Mills2019-04-021-1/+1
| | | | | | | | | | | | | The RedfishServiceValidator throws the following error: "ERROR - Verifying property that does not belong to this version: ManagerNetworkProtocol.v1_2_0.ManagerNetworkProtocol:NTP" NTP was added in version 1_2_0. Bumped to latest, 1_4_0. Tested: Ran RedfishServiceValidator and no longer observe the error. Change-Id: Ia9fb2e789593c28f776928d94094204725f5b1ce Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Fix AllowableValues failProp errorGunnar Mills2019-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The RedfishServiceValidator throws the following error: "ERROR - Locked@Redfish.AllowableValues[0]: Expected string value, got type class 'bool'" From http://redfish.dmtf.org/schemas/DSP0266_1.0.html#allowable-values "6.5.4.7.2. Allowable values The property representing the action may be annotated with the "AllowableValues" annotation in order to specify the list of allowable values for a particular parameter. The set of allowable values is specified by including a property whose name is the name of the parameter followed by "@Redfish.AllowableValues", and whose value is a JSON array of strings representing the allowable values for the parameter." Moved AllowableValues[0] to a string. Tested: Ran RedfishServiceValidator and no longer observe the error. Change-Id: I167416fe62449dd428f549c486069db0de7676b0 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Allow multiple registrationsTanous2019-04-012-0/+2
| | | | | | | | | | | | | 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>
* Redfish(Network): Implemented GET and PATCH support for NTP serversraviteja-b2019-03-301-2/+156
| | | | | | | | | | | | Testing: GET PATCH {"NTPServers": ["7.7.7.7"]} PATCH {"NTPServers": ["7.7.7.7","4.4.4.4"]} PATCH {"NTPEnabled": true, "NTPServers": ["1.1.1.1"]} PATCH {"NTPEnabled": false} Change-Id: I324e8779d84b368ada78541596946a23f42ef785 Signed-off-by: raviteja-b <raviteja28031990@gmail.com>
* fw-inventory: description of FirmwareInventory objAndrew Geissler2019-03-291-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow one to identify what a firmware inventory object represents. The Purpose was already being pulled from the Dbus data but not put into anything. The description field looks like the best fit for it. Schema Reference: http://redfish.dmtf.org/schemas/v1/SoftwareInventory.v1_2_1.json#/definitions/SoftwareInventory Other Implementations: Not a lot of reference material out there for what other implementers have used for this field. HP: "Description": "SystemBMC" "Description": "SystemRomActive" SuperMicro: <BMC description not available> "Description: "Description of SUPERMICRO BIOS" Tested: - Verified RedfishServiceValidator.py shows no new errors VERBO - Resource.v1_0_0.Resource:Description VERBO - value: BMC update <class 'str'> VERBO - has Type: Resource.Description Edm.String VERBO - is Optional VERBO - permission OData.Permission/Read VERBO - Success - Description now correctly returned in data $ curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/58a9b6db { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/58a9b6db", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "BMC update", "Id": "58a9b6db", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "2.6.0-rc1-265-gfb721b2" } Change-Id: I55d1b1a5901878da2566713de9dc72e88a8c6359 Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
OpenPOWER on IntegriCloud