summaryrefslogtreecommitdiffstats
path: root/redfish-core
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement AccountService DELETE methodEd Tanous2018-10-081-0/+34
| | | | | | | | | | | | This commit implements the AccountService DELETE method within redfish. It accesses the user manager interfaces as required. Tested by: Created a user using the dbus interface, then removed it using a DELETE command. Observed user was deleted from both dbus and redfish. Change-Id: I5ba639837a643731fcf180410a92011a08d968c7 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Unhardcode Enabled and Locked from AccountServiceEd Tanous2018-10-081-1/+41
| | | | | | | | | | | | AccountService previously hardcoded accounts to Enabled, and not locked. This patchset makes them pull from phsophor-network manager correctly. Tested By: Pulled AccountService with a collection of enabled and disabled accounts, and observed correct behavior. Change-Id: I0b122ba42b3c63acabe46caf56f843cfe02cf9e5 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Implement AccountService PATCH methodEd Tanous2018-10-081-0/+128
| | | | | | | | This patchset implements the AccountService PATCH method, using PAM and dbus in combination. Change-Id: I754590f787fc84a21a9453e7e10726c56da5c3f7 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Move AccountService to node structureEd Tanous2018-10-082-1/+165
| | | | | | | | | | 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>
* remove providers interface from chassis schemaEd Tanous2018-09-261-115/+56
| | | | | | | | This commit removes the providers interface from the chassis schema, and cleans up quite a bit of code. Change-Id: I8984af67c9f15834ce59951c5e8f3b0d5c26697c Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Implement JsonSchema endpointEd Tanous2018-09-171-0/+1
| | | | | | | | | | This patchset implements JsonSchema support, and automates our update of the XML metadata, and Json schema files in the future by way of a python script. Change-Id: Iec6f580d10736678149db18d87be2f140b535be9 Signed-off-by: Ed Tanous <ed.tanous@intel.com> Signed-off-by: James Feist <james.feist@linux.intel.com>
* Implement Computer System reset actionEd Tanous2018-09-122-2/+148
| | | | | | | | | | | | 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>
* Modernization of systemsEd Tanous2018-09-121-190/+168
| | | | | | | | | | | | This moves systems schemas over to modern useages: 1. Remove the use of wildcard lambda captures [&] 2. Correctly handle the case where we are given a PATCH with parameters we don't support. 3. Move some functions that are no longer required, and are done more cleanly inside the specific handlers. Change-Id: Iab4a360e6b675e4f792b49c8cb2df9a3e7f68cbb Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Remove the providers interface from systemsEd Tanous2018-09-121-544/+490
| | | | | | | | | | | | | The providers class is entirely static, and has no real purpose at this point in time. This commit removes it so we don't copy the pattern in other places. Tested By: Ran a subset of gets and patches to the computer system schema, observed the same behavior. Change-Id: Ia9e49aee6bd944aeadb2536de38a905b25047d9e Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Generalize the "Async Response" patternEd Tanous2018-09-122-119/+109
| | | | | | | | | | 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-0520-5010/+6097
| | | | | | | | 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>
* Last round of variable renamesEd Tanous2018-08-153-19/+18
| | | | | | | | A few patches were in flight when we did the great variable renaming. This catches all the patches that have been merged since Change-Id: Ie9642a4812b2a679ffa01ce540f5c4515a4c710b Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Cleanups to update service schemaEd Tanous2018-08-151-224/+137
| | | | | | | | This commit moves update service to a number of better practices, and avoids a few copies along the way. Change-Id: I3cea25a8f804b8e1109a1e5bb8becf69a4b77e71 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Cleanups to network protocolEd Tanous2018-08-151-103/+69
| | | | | | | | | | 1. remove providers interface 2. Move the static structures to globals, and make them const char* to avoid construction on startup. 3. Explicitly capture all variables Change-Id: I4a79d6f94e38c1a0ea0002b584c30ca02f5a930f Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Refactor Manager Network Protocol to use D-BusKowalski, Kamil2018-08-151-37/+157
| | | | | | | | | | | | | | ManagerNetworkProtocol schema now operates on data fetched from D-Bus instead of netstat. This also prepares it for PATCH implementation that will allow services ports & state manipulation. Does not break other components. ManagerNetworkProtocol however will display only services available on D-Bus. Tested on platform and x86 machine. Change-Id: Id693dfbdd870801feb06d08833a261bdbb4285e6 Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Implement POST for redfish UpdateServiceJennifer Lee2018-08-151-92/+269
| | | | | | | | | | | | - POST an image file to /redfish/v1/UpdateServer uri will upload the image and activate it - Modified SoftwareInventoryCollection to list items with xyz.openbmc_project.Software.Activation/Activation property as "xyz.openbmc_project.Software.Activation.Activations.Active" - SoftwareInventory odata.id is identified with DBus generated uuid Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com> Change-Id: I48c3e6d868d1c27420cab5a706e4205f06713923
* Implement Location header for session authEd Tanous2018-08-131-0/+3
| | | | | | | | | | | | | | | | | | | | From the redfish specification 1.5.0, page 98: """ The response to the POST request to create a session shall include the following: ... A Location header that contains a hyperlink to the newly created session resource """ This implements the location header properly, per specification. Tested by: Attempting POST on the Sessions resource, and observing a "Location" header be set. Change-Id: Ia62c385bedf67e6267d573771b04a211ba332f21 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Clang-format cleanupEd Tanous2018-08-133-158/+158
| | | | | | | | | | | | | | | | | | | | | | 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-095-209/+205
| | | | | | | | | 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>
* Fix crash issue with Managers schemaEd Tanous2018-08-061-4/+1
| | | | | | | | | | | | | | The bmc was initing two copies of the managers route, which was causing the route handler to crash at startup. Remove the extra one. Jul 26 20:39:50 wolfpass systemd[1]: Started Start bmcweb server. Jul 26 20:39:50 wolfpass bmcweb[3279]: terminate called after throwing an instance of 'std::runtime_error' Jul 26 20:39:50 wolfpass bmcweb[3279]: what(): handler already exists for /redfish/v1/Managers/openbmc Change-Id: Id2c469b5e82bddc68987f89f0eff23072b16854c Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Move over to upstream c++ styleEd Tanous2018-07-2620-699/+704
| | | | | | | | | | | | | | | | | | 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>
* Reimplement UUID based on systemd UUIDEd Tanous2018-07-261-10/+32
| | | | | | | ...rather than a randomly generated one Change-Id: I85493ac29d21f5fa9f347edc21129901f9d0d911 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>
* Make Ethernet/VLAN Interfaces handle "404 Not Found" properlyKowalski, Kamil2018-07-261-6/+134
| | | | | | | | | | | | | | Ethernet and VLAN Interfaces lacked detection whether interface actually existed. So this detection had to be added. Additionally there was slight inconsistency with error messages and statuses, this is fixed now. Tested on x86 development machine and dedicated platform. Does not introduce any regression. Change-Id: Ic9e2a98c748ac0dd1cf412b6a54a14f3f53eb9fa Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Make SessionStore a proper singletonBorawski.Lukasz2018-07-255-24/+21
| | | | | | | | | | | | | | | - SessionStore class now has a proper singleton structure - session_storage_singleton.hpp is removed - from_json(..) function for SessionStore is changed to a specialized template - minor cosmetic fixes added - Move the template class usages of Crow App over to a non-template parameter Change-Id: Ic9effd5b7bac089a84c80a0caa97bd46d4984416 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Implement VlanNetworkInterface and VlanNetworkInterfaceCollection SchemaKowalski, Kamil2018-07-241-126/+23
| | | | | | | | | | Implemented GET for both schemas and POST in collection for VLAN creation. PATCH and DELETE for interface schema will be introduced later. Does not introduce regression. Tested on HW platform and x86 dev system. Change-Id: If7b11c42a9382030ab1f0712422e310f192055ca Signed-off-by: Kowalski, Kamil <kamil.kowalski@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>
* Move Sensors path to sensorsJames Feist2018-07-202-6/+6
| | | | | | | Upstream uses lowercase paths, fix it. Change-Id: Ia8dc522fdd59cbbde015049ca772347fb9d2c991 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Update sensors to reflect changes after switching to sdbusplusLewanczyk, Dawid2018-06-293-16/+34
| | | | | | | | - GetManagedObjects should be call only on service root path - additional fixes for RSV Change-Id: I4e345e57b081d7683fd8f3f4efa23fe4091ce41e Signed-off-by: Lewanczyk, Dawid <dawid.lewanczyk@intel.com>
* Fix for empty string in IPv4 PATCH.Kowalski, Kamil2018-06-291-2/+6
| | | | | | | | Unfortunately current implementation handles empty string as 0, so format verification is OK, but IPs like XXX...XXX should not be accepted. Change-Id: Ibdc526a7118bffdc6a028343a32711d1ad6e2d62 Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
* Introduce ComputerSystem schemaLewanczyk, Dawid2018-06-293-1/+691
| | | | | | | | | | | | | | 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>
* Fixed the Software Inventory schema Object Mapper callsJennifer Lee2018-06-291-128/+145
| | | | | Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com> Change-Id: I41c374ba0a37bf8ff17577dbef17a6d952315a1b
* Implement VlanNetworkInterface Schema DELETE and PATCH methodsKowalski, Kamil2018-06-291-71/+478
| | | | | | | Does not introduce regression. Tested on HW platform and x86 dev system. Change-Id: I1e8894367e664de4900f7a528d1ce8ee4d66ac1c Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
* Pull in nlohmann json as a dependency rather than checking in.Ed Tanous2018-06-291-5/+7
| | | | | | | | This should allow keeping closer to the upstream yocto recipes, and avoid excess code in the repo Change-Id: Ib66f7cf69b68bb23f9789580beadf8344cb68cfa Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Implemented PATCH for EthernetInterface IPv4Addresses arrayKowalski, Kamil2018-06-291-65/+600
| | | | | | | | | | | Implemented PATCH request handling in EthernetInterface schema. Allows creation, modification and deletion of IPv4Addresses according to DMTF's Redfish specification. This code does not change existing functionality - only expands it. Tested on real hardware and x86 VM. Works fine, passes RedfishSchemaValidator. Change-Id: Iff485b969e87d51b65a63c84a9199d44189131d0 Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
* Implemented PATCH for EthernetInterface VLAN and HostName fieldsKowalski, Kamil2018-06-294-155/+475
| | | | | | | | | | | | 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-292-3/+295
| | | | | | | | | | | - 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-2914-234/+240
| | | | | | | | 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-292-0/+746
| | | | | | | | | 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>
* Move thermal interfaces to new schemaEd Tanous2018-06-293-124/+112
| | | | | | | | With the change to entity manager, move the thermal componets to the proper inventory manager interfaces Change-Id: I520e65b1df53ca8d3fbc12253882ae69b708bbbf Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Move bmcweb over to sdbusplusEd Tanous2018-06-294-67/+75
| | | | | | | | | | | | | | | | | | | | | | | | This patchset moves bmcweb from using boost-dbus over entirely to sdbusplus. This has some nice improvements in performance (about 30% of CPU cycles saved in dbus transactions), as well as makes this project manuver closer to the upstream way of thinking. Changes to bmcweb are largely ceremonial, and fall into a few categories: 1. Moves async_method_call instances to the new format, and deletes any use of the "endpoint" object in leiu of the sdbusplus style interface 2. sdbus object_path object doesn't allow access to the string directly, so code that uses it moves to explicit casts. 3. The mapbox variant, while attempting to recreate boost::variant, misses a T* get<T*>() method implementation, which allows using variant without exceptions. Currently, there is an overload for mapbox::get_ptr implementation which replecates the functionality. Tested by: Booting the bmcweb on a target, iterating through redfish basic phosphor-webui usage, and websockets usage Change-Id: I2d95882908d6eb6dba00b9219a221dd96449ca7b Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Spelling fixes in redfish-coreGunnar Mills2018-06-133-12/+12
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: Iaac459596247a9063350a129d0458ebe0c0e39ce Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Introduce Thermal schemaLewanczyk, Dawid2018-05-184-0/+488
| | | | | | | | | | | | | | | | | | | 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-227-13/+2901
| | | | | | | | | | | | | | | | | 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>
* Added VLAN Object to EthernetInterface schemaKowalski, Kamil2018-04-221-1/+15
| | | | | | | | | | VLAN object added to EthernetInterface schema which is visible when Ethernet Interface is a VLAN interface. Does not break anything on Wolfpass or x86. BMCWeb working Change-Id: I965c484e6e120568db4e6542d2b48f8a7fb54fd0 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-224-1/+509
| | | | | | | | | | | | | | | | | | | 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>
* Minor fixes to make redfish pass compliance testsEd Tanous2018-04-225-16/+12
| | | | | | | | | | | | 1. Role members needs to be an array, not an object 2. Fix accounts schema to use the new user manager 3. Remove "status" field hardcodes 4. Hardcode chassisType to rackmount for now 5. Work around bug in get sub routes 6. Add ID to SessionService Schema Change-Id: Ibb13d6ace747ac028e840638868c3a01d65dedfa Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Adding Chassis and ChassisCollection Schemas to RedfishRapkiewicz, Pawel2018-04-222-0/+281
| | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud