Hello,
The attached module was accepted as valid by pyang and by the http://www.netconfcentral.org/ validator. IMHO it should be invalid as it seems to allow two a1 and two a2 definition inside choices desease and kongo.
The operation
<edit-config>
   <hospital>
      <a1>5</a1>
   </hospital>
<\edit-config>
would be abigious. Does the value 5 belong to the case pest or the case ebola?
Opinions?
regards Balazs

--
Balazs Lengyel                       Ericsson Hungary Ltd.
Senior Specialist
ECN: 831 7320
Mobile: +36-70-330-7909              email: [email protected]

module rec2
{
   namespace "http://rekursera.fett";;
   prefix fett;
   container hospital
   {
      leaf a0
      {
         type uint16;
      }
      choice disease
      {
         case pest
         {
            leaf a1
            {
               type uint16;
            }
         }
         case kolera
         {
            leaf a2
            {
               type uint16;
            }
         }
         case kongo
         {
            choice jungle-disease
            {
               case ebola
               {
                  leaf a1
                  {
                     type uint16;
                  }
               }
               case marburg
               {
                  leaf a2
                  {
                     type uint16;
                  }
               }
            }
         }
      }
   }
}
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to