Re: [lmap] Data type for Option/Value

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Mon, 10 October 2016 13:42 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: lmap@ietfa.amsl.com
Delivered-To: lmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0AFA81296CF for <lmap@ietfa.amsl.com>; Mon, 10 Oct 2016 06:42:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.196
X-Spam-Level:
X-Spam-Status: No, score=-7.196 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-2.996] 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 OdNctx3QRF_W for <lmap@ietfa.amsl.com>; Mon, 10 Oct 2016 06:41:58 -0700 (PDT)
Received: from atlas3.jacobs-university.de (atlas3.jacobs-university.de [212.201.44.18]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EB2501296CC for <lmap@ietf.org>; Mon, 10 Oct 2016 06:41:57 -0700 (PDT)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id 4E2736D5; Mon, 10 Oct 2016 15:41:56 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas3.jacobs-university.de ([10.70.0.205]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10030) with ESMTP id NyRSNBRNfZZY; Mon, 10 Oct 2016 15:41:49 +0200 (CEST)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas3.jacobs-university.de (Postfix) with ESMTPS; Mon, 10 Oct 2016 15:41:55 +0200 (CEST)
Received: from localhost (demetrius4.jacobs-university.de [212.201.44.49]) by hermes.jacobs-university.de (Postfix) with ESMTP id 66C7220037; Mon, 10 Oct 2016 15:41:55 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius4.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id dJGUrUwuc_A5; Mon, 10 Oct 2016 15:41:52 +0200 (CEST)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id BD8AC20035; Mon, 10 Oct 2016 15:41:52 +0200 (CEST)
Received: by elstar.local (Postfix, from userid 501) id 84C353CB6A07; Mon, 10 Oct 2016 15:41:52 +0200 (CEST)
Date: Mon, 10 Oct 2016 15:41:52 +0200
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Ron Stana <Ron.Stana@viavisolutions.com>
Message-ID: <20161010134152.GB28557@elstar.local>
Mail-Followup-To: Ron Stana <Ron.Stana@viavisolutions.com>, "lmap@ietf.org" <lmap@ietf.org>, "alissa@cooperw.in" <alissa@cooperw.in>
References: <MWHPR18MB096078AD85087A46F0F7BF258ACC0@MWHPR18MB0960.namprd18.prod.outlook.com> <20161007182405.GA20761@elstar.local> <MWHPR18MB0960DBA2DFB0EFDAC18BA49D8AC60@MWHPR18MB0960.namprd18.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <MWHPR18MB0960DBA2DFB0EFDAC18BA49D8AC60@MWHPR18MB0960.namprd18.prod.outlook.com>
User-Agent: Mutt/1.6.0 (2016-04-01)
Archived-At: <https://mailarchive.ietf.org/arch/msg/lmap/pxbaj4m8-2YlSnaXxkqupZYtdVs>
Cc: "alissa@cooperw.in" <alissa@cooperw.in>, "lmap@ietf.org" <lmap@ietf.org>
Subject: Re: [lmap] Data type for Option/Value
X-BeenThere: lmap@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
List-Id: Large Scale Measurement of Access network Performance <lmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lmap>, <mailto:lmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lmap/>
List-Post: <mailto:lmap@ietf.org>
List-Help: <mailto:lmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lmap>, <mailto:lmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Oct 2016 13:42:01 -0000

On Fri, Oct 07, 2016 at 08:13:09PM +0000, Ron Stana wrote:
> Juergen,
> 
> The reason we want to pass structured data is because we have tests that define hundreds of network paths, and each network path is defined by a group of parameters.  The example in appendix G is good for defining one network path but does not scale to multiple since it only supports the definition of one src/dest pair.

Ron,

I pointed you to the appendix not because the appendix solves your
problem but instead it shows how a model can augment model specific
parameters into the core LMAP data model. You can make this a list of
list of list if there is a need to do this.
 
> TWAMP is one example of a test that takes multiple network paths.  It has YANG models defined for it: 
> https://tools.ietf.org/html/draft-ietf-ippm-twamp-yang-01
> https://tools.ietf.org/html/draft-mirsky-ippm-twamp-light-yang-03
> 
> Which model is used depends on whether the network path requires special setup steps.  A single test could then consist of one or both of these models.
> 
> For these reasons we are using one LMAP id/value option for each of the TWAMP models above.

OK. Anyway, if your test requires complex parameters, one option is to
write a model augmentation to define the structure of the complex
parameters. The other option that you used is to serialize things and
put the result into an option. A third option is to have parameters
that are opaque anydata. All three options have their pros and cons.
If you have alreay TWAMP models, there might be a chance to reuse a
grouping if you were to augment the LMAP YANG model.

> The example in appendix G requires an extension of the LMAP model.  While I can see that it is a nice way of combining the two models, my understanding is LMAP was trying to prevent the need for customer extensions, especially in this situation where two well-known models are used.

There are trade-offs. If you serialize complex structures into string
option values, then any LMAP implementation will be able to move these
options around. Of course, this requires some additional serialization
and non-sense input will likely be detected only at test run-time. If
you augment the model, you of course require implementations to
support the augmentation but then you get the benefit of data
validation etc.

> The Appendix F example seems to define the new objects for use both within action/parameter and action/object.  If that understanding is correct, can you explain the difference between using them in the two places?  I didn't see anything in the information model document (version 11) that explained this.
>

The augmentation only adds something to parameters of an action
object. It is actually missing a second augmentation that is needed in
order to ship the parameters in reports back to the collector.

The information model is silent about this kind of extensibility,
which I think is OK, unless we want to make this a first class
property of the information model itself.

I added parameters essentially as a hook we might use when it turns
out to be needed. (And there should be a second matching hook for the
report model.)

/js

> Ron
> 
> -----Original Message-----
> From: Juergen Schoenwaelder [mailto:j.schoenwaelder@jacobs-university.de] 
> Sent: Friday, October 07, 2016 2:24 PM
> To: Ron Stana
> Cc: lmap@ietf.org; alissa@cooperw.in
> Subject: Re: [lmap] Data type for Option/Value
> 
> On Tue, Sep 27, 2016 at 09:24:34PM +0000, Ron Stana wrote:
> > LMAP Team,
> > 
> > The data type for the option/value in the LMAP YANG model is currently defined as a string.  Our tests use a structured set of input parameters, sometimes mandated by IETF YANG models such as TWAMP and TWAMP Light (see example below) so we currently have to stringify the data which makes it unnecessarily hard to read and requires an extra step before sending and parsing.
> > 
> > "action":[
> > 
> >    {
> > 
> >       "name":"Test-2016-09-27-16:54-action",
> > 
> >       "task":"twamp-initiator",
> > 
> >       "option":[
> > 
> >                  {
> > 
> >                     "id":"twamp-light",
> > 
> >                     "value":"{\"ietf-twamp-light:twamp-light\":{\"twamp-light-session-sender\":{\"sender-light-enable\":true,\"test-session\":[{\"session-id\":1,\"test-session-enable\":true,\"packet-padding-size\":425,\"session-authentication-mode\":\"unauthenticated\",\"interval\":10,\"sender-ip\":\"192.168.2.10\",\"sender-udp-port\":50000,\"reflector-ip\":\"192.168.2.20\",\"reflector-udp-port\":50000,\"dscp\":0},{\"session-id\":2,\"test-session-enable\":true,\"packet-padding-size\":41,\"session-authentication-mode\":\"unauthenticated\",\"interval\":20,\"sender-ip\":\"192.168.2.10\",\"sender-udp-port\":50000,\"reflector-ip\":\"192.168.2.20\",\"reflector-udp-port\":50000,\"dscp\":8}]}}}"
> > 
> >                 }
> > 
> >       ],
> 
> Why do you encode all twamp-light options in a single lmap task option?
> 
> > 
> >       "destination":[
> > 
> >                  "Test-2016-09-27-16:54-results-periodic-pm",
> > 
> >                 "Test-2016-09-27-16:54-results-periodic-rt"
> > 
> >       ]
> > 
> >    }
> > 
> > ]
> > 
> > 
> > 
> > Can the value object be changed in the LMAP YANG model so that it can contain another object (i.e. YANG's anyxml object type)?
> >
> 
> Please take a look at appendix G of draft-ietf-lmap-yang-05.txt for a possible way to do this if plain name/value pairs are not good enough.
> Using anydata makes the data really opaque. But the most important aspect, I think, is that LMAP YANG module provides the proper hooks to enable future extensions (via the parameters container).
> 
> /js
> 
> PS: Note that options are automatically submitted with result reports;
>     we should make sure that added structured parameters are also
>     contained in result reports (anydata may work generically here
>     since the format is implicitely defined).
> 
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>