Subject: [netmod] Inner lists in unique - are they allowed?

From: Balazs Lengyel <[email-masked]>
Date: Wed, 10 Jun 2015 13:38:24 +0200

Hello,
I have the following model

     list rootlist1 {
         description  dd;
         key rootlist1Key1;
         unique "rootlist1StrAtt1 innerContainer/innerLeaf1 
innerContainer/innerList/innerUnique1";
         leaf rootlist1Key1 {  type string;}
         leaf rootlist1StrAtt1 {  type string;}
         container innerContainer{
             leaf innerLeaf1 { type string;}
             list innerList {
                 key innerKey;
                 leaf innerKey { type uint8;}
                 leaf innerUnique1 { type uint16;}
             }
         }
     }

 From PYANG I get teh error message:

the identifier "innerList" in the unique argument references a list; 
this is not legal

However the standard does not mention that lists are not allowed.
innerContainer/innerList/innerUnique1 follows the 
descendant-schema-nodeid and it refers to a leaf at the end.

So is referencing the leaf within the innerList allowed or not? If not 
this should be described in the draft.

SImilarly can a leaf under a choice/case be part of the unique? IMO the 
RFC/draft allows it, but I would not.
regards Balazs

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