Hello,
I need to create some automation scripts that allow managing the DMA services based on CSV files (create/delete/update/re-apply or change service template/etc), but I could not find any documentation or example codes. Is there a document or a generic code I can use to base my automation script on?
Thanks in advance
MAXIMILIANO FILHO [DevOps Enabler] Selected answer as best 17th February 2023
Hi Maximiliano,
As far as I know there are two possible options to work with services from an automation script:
- Using the DataMiner class library:
- Create Service: You can find a snippet to create a service in the Protocol Development Guide (Create a Service). In this case you will need to use a engine object instead of a protocol object (e.g. IDms myDms = engine.GetDms())
Something that I didn't check (and I believe it is not supported) is the creation of a service from a service template (using this library). However, there is workaround described in this question (Apply service template from automation script)
- Update, Remove Service: You can use the IDmsService methods to work update and remove services - Using the Web API:
You could use the following methods from the web API to work with services:
- CreateService
- EditService
- DeleteService
- You can also interact with service templates from the Web API: (CreateServiceTemplate, DeleteServiceTemplate, ReapplyService)
Additional methods related to services can be found in (Web Services V1)
MAXIMILIANO FILHO [DevOps Enabler] Selected answer as best 17th February 2023
Hi Miguel,
Thank you so much!