Forum Discussion
The ERI PropertySources only ensure that unique identifiers are stored on the device itself. It's a prereq for actually tying devices together. Most often the ERI has the mac address of the device. If all the devices you want to add as nodes already have a predef.externalResourceID, then you don't have to worry about the property source at all. But it is something to check.
The TopologySource is the one that maps the parents to the children.
So, if Device1, Device2, and Device3 already have predef.externalResourceID, then all you have to worry about is the TopologySource. Let's add some fictional details to your example:
1. Device1: 10.1.1.1 (RCA – Entry Point] 8a:72:63:5f:45:4e, LM device id: 1
2. Device2: 10.1.1.2 [child to Device1] 1c:b0:85:0b:fc:6f, LM device id: 2
3. Device3: 10.1.1.3 [child to Device1] 8f:05:2f:59:56:ed, LM device id: 3
You have a property source, out of the box, that likely already put the mac address as one of the ERIs on each device. If these really are ping only, then you'll need to create an ERI PropertySource (it can be done in one) to assign the mac address, or some other UUID to each device. This can be done with a PropertySource like this one.
Once all your devices have ERIs, you would then need to write a TopologySource that ties those ERIs together. The TS would only really need to run on any parents. The output would look like this in your example (assuming you used the linked ERISource):
{ "edges": [ { "type": "Depends On", "from": "LMID_2", "to": "LMID_1" }, { "type": "Depends On", "from": "LMID_3", "to": "LMID_1" } ] }
Related Content
- 6 years ago
- 6 years ago