summaryrefslogtreecommitdiffstats
path: root/redfish-core/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement redfish LogServiceEd Tanous2018-10-091-0/+13
| | | | | | | | | | | This commit implements an optional LogService endpoint for debugging CPUs over Redish. It exposes both the ability to create a new log with the LogImmediate action, as well as to pull a stored log using the LogCollection schema. This feature is disabled by default, and should be enabled in the meta-x86 layer. Change-Id: Ied1d5e263a0857e09cd9a24fddec9c11a4066cd2 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Move AccountService to node structureEd Tanous2018-10-081-0/+2
| | | | | | | | | | AccountService was the last service hanging on to the old way of doing things. This moves it up to our current standard using the Node class. Tested by: Ran service validator. Saw no errors. Change-Id: I84d0097f48803cb06d2ec95171f18bff04661666 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Implement Computer System reset actionEd Tanous2018-09-121-0/+1
| | | | | | | | | | | | This commit adds the ComputerSystem.Reset action to the redfish interface. Tested by: Ran compliance tool, and it appeared to pass. Also ran POST on the interface, and observed the system reset. Change-Id: Ie39bf9d1c78fe0688f4fee22b1ecf91268f2242c Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Generalize the "Async Response" patternEd Tanous2018-09-121-0/+19
| | | | | | | | | | Lots of endpoints have been using the AsyncResp structure, and some, like the systems schemas, have created their own. This is the start of a series of patches to move to a more condensed async response object. Tested by: ran GET on systems schema and observed no change to behavior. Change-Id: I4c9afc583be3f75371b31cc76dcc02590ce5e9a7
* Move to clang-format-6.0Ed Tanous2018-09-055-293/+364
| | | | | | | | 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>
* Clang-format cleanupEd Tanous2018-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | It looks like some of the code reviews in progress contain clang-format fixes as well. This squashes all of the clang-format fixes into a single commit, that hopefully can go through the process a little faster, as it should only be whitespace changes. In the past, clang-formatting the naughty strings file proved to return inconsistent results, and even formatted files would still be detected as unformatted. Aparently the solution was to run clang-format-5.0 approximately 20 times in a loop, until it decided on a code layout that it was ok with iteration to iteration. This is a bit of a corner case, so I don't think we need to get CI running multiple runs in the future, and can just handle this on a case by case basis. I'd be surprised if anyone else had this issue. Change-Id: I57e2a03676bce20dc376fd9cea724732b2dc7010 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Fix merge conflictEd Tanous2018-08-091-0/+1
| | | | | | | | | Got a couple patches that collided in air, and now builds are broken. This resolves the collision by moving the new patches forward to the latest #defines Change-Id: I1fe35d17a68c61ad90752ae73000e2579131bf5d Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Move over to upstream c++ styleEd Tanous2018-07-264-38/+38
| | | | | | | | | | | | | | | | | | This patchset moves bmcweb over to the upstream style naming conventions for variables, classes, and functions, as well as imposes the latest clang-format file. This changeset was mostly built automatically by the included .clang-tidy file, which has the ability to autoformat and auto rename variables. At some point in the future I would like to see this in greater use, but for now, we will impose it on bmcweb, and see how it goes. Tested: Code still compiles, and appears to run, although other issues are possible and likely. Change-Id: If422a2e36df924e897736b3feffa89f411d9dac1 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Make doGet implementations optionalEd Tanous2018-07-261-1/+4
| | | | | | | | | There are cases in redfish where one may want to support ONLY a POST/PATCH interface, and not support GET. This patchset provides default behavior for that case. Change-Id: Ibd46c5dda2af543c491c1d6fba3d0adb65699db2 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Remove some critical debug printsEd Tanous2018-07-241-2/+2
| | | | | | | | | These prints are causing a lot of excess logs, and for the current archittecture, the error isn't a concern. This could use some cleanup in the future, but for now, comment out so we get more useful logs. Change-Id: I3113f985745e5c0286e25abbd7ccdef3a3094269 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Introduce ComputerSystem schemaLewanczyk, Dawid2018-06-291-0/+5
| | | | | | | | | | | | | | Initial commit which adds: - ComputerSchemaCollection GET method - ComputerSchema GET, PATCH methods Tested on x86 and aspeed - RSV pass for ComputerSchema - bmcweb interface no regression - smbios interface tested with demo app Change-Id: Ib64084c5888bc511a24f954a6bc062ca920addbe Signed-off-by: Lewanczyk, Dawid <dawid.lewanczyk@intel.com>
* Implemented PATCH for EthernetInterface VLAN and HostName fieldsKowalski, Kamil2018-06-291-0/+13
| | | | | | | | | | | | Implemented PATCH request handling in EthernetInterface schema. Currently only VLAN and HostName patching is implemented - IP changes will be introduced in further patchsets. This code does not change existing functionality - only expands it. Tested on real hardware and x86 VM. Works fine, passes RedfishSchemaValidator. Change-Id: I8de4ee5e859218823b07cc11845f7ef6782d7171 Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
* Added UpdateService to RedfishJennifer Lee2018-06-291-3/+6
| | | | | | | | | | | - Implemented SoftwareInventoryCollection - Implemented SoftwareInventory Currently DBus supports BMC FW version only, so only BMC is listed in the invetory. Change-Id: I28a151b2b1cd98573ec93234717eae5eaf95058c Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
* Boost beastEd Tanous2018-06-292-11/+11
| | | | | | | | This commit is the beginings of attempting to transition away from crow, and toward boost::beast. Unit tests are passing, and implementation appears to be slightly faster than crow. Change-Id: Ic8d946dc7a04f514c67b1098f181eee1ced69171
* Added JSON utilities to allow easy exception-less usage of nlohmann JSON.Kowalski, Kamil2018-06-291-0/+292
| | | | | | | | | These functions are not yet used, but will be required by at least two upcoming patchsets. This functionality has been cut out from Configuration patchset for easier merge without having to wait for that commit. Change-Id: Ibe5d5cefd874d4a2d896b42a2b7cfc17480f3c5a Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
* Introduce Thermal schemaLewanczyk, Dawid2018-05-181-0/+2
| | | | | | | | | | | | | | | | | | | Changes: -redfish.hpp add thermal node installation -thermal.hpp add thermal schema for chassis -sensor.hpp add support for retrieving: temperature, and fan Verification: -web server: no regression -RSV: pass -build on x86 and ASPEED This patchset builds on Dawids original. Change-Id: Ia8e40edff3c722fa02a161248bcdf602e36e3e62 Signed-off-by: Lewanczyk, Dawid <dawid.lewanczyk@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Introduce Redfish Error messages definitionsKowalski, Kamil2018-04-221-0/+641
| | | | | | | | | | | | | | | | | Added a python script that should be use to generate error_messages.cpp na .hpp files. These files as are not subject to change in a dynamic manner, should be regenerated only when MessageRegistry changes. Tested on x86 Ubuntu VM and Wolfpass platform: a) No regression in BMCWeb interface - Went through WebUI observed no changes in functionality b) No regression in Redfish functionality - Went through nodes and observed no changes in functionality - Sessions now return error messages in addition to HTTP codes Change-Id: I4aba9ee247b6cd2c46a9c158d14bdc7546e9b11b Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Enabling Ethernet Interfaces, and Ethernet Interfaces Collection SchemasRapkiewicz, Pawel2018-04-222-1/+4
| | | | | | | | | | | | | | | | | | | Commit provides Schemas for: * Single Eth Interface (GET) * Eth Interface Collection (GET) Both are using EthernetProvider, which delivers data available from xyz.openbmc_project.Network It was tested: * Regression (no regression in web server behaviour) * Memory Leaks (no leaks detected via valgrind) * Compiling multiple arch (x86, ASPEED) * Service Validator pass all available schemas Change-Id: Idee321cb294f48b59f7740512bbe416cf10236c0 Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Adding Chassis and ChassisCollection Schemas to RedfishRapkiewicz, Pawel2018-04-221-0/+3
| | | | | | | | | | | | | | | | | This commit: * removes previous redfish_v1 Chassis implementation * Adds Chassis and ChassisCollection implementation as Node way * Adds Chassis Provider class for retrieving data from EntityManager It was tested: * Wolfpass run, to see if previous functionality was not broken * Service Validator, which did not unveil any regression, and did verified that implemented schemas are complient. Change-Id: I75a9545a0abd8b85d6ce72329c523fc076affc28 Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com> Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com>
* Make getUrl not copyEd Tanous2018-04-201-15/+24
| | | | | | | | | Make get url return a const std::string* instead of a copy. Also, make the getSubroutes function modify strings in place rather than construct new strings where possible Change-Id: I68d8053a62abd8d907ecb6717e0f266eee4d09a8 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Merge OEM and Base privileges bitsets into a single bitsetEd Tanous2018-04-111-59/+31
| | | | | | | | | | | | | | This saves memory overall, and should lead to fewer runtime branches, and more inlining of functions overall. getPrivilegeIndex is now removed, as it is embedded into getActivePrivilegeNames. oemPrivilegeBitset and basePrivilegeBitset are now merged into a single privilegeBitset field TestedBy: Running relevant unit tests, which pass, and verifying login still functions Change-Id: Iaa4189b37f39cf65fa95b72b95ed92d8826cab0d Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Make a few changes to privileges commitEd Tanous2018-03-272-198/+114
| | | | | | | | | | | | | | | | | | | | | | 1. Create char* overloads for the things that need it. 2. Fix up a couple errant moves 3. Use the gtest APIs for testing container membership, rather than sort 4. Move the index management to vector rather than map to avoid a lookup 5. Remove errant use of .at() 6. Move privilege comparison into the privilege class, in order to keep the bitset implementation private. This removes the requirment on the forward declaration of PrivilegeProvider, and the use of friend class 7. Remove unimplemented override strcutures. Feel free to add them back once implemented 8. Make setSignlePrivilege return a code if the set failed 9. Remove the need for an extra construction of a blank privileges object for things that require no privileges. Tested by: updating unit tests with the appropriate APIs. Relevant unit tests pass Change-Id: Ie9cde003b6c865979b4cac086379d0a3473896ce Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Redfish Manager and ManagerCollectionBorawski.Lukasz2018-03-271-0/+2
| | | | | | | Node version of the Manager and ManagerCollection implementation. Change-Id: I693fa57add670fb0ecfc0cf0046e06142571c543 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Redfish SessionServiceBorawski.Lukasz2018-03-271-0/+1
| | | | | | | | | - added node version of the SessionService implementation - added a default timeout member and a get timeout method to the SessionStore class Change-Id: I532080789b3d687208510f8b748402735ed888d8 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Redfish NetworkProtocolBorawski.Lukasz2018-03-271-0/+2
| | | | | | | Node version of the NetworkProtocol implementation. Change-Id: I6f52dca4e530917a5b815a32f1222b481059aa23 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Improved Refish subroutesBorawski.Lukasz2018-03-272-23/+52
| | | | | | | | | | - getSubroutes() is now a method of the Node class - getSubroutes() is called only once per node at construction time, not at each GET request - template parameter removed from the Node class Change-Id: Ie4eb8766717aae566c13c295458fe0dba8ab84c0 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Privilege implementation changeBorawski.Lukasz2018-03-273-87/+159
| | | | | | | | | | - privilege_registry.json has been removed - PrivilegeProvider class has been removed - default privileges for nodes are now hard-coded - privilege overriding feature is not yet implemented Change-Id: Ic9fdfa1c692c1abd26e339e2a8c702fc4aebd19f Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* AccountServiceLewanczyk, Dawid2018-03-271-0/+3
| | | | | | | Initial version moved to separate node. Change-Id: I3fe4e2eb00bcb754ea81de0a0656f4de9eb9156c Signed-off-by: Lewanczyk, Dawid <dawid.lewanczyk@intel.com>
* Redfish privilegesBorawski.Lukasz2018-03-273-60/+237
| | | | | | | | | | | | Redfish privilege authorization subsystem controlled by the privilege_registy.json configuration file. PropertyOverrides, SubordinateOverrides and ResourceURIOverrides are not yet implemented. Change-Id: I4d5670d557f4da172460ada3512e015830dab667 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* RolesLewanczyk, Dawid2018-03-061-5/+9
| | | | | | | | Move roles and roles collection to new class based implementation Change-Id: I70f39bf8289fb45483a1e7f2c4eb3dbc1c7a7090 Signed-off-by: Lewanczyk, Dawid <dawid.lewanczyk@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Session and SessionCollectionKowalski, Kamil2018-02-051-0/+4
| | | | | | | | | | | New Redfish-Core nodes added (removed from redfish_v1.hpp) - Session and SessionCollection. Tested manually on x86 VM and Wolfpass Platform. Behavior almost identical to what was before - differences: - SessionCollection - now only returns TIMEOUT presistence sessions, not SINGLE - Aquiring sessions from session storage now applies timeouts Change-Id: I68bf4fa7fa1c8371216a7d4daa30bbfb653cfa72 Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
* Service RootBorawski.Lukasz2018-01-243-4/+65
| | | | | Change-Id: Ibf9d463802d77014852a92ecfcb8096324f3670f Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Node abstraction layerBorawski.Lukasz2018-01-232-0/+181
Change-Id: I3cbad5b566cd005d33a9fbd18ff4e6669dae3a31 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
OpenPOWER on IntegriCloud