07-17-2023 07:40 AM
How do i redeploy a service using the following code in combination with discard-non-service-config
with ncs.maapi.Maapi() as m:
with ncs.maapi.Session(m, 'admin', 'system'):
with m.start_read_trans() as t:
instance = ncs.maagic.get_node(t, dst_path)
inputs = instance.re_deploy.get_input()
inputs.reconcile.create()
self.log.debug('Redeploying instance...')
instance.re_deploy(inputs)
self.log.debug('Instance reconciled.')
Solved! Go to Solution.
07-18-2023 05:08 PM
Hello
You need to add this
inputs.reconcile.discard_non_service_config.create()
07-18-2023 05:08 PM
Hello
You need to add this
inputs.reconcile.discard_non_service_config.create()
07-19-2023 12:43 AM
Ended up using successfull:
with ncs.maapi.Maapi() as m:
with ncs.maapi.Session(m, 'admin', 'system'):
with m.start_read_trans() as t:
instance = ncs.maagic.get_node(t, dst_path)
inputs = instance.re_deploy.get_input()
inputs.reconcile.create()
inputs.reconcile.discard_non_service_config.create()
self.log.debug('Redeploying instance...')
instance.re_deploy(inputs)
self.log.debug('Instance reconciled.')
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