Bug 883894

Summary: [CLI] When executing measurement_utils.js, collection interval will not be changed when using interval method
Product: [Other] RHQ Project Reporter: Lukas Krejci <lkrejci>
Component: CLIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED DUPLICATE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: bkramer, hrupp, loleary, myarboro
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 876479 Environment:
Last Closed: 2012-12-05 14:29:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Krejci 2012-12-05 14:21:39 UTC
+++ This bug was initially created as a clone of Bug #876479 +++

Description of problem:
When executing measurement_utils.js, collection interval will not be changed when using interval method.

Version-Release number of selected component (if applicable):
JON 3.1.0 
JON 3.1.1

How reproducible:
always

Steps to Reproduce:
1. log in to the JON CLI;
2. from the JON CLI command line execute the following:

------------------------------------------------------

exec -f /home/JON_311/util.js
exec -f /home/JON_311/measurement_utils.js

mm = new MeasurementModule();

interval = mm.interval;
time = mm.time;
updates = { context: 'Resource', id: 24171, schedules: {'Free Memory': interval(30, time.minutes)}};
mm.updateSchedules(updates);
  
----------------------------------------------------
3. Navigate to JON UI -> resource 24171 -> Monitoring -> Schedules;
  
Actual results:
Collection interval for the metric 'Free Memory' has not been changed.

Expected results:
Collection interval for the metric 'Free Memory' is changed to 30 minutes.

Additional info:
Above works fine if interval method is not used and if the collection interval is set directly using milliseconds, for instance:

exec -f /home/JON_311/util.js
exec -f /home/JON_311/measurement_utils.js

mm = new MeasurementModule();

updates = { context: 'Resource', id: 24171, schedules: {'Free Memory': 1800000}};
mm.updateSchedules(updates);

Comment 1 Lukas Krejci 2012-12-05 14:29:23 UTC

*** This bug has been marked as a duplicate of bug 876481 ***