[PATCH phosphor-settingsd] Move settings to c code

OpenBMC Patches openbmc-patches at stwcx.xyz
Sat Jan 30 09:50:30 AEDT 2016


This gets the boot_list and PowerCap settings exposed
on the dbus.

Examples of how to now interact...
$ curl -c cjar -b cjar -k https://x.x.x.x/org/openbmc/settings/host0
{
  "data": {
    "boot_mode_list": [
      "Default",
      "Network",
      "Disk",
      "Safe",
      "CDROM",
      "Setup"
    ],
    "current_boot_mode": "Default",
    "power_cap_default": 999,
    "power_cap_max": 1000,
    "power_cap_min": 1,
    "power_cap_now": 998
  },
  "message": "200 OK",
  "status": "ok"
}
View a single property
curl -c cjar -b cjar -k https://192.168.7.2/org/openbmc/settings/host0/attr/Current_boot_mode
Make the Network the current boot device
curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d "{\"data\": [\"CDROM\"]}" https://x.x.x.x/org/openbmc/settings/host0/action/setBootMode
Set the powercap to 42
curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d "{\"data\": [42]}" https://x.x.x.x/org/openbmc/settings/host0/action/setPowerCap

https://github.com/openbmc/phosphor-settingsd/pull/3

Chris Austen (1):
  Move settings to c code

 Makefile            |  22 ++++++
 settings_file.py    |   2 -
 settings_manager.c  | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 settings_manager.py |  87 ----------------------
 settings_parser.py  |  20 -----
 5 files changed, 228 insertions(+), 109 deletions(-)
 create mode 100644 Makefile
 delete mode 100644 settings_file.py
 create mode 100644 settings_manager.c
 delete mode 100755 settings_manager.py
 delete mode 100755 settings_parser.py

-- 
2.6.4




More information about the openbmc mailing list