Bug 801980

Summary: rhq-cli exec should support reading a list of scripts and/or directory at startup
Product: [Other] RHQ Project Reporter: Elias Ross <genman>
Component: CLIAssignee: Lukas Krejci <lkrejci>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 4.3CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
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: ---

Description Elias Ross 2012-03-09 20:52:17 EST
Description of problem:

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


$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.