**

Hi all,

 

I’m currently trying without success to get the CMDBGraphQuery function call, (using c on CMDB 1.1) to work. I haven’t seen much on the list on this topic – in fact, I only found one entry – Dan, back in 2005 you asked if anyone had used it. I didn’t find any responses. As far as documentation goes, all I’ve been able to get my hands on is the graph query white paper, and the CMDB api guide.

 

I am currently testing our requirement against the cmdb driver (i.e. osdriver) program. The driver program is running on a linux (fedora core 4) platform, and the database being queried is running on win 2003.

 

First, a brief description of what we require:

 

Given a specific CI (configuration item), traverse the CMDB tree, finding all CI’s (regardless of class) where a relationship of type “Impact” has been defined. Once this list has been returned, a number of records will be created in another form on the system.

 

In running the driver program, I am starting with a CI that is known to exist (see attached output from the “gi” get instance driver command). When running the graph query (grq) command, I am supplying namespace, class, instance id, etc. as prompted. However, I am not entirely sure that I am supplying the correct information. Assuming that I can construct a graph to represent what I want to achieve, I’m still not entirely certain how to represent this within the querygraph structure. After supplying all required information, I am receiving an error 120036:

 

120036

Error

The specified query graph does not have a starting node.

(AROS_ERROR_QUERY_GRAPH_HAS_NO_STARTNODE)

Specify starting node information in the query graph.

 

 

Please see the attached output from the grq command.

 

What I require:

 

1 – What am I doing wrong to get the “120036” error? I think I’m supplying the correct namespace, class and instance id.

2 – What else am I doing wrong, understanding the requirement? In other words, what should my responses to the grq command look like?

3 – Is the cmdbGraphQuery command actually able to do what we require? Our requirement is to traverse the tree, finding matching relationships, but where the class could be any class

4 – I would appreciate any sample code where the querygraph structure is being populated. I can derive this from the api guide, and also from the example in the driver program, but if there is any other example code in use to do a cmdbGraphQuery call, I would love to see it.

 

I would be grateful for any feedback from any c or java gurus out there who have successfully implemented this function call.

Many thanks,

Matt Willis
È +61 410 471 901
[EMAIL PROTECTED]

 

__20060125_______________________This posting was submitted with HTML in it___
Command: gi
GET INSTANCE
Class Name
   Namespace (): BMC
   Class name (): BMC_ComputerSystem
Instance Id (): AS000D569A5F3B6aWrQQjMhXAAMAAA
Number of Attributes to Get (0): 4
Attribute Name (): InstanceId
Attribute Name (): ClassId
Attribute Name (): Name
Attribute Name (): SupplierName

   AROSGetInstance  results
Attribute Value List : 4 items
Attribute Value Info:
   Attribute Name: InstanceId
   Value:  (char)   AS000D569A5F3B6aWrQQjMhXAAMAAA
Attribute Value Info:
   Attribute Name: ClassId
   Value:  (char)   BMC_COMPUTERSYSTEM
Attribute Value Info:
   Attribute Name: Name
   Value:  (char)   Dell Desktop
Attribute Value Info:
   Attribute Name: SupplierName
   Value:  (char)   Dell Computer
ReturnCode:  OK
Status List : 0 items



_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org
Command: grq
GRAPH QUERY
Starting Node Instance
   Instance id (): AS000D569A5F3B6aWrQQjMhXAAMAAA
Starting Node Class Name
   Namespace (): BMC
   Class name (): BMC_ComputerSystem
Starting Node Extension Name (): a
Query Graph Info
   Number of nodes (including starting node) (1): 2
   Node info 1 of 2:
      Class Name
         Namespace (): BMC
         Class name (): BMC_ComputerSystem
      Extension Name (): b
      Number of adjacent nodes (0): 1
      Adjacent node info 1 of 1:
         Relationship Class Name
            Namespace (): BMC
            Class name (): BMC_Impact
         Enter the type of qualification: (none\string\struct, 0-2) (0):
         Type of attribute retrieval:
            none/custom/nonhidden/all (0-3) (0): 3
         Object Class Name
            Namespace ():
            Class name ():
         Object Extension Name (): c
         Enter the type of qualification: (none\string\struct, 0-2) (0):
         Type of attribute retrieval:
            none/custom/nonhidden/all (0-3) (0): 3
   Node info 2 of 2:
      Class Name
         Namespace (): BMC
         Class name (): BMC_ComputerSystem
      Extension Name (): d
      Number of adjacent nodes (0):
Number of levels (1): -1
Direction
   out/in (0-1) (0):
On no match proceed? (F): T
On match proceed? (T): T

   AROSGraphQuery  results
ReturnCode:  ERROR
Status List : 1 items
Status Struct :
   Message type : ERROR
   Message number :  120036
   Message:  Cannot open catalog; Message number = 120036
   Appended:  BMC:BMC_ComputerSystem



_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

Reply via email to