Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-63

Datastore / Restconf / Data Broker should optionally support "default" statement

    XMLWordPrintable

Details

    • Improvement
    • Status: Confirmed
    • Resolution: Unresolved
    • None
    • 14.0.0
    • None
    • Operating System: All
      Platform: All

    Description

      Yang leaf default statement is not honored by Yang/datastore

      I have the following in a model

       

      leaf symmetric {
        type boolean;
        default false;
        description "If the chain is symmetric we will create two service paths, one ingress and another egress. Packets traverse the egress service path in the reverse order of the ingress path";
      }
      

       

      If a create new container and do not pass a value for leaf "symmetric" I expect "false" to be assigned. But this does not happen.

      If I read the container and try to check the value of "symmetric" from datastore I get a NULL pointer exception:

      if (serviceFunctionChain.isSymmetric()) {

      }

      And serviceFunctionChain is not NULL. All values are properly there with exception of "symmetric"

      ServiceFunctionChain{getName=SFC2, getSfcServiceFunction=[SfcServiceFunction\{getName=firewall-abstract2, getOrder=0, getType=class org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sft.rev140701.Firewall, augmentations={}}, SfcServiceFunction\{getName=napt44-abstract2, getOrder=1, getType=class org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sft.rev140701.Napt44, augmentations={}}], augmentations={}}

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              repenno Reinaldo Penno
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: