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: Nobody <nobody>
Status: NEW --- QA Contact:
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: --- Target Upstream Version:
Embargoed:

Description Ondřej Žižka 2011-08-01 19:47:51 UTC
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 19:52:29 UTC
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.