Highlighted
Absent Member.
Absent Member.
662 views

In UCMDB JAVA API can we add two relational node

Hi,
I am using UCMDB 8.0. And i am creating dynamic TQL by java API.I have added three querynode such as host ,ip and memory. Now my code is giving proper result for CIs but in case of Relations it is not giving any realtions.

 

TopologyQueryService queryService =    ucmdbService.getTopologyQueryService();    
   TopologyQueryFactory queryFactory = queryService.getFactory();      
    QueryDefinition queryDefinition = queryFactory.createQueryDefinition("Get hosts' neighbors");       
    QueryNode cisNode = queryDefinition.addNode("CIs").ofType("host").queryProperties("display_label");      
    QueryNode memoryNode = queryDefinition.addNode("Memory").ofType("memory").queryProperty("display_label");
    QueryNode ipNode2 = queryDefinition.addNode("IP").ofType("ip").queryProperty("display_label");
    Topology topology = queryService.executeQuery(queryDefinition);

    Collection<TopologyCI> hosts = topology.getAllCIs();

   Collection<TopologyRelation> hostRelations=topology.getAllRelations();

System.out.println("hostRelations size"+hostRelations.size());

 

It is giving 0 for Host Relations.

 

Thanks in advanced.

Devesh

 

 

P.S. This thread has been moevd from Application Perf Mgmt (BAC / BSM) Support and News Forum to CMS and Discovery Support and News Forum. - Hp Forum MOderator

 

0 Likes
1 Reply
Highlighted
Absent Member.. Absent Member..
Absent Member..

Hi All,

 

I want to add relations to existing CIs with java Api.Please  help me its bit urgent.

 

Warm regards,

Milap

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.