Re: [YANG] key clause issues
Andy Bierman <ietf@andybierman.com> Tue, 08 January 2008 13:24 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 1JCERg-0003Wu-4L; Tue, 08 Jan 2008 08:24:44 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JCERe-0003Pw-RV
for yang-confirm+ok@megatron.ietf.org; Tue, 08 Jan 2008 08:24:42 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JCERe-0003PI-AN
for yang@ietf.org; Tue, 08 Jan 2008 08:24:42 -0500
Received: from smtp119.sbc.mail.sp1.yahoo.com ([69.147.64.92])
by ietf-mx.ietf.org with smtp (Exim 4.43) id 1JCERd-0008GR-SW
for yang@ietf.org; Tue, 08 Jan 2008 08:24:42 -0500
Received: (qmail 47671 invoked from network); 8 Jan 2008 13:24:41 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@68.120.80.25
with plain)
by smtp119.sbc.mail.sp1.yahoo.com with SMTP; 8 Jan 2008 13:24:40 -0000
X-YMail-OSG: f.eDjjsVM1l_glSO_vwzUjRycCUA9FvsKn_bh6n6.r_S5BD8
Message-ID: <47837999.8090305@andybierman.com>
Date: Tue, 08 Jan 2008 05:24:41 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Balazs Lengyel <balazs.lengyel@ericsson.com>
Subject: Re: [YANG] key clause issues
References: <4782C606.5010109@andybierman.com> <47835079.9000706@ericsson.com>
In-Reply-To: <47835079.9000706@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: c0bedb65cce30976f0bf60a0a39edea4
Cc: yang <yang@ietf.org>
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
Balazs Lengyel wrote:
> See below
>
> PS.:
> The reason for the existence of YANG is that it is more simple then
> XSD." quote from Balazs
>
> Andy Bierman wrote:
>> Hi,
>>
>> I have a few concerns with the key clause...
> ...
>
>> Issue 2)
>>
>> Why is the CLR about a leaf appearing more than once in the key needed?
>> It should be up to the DM writer to decide if this makes sense or not:
>>
>> list addr-pairs {
>> key "addr-type src-addr addr-type dest-addr";
>>
>> leaf addr-type { type ietf:InetAddressType; }
>> leaf src-addr { type ietf:InetAddress; }
>> leaf dest-addr { type ietf:InetAddress; }
>> // ... rest of list entry
>> }
>>
>> Why is this illegal?
>> It may be bad practice (according to RFC 4001), but should it be
>> illegal?
> [BALAZS]: When the user/programmer uses this in an edit-config he might
> think that the two add-types are two distinct pieces of data, while they
> are actually the same.
>
Why would they think that?
The path to the node (/addr-pairs/addr-type) is the same.
That is enough info for the manager to know they are the same object.
> Would the user actually have to provide the addr-type twice in a netconf
> message?
no -- the key is conceptual -- not actually identifiable in
any NETCONF PDU as a key.
> How do you handle if the two provided values in a netconf request are
> not the same?
The point of this DM design would be that the addr-pairs are
always the same addr-type so listed it twice is always redundant.
If the addr-pairs could ever be different addr types for each addr,
then a different table design would be used.
We need to give the DM writer the tools to make good decisions.
We do not need a ton of CLRs that assume the DM writer does
not know what to do. CLRs should be used when the consensus
is that more often than not, bad things will happen without the CLR.
What bad things happen by not forbidding a key component from
appearing more than once?
>
>
Andy
_______________________________________________
YANG mailing list
YANG@ietf.org
https://www1.ietf.org/mailman/listinfo/yang
- [YANG] key clause issues Andy Bierman
- Re: [YANG] key clause issues Balazs Lengyel
- Re: [YANG] key clause issues Martin Bjorklund
- Re: [YANG] key clause issues Andy Bierman
- Re: [YANG] key clause issues Andy Bierman
- Re: [YANG] key clause issues Martin Bjorklund
- Re: [YANG] key clause issues Andy Bierman
- Re: [YANG] key clause issues Martin Bjorklund
- Re: [YANG] key clause issues Phil Shafer
- Re: [YANG] key clause issues Andy Bierman