IRE Multiple Dependency issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 07:36 AM
I am using the IRE API
i am sending a cmdb_ci_vm_instance it has two relationships, one to the cmdb_ci_virtualization_server and one to cmdb_ci_server
{
"items": [{
"values": {
"install_status": 1,
"name": "vm instance",
"sys_class_name": "cmdb_ci_vm_instance",
"manufacturer": null,
"sys_id": "193d4605dbb2d050e590d1d3ca96192a",
"cpu_manufacturer": null,
"model_id": null
},
"className": "cmdb_ci_vm_instance"
}, {
"values": {
"install_status": 1,
"sys_class_name": "cmdb_ci_esx_server",
"name": "esx server",
"sys_id": "af88d2891bb690101c6afd9f034bcba0"
},
"className": "cmdb_ci_esx_server"
}, {
"values": {
"sys_class_name": "cmdb_ci_win_server",
"install_status": 1,
"sys_id": "503d8a811bb690101c6afd9f034bcb81"
},
"className": "cmdb_ci_win_server"
}],
"relations": [{
"parent": "0",
"type": "Runs on::Runs",
"child": "1"
}, {
"parent": "2",
"type": "Runs on::Runs",
"child": "0"
}]
}
This causes an error ,
"errors": [
{
"error": "MULTIPLE_DEPENDENCIES",
"message": "Found multiple dependent relation items [{\"parent\":2,\"child\":0,\"type\":\"Runs on::Runs\"}] and [{\"parent\":0,\"child\":1,\"type\":\"Runs on::Runs\"}] in payload"
}
],
Both the win_server and the esx_server require a Runs on: Runs relationship with the vm_instance, and if i sent them individually with the vm_instance without the Runs on:: Runs it would fail with missing dependency, however if send them in a packet together they fail with multiple dependency.
How do i solve this issue?
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 07:41 AM
Error: MULTIPLE_DEPENDENCIES
Message | Description and Resolution |
---|---|
Found multiple dependent relation items [xyz] and [abc] in payload |
|
Multiple paths leading to the same destination: xyz -> abc |
|
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 07:51 AM
Thanks for your reply, i am fully aware of what the error means, but in this scenario both server and computer require a Runs on relationship
cmdb_ci_computer | Runs on::Runs | cmdb_ci_vm_instance |
cmdb_ci_vm_instance | Runs on::Runs | cmdb_ci_virtualization_server |
cmdb_ci_vm_instance | Hosted on::Hosts | cmdb_ci_logical_datacenter |
so if i sent the payload in separate items as such it works, as i satisfying the IRE rules
{
"items": [{
"values": {
"install_status": 1,
"name": "vm instance",
"sys_class_name": "cmdb_ci_vm_instance",
"manufacturer": null,
"sys_id": "193d4605dbb2d050e590d1d3ca96192a",
"cpu_manufacturer": null,
"model_id": null
},
"className": "cmdb_ci_vm_instance"
}, {
"values": {
"install_status": 1,
"sys_class_name": "cmdb_ci_esx_server",
"name": "esx server",
"sys_id": "af88d2891bb690101c6afd9f034bcba0"
},
"className": "cmdb_ci_esx_server"
}]
"relations": [{
"parent": "0",
"type": "Runs on::Runs",
"child": "1"
}]
}
{
"items": [{
"values": {
"install_status": 1,
"name": "vm instance",
"sys_class_name": "cmdb_ci_vm_instance",
"manufacturer": null,
"sys_id": "193d4605dbb2d050e590d1d3ca96192a",
"cpu_manufacturer": null,
"model_id": null
},
"className": "cmdb_ci_vm_instance"
},{
"values": {
"sys_class_name": "cmdb_ci_win_server",
"install_status": 1,
"sys_id": "503d8a811bb690101c6afd9f034bcb81"
},
"className": "cmdb_ci_win_server"
}],
"relations": [{
"parent": "1",
"type": "Runs on::Runs",
"child": "0"
}]
}
However is i send them together as i would expect the point of this IRE API it fails, so either the rules doesnt make a lot of sense as you can create the exact multiple dependent relationship it doesnt like by splitting out the items.