clicon / clixon-controller

Clixon network controller
Apache License 2.0
12 stars 4 forks source link

Device-specific tolerance of unknown YANG by replacing them with anydata #59

Closed olofhagsand closed 6 months ago

olofhagsand commented 8 months ago

Some devices have configs that do not have corresponding YANG statements. This can be partly solved by a slight twist to CLICON_YANG_UNKNOWN_ANYDATA but then it applies globally, which have the sideeffects of not detecting erroneous XML. Instead, add a device / device-profile addition to yang-config enum, eg:

              enum BIND_UNKNOWN_ANYDATA{
                description
                "Bind YANG model to config, but do not validate
                 Also, treat unknown XML nodes as YANG anydata 
                 Downside is: sanity checks of erroneous XML may not be properly detected, and may not be edited by the autocli;
            }