Hi Dojo
A Lifecycle Service Orchestration (LSO) script needs to set alarm templates on certain elements when they are getting booked. These elements are child Dynamic Virtual Elements (DVE). To set the alarm templates, I would need to know the ID's of these child DVE's.
For now, my approach is to cast the Skyline.DataMiner.Net.Messages.Resource object to a Skyline.DataMiner.Net.ResourceManager.Objects.FunctionResource object as this makes the ID of the parent DVE available. But I seem to be stuck here.
SrmResourceConfiguration[] resources = srmBookingConfiguration.GetResources().ToArray();
foreach (var resource in resources)
{
FunctionResource functionResource = resource.Resource as FunctionResource;
Element element = engine.FindElement(functionResource.MainDVEDmaID, functionResource.MainDVEElementID);element.SetAlarmTemplate(alarmTemplateName);
}
What is the best approach to be able to retrieve the element ID's of these child elements?
Thank you in advance!
Kind regards
Hi Michiel,
I assume your FunctionResources are generated from a table (entrypoint)? Your FunctionResource object will have a reference to the row it's generated from in the LinkerTableEntries property.
Depending on the structure of the parent connector, it should be possible then to map this entry to the entry in the table where the DVE is generated from? That row should contain a column with the element id of that DVE.
Please let me know in case this explanation is not clear, because it's not that straight forward to explain.
Hi Joey, thanks a lot for your answer! Indeed, I should retrieve the table that generates the DVE’s. In the meantime I foud a way to do it.