Re: [netmod] datastore-specific constraints

Ladislav Lhotka <lhotka@nic.cz> Wed, 12 December 2018 15:52 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E6287130DEE for <netmod@ietfa.amsl.com>; Wed, 12 Dec 2018 07:52:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.999
X-Spam-Level:
X-Spam-Status: No, score=-6.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 3azfn2nJpawC for <netmod@ietfa.amsl.com>; Wed, 12 Dec 2018 07:52:34 -0800 (PST)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 88FF612D84C for <netmod@ietf.org>; Wed, 12 Dec 2018 07:52:33 -0800 (PST)
Received: from birdie (unknown [IPv6:2001:1488:fffe:6:e43e:c5ff:fe5f:8969]) by mail.nic.cz (Postfix) with ESMTPSA id 2C4606079C; Wed, 12 Dec 2018 16:52:31 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1544629951; bh=drHEHOSFJcZ02WfVfWatFPyE75jar20B5qQ52Ln8KHw=; h=From:To:Date; b=hkYN3iC9fKOrKFP7DAA2Kw5Bhai7z7dejkXi9+Dm9g0qGEiYJD8D/J8cySsKleOio xouZOBRNWg6YWI7YtUWf/HE6xAiJHFbF9dReAEWmaf75JvwXcE6U33lrnoTLxr3ehI +9pmgLY3RvEYZZB0IMWNGSStOrrICOTa8l6o7yiQ=
Message-ID: <b434351564e5244c1341a247b819e5fe935788e5.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: Robert Wilton <rwilton@cisco.com>, Jan Lindblad <janl@tail-f.com>, netmod@ietf.org
Date: Wed, 12 Dec 2018 16:52:30 +0100
In-Reply-To: <2c2eff9a-4cdb-d755-dc2b-05c01d8c8d1d@cisco.com>
References: <87zhtan7bo.fsf@nic.cz> <BE57F393-5E00-4877-BA04-7B980DDB3CDF@tail-f.com> <2c2eff9a-4cdb-d755-dc2b-05c01d8c8d1d@cisco.com>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.30.3
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/9bxVovQfY9VDaT8Se3JW1i1pyio>
Subject: Re: [netmod] datastore-specific constraints
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Dec 2018 15:52:37 -0000

On Wed, 2018-12-12 at 15:23 +0000, Robert Wilton wrote:
> Hi Lada,
> I basically agree with Jan's suggestion.
> I don't think that I would use a when statement for this scenario since you
> want a leaf to report the operational value that is in effect, and one of the
> aims of NMDA is to try and get the configured and operational value onto the
> same path wherever possible.
> But, I think that the question about validity of must statements is more
> interesting.  RFC 8342 states that these can be violated in operational, but
> the intention is that the constraints in <operational> should generally apply
> (but never be actually checked by the server).  In this case, it might be
> useful to be able to annotate a must statement to indicate that it only
> applies to configuration data and not operational data.

Another option could be that "must" constraints on config data do not apply in
<operational>, whereas constraints on "config false" data serve as binding
guidelines for implementors.

Anyway, the logic of my example could then be implemented using "must". I agree
though that ignoring the configured value if auto-foo is true may be preferable.

Lada


> Thanks,
> Rob
> 
> On 12/12/2018 14:52, Jan Lindblad wrote:
> > Lada,
> > 
> > Maybe you could just skip the when and explain the behavior in the
> > description? E.g.
> > 
> > leaf foo {
> >  ...
> >  description "Foo controls bla, bla. 
> >   Any configured value will be ignored when auto-foo is true.";
> > }
> > 
> > Best Regards,
> > /jan
> > 
> > > On 12 Dec 2018, at 15:33, Ladislav Lhotka <lhotka@nic.cz> wrote:
> > > 
> > > Hi,
> > > 
> > > in some cases, constraints expressed with "when" or "must" may only be
> > > intended for configuration datastores. A typical example is an
> > > auto-negotiable parameter:
> > > 
> > > leaf auto-foo {
> > >  type boolean;
> > >  default true;
> > >  description "If true, parameter 'foo' will be auto-negotiated.";
> > > }
> > > leaf foo {
> > >  when "../auto-foo = 'false'";
> > >  ...
> > > }
> > > 
> > > This means that if auto-foo is true, it is impossible to configure the
> > > foo parameter. However, even with auto-foo = true, it is desirable to
> > > see the auto-negotiated value in <operational>, so, ideally, the "when"
> > > constraint should not apply in <operational>.
> > > 
> > > How can this logic be modelled under NMDA? Is an extra leaf
> > > "foo-operational" needed?
> > > 
> > > Thanks, Lada
> > > 
> > > -- 
> > > Ladislav Lhotka
> > > Head, CZ.NIC Labs
> > > PGP Key ID: 0xB8F92B08A9F76C67
> > > 
> > > _______________________________________________
> > > netmod mailing list
> > > netmod@ietf.org
> > > https://www.ietf.org/mailman/listinfo/netmod
> > > 
> > 
> > 
> > 
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://www.ietf.org/mailman/listinfo/netmod
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67