Re: [YANG] new pyang errors

Ladislav Lhotka <lhotka@cesnet.cz> Thu, 24 January 2008 08:32 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 1JHxVr-0001id-J2; Thu, 24 Jan 2008 03:32:43 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JHxVq-0001iS-Cp for yang-confirm+ok@megatron.ietf.org; Thu, 24 Jan 2008 03:32:42 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JHxVi-0001iC-Jg for yang@ietf.org; Thu, 24 Jan 2008 03:32:34 -0500
Received: from office2.cesnet.cz ([195.113.144.244]) by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JHxVh-00036T-Uv for yang@ietf.org; Thu, 24 Jan 2008 03:32:34 -0500
Received: from [172.29.2.201] (asus-gx.lhotka.cesnet.cz [195.113.161.161]) by office2.cesnet.cz (Postfix) with ESMTP id BB034D800C4 for <yang@ietf.org>; Thu, 24 Jan 2008 09:32:28 +0100 (CET)
Subject: Re: [YANG] new pyang errors
From: Ladislav Lhotka <lhotka@cesnet.cz>
To: yang@ietf.org
In-Reply-To: <200801232058.m0NKw1MF024713@idle.juniper.net>
References: <200801232058.m0NKw1MF024713@idle.juniper.net>
Content-Type: text/plain; charset=utf-8
Organization: CESNET
Date: Thu, 24 Jan 2008 09:32:28 +0100
Message-Id: <1201163548.20662.71.camel@missotis>
Mime-Version: 1.0
X-Mailer: Evolution 2.12.1
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Scan-Signature: fb6060cb60c0cea16e3f7219e40a0a81
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

Phil Shafer píše v St 23. 01. 2008 v 15:58 -0500:
> Ladislav Lhotka writes:
> >My definition of mandatory: mandatory configuration parameters are those
> >that are essential for device or protocol operation. It doesn't matter
> >whether they are set by the user/application, supplied from non-volatile
> >memory or perhaps even hardwired.
> 
> Why would you need or want to mark is as mandatory if the value
> is hardwired?  What are you trying to say by calling a parameter
> "mandatory" and who are you trying to say it to?

Example: there are many devices out there that have fixed Ethernet MTU
value (1500). Such a device can certainly use a DM that specifies MTU as
mandatory. It will just fill in this slot with the hardwired value and
report a run-time error if a client tries to change it.  

> 
> If the application need do nothing with such hardwired parameters,
> why does it need to distinquish them?

The application needs to know what the value is (as in the case of MTU).
I don't want to rely on out-of-band resources. We also have get-config,
not only edit-config.

> 
> If the device need to nothing <ditto>?

<ditto>

> 
> YANG defines constraints on the XML that passes between the client and
> server.  Nearly every statement in a YANG module defines a rule which
> that XML must follow, both during protocol operations and the valid
> configuration being built.

I don't agree. YANG models mostly define constraints on the entire
content of the config datastore, less so on the XML PDUs.

> 
> Mandatory is such a constraint, and should be an indication to the
> NETCONF client application that it needs to do something explicit
> to satisfy this constraint.  If the mandatory parameter isn't set,
> the configuration isn't valid.

I disagree again: this would mean you cannot change the factory default
configuration part by part. Should the factory default configuration be
marked invalid until the client application touches all mandatory
values?

> 
> If we allow this mandatory constraint to be satisfied via mechanisms
> that do not involve the client and server, why have it?  How is the
> application to discern the difference between a real constraint and
> a parameter that the fairy god mother daemon fills in?

The mandatory/optional property should be specified by the data modeller
and not depend on the way how it is implemented in different devices.
Example: in an authentication database DM, the login, uid and password
are mandatory while full-name is optional. IMO this DM is perfectly
usable also by devices that either
(i) don't implement the full-name slot, or even
(ii) allow only one user - so, login=admin and uid=0 are effectively
hardwired.

Lada

-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C



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