cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5871
Views
14
Helpful
16
Comments
frjansso
Cisco Employee
Cisco Employee

Create the Device

curl -H "Content-Type:application/vnd.yang.data+xml" -X PUT -u admin:admin -d @ios3.xml http://localhost:8080/api/running/devices/device/ios3

Fetch SSH Keys

curl -H "Content-Type:application/vnd.yang.data+xml" -X POST -u admin:admin http://localhost:8080/api/running/devices/device/ios3/ssh/_operations/fetch-host-keys

Sync From

curl -H "Content-Type:application/vnd.yang.data+xml" -X POST -u admin:admin http://localhost:8080/api/running/devices/device/ios3/_operations/sync-from

ios3.xml

<device xmlns="http://tail-f.com/ns/ncs">
  <name>ios3</name>
  <address>127.0.0.1</address>
  <port>10022</port>
  <state>
    <admin-state>unlocked</admin-state>
  </state>
  <authgroup>default</authgroup>
  <device-type>
    <cli>
   <ned-id xmlns:ios-id="urn:ios-id">ios-id:cisco-ios</ned-id>
    </cli>
  </device-type>
</device
>

Comments
yfherzog
Cisco Employee
Cisco Employee

@Islam_Hassanin if you want to use POST call then you'd need to provide the URI to the device-name list, and provide the new device-name instance in the payload.

If you want to add multiple devices to a group, you need to run a PATCH call on the same URI, and provide all new instances in the payload.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community:

Quick Links