Bug 801980 - rhq-cli exec should support reading a list of scripts and/or directory at startup
Summary: rhq-cli exec should support reading a list of scripts and/or directory at sta...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 4.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Lukas Krejci
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-10 01:52 UTC by Elias Ross
Modified: 2012-12-20 17:41 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-20 17:41:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Elias Ross 2012-03-10 01:52:17 UTC
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 15:42:37 UTC
per BZ traige (crouch, foley, loleary), medium priority, not targetted for JON 3.1

Comment 2 Heiko W. Rupp 2012-06-05 12:39:00 UTC
I think this is a good idea

Comment 3 Heiko W. Rupp 2012-06-05 12:39:09 UTC
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 13:23:35 UTC
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 17:41:17 UTC
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.