NSO API using Python #2
Last updated
Last updated
Load blank.ssh.enabled.cfg
#IOS-XE
config replace flash:blank.ssh.enabled.cfg
#IOS-XR
configure
load bootflash:blank.ssh.enabled.cfg
commit replace
u
Create a python script that syncs all XE devices.
The script should iterate over the XE group, and do a “sync-from” for each device
You can make a change to R1 and R2 to confirm that it works properly.
Create a new script that deletes any loopback12 on all XE routers.
with ncs.maapi.single_read_trans('admin', 'python') as t:
root = ncs.maagic.get_root(t)
device_group = root.devices.device_group['XE']
for device in device_group.device_name:
device_object = root.devices.device[device]