commit | d5b8f75c2f93d19d16411f0846d8ecd331d59562 | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Wed May 01 11:52:35 2019 -0500 |
committer | Adriana Kobylak <anoo@us.ibm.com> | Tue May 14 13:15:43 2019 -0500 |
tree | 0e1fb4ef17101d1a88c18e58fcba0c88cb1e1725 | |
parent | 9cbfa2efaf65f6c038c77cddf85e9366d90fdeed [diff] |
item_updater: Return NotAllowed when attempting to clear FieldMode Clearing FieldMode used to be a no-op, but by returning success, the user wouldn't necessarily know that the PUT request did not take effect, unless they checked the property value. Changed it to return an error to let the user know that their request did not take effect. Tested: Verified an error is returned if the property is requested to be cleared when it's already set, but no error is returned if it's already cleared: $ curl -b cjar -k -H "X-Auth-Token:$sha" -X PUT -d '{"data":"false"}' https://$bmc/xyz/openbmc_project/software/attr/FieldModeEnabled { "data": null, "message": "200 OK", "status": "ok" } $ curl -b cjar -k -H "X-Auth-Token:$sha" -X PUT -d '{"data":"true"}' https://$bmc/xyz/openbmc_project/software/attr/FieldModeEnabled { "data": null, "message": "200 OK", "status": "ok" $ curl -b cjar -k -H "X-Auth-Token: $sha" -X PUT -d '{"data":"false"}' https://$bmc/xyz/openbmc_project/software/attr/FieldModeEnabled { "data": { "description": "The specified property cannot be created" }, "message": "Input/output error", "status": "error" } May 01 19:36:16 witherspoon phosphor-image-updater[1465]: The operation is not allowed "MESSAGE" : "The operation is not allowed", "REASON" : "FieldMode is not allowed to be cleared", "SYSLOG_IDENTIFIER" : "phosphor-image-updater", Change-Id: I1c0226c58956a28d903a85dfe98ac11daca4c7d4 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture
To build this package, do the following steps: 1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make To clean the repository run `./bootstrap.sh clean`.