I would like to use the “-F Feature” as part of confdc to support only the following features in firstname.lastname@example.org:
What should be the syntax , in order to have only these features and not others (e.g. nsr)?
confdc -F auto-cost -F graceful-restart -F admin-control ... or
confdc -F auto-cost,graceful-restart,admin-control ....
From the confdc(1) man-page:
-Ffeatures, --feature features
Indicates that support for the YANG features should be present in the fxs file. features is a string on the form modulename:[feature(,feature)*]
This option is used to prune the data model by removing all nodes that are defined with a “if-feature” that is not listed as feature.
This option can be given multiple times.
If this option is not given, nothing is pruned, i.e., it works as if all features were explicitly listed.
If the module uses a feature defined in an imported YANG module, it must be given as modulename:feature.
Thanks for the quick response.
After using the command:
“confdc -F auto-cost -F graceful-restart -F admin-control”
I used the emit command to generate .h file and still see the definitions for nsr.
When I used the option:
“confdc --no-features” and performed the emit command to generate .h file I don’t see the nsr definitions.
August 30, 2017, 7:46pm
I’m afraid the confdc(1) man page is rather confusing here - you should focus on the statement
features is a string on the form modulename:[ feature(, feature)*]
and ignore the statement
If the module uses a feature defined in an imported YANG module, it must be given as
The second statement is correct, but redundant (and thus confusing), since per the first statement,
modulename: must always be included.
I.e. assuming that the features are defined in the module called “isis”, the correct form is
Thanks for the clarification.
It makes sense to use this syntax for all cases: ( -F :feature[,feature2])
Such approach is used also in pyang compiler
September 3, 2017, 8:09am
Can I add all the supported features in annotate YANG module instead of mention it in the confdc command?
Is there such definition in Confd?
September 4, 2017, 6:28am
No, this is not possible - annotations just add statements that could alternatively be written directly in the module, and there is no ‘enable-feature’ statement.