cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
550
Views
2
Helpful
7
Replies

Use my NSO loopback service thru the API ?

Hello Community

I do have the next basic service in my NSO which create a custom loopback.  Using the CLI works well
admin@ncs(config)# my_std_mgmt_loopback TEST_FOR_CISCO_COMUNNITY device my_sw loopback-intf 77 ip-address 77.77.77.77 net_mask 255.255.255.0
but I would like to use this service and create a loopback thru the API. Is that possible?  Can you give me an insight ?
NSO version: 6.1

1 Accepted Solution

Accepted Solutions

Python is the best! Check out the guide here https://developer.cisco.com/docs/nso/api/#!ncs

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

7 Replies 7

Check out the NSO Postman collection HERE this will show you how to create a loopback, edit the loopback and also delete the IP and the loopback itself via the API.

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

thanks for that. Im able to create the loopback using RESTCONF. However how can I consume my service thru the NSO API?

The specific method that you use to consume a service through an API will depend on your programming language of choice and your preferred development environment. Which is that?

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Im using python and request module to make API calls

Python is the best! Check out the guide here https://developer.cisco.com/docs/nso/api/#!ncs

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Thanks!

See the new $NCS_DIR/examples.ncs/development-guide/nano-services/netsim-sshkey/showcase_maapi.py for an intro example. Used by the NSO Getting Started Guide https://developer.cisco.com/docs/nso/guides/#!developing-and-deploying-a-nano-service
There are corresponding Python requests RESTCONF and CLI showcase variants too in the example.

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: