Skip to content
  1. Oct 02, 2020
    • Manojkiran Eda's avatar
      Enable Meson Build System & remove cmake support · af6298da
      Manojkiran Eda authored and Ed Tanous's avatar Ed Tanous committed
      - This commit enables the support for meson build system for
        bmcweb and also remove the cmake support
      
      - The inital thought of migrating to meson build system was based
        on [link](https://mesonbuild.com/Simple-comparison.html)
      
      - Other things to praise about meson are its simplicity and userfriendly ness.
        It also have native support for modern tools such as precompiled headers,
        coverage, Valgrind , unity builds e.t.c
      
      - This commit also support the automatic download and setup of dependencies
        if they are not found in usual places using meson wraps that are already
        available in [wrap db](https://wrapdb.mesonbuild.com/)
      
      - For few dependencies like boost, boost-url which does not have meson
        wrap support yet, i have misused the meson subproject command to download
        boost & boot-url and build against them if they are not found in usual
        places.
      
      - For boost & boost-url the subproject command will always fail as meson
        supports other meson projects as subprojects but it will always download
        the source, and since we dont actually build boost/boost-url but just use
        the the source headers this should not be a problem.
      
      - Cmake options removed:
      
         - BUILD_STATIC_LIBS has been removed as it is not being used any where as per the
           review comments.
      
      -  By default the meson wraps are enabled and it downloads the dependencies if they
         are not found, and via bitbake this behaviour is disabled by default as download
         fallback feature is disabled.
      
      - This commit also adds the README, changes for bmcweb as well.
      
      - The meta-* layer changes are also pushed and marked as WIP under bmcweb_meson_port
        topic.
      
      Tested By :
      ===========
      1. Compilation is passed without error or warning in both arm & x86 sdks that
         are populated by yocto.
      2. The unittests are also passed on both x86 & arm machines.
      3. Compilation passed with various build types supported by meson (debug,debugoptimized,
         relase)
      4. modified the meta-phosphor & meta-ibm to leverage meson build for bmcweb, and loaded
         the resulted image on qemu & real machine, checked the bmcweb status and was also able
         to pull the web-gui on both.
      5. Tested few common commands related to session service & network service manually on a
         real machine and also also had run a CT regression bucket, and it looked clean.
      
      The binary sizes when bmcweb is compiled via bitbake(using meta-ibm) are :
      cmake: 3100080 bytes approx (3 MB)
      meson: 2822596 bytes approx (2.7 MB)
      
      1:1 equivalent hash is not possible due to couple of things:
      1. The build types in meson does not have a 1:1 mapping with cmake build types.
      2. Meson adds below mentioned compiler & linker flags than cmake as a part of
         warning_level & build types
      
      CXXFLAGS :' -O2 -pipe -g -feliminate-unused-debug-types -fdiagnostics-color=always
                  -D_FILE_OFFSET_BITS=64 -Winvalid-pch -DNDEBUG'
      LDFLAGS : ' -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--no-undefined,-Wl,--end-group'
      
      Tried to match the compile commands in both cmake & meson as much as possible and this
      is what i could get.I have attached the compile_commands.json for both duing an yocto
      full build in the [link](https://gofile.io/d/gM80fw
      
      ) for reference.
      
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      Change-Id: Ia65689fdacb8c398dd0a019258369b2442fad2f3
      af6298da
    • Ed Tanous's avatar
      Remove redundant void from error messages · 65176d39
      Ed Tanous authored
      
      
      It's not neeeded.
      
      Tested:
      Code compiles.  No functional changes.
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: I21588b8ca2bab4ddb65d9c6d910ba26db83c323b
      65176d39
    • Ed Tanous's avatar
      Fix bad log statement · 7cd94e46
      Ed Tanous authored
      
      
      Someone needs to double check me here, but I suspect this was not doing
      what the author intended with the sizeof call, considering it's no a C
      array.
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: I603b72837e24be0eca6337d0703dc56c47dba1d3
      7cd94e46
  2. Oct 01, 2020
    • Ed Tanous's avatar
      Remove redundant void in task · d609fd6e
      Ed Tanous authored
      
      
      It is not required.  Also, move the deleted destructor to a public
      member where it should be.
      
      Tested:
      Code builds.  No functional changes.
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: I4b04ee0870e908fb8204d91e2cd8505518272c7a
      d609fd6e
    • Ed Tanous's avatar
      Remove socket() call from Request · 0f8472a7
      Ed Tanous authored
      
      
      The socket() call in the request object is a pretty bad architecture
      break.  Requests should have no knowledge of the underlying socket.  It
      is currently not used.
      
      Tested:
      Code compiles
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: I1f72667857c377df370e3238a81d6c46fba1e8f5
      0f8472a7
  3. Sep 29, 2020
    • Ed Tanous's avatar
      modernize ibm management console · 4e08751b
      Ed Tanous authored
      There was some modernization problems in the IBM console.  These are all
      minor, and unlikely to cause problems.  The issues were:
      1. Trivial destructors need to use the = default syntax
      2. Several loops can be simplified into range based for loops
      3. push_back should not be paired with make_pair.  emplace_back should
      be used instead.
      
      Change-Id: I71b1d5437249d896a6f95c211e176deb676f985d
      4e08751b
    • Ed Tanous's avatar
      Remove Server header from responses · e7d1a1cf
      Ed Tanous authored
      
      
      The HTTP Server header allows potential attackers to fingerprint the BMC
      much easier than they could otherwise, as the bmc essentially reports
      its name to requests.
      
      From section 7.4.2 of RFC7231:
      "An origin server MAY generate a Server field in its responses."
      
      This patchset moves bmcwebs position that it will not publish the server
      field, as it does not contain useful data for the client.
      
      It should be noted, it looks like OpenSSL was using the server name for
      its connection ID.  It's not clear this is correct, or desired, but I've
      inlined the old value (to avoid changing behavior).  Also, it was
      missing a return code check, so I added it.
      
      Tested:
      Will verify in the webui (TBD)
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: Ieee6f15d8299e76517952514ff196008a563b63c
      e7d1a1cf
    • Ed Tanous's avatar
      Fix naming conventions · 2c70f800
      Ed Tanous authored
      
      
      Lots of code has been checked in that doesn't match the naming
      conventions.  Lets fix that.
      
      Tested:
      Code compiles.  Variable/function renames only.
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: I6bd107811d0b724f1fad990016113cdf035b604b
      2c70f800
  4. Sep 28, 2020
  5. Sep 27, 2020
  6. Sep 25, 2020
  7. Sep 24, 2020
    • Asmitha Karunanithi's avatar
      Move to 2020.3 · c8ccb774
      Asmitha Karunanithi authored
      Run the script update_schemas.py by pointing it to 2020.3
      
      An overview of 2020.3 release can be found at:
      https://www.dmtf.org/sites/default/files/Redfish_Release_2020.3_Overview.pdf
      
      
      
      Tested: Loaded on a Witherspoon and Validator passed with the latest schemas
      
      Signed-off-by: default avatarAsmitha Karunanithi <asmitk01@in.ibm.com>
      Change-Id: I6c7a2e0cbdbe599930ba453a1d8c134c22136306
      c8ccb774
    • Wludzik, Jozef's avatar
      Response with internal error on invalid Chassis path · 4841191f
      Wludzik, Jozef authored
      
      
      Added verification of chassis path in case if received path is
      invalid. Response with internal error on wrong format of a path.
      
      Tested:
       - Verify if chassis collection is filled properly
       - Verify if internal error is returned on wrong path
       - RedfishServiceValidator.py passes
      
      Signed-off-by: default avatarWludzik, Jozef <jozef.wludzik@intel.com>
      Change-Id: Ibe2b9a12d0a5c2c05c9db502b65d2196851352b5
      4841191f
    • Ed Tanous's avatar
      Improve JSON->HTML conversion · 57fce80e
      Ed Tanous authored and Ed Tanous's avatar Ed Tanous committed
      
      
      The existing JSON to html conversion is quite unfortunate, as it runs
      several very expensive regular expressions on an output to properly
      invoke the correct behavior, and to escape things like links.  This
      patchset adjusts the behavior to directly dump the tree to HTML,
      skipping the json step entirely.
      
      Most of the code was pulled from the nlohmann::serializer class.
      
      Small side node:
      This also resolves the CSP issue with the inline CSS classes that are
      currently embedded in the json UI.
      
      Note, in terms of user facing behavior, this finally fixes the CSS
      issue, so the div is now centered as designed.  Previously it was left
      justified.
      
      Tested:
      Ran several redfish schemas and compared to old ones.  Output appears
      the same in the window, and content security policy warnings are gone.
      Verified several links works as expected, and verified the behavior of
      all base types, as well as empty arrays and empty objects.  All appear
      to work correctly.
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: Id9bf6dc33acb1603f009de4cd322e81d83f334be
      57fce80e
  8. Sep 23, 2020
  9. Sep 22, 2020
    • Ed Tanous's avatar
      Fix IBM management console to match coding standard · 02379d35
      Ed Tanous authored
      
      
      Lots of missing inline definitions, a case where a RVO move is not
      guaranteed when returning a variant, and removing the header checks,
      which means that these types of build errors wont happen in the future.
      
      Tested:
      Should be no impact, but could someone from the IBM team grab these
      changes and sanity check them?
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: Iea0a06b8e744542a7d08e38217718e7a969f2827
      02379d35
  10. Sep 21, 2020
    • Jason M. Bills's avatar
      Update error_messages to Base 1.8.1 · 684bb4b8
      Jason M. Bills authored
      
      
      The Base message registry has updated to 1.8.1.  This updates our
      error_messages files to match.
      
      This changes from the deprecated 'Severity' to the new
      'MessageSeverity' property.
      
      It also adds a script to compare our error_messages.cpp messages
      against the Base message registry and flag any differences.
      
      Tested:
      Ran the Redfish Validator and confirmed that this change does
      not introduce any new failures.
      
      Change-Id: I2e5101a5b4d0c0963569493451f99521e42b0f4d
      Signed-off-by: default avatarJason M. Bills <jason.m.bills@linux.intel.com>
      684bb4b8
  11. Sep 19, 2020
    • Ed Tanous's avatar
      Add Ed back as a maintainer · 1eb779d1
      Ed Tanous authored
      
      
      I seem to be doing more and more architectural work these days on
      bmcweb, so I might as well make it slightly more official by editing
      this powerful text file.  I really would've prefered pulling a sword
      from a stone, or been given a 2 factor encryption key by the lady of the
      lake, but as monty python says "strange women lying in ponds
      distributing swords is no basis for a system of government. Supreme
      executive power derives from a mandate from the masses, not from some
      farcical aquatic ceremony."
      
      As such, I submit this to the masses for approval.
      
      Change-Id: Ie9767c58980855bf63ef94524553c08fcc202980
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      1eb779d1
  12. Sep 17, 2020
    • Ed Tanous's avatar
      Fix using namespace · 23e64207
      Ed Tanous authored
      
      
      We inherited a "using namespace" crow.  Lets fix it.
      
      Tested:
      Code compiles.  No functional changes.
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: Id47446150dfb312c5cd84a4b4284fb824eba8021
      23e64207
  13. Sep 16, 2020
  14. Sep 11, 2020
    • Ed Tanous's avatar
      Add missing inline · 1536473f
      Ed Tanous authored
      
      
      Tested:
      Code compiles in clang
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: Ib7377d05441328197e1de59fabc0ca9bfa0b703b
      1536473f
    • Ed Tanous's avatar
      Remove tick timer · b74e4405
      Ed Tanous authored
      
      
      External tick timers were never something we used, so they're
      effectively dead code, even if they do still execute.
      
      Remove them.
      
      Tested:
      Loaded bmcweb on a system, and pulled down webui-vue.
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: I65bbc24d59cfa45adeb013055a2eab2eeb26ad3d
      b74e4405
  15. Sep 10, 2020
    • Zhikui Ren's avatar
      fix processor summary · 9cf21522
      Zhikui Ren authored
      update processor summary to use cpu property correctly.
      
      Tested:
      1. Verified redfish validator passed
      2. Get cpu details from Redfish
      GET: https://<BMC-IP
      
      >/redfish/v1/Systems/system/Processors
      {
          "@odata.id": "/redfish/v1/Systems/system/Processors/",
          "@odata.type": "#ProcessorCollection.ProcessorCollection",
          "Members": [
              {
                  "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0"
              }
          ],
          "Members@odata.count": 1,
          "Name": "Processor Collection"
      }
      
      Signed-off-by: default avatarZhikui Ren <zhikui.ren@intel.com>
      Change-Id: I1f36118cdc80aabf05f2d678afc6ffc329d07872
      9cf21522
    • Xiaochao Ma's avatar
      Fix the snmp parameter in NetworkProtocol · 7c486a18
      Xiaochao Ma authored
      
      
      This should be the configuration information of snmpagent. Now
      we have "snmp trap" functionality in openbmc,we don't have SNMP
      agent functionality. So the parameters belonging to the agent
      such as port are removed here.
      
      Signed-off-by: default avatarXiaochao Ma <maxiaochao@inspur.com>
      Change-Id: I2d684b63d79ac1dc00bce0d2e0bd48e5a315f258
      7c486a18
  16. Sep 09, 2020
    • Manojkiran Eda's avatar
      Suppress : Stringop Overflow warning during build time · ac29323d
      Manojkiran Eda authored
      
      
      - gcc complains about the following warning during a build
        and as -Werror is enforced, it is treated as an error which
        is resulting in a build failure.
      
      - error: ‘strncpy’ specified bound depends on the length of
        the source argument [-Werror=stringop-overflow=]
      
      - There are couple of workarounds that were discussed in this
        commit, but at the moment we thought the best option to move
        forward is to suppress the warning until we know a concrete
        solution for this problem. Once we fix it , we can enforce the
        warning again.
      
      Tested By:
      - bmcweb compiled without any warning or error.
      
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      Change-Id: I36c595ab610523c8d50833cab0fdd20c509a8a2a
      ac29323d
    • Wludzik, Jozef's avatar
      EventService: Fix type mismatch in MetricReport · 93f5d7c7
      Wludzik, Jozef authored
      
      
      Fix the type mismatch in MetricReport data which
      is sent to Event Subscribers. Change below properties
      type to match with MetricReport schema.
       - Timestamp: It should be uint32_t type.
       - MetricValue: It should be string type.
       
       Tested:
        - Create MetricReport subscription and report contains
          correct data types for Timestamp and MetricValue.
      
      Signed-off-by: default avatarWludzik, Jozef <jozef.wludzik@intel.com>
      Signed-off-by: default avatarAppaRao Puli <apparao.puli@linux.intel.com>
      Change-Id: I0a52b6963e7bedda89a216256f64764cd8799bf1
      93f5d7c7
    • AppaRao Puli's avatar
      Add MutualExclusiveProperties registry · dd28ba82
      AppaRao Puli authored
      
      
      Add MutualExclusiveProperties message registry entry
      and error message.
      As per redfish specification, "RegistryPrefixes" and
      "MessageIds" are mutually exclusive. So add check for
      same in EventService and return MutualExclusiveProperties
      error message.
      
      Tested:
       - Create subscription failed with error(bad request)
         when the request body contain both "RegistryPrefixes"
         and "MessageIds".
      
      Change-Id: I4c14f946977bce2ced8a7f96eb85855117fde9a8
      Signed-off-by: default avatarAppaRao Puli <apparao.puli@linux.intel.com>
      dd28ba82
  17. Sep 08, 2020
    • Zhikui Ren's avatar
      update cpu information to cpu interface · 029cc1f4
      Zhikui Ren authored
      update cpu summary and cpu information to
      cpu interface.
      https://github.com/openbmc/phosphor-dbus-interfaces/commit/259f49e0c40b287d9ea79f77db1654da47161340
      
      Tested:
      1. Verified redfish validator passed
      *** /redfish/v1/Systems/system/Processors/cpu0
      INFO -   Type (#Processor.v1_9_0.Processor), GET SUCCESS (time: 1.091324)
      INFO -   PASS
      INFO -
      *** /redfish/v1/Systems/system/Processors/cpu1
      INFO -   Type (#Processor.v1_9_0.Processor), GET SUCCESS (time: 0.993352)
      INFO -   PASS
      INFO -
      
      2. Get cpu details from Redfish
      GET: https://<BMC-IP>/redfish/v1/Systems/system/Processors/cpu0
      Response:
      {
          "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0",
          "@odata.type": "#Processor.v1_7_0.Processor",
          "Id": "cpu0",
          "InstructionSet": "x86-64",
          "Manufacturer": "Intel(R) Corporation",
          "MaxSpeedMHz": 4000,
          "Model": "QUZS",
          "Name": "Processor",
          "ProcessorArchitecture": "x86",
          "ProcessorId": {
              "EffectiveFamily": "Intel Xeon processor",
              "IdentificationRegisters": "13829424153406867109"
          },
          "ProcessorType": "CPU",
          "SerialNumber": "6122cca2e8a2d5c",
          "Socket": "CPU0",
          "Status": {
              "Health": "OK",
              "HealthRollup": "OK",
              "State": "Enabled"
          },
          "TotalCores": 32,
          "TotalThreads": 64,
          "Type": "Central Processor",
          "Version": "Genuine Intel(R) CPU $0000%@"
      }
      GET: https://<BMC-IP
      
      >/redfish/v1/Systems/system/Processors/cpu1
      {
          "@odata.id": "/redfish/v1/Systems/system/Processors/cpu1",
          "@odata.type": "#Processor.v1_9_0.Processor",
          "Id": "cpu1",
          "Manufacturer": "CPU1",
          "Name": "Processor",
          "ProcessorType": "CPU",
          "Status": {
              "Health": "OK",
              "HealthRollup": "OK",
              "State": "Absent"
          },
          "Version": "CPU1"
      }
      
      Signed-off-by: default avatarZhikui Ren <zhikui.ren@intel.com>
      Change-Id: I06424c9adb1922ae70e0936c7cb33efcf522c100
      029cc1f4
    • Igor Kononenko's avatar
      bmcweb: cmake: add advanced logs build option · 3d2b2c0b
      Igor Kononenko authored
      
      
      Add cmake option to enable output of extended debug logs, separate from
      DEBUG build.
      
      Time to time when testing `bmcweb` it is required to output logs with
      extended debug information.
      Cmake currently allows this option to be enabled with build of the debug
      symbols.
      Sometimes this behavior will be overhad and this is unwanted to be extra
      size of `bmcweb` binary (and disabling the code optimization).
      
      With add of the `BMCWEB_ENABLE_LOGGING` option, the bmcweb allows to
      separate the extended logging from the debug build type.
      
      End-user-impact: None
      
      Change-Id: I0d42c8373aa6f343117b68390172dce2f0db64a0
      Signed-off-by: default avatarIgor Kononenko <i.kononenko@yadro.com>
      3d2b2c0b
  18. Sep 05, 2020
  19. Sep 03, 2020
    • Ed Tanous's avatar
      Revert http::Request::socket() callback · d206b437
      Ed Tanous authored
      Details on why this revert is needed are here.
      
      https://lists.ozlabs.org/pipermail/openbmc/2020-August/022478.html
      
      Appu and Ravi still have not commented.
      
      It should be noted, this also causes a memory leak in http connection,
      where connections refuse to be freed, because of a bad usage of
      shared_from_this.
      
      This code wasn't very well thought through, and needs rearchitected to
      not break the unit testability of bmcweb, nor cause memory leaks.
      
      https://github.com/openbmc/bmcweb/blob/218bd4746130aac22366968c8c9a34a929e45a3d/http/http_connection.h#L351
      
      Is the memory leak in question.
      
      Specifically, this reverts:
      The /attachment download in LogServices.  This needs reimplemented
      properly, but is an OEM property, so it shouldn't be a big deal to
      revert, and shouldn't break our redfish compliance.
      
      The IpAddress property in SessionService.  I have no idea why this was
      injected, and it's functionally incorrect.  IpAddresses are not related
      to a session, and IP addresses can change over the course of a session,
      so this property is already broken as written.  I suspect the author
      really wanted RedfishEvent type logging, but that was too complex, so
      they half implemented this.
      
      Redfish SSE properties.  This needs to be reimplemented similar to the
      patchset here:
      https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/13948
      
      
      Where the ownership of the HTTP connection does not leave the http
      framework.  As written, the SSE implementation causes ownership issues,
      as there's no clear delineation of the ownership between HttpConnection
      and the SSE framework.
      
      Tested:
      On current master, running this command:
      wget -O- --no-http-keep-alive --no-check-certificate https://{bmc
      hostname}:18080/redfish/v1
      Which should download the service root, then immediately close and
      destroy the connection, prints:
      
      (2020-08-28 16:55:24) [DEBUG "routing.h":1258] Matched rule
      '/redfish/v1/' 2 / 4
      (2020-08-28 16:55:24) [DEBUG "http_response.h":130] calling completion
      handler
      (2020-08-28 16:55:24) [DEBUG "http_response.h":133] completion handler
      was valid
      (2020-08-28 16:55:24) [INFO "http_connection.h":429] Response: 0x1e1ee28
      /redfish/v1 200 keepalive=0
      (2020-08-28 16:55:24) [DEBUG "timer_queue.h":48] timer add inside:
      0x1d3d1a8 7
      (2020-08-28 16:55:24) [DEBUG "http_connection.h":751] 0x1e1ee28 timer
      added: 0x1d3d1a8 7
      (2020-08-28 16:55:24) [DEBUG "http_connection.h":655] 0x1e1ee28 doWrite
      (2020-08-28 16:55:24) [DEBUG "http_connection.h":663] 0x1e1ee28
      async_write 1555 bytes
      (2020-08-28 16:55:24) [DEBUG "http_connection.h":697] 0x1e1ee28 timer
      cancelled: 0x1d3d1a8 7
      (2020-08-28 16:55:24) [DEBUG "http_connection.h":676] 0x1e1ee28 from
      write(1)
      
      Then stops.  Note, that the connection was not destroyed, and has
      leaked.  Once this patchset is added, the connection closes and destroys
      properly, and doesn't leak, so it prints the above, but also prints.
      
      (2020-08-28 16:27:10) [DEBUG "http_connection.h":305] 0x1d15c90
      Connection closed, total 1
      
      Ran Redfish service validator.  Saw one unrelated failure due to UUID,
      all other things pass.
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: I18686037bf58f20389d31facc0d77020274d38a1
      d206b437
  20. Sep 02, 2020
    • Gunnar Mills's avatar
      Add "Links""SoftwareImages" · f97ddba7
      Gunnar Mills authored
      SoftwareImages was added in Manager in 1_6_0 and Bios in 1_1_0.
      
      Use the existing getActiveFwVersion function but rename to
      populateFirmwareInformation. Changed the mapper call from a GetObject to a
      GetSubTree. Added some debug to the function.
      
      Tested: Validator passes.
      
      curl -k https://$bmc/redfish/v1/Managers/bmc
      
      
       ....
        "Links": {
          "ActiveSoftwareImage": {
            "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/e4e1c69d"
          },
          "ManagerForChassis": [
       ....
            "@odata.id": "/redfish/v1/Chassis/chassis"
          },
          "SoftwareImages": [
            {
              "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/730944ed"
            },
            {
              "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/e4e1c69d"
            }
          ],
          "SoftwareImages@odata.count": 2
        },
      ...
      
      Change-Id: I20798852a2f62575854820bff36175dda38c7dbc
      Signed-off-by: default avatarGunnar Mills <gmills@us.ibm.com>
      f97ddba7
    • Jayaprakash Mutyala's avatar
      Manager:Add ForceRestart to ResetType · f92af389
      Jayaprakash Mutyala authored
      Add ForceRestart in Action/#Manager.Reset/ResetType@AllowableValues,
      as it is a mandatory parameter in the OCP Redfish Profile v1.0.
      
      Tested:
      1. Verified redfish validator passed
      2. Verified details from Redfish
      GET: https://<BMC-IP>/redfish/v1/Managers/bmc/ResetActionInfo
      Response:
      {
        "@odata.id": "/redfish/v1/Managers/bmc/ResetActionInfo",
        "@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
        "Id": "ResetActionInfo",
        "Name": "Reset Action Info",
        "Parameters": [
          {
            "AllowableValues": [
              "GracefulRestart",
              "ForceRestart"
            ],
            "DataType": "String",
            "Name": "ResetType",
            "Required": true
          }
        ]
      }
      
      Case 1: ForceRestart:
      POST: https://<BMC-IP>/redfish/v1/Managers/bmc/Actions/Manager.Reset
      Body:
      {
        "ResetType": "ForceRestart"
      }
      Response:
      {
        "@Message.ExtendedInfo": [
          {
            "@odata.type": "#Message.v1_0_0.Message",
            "Message": "Successfully Completed Request",
            "MessageArgs": [],
            "MessageId": "Base.1.4.0.Success",
            "Resolution": "None",
            "Severity": "OK"
          }
        ]
      }
      Case 2: GracefulRestart:
      POST: https://<BMC-IP>/redfish/v1/Managers/bmc/Actions/Manager.Reset
      Body:
      {
        "ResetType": "GracefulRestart"
      }
      Response: Success
      
      Case 3: Negative test case
      POST: https://<BMC-IP
      
      >/redfish/v1/Managers/bmc/Actions/Manager.Reset
      Body:
      {
        "ResetType": "Test1"
      }
      Response:
      {
        "error": {
          "@Message.ExtendedInfo": [
            {
              "@odata.type": "#Message.v1_0_0.Message",
              "Message": "The parameter Test1 for the action ResetType is not
                          supported on the target resource.",
              "MessageArgs": [
                "Test1",
                "ResetType"
              ],
              "MessageId": "Base.1.4.0.ActionParameterNotSupported",
              "Resolution": "Remove the parameter supplied and resubmit the
                             request if the operation failed.",
              "Severity": "Warning"
            }
          "code": "Base.1.4.0.ActionParameterNotSupported",
          "message": "The parameter Test1 for the action ResetType is not
                      supported on the target resource."
        }
      }
      
      Signed-off-by: default avatarJayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
      Change-Id: I84f4942ddabc564a267d7db8e582ad8c11b5399b
      f92af389
  21. Aug 27, 2020
  22. Aug 26, 2020
  23. Aug 25, 2020
    • Ed Tanous's avatar
      Fix build error in debug · 3bcc0152
      Ed Tanous authored
      
      
      std::exception doesn't have a direct conversion to iostream.  This only
      shows up when building for debug.
      
      Tested:
      Forced -DCMAKE_BUILD_TYPE=Debug, and verified code builds.
      
      Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
      Change-Id: I6fdd0e561f1cecc5f40f0e8b9c624f746ce6456f
      3bcc0152
Loading