How do i rename the device name in nso through python maapi
From nso cli i can rename device name to some new name
rename devices device old_name new_name
i am trying this but getting error:
with ncs.maapi.Maapi() as m: with ncs.maapi.Session(m, 'azhar', 'system'): with m.start_write_trans() as t: root = ncs.maagic.get_root(t) old_device = root.devices.device['MADSIM11'] m.move(t.th, ['new_device'], old_device._path) t.apply(True, maapi.COMMIT_NCS_NO_NETWORKING)
this is the error i am getting:
Traceback (most recent call last): File "/home/azhar/Documents/scripts/rename_nso_devices.py", line 173, in <module> m.move(t.th, [new_device], old_device._path) File "/opt/ncs/current/src/ncs/pyapi/ncs/maapi.py", line 272, in proxy return real(self2.msock, *args, **kwargs) TypeError: tokey must be a _ncs.Value instance [Finished in 0.1s with exit code 1]
Do you have a hard time staying updated on what's going on due to the massive flow of information?
I recommend that you manage your subscription and notification settings by clicking on your avatar up on the right corner.
Select "My subscriptions" ...
The NSO community is constantly growing. The number of unique visitors on the Developer Hub has been increasing steadily since the beginning and the trend continues. Network Automation is, as we could read in Cisco’s inaugural N...
We're excited to announce our third annual Cisco NSO Developer Days NYC!
Returning to New York City, the two-day event is a tremendous opportunity to learn more about real-world applications of automation, gain a better understanding of NSO technol...
Want to run both python2 and python3 packages at the same time? Maybe you don't want to upgrade all your python2 services at the same time? With some small changes to the "ncs-python-start-vm" script you can. While you are at it maybe you would like...