[YANG] more clarifications on unique-stmt

Andy Bierman <ietf@andybierman.com> Mon, 14 January 2008 17:59 UTC

Return-path: <yang-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1JETbG-0000M8-W7; Mon, 14 Jan 2008 12:59:54 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JETbG-0000M3-J2 for yang-confirm+ok@megatron.ietf.org; Mon, 14 Jan 2008 12:59:54 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JETbG-0000Lv-8o for yang@ietf.org; Mon, 14 Jan 2008 12:59:54 -0500
Received: from smtp116.sbc.mail.sp1.yahoo.com ([69.147.64.89]) by chiedprmail1.ietf.org with smtp (Exim 4.43) id 1JETbF-0000T4-QV for yang@ietf.org; Mon, 14 Jan 2008 12:59:54 -0500
Received: (qmail 55320 invoked from network); 14 Jan 2008 17:59:53 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@67.126.240.103 with plain) by smtp116.sbc.mail.sp1.yahoo.com with SMTP; 14 Jan 2008 17:59:52 -0000
X-YMail-OSG: UJO9TdwVM1mxBQbPRrgcHpNajGtEuD_upTdQqsInulJnesmW
Message-ID: <478BA392.5080204@andybierman.com>
Date: Mon, 14 Jan 2008 10:01:54 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: yang <yang@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 538aad3a3c4f01d8b6a6477ca4248793
Subject: [YANG] more clarifications on unique-stmt
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: YANG modeling Language for NETCONF <yang.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=subscribe>
Errors-To: yang-bounces@ietf.org

Hi,

Sec. 7.8.3 is not entirely clear wrt/ nested objects.

It should be stated that the descendant-schema-nodeid sequence
includes choice and case names, even though these nodes are
not in the config, and are not used in Xpath expressions
which refer to a config.  This applies to augment as well.

// problem 1: choices
list a {
   unique "B/X/xx B/Y/yy";
   choice B {
     mandatory true;
     case X {
       leaf xx {type int32; }
     }
     case Y {
       leaf yy {type string; }
     }
   }
}


Is this just a garbage-in/garbage-out scenario?
Obviously, only xx or yy will be present, but never both.


// problem 2: nested lists
list c {
   config false;
   unique "d/b e";
   list d {
      key a;
      leaf a { type string; }
      leaf b { type instance-identifier; }
   }
   leaf e { type uint8; }
}

This is legal?
It means (within list c) every tuple of [d/b[a], e] must be unique, if 'e' exists,
and all instances of 'c/d/b' do not have to be unique at all if E is not present?
But within list d, b is not required to be unique at all, so this seems conflicting.

IMO, deep keys, deep unique targets, deep augment targets,
are all part of the same problem space, and one clean
solution is needed for all of them.


Andy




_______________________________________________
YANG mailing list
YANG@ietf.org
https://www1.ietf.org/mailman/listinfo/yang