Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

COSMOS Design 214153

Revision as of 13:21, 8 January 2008 by Sleeloy.ca.ibm.com (Talk | contribs) (Design)

Back to Data Reporting Design

Change History

Name: Date: Revised Sections:
Sheldon Lee-Loy 01/08/2008
  • Initial version

Workload Estimation

Rough workload estimate in person weeks
Process Sizing Names of people doing the work
Design 0.2 Sheldon Lee-Loy
Code
Test
Documentation
Build and infrastructure
Code review, etc.*
TOTAL

'* - includes other committer work (e.g. check-in, contribution tracking)

Requirement

The COSMOS UI should provide the ability to create custom query user interfaces. These interfaces can be in the form of a dialog box or wizard.

A strategy is needed to determine how exploiters can contribute their own customized query user interfaces to the COSMOS ui. Note that these query user interfaces can be initiated by selecting a menu item, selecting a node, etc.

These customized user interfaces will be dojo widgets that are binded using query objects.

It should be possible to create "CMDBf query templates" that uses some form of macro language to define input parameters for the query. For example, consider the following CDMBf query:

<registerResponse xmlns="http://cmdbf.org/schema/1-0-0/datamodel">
        <instanceResponse>
                <instanceId>
                        <mdrId>http://testSystem.com/DiscoveryMdr</mdrId>
                        <localId>http://my.computer</localId>
                </instanceId>
                <accepted>
                </accepted>
        </instanceResponse>
</registerResponse>

Design

Note that the above CDMBf query has a hard coded localId set to "http://mycomputer". If we use some form of macro language we can create a more dynamic query as follows:

<registerResponse xmlns="http://cmdbf.org/schema/1-0-0/datamodel">
        <instanceResponse>
                <instanceId>
                        <mdrId>http://testSystem.com/DiscoveryMdr</mdrId>
                        <localId>$localId</localId>
                </instanceId>
                <accepted>
                </accepted>
        </instanceResponse>
</registerResponse>

The above query defines a $localId input parameter that a user interface can bind to.

The value of the $localId parameter can be provided by the user interface via a data feed. The following url can be used to execute the data feed:

http://localhost:8080/COSMOSUI/json?service=org.eclipse.comos.dr.service.handler.query&template=mytemplate&localId=http://my.computer&mdr=http://localhost:8080/myMDR

Note that the template variable signifies the query template file that is defined above.

Also note that a service is required to read in the input parameters from the request, process the query template file, submit the query template file to the mdr and generate a JSON structure based on the cmdbf graph response received.

Design note: Should cosmos make use of an opensource macro language processor or make up its own. Apache has a template engine called "Velocity" http://velocity.apache.org/engine/index.html that can be used. However ip approval is required. If this is an issue we can add extension points to "plug-in" a template engine and by default COSMOS can provide a simple template engine that defines simple parameter substitution.

Back to the top