Hi Dojo,
Is there any fast and optimized way to retrieve the elements on a DMS that are using a certain type of connector?
I know that we can retrieve all the elements present on the DMS.
Just wondering if we have a call that does the filtering already 🙂
Thank you,
Ana
Hi Ana,
If using an automation script you can use the Engine method FindElementsByProtocol, which will allow you to filter either per protocol or per protocol and version.
If wanting to use it elsewhere, you can use the GetLiteElementInfo SLNet message similar to this answer but instead of filling in the DataMiner Id and Element Id of a specific element, you leave them with their default values and select the correct value for the Protocol Name and Version.
Something like
GetLiteElementInfo glei = new GetLiteElementInfo();
glei.ProtocolName = "Skyline Protocol Name";
glei.ProtocolVersion = "1.0.0.1";
glei.IncludePaused = true;
glei.IncludeStopped = true;
Do note that these SLNet calls are internal calls and we tend to not recommend using them, as it is not officially supported and we cannot guarantee that it will still work in the future. As a rule, you should avoid using SLNet calls, as these are subject to change without notice.
Hope it helps
Hi Ana,
Would you be using this in Automation, a protocol or the dashboards?
e.g. in automation, you can just use the engine.FindElementsByProtocol function.
engine.FindElementsByProtocol("NMOS IS-05","Production");
You can also just go to your surveyor/rootview and click on the hamburger menu and select actions/export. Choose .csv, 'data as displayed on view card'. Then you have a csv with all the info including protocol and version and you can do whatever you want with it.
Sorry.. misread your question. You want to prefilter the output. Ignore my answer.
Just to add a small clarification in regards to the SLNet usage, in order for this to work the Send Message variant must be used instead of the Send Single Response variant as in the linked question.