cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

1785
Views
4
Helpful
18
Replies
khgrant
Cisco Employee

NSO Rest .Net library

Anyone saw/heard/seen any .Net libraries that implement REST communication with NSO? It would help us to jumpstart the project my team is working on. I do not see anything on the developer.cisco.com

1 ACCEPTED SOLUTION

Accepted Solutions
khgrant
Cisco Employee

Let me re-phrase.

In REST you write straight to running config, so in that way it is similar to how IOS configures routers you press enter and you fire the config change.

In JSON RPC you implement what is called a “two phase commit mechanism” which is ideal for a transaction across multiple devices: you open a transaction first, you then have a preparation phase where you can: set your changes, validate them, you can do a commit-dry-run and finally you perform a commit of the changes.

As Stefan pointed out, you could use also NETCONF thanks to our JAVA library. The language libraries (JAVA, Erlang, Python) are also an option. However, you need to check your security requirements here as you working against an RPC socket. In NETCONF and JSON RPC you have SSH or TLS transport/authentication, encryption, etc.

View solution in original post

18 REPLIES 18
khgrant
Cisco Employee

Do not know what project you work on but, just for curiosity, why REST?

khgrant
Cisco Employee

I'm pretty sure there's nothing readily available specifically for NSO in .net. According to Mr. Google there seems be loads of generic .net based REST libraries waiting to serve, however.

khgrant
Cisco Employee

Rest seems to be the easiest way to talk to NCS from a standalone program. Are you aware of any other libraries that talk to ncs?

khgrant
Cisco Employee

Easiest is a point of view. Remember that you loose the concept off transactions. Have you checked the other apis? JSON RPC in particular.

khgrant
Cisco Employee

That is an interesting statement “ you loose the concept of transactions” – I assume you mean with REST as it does not fully implement all the netconf capabilities.

Can you elaborate more and why the JSON RPC is better from that aspect vs. say using netconf or in the future RESTCONF?

khgrant
Cisco Employee

The REST api does not implement all of netconfs capabilities, and - looking at the current draft - nor will RestConf:

(From the latest draft)

....

1.1. Simple Subset of NETCONF Functionality

...

 
   RESTCONF is not intended to replace NETCONF, but rather provide an
   additional simplified interface that follows REST principles and is
   compatible with a resource-oriented device abstraction.
...
Add to that that the current API lack even more functionality, such as event notifications.
The REST API is in no way a bad API, it just is what it is, a simple subset of NETCONF.

khgrant
Cisco Employee

I do not know what to elaborate. IMHO, I would use anything but REST. I would use REST for read only if I can. With JSON RPC, NETCONF and others you get commits, dry run, rollbacks, etc etc.