834
Views
4
Helpful
2
Replies
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Labels:
- Labels:
-
Developer
1 Accepted Solution
Accepted Solutions
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 05:08 PM
Hello
You need to add this
inputs.reconcile.discard_non_service_config.create()
2 Replies 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 05:08 PM
Hello
You need to add this
inputs.reconcile.discard_non_service_config.create()
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.')
