Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-209

Could not find Choice node parent AbsoluteSchemaPath

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 7249

    Description

      I get a Error when trying to parse a yang file like below:
      choice pool-type {
      container interface-pool {
      leaf dddd

      { type string; }

      list sub-option {
      description "Specifieds the user defined DHCP sub options";
      key sub-option-code;

      leaf sub-option-code {
      description "The sub option code of the user defined option";
      type uint8

      { range "1..254"; }

      }
      choice option-format {
      leaf-list ip-address

      { description "IP address list"; type string; }

      }
      }
      }
      }

      the error is:
      [ERROR] yang-to-sources: Unable to generate sources with org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl generator
      java.lang.IllegalStateException: Could not find Choice node parent AbsoluteSchemaPath

      {path=[(com:huawei:controller:application:test?revision=2016-07-12)pool-type, (com:huawei:controller:application:test?revision=2016-07-12)interface-pool, (com:huawei:controller:application:test?revision=2016-07-12)sub-option]}

      at com.google.common.base.Preconditions.checkState(Preconditions.java:197)
      ...

      Why compilation of this yang failure?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            zhuweisheng@huawei.com zhuweisheng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: