We are using the following reference to query neighbour information from OneClick:
TechDocs : DX NetOps Spectrum 25.4 : GET connectivity
However, when a device model is connected to a Fanout model, it defeats the purpose. Since the reference uses IP addresses, is there any other way to expand Fanout models to the actual neighbor models via REST API queries?
For example:
So as to get the latest data on-demand, querying information via REST API instead of a static file from some command is preferable. This article shows how.
DX NetOps Spectrum all currently supported releases
A Fanout has two sides to it - one connected to your device and the other side with somewhat ambiguous connections to other interfaces. So the API requires a two-step approach to "traverse" it. You can achieve this by querying the associations of the Fanout model.
To retrieve the neighbour information, do the following:
Model_Handle of the Fanout model returned in the results.Is_Adjacent_to relation handle (0x10007):http://<OneClick_Host>:<Port>/spectrum/restful/associations/relation/0x10007/model/<Fanout_Model_Handle>?side=leftcd $SPECROOT/vnmsh./connect./show associations mh=<Fanout_Model_Handle> rel=0x10007
This will return a clean table of all the neighbour models sharing that adjacency link.Name 0x1006e or IP 0x12d7f):http://<OneClick_Host>:<Port>/spectrum/restful/model/<Model_Handle>?attr=0x1006e&attr=0x12d7f