Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-118

enumeration type in key of list error

    XMLWordPrintable

Details

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

    • 586

    Description

      Generation of java code from this yang works:

      typedef permission-type {
      type enumeration

      { enum permit; enum deny; }

      }

      container access-control-services {
      list access-control-service {
      key "permission";

      leaf permission

      { type permission-type; }

      }
      }

      -------------------------------------------------------------
      but generation from this has error

      container access-control-services {
      list access-control-service {
      key "permission";

      leaf permission {
      type enumeration

      { enum permit; enum deny; }

      }
      }
      }

      [ERROR] /PathToGeneratedClass/AccessControlServiceBuilder.java:[75,54] incompatible types
      required: packageName.AccessControlService.Permission
      found: java.lang.Enum

      Attachments

        Issue Links

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

          Activity

            People

              mvitez@cisco.com Martin Vitez
              msunal@cisco.com Martin Sunal
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: