Bug 785263

Summary: JON 3.01 RC1 CLI sample drift.js ...error using utility method "fetchHistory"
Product: [Other] RHQ Project Reporter: Mike Foley <mfoley>
Component: CLIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.0.1CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-27 20:20:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Mike Foley 2012-01-27 19:59:02 UTC
Description of problem:  JON 3.01 RC1  CLI sample drift.js ...error using utility method "fetchHistory"


Version-Release number of selected component (if applicable):  JON 3.01 RC1


How reproducible: 100%


Steps to Reproduce:
1.  with the UI ... create a drift configuration named 'mydrift'  (note: in the base directory ... there is a folder named 'folder1')
2.  with the CLI ... ./rhq-cli.sh -u rhqadmin -p rhqadmin
3.  exec -f samples/drift.js
3.  fetchHistory(10002, 'folder1/abc.txt')
  
Actual results:

ReferenceError: "foreach" is not defined. (<Unknown source>#198)

Expected results:  


Additional info:


rhqadmin@localhost:7080$ fetchHistory(10002, 'folder1/abc.txt')
ReferenceError: "foreach" is not defined. (<Unknown source>#198)
fetchHistory(10002, 'folder1/abc.txt') 
^

Comment 1 Mike Foley 2012-01-27 20:01:50 UTC
note: in the above example 

the base folder being watched by drift is 

/home/mfoley/folderwatchedbyDrift

under that ... there is a folder named 'folder1' ... and then a filed named abc.txt in that folder.  

10002 is the resource id

Comment 2 Mike Foley 2012-01-27 20:20:23 UTC
new information ... i didn't have util.js loaded ....

rhqadmin@localhost:7080$ fetchHistory(10002, 'folder1/abc.txt')
NativeObject:
	className: Object