Submit Queries to a Data Manager

From Eclipsepedia

Jump to: navigation, search

COSMOS Wiki > COSMOS Document Plan > COSMOS Manual Guide > COSMOS UG Web Console

This tutorial will go through the steps to create and submit a query to a Data Manager using the Basic Query Dialog.

Consider the "Resource Repository" which manages a repository that contains asset data. This data is modeled using the Service Modeling Language. The current repository contains asset information about a rack unit that has a set of mounted CPUs connected by cables and switches. Users can construct a CMDBf query to acquire asset information on these resources. We will submit a query to the "Resource Repository" by right-clicking the "Resource Repository" from the navigator. This will bring up a pop-up menu that shows three options. Select the "Submit Query" menu option as illustrated below.

Demoi10 smlmenu12.jpg

Click on the option. This will bring up a dialog box that will allow the user to enter a CMDBf query. Let us submit the following CMDBf query. This query return information about a computer system.

<?xml version="1.0" encoding="UTF-8"?>
<s:query xmlns:s="">
	<s:itemTemplate id="cableTemplate">

Enter the above CMDBf query in the Dialog box and click "Submit" as shown below.

Demoi10 smlsubmit12.jpg

The graph response viewer should be shown in the details pane in the top right pane as shown below.

Demoi10 smlviewer12.jpg

Click on the "Source" cell in the "Nodes and Edges" section of the view. The Record section of the view should show the cable information. Note that the asset information is displayed as a SML structure as follows:

<s:manufacturer name="Dell"/>
	<s:processor name="processor">
<s:vendor name="Intel"/>
<s:instructionSet label="x86"/>
<s:clock multiplier="G" speed="2"/>
<s:systemBoardUUID value="DC5678654-ABCD-9876-B023-89506DEB0000"/>
	<s:ram name="ram">
<s:size amount="2000" multiplier="M"/>
	<s:disk name="disk">
<s:size amount="120" multiplier="G"/>
<s:mac address="00:02:55:AA:F5:54"/>
<s:port number="8080"/>
<s:port number="5000"/>
	<s:os sml:ref="true">

We can see that the SML document that is displayed contains asset information about the computer system.