Re: [YANG] errors
Andy Bierman <ietf@andybierman.com> Fri, 25 January 2008 00:10 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 1JIC9d-0006Ut-7C; Thu, 24 Jan 2008 19:10:45 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JIC9c-0006Ug-6I
for yang-confirm+ok@megatron.ietf.org; Thu, 24 Jan 2008 19:10:44 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JIC9b-0006TX-QD
for yang@ietf.org; Thu, 24 Jan 2008 19:10:43 -0500
Received: from smtp122.sbc.mail.sp1.yahoo.com ([69.147.64.95])
by chiedprmail1.ietf.org with smtp (Exim 4.43) id 1JIC8u-0000ZA-O8
for yang@ietf.org; Thu, 24 Jan 2008 19:10:01 -0500
Received: (qmail 30648 invoked from network); 25 Jan 2008 00:10:00 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@67.127.97.95
with plain)
by smtp122.sbc.mail.sp1.yahoo.com with SMTP; 25 Jan 2008 00:09:59 -0000
X-YMail-OSG: K2mEuRQVM1n2GS74xSV5R4kT8AEwHHg0kfRNZGrTVPGo_Rr2
X-Yahoo-Newman-Property: ymail-3
Message-ID: <479928D7.1070706@andybierman.com>
Date: Thu, 24 Jan 2008 16:09:59 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Martin Bjorklund <mbj@tail-f.com>
Subject: Re: [YANG] errors
References: <4798FCA9.60500@andybierman.com> <20080124.220749.135318331.mbj@tail-f.com> <4799049F.4030400@andybierman.com>
<20080124.231036.37087164.mbj@tail-f.com>
In-Reply-To: <20080124.231036.37087164.mbj@tail-f.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: bdc523f9a54890b8a30dd6fd53d5d024
Cc: 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
Martin Bjorklund wrote: > Andy Bierman <ietf@andybierman.com> wrote: >>> The idea was (I think it came from you :) that the identifier for the >>> error clause is error-app-tag. So the above would be in XML: >>> >>> <rpc-error> >>> <error-tag>operation-failed</error> >>> <error-app-tag>lock-denied</error-app-tag> >>> </rpc-error> >>> >>> Thus, no name clash. >>> >> huh? >> >> then how do you specify a 'raise-error' for the lock-denied in RFC 4741? > > You don't. Unless you also have an error-app-tag: > > error my-extra-lock-denied { > error-tag lock-denied; > } > > The idea was that really do not want to list all std errors that can > occur: > > rpc my-rpc { > ... > raise-error missing-element; > raise-error bad-namespace; > ... > } > > These std errors can always occur. No need to specify them again. > okay, that's fine. > ----- > > We also disucssed an alternative way to do this, which is slightly > more flexible. In this variant, the error is identified with an > identifier, which has no meaning on the wire. It's just a local > identifier like a typedef or grouping identifier. Then within the > error, you have the statement 'error-app-tag' in addition to the other > stmts: > > error my-error { > error-tag invalid-value; > error-app-tag bad-mtu; > } > > I like the current design better because the key into the error dictionary has meaning, but there is a problem... There is still at least one open issue, which is that error-app-tag is defined in RFC 4741 as a string and it should really be a QName. Each error definition will only be unique within its module, so error-app-tag is not globally unique as it should be (according to the RFC). IMO, this should be solved by calling it a bug in the RFC (along with the bad-namespace element, which is a QName and MUST be an Xpath string, not a QName at all), and encoding the error-app-tag as a QName. The module namespace URI identifies the prefix in an XML instance document. Your 'raise-error' examples always show a local identifier reference (i.e., no prefix), but the real syntax is an identifier-ref-string (called a node-identifier in -00), so the error does not have to be in the same module as the raise-error statement. > > /martin > > Andy _______________________________________________ YANG mailing list YANG@ietf.org https://www1.ietf.org/mailman/listinfo/yang
- [YANG] errors Martin Bjorklund
- Re: [YANG] errors Juergen Schoenwaelder
- Re: [YANG] errors Phil Shafer
- Re: [YANG] errors Andy Bierman
- Re: [YANG] errors Martin Bjorklund
- Re: [YANG] errors Juergen Schoenwaelder
- Re: [YANG] errors Juergen Schoenwaelder
- Re: [YANG] errors Martin Bjorklund
- Re: [YANG] errors Andy Bierman
- Re: [YANG] errors Martin Bjorklund
- Re: [YANG] errors Andy Bierman
- Re: [YANG] errors Martin Bjorklund
- Re: [YANG] errors Andy Bierman
- Re: [YANG] errors Martin Bjorklund
- Re: [YANG] errors Andy Bierman
- Re: [YANG] errors Juergen Schoenwaelder
- Re: [YANG] errors Martin Bjorklund
- Re: [YANG] errors Juergen Schoenwaelder
- Re: [YANG] errors Martin Bjorklund