admin connected from 127.0.0.1 using console on
*
admin@ncs# config term
Entering configuration mode terminal
admin@ncs(config)# devices device ios0
admin@ncs(config-device-ios0)# address
127.0.0.1
admin@ncs(config-device-ios0)# port 10022
admin@ncs(config-device-ios0)# authgroup
default
admin@ncs(config-device-ios0)# device-type cli
ned-id cisco-ios-cli-3.8
admin@ncs(config-device-ios0)# state admin-
state unlocked
admin@ncs(config-device-ios0)# exit
When all three simulated IOS devices are onboarded and
the configuration changes are committed, the devices can
be displayed through a GET call over the RESTCONF
interface. Cisco NSO exposes its full functionality over
this RESTCONF interface that is available by default
starting at
http://
list of all the devices that have been onboarded can be
obtained by performing a GET call on the following
RESTCONF URI resource:
http://
ncs:devices/device. The curl command to test this GET
call looks as follows:
Click here to view code image
$ curl --request GET
'http://localhost:8080/restconf/data/tailf-
ncs:devices/device' \
--header 'Content-Type: application/yang-
data+json' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='