Hello,
I would like to perform over JUNIPER devices :
rguilloux@ncs(config)# deactivate devices device ysty....
I wants to use ncs maapi/maagic python API to perform it but I don't find any command in root object for it :
with ncs.maapi.Maapi() as m: with ncs.maapi.Session(m, "nso", "pyNORTHNSO"): with m.start_write_trans() as t: root = ncs.maagic.get_root(t) out = root.devices.device["RNET-M6"] for i in out.config: print i
Any idea of how to launch deactivate using NSO python API ?
Thanks,
Romain
You would have to use the low-level MAAPI (not MAAGIC) API to set attributes ("inactive" is an attribute). Setting attributes from a service does not work the way you'd expect, however, so I can't recommend this approach.