Re: [netmod] New proposal: Yang Schema annotation

Ladislav Lhotka <lhotka@nic.cz> Wed, 25 January 2017 12:41 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 5AC9D1298AC for <netmod@ietfa.amsl.com>; Wed, 25 Jan 2017 04:41:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
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 E6MzqbKJLom2 for <netmod@ietfa.amsl.com>; Wed, 25 Jan 2017 04:41:29 -0800 (PST)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 408991295A9 for <netmod@ietf.org>; Wed, 25 Jan 2017 04:41:29 -0800 (PST)
Received: from localhost (unknown [195.113.220.110]) by trail.lhotka.name (Postfix) with ESMTPSA id 796441821FD5; Wed, 25 Jan 2017 12:40:20 +0000 (UTC)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Balazs Lengyel <balazs.lengyel@ericsson.com>, "netmod@ietf.org" <netmod@ietf.org>
In-Reply-To: <0df38f7a-7127-7a6f-3974-15ffbdc9b542@ericsson.com>
References: <0df38f7a-7127-7a6f-3974-15ffbdc9b542@ericsson.com>
Date: Wed, 25 Jan 2017 13:41:27 +0100
Message-ID: <m2fuk79urs.fsf@birdie.labs.nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/NW1SaUGWfbfSkeh1L47f5y-vvSI>
Subject: Re: [netmod] New proposal: Yang Schema annotation
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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, 25 Jan 2017 12:41:31 -0000

Hi Balazs,

I agree that such a mechanism would be pretty useful.

I think though that the deviation-based approach can be used without
further ado. Why do you think that the "deviate" statement cannot handle
extension statements? AFAICT, the following module satisfies all rules
of RFC 7950, and it is then up to an implementation to handle the
extension, so it can also add it as an annotation to the target node.

module devext {
  namespace "http://example.com/devext";
  prefix de;
  import ietf-interfaces {
    prefix if;
  }
  extension foo;
  deviation "/if:interfaces" {
    deviate "add" {
      de:foo;
    }
  }
}

Lada

Balazs Lengyel <balazs.lengyel@ericsson.com> writes:

> Hello,
>
> As a result of work coming from the Yangpush effort I just posted a draft
> https://tools.ietf.org/html/draft-lengyel-netmod-schema-annotation-00
>
> This proposes a way to extend YANG modules with extra properties for 
> specific schema nodes without modifying the text of the original YANG 
> module. We have a strong need for this in Yangpush, but it would be 
> useful/needed outside Yangpush as well.
>
> Please review, comment!
>
> regards Balazs
>
> -- 
> Balazs Lengyel                       Ericsson Hungary Ltd.
> Senior Specialist
> Mobile: +36-70-330-7909              email: Balazs.Lengyel@ericsson.com
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67