Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-655

Config-sub sys code generator not handling container with uses statement

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Cannot Reproduce
    • Helium
    • None
    • config
    • None
    • Operating System: Mac OS
      Platform: PC

    • 1451

    Description

      The config code generator reports an error when using the a config with a container containing a "uses" statement. The generator accepts the uses statement without the container.

      [ERROR] yang-to-sources: Unable to generate sources with org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator generator
      java.lang.IllegalStateException: Unexpected 'refine' child node size of container authz-data
      at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
      at org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntryBuilder.extractDependency(ModuleMXBeanEntryBuilder.java:473)
      at org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntryBuilder.getAttributeValue(ModuleMXBeanEntryBuilder.java:443)
      at org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntryBuilder.fillConfiguration(ModuleMXBeanEntryBuilder.java:411)
      at org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntryBuilder.processChoiceCaseNode(ModuleMXBeanEntryBuilder.java:274)
      at org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntryBuilder.build(ModuleMXBeanEntryBuilder.java:137)
      at org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry.create(ModuleMXBeanEntry.java:160)
      at org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator.generateSources(JMXGenerator.java:134)

      module aaa-authz-service-impl {

      yang-version 1;
      namespace "urn:opendaylight:params:xml:ns:yang:controller:config:aaa-authz:srv";
      prefix "aaa-authz-srv-impl";

      import config

      { prefix config; revision-date 2013-04-05; }

      import opendaylight-md-sal-binding

      { prefix mdsal; revision-date 2013-10-28; }

      import authorization-schema

      { prefix authzs; revision-date 2014-07-22; }

      revision "2014-07-01"

      { description "Initial revision."; }

      // This is the definition of the service implementation as a module identity.
      identity aaa-authz-service

      { base config:module-type; // Specifies the prefix for generated java classes. config:java-name-prefix AuthzSrv; }

      // Augments the 'configuration' choice node under modules/module.
      augment "/config:modules/config:module/config:configuration" {
      case aaa-authz-service {
      when "/config:modules/config:module/config:type = 'aaa-authz-service'";

      container data-broker {
      uses config:service-ref {
      refine type

      { mandatory false; config:required-identity mdsal:binding-data-broker; }

      }
      }

      container authz-data

      { uses authzs:authorization-grp; }

      }
      }

      Attachments

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

        Activity

          People

            mmarsale@cisco.com Maros Marsalek
            wojdec Wojciech Dec
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: