clustershell icon indicating copy to clipboard operation
clustershell copied to clipboard

Please pull out some of the functionality in clush to a library

Open wt opened this issue 8 years ago • 4 comments

It would be really cool to be able to more easily build clush-like functionality into other applications.

wt avatar Mar 09 '16 03:03 wt

FWIW, I am more interested in the realtime output part than the interactive input part.

wt avatar Mar 09 '16 03:03 wt

@wt: Thanks for your feedback, and I am glad that you're interested in the library.

I suppose you've already checked http://clustershell.readthedocs.org/en/latest/guide/examples.html#remote-command-example-with-live-output-event-based-mode and that you want more :)

Precisely, do you want to implement the live progress indicator when -b is used?

If so, it's something we've already discussed and it's planned on the roadmap. We plan to provide pre-defined event handlers that other applications could use when calling task.shell() and task.run().

thiell avatar Mar 10 '16 06:03 thiell

This is great.

I've already implemented the limited real time output I see in the docs.

What I really want is the output format and using color to show stdout vs stderr. I also like being able to hit enter to see the remaining hosts.

I won't be using the clush CLI at all really. I implemented a custom nodesource that pulls from a custom data source. I'd just like to get a very similar experience to clush with my tool without copying large swaths of code from CLI.Clush.

wt avatar Mar 10 '16 09:03 wt

There is a lot of people which are interested in such possibility. They want to easily implement their own clush-like command. What people wants is:

  • Output processing (various event handlers)
  • Progress output
  • Enter keystroke displays current status
  • Command line options: -w/-x, -b, ...

We should think about the best way to expose this in the library... for a 1.8/1.9 timeframe

degremont avatar Mar 21 '16 09:03 degremont