This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 231343 - Improve query capability of the COSMOS broker
Summary: Improve query capability of the COSMOS broker
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Cosmos (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Bill Muldoon CLA
QA Contact:
URL: http://wiki.eclipse.org/COSMOS_Design...
Whiteboard:
Keywords:
Depends on:
Blocks: 238303
  Show dependency tree
 
Reported: 2008-05-09 13:49 EDT by Jimmy Mohsin CLA
Modified: 2012-01-03 13:46 EST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmy Mohsin CLA 2008-05-09 13:49:21 EDT
Do we have a method on the COSMOS Broker that returns the Service Metadata provided by ALL MDRs?

I believe we can do this today on a one MDR at a time basis; but it would be GREAT if we could get this info from the COSMOS Broker in ONE call for ALL MDRs....

Please note that we do NOT need to copy any data of any sort to the Broker; this is simply about providing a one-stop-shopping approach for the COSMOS client.

Thanks,
Jimmy Mohsin
Comment 1 Jimmy Mohsin CLA 2008-06-06 12:47:30 EDT
Assigning this to Hubi....
Comment 2 amehrega CLA 2008-06-12 10:05:51 EDT
Here's my view:

There is no place for convenience APIs at a service level.  A service should only provide atomic functions to enable clients in accomplishing tasks.  If there is a common usage of those atomic functions, then they can be abstracted out in the client side.

If we open the door to these sort of requirements, then there is no limit to what can be added to the broker service.
Comment 3 Hubert Leung CLA 2008-06-17 16:58:03 EDT
Here is how I expect adopters of COSMOS to get service metadata from all MDRs:

// Get data managers that support CMDBf query service
List<DataManager> dmlist = brokerClient.getDataManagerByNamespace("http://cmdbf.org/schema/1-0-0/query");
for (DataManager dm : dmlist) {
	Element serviceMetadata = dm.getCMDBfQueryClient().getQueryServiceMetadata();
  // process the metadata here...
}

The code can reside in the application that is querying for data managers.

From data collection call, I was getting the impression that the motivation for having this function is to have a way to find out what each MDR supports.  For example, given an MDR, we need to know if it knows about asset data, or if it has information about Tomcat servers.  Currently, the broker can only tell you which data managers support the CMDBf query service, but it doesn't know exactly what type of data is managed by the MDR.  If I am understanding the requirement correctly, this requirement is not about getting the service metadata, but about adding query capabilities to the broker so that the broker client can search for MDRs by providing more fine-grained search criteria.  This requirement is related to bug 235898.  
Comment 4 Hubert Leung CLA 2008-06-17 17:00:01 EDT
As discussed in the data collection call on June 17, it would help understanding the requirement if CA can provide a use case for this function. 
Comment 5 Jimmy Mohsin CLA 2008-06-20 23:15:23 EDT
Hubert,

Per your request, the new use case is on the use case page...
 2.6.1 Use Case: Query for a list of MDR’s and their Meta Data

Please comment if you need additional info.
Comment 6 Bill Muldoon CLA 2008-07-18 15:00:32 EDT
Changes have been submitted. These operations have been added to the Broker:

 * getGroupsByRecordTypeNamespace
 * getGroupById
 * deregisterGroupById

The Broker client has been updated and also the COSMOS CLI has new commands to support these operations:

 * GetDataManagerById <DataManager Id>
 * GetDataManagersByRecordTypeNamespace <RecordTypeNamespace>
 * DeregisterById <DataManager Id>

Please note that I did not remove the current Broker operations that require host and group names because these operations are still being used by the COSMOS UI outputters.
Comment 7 Srinivas Reddy CLA 2008-07-31 05:00:33 EDT
QA Review for Manual Tests/JUnits:
- No explicit test cases defined here, however this has been tested as part of End2End testing using COSMOS Command line operations - GetDataManagerById,
GetDataManagersByRecordTypeNamespace,DregisterById.
Comment 8 Jimmy Mohsin CLA 2008-08-01 12:41:57 EDT
Closing per note from Srinivas Doma Reddy on 8/1/08.