Re: [Rtg-yang-coord] Restrictions on list keys

Mahesh Jethanandani <mjethanandani@gmail.com> Mon, 02 March 2015 04:32 UTC

Return-Path: <mjethanandani@gmail.com>
X-Original-To: rtg-yang-coord@ietfa.amsl.com
Delivered-To: rtg-yang-coord@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 187661A0069 for <rtg-yang-coord@ietfa.amsl.com>; Sun, 1 Mar 2015 20:32:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XP4AG3NUUlOM for <rtg-yang-coord@ietfa.amsl.com>; Sun, 1 Mar 2015 20:32:17 -0800 (PST)
Received: from mail-qc0-x234.google.com (mail-qc0-x234.google.com [IPv6:2607:f8b0:400d:c01::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 15A0F1A0052 for <rtg-yang-coord@ietf.org>; Sun, 1 Mar 2015 20:32:17 -0800 (PST)
Received: by qcvx3 with SMTP id x3so22674972qcv.5 for <rtg-yang-coord@ietf.org>; Sun, 01 Mar 2015 20:32:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=N9AH8YJzVdtXJFbjHpEOeGO+YQavRYpg1YjHCH/h4ng=; b=tro40Vao0sgIEvkp6ZZOsKsUYS8L6trKvQEhFrvAYHL9tjYsPIxY5WPusJziSKTo2a kurjz1t5zn9pr/r8tQVEpNf02HEHp32SJIYcOxe5/d03Y3RkG1MFGC6fCWrR4R2MICZT GsJsZ5hHfV66L/6wpIgRgNxZA0OqPxYwK4k5QF+Zzm/AoHz0r5byW9Lrbrg0M3/lfwVH b4ynFQYqa9fU0PklJke7iIZ2lC4eDCalszfrxG3AGfHOsOcnMo6ORMwo/hqB6DIPCr9A TnXSwbmn6e00smqNaBj6qvDe9XT14d967LXMmG9evHhamuvU7DCQMSzXkb6FsFlY4SrN cETw==
X-Received: by 10.140.81.242 with SMTP id f105mr46830096qgd.33.1425270736042; Sun, 01 Mar 2015 20:32:16 -0800 (PST)
Received: from [192.168.1.133] (108-247-127-76.lightspeed.sntcca.sbcglobal.net. [108.247.127.76]) by mx.google.com with ESMTPSA id l78sm7718964qhl.34.2015.03.01.20.32.14 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 01 Mar 2015 20:32:14 -0800 (PST)
Content-Type: multipart/alternative; boundary="Apple-Mail=_A330AD10-3278-485C-8607-B8A2B704A78E"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\))
From: Mahesh Jethanandani <mjethanandani@gmail.com>
In-Reply-To: <20150301214345.GA38655@elstar.local>
Date: Sun, 1 Mar 2015 20:32:11 -0800
Message-Id: <CCDAA563-CF0A-4E0D-85F2-3693E3C74E75@gmail.com>
References: <A722B25D-D8F2-439C-817E-BBA981DFD698@gmail.com> <20150301214345.GA38655@elstar.local>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.2070.6)
Archived-At: <http://mailarchive.ietf.org/arch/msg/rtg-yang-coord/U4chJ-AkceREFYXfCduprEPiocY>
Cc: rtg-yang-coord@ietf.org
Subject: Re: [Rtg-yang-coord] Restrictions on list keys
X-BeenThere: rtg-yang-coord@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "\"List to discuss coordination between the Routing related YANG models\"" <rtg-yang-coord.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtg-yang-coord>, <mailto:rtg-yang-coord-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtg-yang-coord/>
List-Post: <mailto:rtg-yang-coord@ietf.org>
List-Help: <mailto:rtg-yang-coord-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtg-yang-coord>, <mailto:rtg-yang-coord-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Mar 2015 04:32:19 -0000

Juergen,

I did read that section but it was not clear to me. So here are some examples.

list foo {
      // Assuming one of these forms the key ...
      key “x y”; // is this valid?
      key “x z”;  // is this valid?
      key  “mode”; // is this valid? If not, how would I define a key for a choice statement?

      leaf x {
           type uint16;
      }

      leaf y {
          type uint8;
      }

      leaf z {
           type uint8;
           config false;
      }

      choice mode {
            case a {
                   leaf p {
                        type uint16;
                   }
           }
 
           case b {
                   leaf q {
                         type uint8;
                  }
           }
      }
}

> On Mar 1, 2015, at 1:43 PM, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> 
> RFC 6020 section 7.8.2:
> 
>   All key leafs in a list MUST have the same value for their "config"
>   as the list itself.
> 
> /js
> 
> On Sun, Mar 01, 2015 at 07:59:53AM -0500, Mahesh Jethanandani wrote:
>> Pardon if these questions have already been asked.
>> 
>> Are there restrictions on the following use of keys in lists
>> 
>> - a combination of rw and ro leafs
>> - a ro leaf
>> - a union of of leafs
>> 
>> Mahesh Jethanandani
>> mjethanandani@gmail.com
>> 
>> _______________________________________________
>> Rtg-yang-coord mailing list
>> Rtg-yang-coord@ietf.org
>> https://www.ietf.org/mailman/listinfo/rtg-yang-coord
> 
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

Mahesh Jethanandani
mjethanandani@gmail.com