cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
772
Views
0
Helpful
2
Replies

get_schema for service YANG returns partial schema info at times

rlinga
Cisco Employee
Cisco Employee

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

2 Replies 2

vleijon
Cisco Employee
Cisco Employee
I assume that you are talking about the JSON RPC API? I am not entirely sure what you mean, are you saying that even using evaluate_when_entries you don’t get the entire schema? Can you give an example?

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