Bug 813912

Summary: Unable to execute external scripts via CLI in non-interactive mode
Product: [Other] RHQ Project Reporter: Matt Peter <mpeter>
Component: CLIAssignee: Lukas Krejci <lkrejci>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: medium    
Version: unspecifiedCC: hrupp, jsanda
Target Milestone: ---   
Target Release: RHQ 4.5.0   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-01 06:13:50 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Matt Peter 2012-04-18 14:21:48 EDT
Description of problem:
RHQ does not allow a developer to include scripts into a another script for execution in non-interactive mode.

For example, a developer may have several scripts which all use the same utility functions from an external file, wishes to execute these scripts in non-interactive mode, especially in the case of third party tool integration. 

The only option that does not involve pre-processing for the developer, is to replicate the contents of external scripts in each main script, which can quickly become a maintenance issue.

Please reference the following quote and link for reference:

"As of RHQ 4.3.0 there is no way for the CLI batch scripts (i.e. scripts executed non-interactively) or server-side CLI alert scripts to include other scripts. This severely limits the modularity we can achieve because the user must resort to copy-pasting all the required code "snippets" they might need in their script."

http://rhq-project.org/display/RHQ/Script+Modularity

Version-Release number of selected component (if applicable):
n/a

How reproducible:
Always

Additional info:

Request that some initial support for the functionality be included within the product, for example exposing the "exec" command in non-interactive mode.
Comment 1 John Sanda 2012-04-18 14:44:49 EDT
I am upping the severity of this to HIGH. For anything beyond a trivial script, this is a severe limitation as you have to resort to literally copying and pasting code that would otherwise be reusable as a shared library of some sort. At a minimum, we ought to expose the exec command in non-interactive mode; however I much more strongly favor a solution like upgrading to the latest (very stable) release of rhino so that we can take advantage of a standardized and increasingly used solution in CommonJS.
Comment 2 Mike Foley 2012-04-23 12:10:53 EDT
setting priority to medium per BZ triage 4/23 (crouch, santos, oleary, foley)
Comment 3 John Sanda 2012-05-31 11:34:44 EDT
Lukas, I am reassigning this to you since this is covered by the work you are doing.
Comment 5 Heiko W. Rupp 2013-09-01 06:13:50 EDT
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.