cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
410
Views
0
Helpful
1
Replies

utilizing non-service-related yang nodes for portal

erdemk
Level 1
Level 1

Dear nso community,

 

I want to ask your guidance on subject matter .. any idea is appreciated ..

 

For a customer project, we are developing a custom portal. And we are wondering whether we can make use of existing webui related yang models (tailf-webui.yang or tailf-ncs-webui.yang) or a custom developed yang model , in order to enhance portal experience or solve a common problem. Or in other words, what are the typical use cases to utilize existing webui yang models (or possibly additional augmented custom models) for portal.

I think, a portal can be developed by only using get_schema and subscribe_changes methods and all other necessary methods but only for service related yang nodes. On the other hand, if some more useful things can be achieved by webui related yang nodes, we would like to know typical use cases for the same , to utilize them.

 

Below are some more specific questions :

1/ We are not interested in schematics/icons/images so i clipped this part, we are interested in user info .. below is the yang excerpt from tailf-webui.yang .. i couldn't fetch user=admin related info as i explain below ..
Question is : how can we see this list as populated ( or it is already populated and i am missing something to see it) ?
Question is : What is a typical use case that this info is used for and how can we populate this data ? We have some imagination for utilizing profile data, how about the other nodes.

module: tailf-webui
+--rw webui
+--rw data-stores
+--rw user-profile* [username]
| +--rw username string
| +--rw profile* [key]
| | +--rw key string
| | +--rw value? string
| +--rw saved-query* [list-path name]
| +--rw list-path string
| +--rw name string
| +--rw serialized-query string
+--rw data-store* [key]
| +--rw key string
| +--rw value? string
+--rw saved-query* [list-path name]
+--rw list-path string
+--rw name string
+--rw serialized-query string


How i tried to fetch user=admin related info :

i looked at Chrome inspection window for webui-one[<ip>:8080] (nso-6.1 if that makes any difference),  make example 17-mpls-vpn-python (everything as default, in which case local authentication takes presendence).

> in the following scenario , response is "profile data not found" .. i also tried to fetch this info with json-rpc and see that get_schema returns data for "/webui:webui/data-stores" but not for "/webui:webui/data-stores/user-profile{admin}" .. so conclusion is user-profile for user=admin is not returned.

Chrome inspection for example 17-..
request : get_value .. path: "/webui:webui/data-stores/user-profile{admin}/profile{userdata}/value"
response :"message": "Data not found", "internal": "jsonrpc_data_leaf328"

python json-rpc :
request :
>>> payload = {"jsonrpc": "2.0", "id": 1, "method": "get_schema", "params": {"path": "/webui:webui/data-stores/user-profile{admin}", "insert_values": True", "th": th_id}}
>>> req = requests.post(url, cookies=cookies_string, json=payload, verify=False)
response:
>>> req.text
'{"jsonrpc":"2.0","error":{"type":"data.not_found","code":-32000,"message":"Data not found"},"id":1}'

 


2/ What could be any other typical use cases that, this tailf-webui.yang/tailf-ncs-webui.yang files are augmented with some more yang nodes and utilized for a use case. And how can we populate this data per session.

 


Many thanks in advance and,
regards

1 Reply 1

erdemk
Level 1
Level 1

any comment is appreciated ..