11-19-2019 01:55 PM - edited 11-19-2019 01:55 PM
NSO get_schema response gives different snippets of data based on if a service name is set or not OR if service type is set or not (for example if P2P or EVPN is set for L2 VPN service).
Is there an NSO way to retrieve the entire schema for given YANG path based on model instead of getting partial schema based on partially configured service state?
Thanks,
Rama
11-19-2019 02:40 PM
11-19-2019 03:26 PM
Following is the example:
curl -i -X POST http://localhost:8080/jsonrpc -d '{"jsonrpc":"2.0","id":174,"method":"get_schema","params":{"evaluate_when_entries":false,"levels":1,"path":"/cisco-sr-te-cfp:sr-te/cisco-sr-te-cfp-sr-policies:policies/policy","stop_on_list":false,"th":2}}' > test_eval_false.json
bash-5.0# curl -i -X POST http://localhost:8080/jsonrpc -d '{"jsonrpc":"2.0","id":174,"method":"get_schema","params":{"evaluate_when_entries":true,"levels":1,"path":"/cisco-sr-te-cfp:sr-te/cisco-sr-te-cfp-sr-policies:policies/policy","stop_on_list":false,"th":2}}' > test_eval_true.json
bash-5.0# ls -l test_eval_*
-rw-r--r-- 1 root root 11349 Nov 19 23:22 test_eval_false.json
-rw-r--r-- 1 root root 11433 Nov 19 23:22 test_eval_true.json
Even evaluate_when_entries is set to false, shouldn't this be unconditional and give more?
Actual problem is with L2 VPN. In here, when we set schema_type to p2p, only then we are receiving p2p specific info as part of schema. But, we would like to get p2p related info and evpn related info in the first round of get_schema. Is there a way to do this?
Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide