NETCONF can be used as a NED instead of a CLI-based NED. The built-in NED for IOS-XR does not appear to support NETCONF, however you can easily create your own NETCONF NED by pulling the YANG modules from the device itself.
Note that you may need an XRv9K for this to work properly. I have only tested this on XRv9K.
First we connect to the XRv9K using device-type cli .
Copy devices device xr1
device-type cli ned-id cisco-ios-xr...
connect
On the XRv, we must enable NETCONF:
Copy ssh server v2
ssh server netconf
netconf-yang agent ssh
netconf agent tty
In NSO, fetch SSH host keys and do a sync from:
Copy devices device xr1 ssh fetch-host-keys
devices device xr1 sync-from
Enable devtools and change the device-type to netconf
Copy devtools true
conf t
netconf-ned-builder project xr 7.11
device xrv9k-controller
local-user admin
vendor Cisco
max-download-threads 1
devices device xr1
device-type netconf ned-id netconf
no device-type cli protocol ssh
connect
We then fetch the YANG module list from the XRv:
Copy netconf-ned-builder project xr 7.11 fetch-module-list
netconf-ned-builder project xr 7.11 module Cisco-IOS-XR-* * select
Build the NED and export it:
Copy netconf-ned-builder project xr 7.11 build-ned
netconf-ned-builder project xr 7.11 export-ned to-directory /tmp
Transfer it to the packages dir
Copy mv -f /tmp/<filename>.tar.gz ~/nso-instance1/packages/
In NSO reload packages and use the new NED
Copy packages reload
devices device xr1
device-type netconf ned-id xr-nc-7.11
Reference