Bug 725252 - MeasurementBaselineManager.findBaselinesForResource() not working with CLI
Summary: MeasurementBaselineManager.findBaselinesForResource() not working with CLI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 3.0.1
Hardware: All
OS: Unspecified
high
low
Target Milestone: ---
: ---
Assignee: Jay Shaughnessy
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon3
TreeView+ depends on / blocked
 
Reported: 2011-07-24 17:43 UTC by Simeon Pinder
Modified: 2012-02-07 19:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 19:25:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Simeon Pinder 2011-07-24 17:43:01 UTC
Description of problem: The MeasurementBaselineManager.findBaselinesForResource() is not available to the CLI despite being present in the MeasurementBaselineManagerRemote interface. There are also no other methods in the MeasurementBaselineManagerRemote classes, so this means that the MeasurementBaselineManager object is shown in the CLI but it is actually unaccessible.  See relevant interface and exception below.

We should make it available or remove it from the objects available to CLI.  I think the former is the right option.

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


How reproducible:
Every time.

Steps to Reproduce:
1.Log into CLI and attempt to do tab completion with MeasurementBaselineManager.
2.
3.
  
Actual results:
rhqadmin@localhost:7080$ Measurement

MeasurementBaselineManager     MeasurementDataManager         MeasurementDefinitionManager
MeasurementScheduleManager
rhqadmin@localhost:7080$ MeasurementBaselineManager.          
sun.org.mozilla.javascript.internal.EvaluatorException: missing name after . operator 
MeasurementBaselineManager. 
^

Expected results:
Ability to call MeasurementBaselineManager.findBaselinesForResource() successfully.

Additional info:
Definition in following remote implies availability in the CLI interface.

package org.rhq.enterprise.server.measurement;

import java.util.List;
...

public interface MeasurementBaselineManagerRemote {

    @WebMethod
    List<MeasurementBaseline> findBaselinesForResource( //
        @WebParam(name = "subject") Subject subject, //
        @WebParam(name = "resourceId") int resourceId);
}

Comment 1 Charles Crouch 2011-07-25 14:50:40 UTC
This is listed as part of our API:

http://docs.redhat.com/docs/en-US/JBoss_Operations_Network/2.4/html/API_Guides/remote-api/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerRemote.html

How can this be part of the remote interface but not available in the CLI?
Are there any other classes suffering a similar problem?

Comment 2 Jay Shaughnessy 2011-07-25 20:51:02 UTC
This worked perfectly for me.  I manually added a baseline to my platform system load metric and, using all autocomplete:

rhqadmin@localhost:7080$ MeasurementBaselineManager.findBaselinesForResource(10001)
one row
MeasurementBaseline:
        computeTime: Mon Jul 25 16:47:19 EDT 2011
                 id: 10001
                max: 0.30761803289605116
               mean: 0.05965119910371322
                min: 0.037404573797650664
           schedule: [MeasurementSchedule, id=10008]
        userEntered: true


I don't see the reported problem. This is using the drift branch (should be no different than Master).

Comment 3 Jay Shaughnessy 2011-07-26 13:42:05 UTC
Moving to on_qa as this was either not a problem or has been fixed.

Comment 4 Simeon Pinder 2011-07-26 14:47:27 UTC
This was reported against JON 2.4.1 aka 3.0.1 branch, so we should make sure that it is actually tested against JON 2.4.1 as well and not still a problem that has been fixed by later commits in master + drift code.

Comment 5 Sunil Kondkar 2011-07-28 10:27:23 UTC
Tested on jon241GA build. Logged into CLI and attempted to do tab completion with MeasurementBaselineManager.

rhqadmin.193.104:7080$ Measurement

MeasurementBaselineManager     MeasurementDataManager         MeasurementDefinitionManager   MeasurementScheduleManager

MeasurementBaselineManager.findBaselinesForResource() is not available to the CLI. It displays only MeasurementBaselineManager.toString()

rhqadmin.193.104:7080$ MeasurementBaselineManager.toString()



Also verified on latest master build#224. Manually added a baseline to platform system load metric. The autocomplete shows 'findBaselinesForResource'

rhqadmin.201.124:7080$ Measurement

MeasurementBaselineManager     MeasurementDataManager         MeasurementDefinitionManager   MeasurementScheduleManager

rhqadmin.201.124:7080$ MeasurementBaselineManager.

findBaselinesForResource   toString


Verified that it is working:

rhqadmin.201.124:7080$ MeasurementBaselineManager.findBaselinesForResource(10001)
one row
MeasurementBaseline:
	computeTime: Thu Jul 28 12:57:38 IST 2011
	         id: 10001
	        max: 0.024875621890547265
	       mean: 0.024875621890547265
	        min: 0.024875621890547265
	   schedule: [MeasurementSchedule, id=10008]
	userEntered: true


Marking as verified.

Comment 6 Mike Foley 2012-02-07 19:25:35 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE


Note You need to log in before you can comment on or make changes to this bug.