Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-5663

[ONOS-YANG-TOOLS] leaf-ref(resolved data-type empty) under typdef used in union

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.8.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      3

      Description

      1. if leaf ref (which resolved type is empty) is defined under typedef and used under union
      error should be thrown for this scenario at compile time as empty type is not allowed in union

      2. if two leafs defined as

      leaf l1

      { type empty; }

      typedef type-def1 {
      type leafref

      { path ../l1; }

      }

      leaf list4 {
      type union

      { type int32; type type-def1; }
      }

      leaf list5 {
      type union { type int32; type type-def1; }

      }
      then compilation is failing only for second one not for first one,
      expected :- compilation should have failed first time itself

      3. if two leaf defined as

      typedef type-def2 {
      type leafref

      { path ../../l1; }

      }

      leaf list4 {
      type union

      { type int32; type type-def1; }

      }

      leaf list5 {
      type union

      { type int32; type type-def2; }

      }

      then compilation is getting failed first time itself

        Attachments

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

          Activity

            People

            Assignee:
            huawei-adarsh Adarsh m
            Reporter:
            sonu4huawei sonu gupta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: