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

Default value not used in RPC

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 4315

      This bug was seen while fixing CONTROLLER-1420. I have created a new leaf in an RPC message, and provided a default value for it.

      leaf count

      { type uint16; default 0; description "Number of cars to create. Zero implies unlimited cars; use stop-stress-test rpc to stop the test."; }

      During tests, if the RPC does not contain the 'count', then getCount() returns null. I expect it to return 0. I had to add the value in my implementation. This is fragile, as the code has to keep track of the default value in yang model.

            Unassigned Unassigned
            ShaleenS Shaleen Saxena
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: