cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1668
Views
0
Helpful
2
Replies

How to do partial-sync-from using python maapi or maagic

nso20
Level 1
Level 1

Hello,

I did partial-sync-from from NSO CLI as per NSO user guide. But I need to do partial-sync-from using python maapi or maagic, I tried the below, but no luck:

with ncs.maapi.Maapi() as m:
    with ncs.maapi.Session(m, 'admin', 'python'):
        with m.start_read_trans() as t:
            root = ncs.maagic.get_root(t)

            out = root.devices.partial_sync_from.path.[ /devices/device[name=\'cisco\']/config/ios:ip/vrf ]  

1 Accepted Solution

Accepted Solutions

yfherzog
Cisco Employee
Cisco Employee

See if this post helps you: https://community.cisco.com/t5/nso-developer-hub-discussions/call-partial-sync-from-function-in-cb-create/m-p/3895272/highlight/true#M4055

 

(you should not call it from cb_create(), but I think the process is correct)

View solution in original post

2 Replies 2

nso20
Level 1
Level 1

Can anyone help here ?

yfherzog
Cisco Employee
Cisco Employee

See if this post helps you: https://community.cisco.com/t5/nso-developer-hub-discussions/call-partial-sync-from-function-in-cb-create/m-p/3895272/highlight/true#M4055

 

(you should not call it from cb_create(), but I think the process is correct)