As per our requirement, we need to create CMDB relationship in a CI. We need to create Application relationship and Cluster relationship inside CI using SOAP.
We are able to create relationship between two CI, but no idea how to create relationship between CI and Application/Cluster handle.
Can anybody please help, which method/API need to be use for creating CMDB relationship?
Were you referring to Application/Cluster classes or trying to create relationship type? May be any screenshots would help. If it is only creating relationship between CIs, then you can use createobject() method with the object type "bhmheir".
Thanks for your reply.
We are trying to create relationship between CI and Application/Cluster object. For that we need to use 'hosts' and 'fails over' relations type. I don't have much idea about how to create or which method need to use it.
"Application/Cluster objects" should also be CIs in your CMDB in my opinion, and then creating the required relationships would be completely similar to other relationships that you originally stated that you were able to create without any difficulties. I.e. I would expect your challenges potentially being in the modeling of the application and/or cluster CI types. You may want to refer to https://support.ca.com/phpdocs/0/8165/8165_whitepaper_IT_Serv_Modeling_for_the_CA_CMDB_v6.pdf for ideas.
Thanks for your replay,
We can create a cluster relationship from CMDB UI, but as per our requirement we need to use SOAP API and from that we have to create relationship between CI and cluster object.
In API we are able to get CI handle object and Cluster object, but don't know how to create relationship using SOAP API method.
Also we have tried to use CreateLrelRelationship method, but did not find out the lrelname parameter's value.
I am looking for API to implement this feature.
Its better to create a relation type 'hosts' and 'fails over' manually and then use createobject method to create relationship type between the CIs.
Thanks for reply,
I have look into createObject method, which contains some parameters that we need to pass as like - SID, ObjectType, attrVals, attributes, createObjectResult, newHandle etc.
We have SID, CI object handle and Application object handle, What I need to pass as attrVals, attributes, createObjectResult, newHandle parameters?
I think you can leave blank values for attrVals, attributes, createObjectResult, newHandle parameters.