Re: [netmod] Module tags

Martin Bjorklund <mbj@tail-f.com> Sat, 11 February 2017 16:32 UTC

Return-Path: <mbj@tail-f.com>
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 0EA2F1299B9 for <netmod@ietfa.amsl.com>; Sat, 11 Feb 2017 08:32:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] 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 x_pY4i_W0FUf for <netmod@ietfa.amsl.com>; Sat, 11 Feb 2017 08:32:20 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 9A07B1299B4 for <netmod@ietf.org>; Sat, 11 Feb 2017 08:32:20 -0800 (PST)
Received: from localhost (h-148-188.a165.priv.bahnhof.se [176.10.148.188]) by mail.tail-f.com (Postfix) with ESMTPSA id D072E1AE00A0; Sat, 11 Feb 2017 17:32:18 +0100 (CET)
Date: Sat, 11 Feb 2017 17:32:14 +0100
Message-Id: <20170211.173214.1818067131932995126.mbj@tail-f.com>
To: chopps@chopps.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <87d1eouby0.fsf@chopps.org>
References: <20170208.231709.2214078600549867460.mbj@tail-f.com> <CABCOCHQJ+ef4C=TAfH9NK47mWgO0XOy1gg-cggigWq7Fqdfkgw@mail.gmail.com> <87d1eouby0.fsf@chopps.org>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/FN8rKvRjSmO4hCVEu75SabweALM>
Cc: netmod@ietf.org
Subject: Re: [netmod] Module tags
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: Sat, 11 Feb 2017 16:32:22 -0000

Christian Hopps <chopps@chopps.org> wrote:
> 
> Andy Bierman <andy@yumaworks.com> writes:
> > On Wed, Feb 8, 2017 at 2:17 PM, Martin Bjorklund <mbj@tail-f.com> wrote:
> >      I meant that instead of using the grouping in every module, you could
> >      have a separate structure in your module:
> >
> >       container module-tags {
> >        list module {
> >         key "name revision";
> >         leaf name { ... }
> >         leaf revisoin { ...}
> >         leaf-list tag { ... }
> >        }
> >       }
> >
> >      This way you will handle configuration of tags for all modules, and
> >      they don't have to have a special uses statement.
> >
> >
> > +1.
> >
> > I read the draft, and I agree with you that the single container solution
> > is best. Looks like configuration data to me, and no need for any special
> > case editing models.
> 
> We do get this with the yang library augmentation I believe. I hope
> the yang library will be implemented by most servers. Do you think this
> is not sufficient?

The augmentation of yang-library is not sufficient b/c it is config
false only.  That's why a separate config list is also needed.

> Again the in module list allows for single xpath selection of a given
> node for all modules that have a certain tag set. I found this rather
> elegant, so that's why I've argued to keep it. I want to make sure that
> people have considered this before we abandon it.

Just to be clear, the use case is only for the case where several
different modules implement the exact same structure, right?  Do you
have any example where this is the case?  Or maybe I didn't understand
the use case; if so, could you provide a more complete use case?


> I'm OK with removing the add/delete RPCs as they do seem redundant.
> 
> Is there a way to get the reset to default behavior? We do allow the
> user to remove default set tags, so I think that's why Lou added that
> RPC.

I assume that reset to default would be to remove all configured tags
from the config.  If so that is clearly supported.


> 
> > Oddly, the draft relies on XPath filtering to retrieve modules with a certain tag.
> > There is no <find-tags> operation.
> > That is the 1 RPC operation that might be justified.
> >
> > e.g.:
> >
> >  rpc find-tags {
> >   description "find all modules with the specified tag(s).";
> >   input {
> >    leaf-list tag { type string; }
> >   }
> >   output {
> >    leaf-list module-name { type string; }
> >   }
> >  }
> 
> This does seem useful, we can add it.

But this is an XPath one-liner:

  /modules-state/modules/name[../module-tag = 'foo']



/martin