CiscoDevNet / yang-explorer

An open-source Yang Browser and RPC Builder Application
Apache License 2.0
438 stars 177 forks source link

failed to create correct junos restconf rpc #49

Closed vincenzheng closed 7 years ago

vincenzheng commented 7 years ago

the junos restconf rpc it created is not correct, for example, for get interface configration, it created the url: "url": "/restconf/api/running/configuration/interfaces/interface".

actually, it looks something like this: curl http://ip:port/rpc/get-interface-information -u "xxx:yyyy" -H "Content-Type: application/xml" -H "Accept: application/xml"

Do you know where to change the code to create the correct restconf? is it done on the web browser side?

pgohite commented 7 years ago

Please note that restconf support is experimental in yang-explorer, it need to be refactored once restconf draft becomes a RFC.

All RPCs are generated by server code, located in server/explorer/utils/restconf.py

It seems that your RPC in curl command is not based on config model you have loaded hence it can not generate correct path.