04-30-2020 12:14 PM
Hi All,
We have a NSO deployment using the stacked services model. As such we have a "Main" module and then multiple "Child" modules that actually build individual services:
Module_Main
Module_Child
Module_Child
Module_Child
...
Currently when we make the modules and do a packages reload, all modules show up in the drop down in the NSO GUI. I would like to only display the Module_Main in the drop-down instead of all the child modules too. Is there some method to do this (hide the module, but still have it be functional as normal) like a flag or something I can set?
Thanks in advance for your help!
Solved! Go to Solution.
05-06-2020 05:36 AM - edited 05-06-2020 05:36 AM
Hello,
I am not sure which dropdown you are referring to. But in general, if you want to hide data you can use the yang attribute tailf:hidden a.k.a. hidden data and hidegroups. The "hidden" statements is an extension defined in the tail-common YANG module.
e.g in the yang use:
tailf:hidden hiddenthings;
A hide group can only be unhidden if the group is listed in the ncs.conf
<hide-group> <name>hiddenthings</name> </hide-group>
Then you can unhide the data in the current session, e.g. cli:
unhide hiddenthings
The data should be hidden in the webui, but currently there is no option to unhide it. The jsonrpc the method is called unhide_schema. If needed you can use curl to manually call unhide_schema in the current transaction.
/Jon
05-06-2020 05:36 AM - edited 05-06-2020 05:36 AM
Hello,
I am not sure which dropdown you are referring to. But in general, if you want to hide data you can use the yang attribute tailf:hidden a.k.a. hidden data and hidegroups. The "hidden" statements is an extension defined in the tail-common YANG module.
e.g in the yang use:
tailf:hidden hiddenthings;
A hide group can only be unhidden if the group is listed in the ncs.conf
<hide-group> <name>hiddenthings</name> </hide-group>
Then you can unhide the data in the current session, e.g. cli:
unhide hiddenthings
The data should be hidden in the webui, but currently there is no option to unhide it. The jsonrpc the method is called unhide_schema. If needed you can use curl to manually call unhide_schema in the current transaction.
/Jon
05-06-2020 07:30 AM
Hi Jon,
Thanks very much for the reply, that does exactly what I needed and the package is no longer visible in the GUI after the change but still functions properly. To further elaborate for anyone else who may need the same thing, I implemented it like this:
list MY_LIST {
description "List that builds stuff.";
tailf:hidden no_gui;
key my_key;
leaf my_leaf {
description "This is a leaf.";
type string;
}
Inserting it where I did will hide the entire list, but you could probably hide smaller parts of the code with it if you needed to.
Thanks again for the help!
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