clicon / clixon

YANG-based toolchain including NETCONF and RESTCONF interfaces and an interactive CLI
http://www.clicon.org/
Other
215 stars 72 forks source link

Missing/no namespace error in YANG augments with default values #354

Closed olofhagsand closed 2 years ago

olofhagsand commented 2 years ago

This error appeared in 5.8.0. Error can manifest in several ways. Example symptoms: 1) On startup or edit of config with the error message on the form:

   <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <rpc-error>
        <error-info>
          <bad-element>enable</bad-element>
       </error-info>
       <error-message>Missing namespace</error-message>
      </rpc-error>
   </rpc-reply>

2) CLI show config xml2ns_recurse: 552: XML error: No namespace associated with ngmap:parameters: No such file or directory

This occurs in YANG constructs on the form:

module example {
  prefix ex;
  container table{
  }
}
module augment {
   prefix aug;
   import example {
      prefix ex;
   }
   augment "/ex:table" {
      container map{
         leaf name{
            type string;
         }
     leaf enable {
        type boolean;
        default true;
         }
      }
   }
}

The augmented part must also have a configured part, such as:

 cli> set table map name x
 cli > show configuration 
Aug 17 16:08:48: xml2ns_recurse: 552: XML error: No namespace associated with aug:enable: No such file or directory