tail-f-systems / JNC

JNC (Java NETCONF Client) is the name of a Java library for communicating with NETCONF agents, and a plugin for pyang (http://code.google.com/p/pyang/) to generate Java classes from YANG models, to be used by the JNC library.
Other
77 stars 87 forks source link

top-level container's class not generated #150

Open martin-volf opened 4 months ago

martin-volf commented 4 months ago

If the module top-level container name is the same as module prefix, the pyang plugin does not generate the corresponding class:

module hosts {
  namespace "http://acme.com/ns/simple/1.0";
  prefix hosts;
  container hosts {
    leaf name {
      type string;
    }
  }
}

For a module like this, only Hosts.java corresponding to the module is generated; the problem is obviously related to that the container's class would be the same, i.e. Hosts.java.