Bug 801980 - rhq-cli exec should support reading a list of scripts and/or directory at startup
rhq-cli exec should support reading a list of scripts and/or directory at sta...
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
4.3
Unspecified Unspecified
medium Severity unspecified (vote)
: ---
: ---
Assigned To: Lukas Krejci
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-09 20:52 EST by Elias Ross
Modified: 2012-12-20 12:41 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 12:41:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Elias Ross 2012-03-09 20:52:17 EST
Description of problem:

$RHQ_CLI_HOME/bin/rhq-cli.sh -f 'scripts/*.js'

or

$RHQ_CLI_HOME/bin/rhq-cli.sh -f scripts

(for example)

doesn't work. Same with 'exec'.

For complicated installations, it would be nice to not have to manually exec each script source file individually. And it would be nice to start with all the RHQ supplied 'examples' as a default.

I would see supporting syntax such as:

$RHQ_CLI_HOME/bin/rhq-cli.sh -d scripts

But ideally, there might be one directory that's always read at start up time.
Comment 1 Mike Foley 2012-03-12 11:42:37 EDT
per BZ traige (crouch, foley, loleary), medium priority, not targetted for JON 3.1
Comment 2 Heiko W. Rupp 2012-06-05 08:39:00 EDT
I think this is a good idea
Comment 3 Heiko W. Rupp 2012-06-05 08:39:09 EDT
Assigning to Lukas, as he is currently working in the area of making scripts 
modular, so this could fit into his work.
Comment 4 Lukas Krejci 2012-12-20 08:23:35 EST
While RHQ 4.5.1 doesn't specifically contain this feature, it added CommonJS support to the CLI and thus the ability to load modules from within the scripts.

I think CommonJS provides a much cleaner and nicer alternative to the above mentioned approach.

Do you agree, Elias?
Comment 5 Elias Ross 2012-12-20 12:41:17 EST
This is fine. The CommonJS solution is more elegant than what I proposed.

Note You need to log in before you can comment on or make changes to this bug.