cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
118
Views
0
Helpful
1
Replies
Highlighted

[NSO-4.6.2] cli perform deactivate over junos using MAAPI

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

Everyone's tags (4)
1 REPLY 1
Cisco Employee

Re: [NSO-4.6.2] cli perform deactivate over junos using MAAPI

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.