Bug 727320

Summary: RFE: CLI: Create OOP JavaScript wrapper (at least for JBoss AS)
Product: [Other] RHQ Project Reporter: Ondřej Žižka <ozizka>
Component: CLIAssignee: RHQ Project Maintainer <rhq-maint>
Status: NEW --- QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 3.0.1CC: hrupp
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Ondřej Žižka 2011-08-01 15:47:51 EDT
Would be nice if users could handle JBoss AS like this:

var as = JBossAS.find("localhost", 8080);

as.start( [timeoutSec] );  // Blocking, throws on failure/timeout.
as.deployWar("file:///home/ondra/test.war" [, Configuration]);
as.deployEar("file:///home/ondra/test.war" [, Configuration]);
as.restart();

var ds = as.getDatasources(); // Array of JBossAS.Datasource classes

etc.

Could be writen right in JavaScript as a library loaded by default.
Comment 1 Ondřej Žižka 2011-08-01 15:52:29 EDT
Also, classes for RHQ-wide concepts like schedules and operation results could be implemented.

var sch = as.schedule.start( [new Date()] );  // Non-blocking, returns some ScheduledOp class obj.

var result = sch.waitToFinish( [timeoutSec] ); // Returns null on timeout, result object if finished.