Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor bluechictl usage #941

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

engelmi
Copy link
Member

@engelmi engelmi commented Sep 12, 2024

This PR does split up the method-unit-actions file - which collects a lot of different operations - and creates multiple new files, grouping the commands semantically.
In addition, it also adds specific usage functions for all commands such as:

$ bluechictl start --help
bluechictl is a convenience CLI tool to interact with bluechi

Description: 
  Start/Stop/Restart/Reload a unit on a node

Usage: 
  bluechictl [start|stop|restart|reload] [nodename] [unitname]


Examples:
  bluechictl start primary interesting.service
  bluechictl stop primary interesting.service
  bluechictl restart primary interesting.service
  bluechictl reload primary interesting.service


$ bluechictl status --help
bluechictl is a convenience CLI tool to interact with bluechi

Description: 
  View status for units and nodes of BlueChi

Usage: 
  bluechictl status [nodename] [unitname] [options]

  If [nodename] and [unitname] are not given, the status of all nodes will be displayed.
  If [unitname] is not given, the status of the specific node will be displayed.

Available options:
  --help         shows this help message
  --watch, -w    continuously watch the status of the node(s) and unit

@coveralls
Copy link

coveralls commented Sep 12, 2024

Coverage Status

coverage: 83.553% (-1.6%) from 85.196%
when pulling 09955e0 on engelmi:refactor-bluechictl-usage
into d54adc0 on eclipse-bluechi:main.

Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@engelmi engelmi force-pushed the refactor-bluechictl-usage branch from 29e9fe3 to cb850a7 Compare September 13, 2024 09:21
Relates to: eclipse-bluechi#691

The method-unit-actions file collects a lot of different operations.
These have been split up into multiple files based on semantically
coherent functionality.
Also, usage functions for the various commands have been added.

Signed-off-by: Michael Engel <mengel@redhat.com>
Relates to: eclipse-bluechi#691

Based on the previous refactoring, usage functions have also been
added to the other bluechictl commands and integrated into main.

Signed-off-by: Michael Engel <mengel@redhat.com>
@engelmi engelmi force-pushed the refactor-bluechictl-usage branch from cb850a7 to 09955e0 Compare September 13, 2024 11:34
@engelmi engelmi merged commit 1fc7741 into eclipse-bluechi:main Sep 13, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants