11-26-2018 10:34 PM
I'm writing NSO service package using Java with template.
There have been several device-templates stored in NSO CDB.
I'd like to configure devices by applying device-template in the service.
Is there any way to implement it in Java or config-template?
Thanks,
Steven
Solved! Go to Solution.
11-27-2018 03:12 PM
In order to apply a device template from the service create code, you would need to execute the apply-template action. Generally speaking, initiating an action from within the service create is not a good idea since the action will attempt to start a new transaction within your already executing transaction for the service create.
A way to do this is to convert your device-template to a config-template (simple process outlined in the 'Create a Config-template from a Device-template' section in the NSO Development guide) and then simply provide the parameter variables and apply the config-template from your service.
-Larry
11-27-2018 03:12 PM
In order to apply a device template from the service create code, you would need to execute the apply-template action. Generally speaking, initiating an action from within the service create is not a good idea since the action will attempt to start a new transaction within your already executing transaction for the service create.
A way to do this is to convert your device-template to a config-template (simple process outlined in the 'Create a Config-template from a Device-template' section in the NSO Development guide) and then simply provide the parameter variables and apply the config-template from your service.
-Larry
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide