75fe8cc4 | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
python: reformat using black
Code cannot currently be submitted to this repo because it fails in the unit-test phase. Attempt to reformat the code using `black` to hopefully make pycodestyle happie
python: reformat using black
Code cannot currently be submitted to this repo because it fails in the unit-test phase. Attempt to reformat the code using `black` to hopefully make pycodestyle happier.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I17aa506471ceade224bcab5b2fa0dc8cd7a88c0a
show more ...
|
c8334f32 | 04-Apr-2019 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
Revert "Revert "skeleton: Remove obmcutil""
This reverts commit c0da84767c00657c0b3b1afff7d9c5c2f1ed5fdb.
We have switched to the bash implementation of obmcutil, so this is no longer required.
Ch
Revert "Revert "skeleton: Remove obmcutil""
This reverts commit c0da84767c00657c0b3b1afff7d9c5c2f1ed5fdb.
We have switched to the bash implementation of obmcutil, so this is no longer required.
Change-Id: I10e8008e639bbc6d5d1078d7bcb7c0fa575cc62b Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
c0da8476 | 04-Apr-2019 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
Revert "skeleton: Remove obmcutil"
Additional changes are required before this can go in.
This reverts commit a738350d00b3171a1cbf0a749381b1ac36b4b7f8.
Change-Id: Ie16d54d781743960356ad936c12f2a57
Revert "skeleton: Remove obmcutil"
Additional changes are required before this can go in.
This reverts commit a738350d00b3171a1cbf0a749381b1ac36b4b7f8.
Change-Id: Ie16d54d781743960356ad936c12f2a571a1ef8e2 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
a738350d | 27-Jan-2019 |
Anthony Wilson <wilsonan@us.ibm.com> |
skeleton: Remove obmcutil
In the effort to remove python from the bmc, obmcutil has been rewritten in 'sh' and moved to phosphor-state-manager.
Change-Id: I39dd0e09fada7c7036b14316376e451ae3e2d330
skeleton: Remove obmcutil
In the effort to remove python from the bmc, obmcutil has been rewritten in 'sh' and moved to phosphor-state-manager.
Change-Id: I39dd0e09fada7c7036b14316376e451ae3e2d330 Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
show more ...
|
7e48038a | 24-Sep-2018 |
Adriana Kobylak <anoo@us.ibm.com> |
pytools: Remove dependency to obmc.system
The system manager (obmc.system) is being deprecated and the GPIOs has moved out of D-Bus (see openbmc/openbmc#3332). The pytools still depend on the conver
pytools: Remove dependency to obmc.system
The system manager (obmc.system) is being deprecated and the GPIOs has moved out of D-Bus (see openbmc/openbmc#3332). The pytools still depend on the convertGpio function provided by system manager, so copy that function into the tools that use it to remove the dependency.
Tested: obmcutil power functions still work, and gpioutil -l and -p work the same.
Change-Id: Ia09f95312438040908eb15f93ff6d525665f5ab3 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
c4390dee | 08-Aug-2018 |
Matt Spinler <spinler@us.ibm.com> |
Point obmcutil chassiskill code at the GPIO JSON
Change-Id: Ic4de4f9de2c1755be3430b30ed72dfdbca56f787 Signed-off-by: Matt Spinler <spinler@us.ibm.com> |
c182e5ec | 25-Feb-2018 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: Add completion script for obmcutil
Change-Id: Ia248f971e2c8a1ff80f1e6947ef0af283d4ec9ba Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
a30ab9db | 30-Jan-2018 |
Joel Stanley <joel@jms.id.au> |
obmcutil: alias status to state
Save users who assume the machine status is available with 'obmcutil status' by aliasing status to state.
Change-Id: Icdfa6f62ff6f719386edd892ec80fe29c32087f0 Signed
obmcutil: alias status to state
Save users who assume the machine status is available with 'obmcutil status' by aliasing status to state.
Change-Id: Icdfa6f62ff6f719386edd892ec80fe29c32087f0 Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
aa4c3103 | 25-Oct-2017 |
Gunnar Mills <gmills@us.ibm.com> |
Spelling fixes
Change-Id: Ia4ded0c195204543c3df671ea471610237f5f44b Signed-off-by: Gunnar Mills <gmills@us.ibm.com> |
1be4fabd | 15-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Add `chassiskill` command
Nick reported an issue where the BMC became unusable after the host hit a bug and began "spewing a lot of messages to the console". Save ourselves some
pytools: obmcutil: Add `chassiskill` command
Nick reported an issue where the BMC became unusable after the host hit a bug and began "spewing a lot of messages to the console". Save ourselves some DBus transactions and immediate execution of systemd transitions by introducing a `chassiskill` command to directly deassert the the power-up GPIO ourselves. This will immediately terminate the host and free up resources for the BMC to become responsive. As a bonus, the PGOOD monitoring will then execute to clean up the resulting inconsistent BMC/Host state for us.
Change-Id: I106a4202b6544b8e78b04938230a4eeee5f132bb Requested-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
cf6a784d | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Optionally wait for standby before getting objects
If the user passes --wait, try to immediately get the object but wait until we reach standby before trying again if the first at
pytools: obmcutil: Optionally wait for standby before getting objects
If the user passes --wait, try to immediately get the object but wait until we reach standby before trying again if the first attempt fails.
The correct strategy is probably to look for registration of names on the bus, but this ghetto approach also works.
Change-Id: I71b6f5d4fcf5841510da6f9877726b875b019d51 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
08e149bb | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Use 'in' test rather than dict.has_key()
Change-Id: I51b4d8a9760e0c73f0c36ff6619a484718db3a4b Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
81707a1f | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Remove unnecessary parentheses
Change-Id: I902c6674111a6c1790d08ddf02819dddeede970d Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
b43f7ed4 | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Implement verbose mode
Verbose output is limited to state change requests at the moment, as they are the operations that take significant amounts of time. Further, the verbose out
pytools: obmcutil: Implement verbose mode
Verbose output is limited to state change requests at the moment, as they are the operations that take significant amounts of time. Further, the verbose output is implemented as following the tail of the journal until the requested state change either succeeds or fails.
In testing it was observed that the journal output tends to lag the DBus event that signals the completion of the state transition. As such the patch adds a tuning parameter defining a further waiting period beyond the receipt of the completion signal so that the verbose output looks "reasonable". The default value of the tuning parameter was roughly chosen to correlate well with the journal output on a Witherspoon system for the `poweron` command.
Change-Id: I847e2bfeba55d6a3d7d1f7ff1ba1901993c9b505 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
de4ed02d | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Implement blocking behaviour
The technique to block is to attach a listener for systemd JobRemoved property change events, change the desired OpenBMC state management property to
pytools: obmcutil: Implement blocking behaviour
The technique to block is to attach a listener for systemd JobRemoved property change events, change the desired OpenBMC state management property to trigger the systemd transition, and then run the gobject dbus mainloop. We terminate the mainloop by invoking quit() in the callback on the captured mainloop object.
Additionally, the result of the transition (success or failure) is judged in the callback. We can't obtain the result by returning it, and as we are using Python 2 we cannot meaningfully mutate captured variables to expose it. Instead, a variable is created on the callback function object after it is defined but before the function is invoked, which is mutated inside the function (which can reference its own object) when called. The result is retrieved after the mainloop has terminated and is propagated up the call chain to form the exit status.
Change-Id: Ic19aa604631177abea7580de2357d8c6812ee874 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
bba82bd3 | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Use format string for all-props output
Change-Id: I9d803da8c0ff8862039bb5b7adc07952208820d1 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
c6b5deb0 | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Consistent naming for command descriptors
Change-Id: Ibb6d90dbca9c1bffd7b714dc70342b7927ced94e Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
0b6883d8 | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Use argparse
Change-Id: Id33e3802530aa1bf0cb2af88c16bd94f8bfa219d Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
da3b35cc | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Drop ElementTree and json imports
Change-Id: I2e310eef36eb7bcea58d1567dcf3efe9a9dbeeb8 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
7b376e7b | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Introduce run_all_commands()
This implements the partner for-loop to the run_one_command() function, moving the implementation out of main(). Again this is to elevate the main() i
pytools: obmcutil: Introduce run_all_commands()
This implements the partner for-loop to the run_one_command() function, moving the implementation out of main(). Again this is to elevate the main() implementation to a higher level of abstraction and reduce cyclomatic complexity.
Change-Id: I0abe5ee026750efd10dafb6f113359f035ba5bd8 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
e4dcaef2 | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Introduce run_one_command()
Move the complexity of the for-loop body implementation away from the loop itself. This reduces the general cyclomatic complexity a little and allows f
pytools: obmcutil: Introduce run_one_command()
Move the complexity of the for-loop body implementation away from the loop itself. This reduces the general cyclomatic complexity a little and allows for easier consideration of the implementation in isolation.
Change-Id: Id779dec720d3582cf89cd9981bcfd8b101b0d386 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
554a0e5c | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Drop redundant prop assignment and test
Change-Id: I0b1b023aeac7103f0be92201c2475193b0f69e5c Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
849ebeb7 | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Collapse redundant assignment and test
Change-Id: Ie461546c9056829b1b4a081a4031ac91c10e6a42 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
1133d8c3 | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Drop ability to set properties from the commandline
This was prioritised below the built-in value anyway so I suspect it is an unused feature, especially now that the org.openbmc
pytools: obmcutil: Drop ability to set properties from the commandline
This was prioritised below the built-in value anyway so I suspect it is an unused feature, especially now that the org.openbmc interfaces (and the method feature) have gone away.
Change-Id: Icd5ab91b5fc08b0f6cc461390f4ac39f7e9e41cd Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
39e10da7 | 11-Oct-2017 |
Andrew Jeffery <andrew@aj.id.au> |
pytools: obmcutil: Collapse nested conditions
Change-Id: Idb1f30dc553cfa95b4669df317a5dbac5dbe8966 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |