summaryrefslogtreecommitdiffstats
path: root/pysystemmgr
Commit message (Collapse)AuthorAgeFilesLines
* gpio: Raise exception on GPIO lookup failureXo Wang2016-10-061-3/+7
| | | | | | | | | This allows dbus calls to gpioInit to fail instead of only returning a default value. This behavior allows the C-side GPIO lookup to error out as expected. Signed-off-by: Xo Wang <xow@google.com> Change-Id: I13ad20de5d209716f26e46c12ca6941eb3dd5997
* pwrctl: Add latch output to power controlXo Wang2016-10-041-2/+3
| | | | | | | | | | | | On the Zaius machine, the BMC signals that power up the CPU are gated by a latch to protect against GPIO blips during BMC reset/power loss. This adds an optional power GPIO configuration that controls the latch's enable pin. Its behavior is to assert high when the op-pwrctl runs, allowing power_up lines to propagate past their latches. Signed-off-by: Xo Wang <xow@google.com> Change-Id: Ibf0d1db771033cb9bba82575cca1bd21cfb3ad3d
* system_manager, libobmc-intf: Add power GPIO configuration interfaceXo Wang2016-10-041-0/+10
| | | | | | | | | | | | | This adds a dbus call (in org.openbmc.managers.System) and C binding (in libopenbmc-intf) to read a POWER_CONFIG from the Python system configuration that abstracts GPIO functionality (power good, reset, etc) from their net names in GPIO_CONFIG. This should eventually replace machine-specific patches to op-pwrctl that define their own power and reset lines. Change-Id: I56eaaf60ef852b68124e4a765942243ad17d06ac Signed-off-by: Xo Wang <xow@google.com>
* Fix for Power Restore PolicyRatan Gupta2016-09-271-2/+36
| | | | | | | | | | | | | This fix is to make the Restore_last_state of Power Restore Policy to working properly. eg:- if the last state is Host_powered_on/off and system goes for pdu reboot then system should reach to the Host_Powred_On/Off state. Fixes openbmc/openbmc#196 Change-Id: If4bdb65a21452d7aa041312fcdbb1daa1b1b0424 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* configs: Remove gpio code from config filesBrad Bishop2016-09-233-1/+12
| | | | | | | Move to a new obmc.system module. Change-Id: Ie02a4b2c14cfcf272d8823d44fb9d7c03b796c87 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* inventory: Move INVENTORY_ROOT to inventory moduleBrad Bishop2016-09-231-1/+2
| | | | | Change-Id: Ic68d4a48ff46002858934e0b9c9b1694a2a17a08 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* python: add vim modelinesBrad Bishop2016-09-231-0/+2
| | | | | Change-Id: Ic13d79892e3efe6f7bad357ad747e6fd25299d02 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Use super to construct dbus.service.ObjectBrad Bishop2016-09-121-3/+3
| | | | | Change-Id: I830decfc523d435c6b9ecdc9ffffec7956c3b85d Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_manager: cleanupBrad Bishop2016-09-061-1/+1
| | | | | | | select python via /usr/bin/env Change-Id: I426a8947e277892c3084ef08c246e98b625c3d10 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* systemmgr: Remove state managementBrad Bishop2016-08-311-52/+0
| | | | | | | | | | With the switch to systemd this isn't needed anymore. A small bit remains allowing the obmcutil cmdline to continue reporing the familiar states for now. Change-Id: I4c9a0201e0237fdcbd4f69f0de05c92f223827f0 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* pysystemmgr: Handling SIGCHLD signalYi Li2016-08-221-0/+3
| | | | | | | | | | | SystemManager starts multiple child processes when system state changes. Set parent process to ignore the SIGCHLD signal, to prevent child processes transforming into zombies when they terminate. Resolves openbmc/openbmc#206 Change-Id: Ic8baa0cbb97f2df8fcc462a732a4194e4a6d3f8c Signed-off-by: Yi Li <adamliyi@msn.com>
* Remove unused CACHE_PATH variable from configsBrad Bishop2016-07-261-4/+0
| | | | | | | | | The library function doing the caching now makes the parent directory if it doesn't exist so also removing that bit of code from the system manager. Change-Id: I30a55737a51e698d977dbc3f30208db1d4e0e87e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_manager: wait for objects with mapper waitBrad Bishop2016-07-261-48/+7
| | | | | | | | This is much faster than the current introspection based mechanism. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I1a737cab00311e9e0c0b63f4d8a487085cdf44e0
* system_manager: Remove bus from lookup responseBrad Bishop2016-07-261-14/+3
| | | | | | | | Remove the busname field from the 'GetObject' method responses. Applications should get the busname information from the mapper. Change-Id: Id548f3d5d6afda8334ad1163d66f69832591511a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_manager: Remove dead codeBrad Bishop2016-07-241-20/+0
| | | | | | | | Remove a reference to 'BMC_INIT' state which isn't used. Remove heartbeat code that isn't used. Change-Id: I2de0c881372085519a15235703881054c5a9adfa Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_manager: Run pep8 on system_manager.pyBrad Bishop2016-07-221-248/+246
| | | | | Change-Id: I976228399027420f255f09622b02352e1799fe91 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove unnecessary InterfacesAdded signalsBrad Bishop2016-07-101-1/+0
| | | | | | | | | | Remove ObjectManager signals emitted before a bus name is owned. This isn't necessary now that the system_manager can detect objects via NameOwnerChanged. Change-Id: Ia2b626a926392b50d20c26474e6c9a9fdb3ca2f0 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Export objects prior to bus name grabBrad Bishop2016-07-101-0/+1
| | | | | | | | | The default behavior in pyphosphor changed such that ObjectManager and Properties signals are not emitted by default. Enable signals just prior to bus name grab. Change-Id: I27a2de4b60482dd843702396f33c7cdccaf17277 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Defer busname ownership until init completeBrad Bishop2016-07-101-1/+1
| | | | | | | | | Avoid race conditions where applications expecting an object to be present upon recipt of NameOwnerChanged find that the object hasn't been created yet. Change-Id: I4236a3898055a84b00e1eaf37f32e0192b683a0f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_mananger: Add a name owner handlerBrad Bishop2016-07-101-0/+34
| | | | | | | | | Add a bus name handler so the system manager can detect objects implemented by services that create objects before owning a bus name. Change-Id: Ic311133a8e532e7f2441102689632f5821dbf589 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_manager: Add try_next_state functionBrad Bishop2016-07-101-16/+19
| | | | | | | | Add a re-usable try_next_state function. A handful of idiomatic python improvements. Change-Id: I435aaaeb5760a677f8fd292f396cdbdae1195674 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Install python workbook to well-known locationBrad Bishop2016-06-101-6/+1
| | | | | | | This removes the need to pass the system configuration to all the scripts. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Reorganize directory structureBrad Bishop2016-06-104-0/+259
Moving to directory per-application layout. This facilitates building single applications which is useful in the Yocto build environment since different applications satisfy different OpenBMC build requirements. A number of issues are also addressed: - All applications were pulling in libsystemd and the gdbus libs irrespective of whether or not they were needed. - gpio.o duplicated in every application - moved to libopenbmc_intf - Added install target Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
OpenPOWER on IntegriCloud