Hide tailf:cli-enforce-table; on a specific condition

Hi Everyone,
I am stuck with an issue. I am using same yang file for two separate products. I am annotating a list with tailf:cli-enforce-table. The problem is the table is showing for two products. How can i hide a list using tailf:cli-enforce-table using a condition



In description the intention is not fully clear.
do you want (in the second product) remove/hide tailf:cli-enforce-table annotation only or do you wan to remove/hide the whole list?

If you need to remove annotation only, just pass different annotation file during compilation.

To make different data models (e.g. one with and one without the list) from the same yang file, you can use if-feature keyword and pass features as confdc parameter during yang->fxs compilation, e.g. -F <feature1> -F <feature>.

If if-feature cannot be used (e.g. under import statement), you may also consider option to generate yang file for each product from the same source (e.g. using yangbuilder or some scripting language).

In the attachment you can see i highlighted subport. I have two products both are using same data model. The only thing that works is tailf:hidden debug but it hides for both products. I want something, which can hide subport on a condition.



we do not see any attachment file in this page…

it’s not clear from the description what type of condition you mean - some environment condition at compile time, or some dependency on some yang elements/configuration in confd?

Also, it’s not clear what you mean by two products - is it some separate builds/projects that want to use one “shared” yang model you don’t want to have in two places, with minor variations?
(in this case, you could use e.g. one yang for both projects, and for one project where you want to have table annotation - use mini augmentation annotation yang)

thanks, b.r.