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

JSON for "type bits" in YANG models not handled correctly

    XMLWordPrintable

Details

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

    • 4501
    • Normal

    Description

      We have a section with flags in one of our models, like this:

      leaf lrs-bits {
      type bits {
      bit lookup

      { description "Lookup bit."; }

      bit rloc-probe

      { description "RLOC-probe bit."; }

      bit strict

      { description "Strict bit."; }

      }
      description
      "Flag bits per hop.";
      }

      I'm trying to use RESTCONF to set more than one bit. However, if I use an array, only the last one mentioned is actually set:

      "hop": [

      { "address": "192.0.2.1", "lrs-bits": ["lookup", "rloc-probe", "strict"] }

      ,

      { "address": "192.0.2.2", "lrs-bits": ["lookup", "rloc-probe"] }

      ,

      { "address": "192.0.2.3", "lrs-bits": ["lookup", "rloc-probe", "strict"] }

      ]

      That is, when I read back the restcnf entry, only "strict" is set for the first hop, "rloc-probe" for the second hop, and "strict" for the last hop. I tried a few different combinations, but all were rejected.

      Attachments

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

        Activity

          People

            pkajsa Peter Kajsa
            ljakab Lori Jakab
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: