You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add options to set or clear the `DisableRedundancyOverride` D-Bus
property that manually disables redundancy:
```
-s,--set-disable-redundancy-override Excludes: --clear-disable-redundancy-override
Set override to disable redundancy
-c,--clear-disable-redundancy-override Excludes: --set-disable-redundancy-override
Clear override to disable redundancy
```
Also refactor the CLI11 argument handling to add option groups to make
it more explicit that only one argument can be handled at a time. This
changes the help text a bit. It now looks like:
```
$ ./rbmctool -h
RBMC Tool
[Exactly 1 of the following options is required]
Usage: ./rbmctool [OPTIONS]
Options:
-h,--help Print this help message and exit
[Option Group: Display RBMC information]
Options:
-d Display basic RBMC information
-e Needs: -d Add in extended details
[Option Group: Modify the redundancy override]
Options:
-s,--set-disable-redundancy-override Excludes: --clear-disable-redundancy-override
Set override to disable redundancy
-c,--clear-disable-redundancy-override Excludes: --set-disable-redundancy-override
Clear override to disable redundancy
[Option Group: Reset sibling BMC]
Options:
--reset-sibling Reset the sibling BMC
```
Finally, it also does some small clean up to remove some unnecessary
co_return statements and also return nonzero if the sibling reset option
fails.
Testing:
When it works:
```
$ ./rbmctool -s
<6> Setting disable redundancy override to True
$ ./rbmctool -d | grep Enabled
Redundancy Enabled: false
$ ./rbmctool -c
<6> Setting disable redundancy override to False
$ ./rbmctool -d | grep Enabled
Redundancy Enabled: true
```
When it fails:
```
$ ./rbmctool -s
<6> Setting disable redundancy override to True
Error: Setting cannot be modified now (see journal for details)
```
Change-Id: I89b26bd6b744ee282ae643094adca4cf891098ae
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
0 commit comments