Bug 725252 - MeasurementBaselineManager.findBaselinesForResource() not working with CLI
MeasurementBaselineManager.findBaselinesForResource() not working with CLI
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
3.0.1
All Unspecified
high Severity low (vote)
: ---
: ---
Assigned To: Jay Shaughnessy
Mike Foley
:
Depends On:
Blocks: jon3
  Show dependency treegraph
 
Reported: 2011-07-24 13:43 EDT by Simeon Pinder
Modified: 2012-02-07 14:25 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 14:25:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Simeon Pinder 2011-07-24 13:43:01 EDT
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 10:50:40 EDT
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 16:51:02 EDT
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 09:42:05 EDT
Moving to on_qa as this was either not a problem or has been fixed.
Comment 4 Simeon Pinder 2011-07-26 10:47:27 EDT
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 06:27:23 EDT
Tested on jon241GA build. Logged into CLI and attempted to do tab completion with MeasurementBaselineManager.

rhqadmin@10.65.193.104:7080$ Measurement

MeasurementBaselineManager     MeasurementDataManager         MeasurementDefinitionManager   MeasurementScheduleManager

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

rhqadmin@10.65.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@10.65.201.124:7080$ Measurement

MeasurementBaselineManager     MeasurementDataManager         MeasurementDefinitionManager   MeasurementScheduleManager

rhqadmin@10.65.201.124:7080$ MeasurementBaselineManager.

findBaselinesForResource   toString


Verified that it is working:

rhqadmin@10.65.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 14:25:35 EST
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.