11-07-2023 02:23 AM
admin@ncs# services var-vdom test re-deploy dry-run
cli {
local-node {
data devices {
device bng01 {
config {
interface {
Loopback 0 {
ip {
address {
primary {
- address 127.0.0.1;
+ address 2.2.2.2;
}
}
}
}
}
}
}
}
}
}
admin@ncs# show running-config devices device fg01 config global system admin trusthost1
devices device fg01
config
config global
config system admin
edit user
trusthost1 10.0.0.0 255.0.0.0
exit
!
!
!
!
admin@ncs#
Error: Python cb_create error. '{user} not in /ncs:devices/device{fg01}/config/fortinet-fortios:global/system/admin/admin-list'
11-07-2023 05:43 AM - edited 11-07-2023 05:44 AM
Solved with maapi:
with ncs.maapi.single_write_trans('admin', 'admin') as t:
root = ncs.maagic.get_root(t)
device = root.devices.device['fg01']
config = device.config
admin_list = config.fortinet_fortios__global.system.admin.admin_list[service.vdom_admin]
trusthost = admin_list.trusthost1
trusthost.ip_mask.class_ip = '2.2.2.2'
t.apply()
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