Re: [netmod] yang-data-ext issues

Kent Watsen <kwatsen@juniper.net> Tue, 24 April 2018 21:13 UTC

Return-Path: <kwatsen@juniper.net>
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 BA57F12DA4F for <netmod@ietfa.amsl.com>; Tue, 24 Apr 2018 14:13:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=juniper.net
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 jCRYooIB-_Oe for <netmod@ietfa.amsl.com>; Tue, 24 Apr 2018 14:13:15 -0700 (PDT)
Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (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 F3EFF12DA11 for <netmod@ietf.org>; Tue, 24 Apr 2018 14:13:14 -0700 (PDT)
Received: from pps.filterd (m0108159.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3OL9FqH030651; Tue, 24 Apr 2018 14:13:14 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=PPS1017; bh=MEljIUEcKVOQTf8FQxbNuZlJyijNzluJS47kL7pPV60=; b=MeTx1QJV9K8RkQXAXQFDB1i/82qTjlukD1+4n4SHexznPGmAifDC5khfOtmCwV3BMmoy wzenlhcFPe2DIJimLKGYu8FmEPpet9fbWGtWQjP3pMFXkcRoImrsQ0CbxdQcZO2YHItF +y9bBs8AL4Z8rN1bY79DQ0kGSxvyUJQob/d4p6tmqtXx3oJwu9H+D22X60gkOZiLPAf/ B5T8VWjLeknRjEl8SGB6JYUt4omj+IicZCojIB3iE/adRPw9spVIPHauScEwgB1/YQ62 c6Fgwu5YWF31u2c8SUScPY8/OZuoXQnqXtlfce4wY8AUQ0sVYaAYVjtp9wDWGslqmToK xw==
Received: from nam03-dm3-obe.outbound.protection.outlook.com (mail-dm3nam03lp0015.outbound.protection.outlook.com [207.46.163.15]) by mx0a-00273201.pphosted.com with ESMTP id 2hj8tpgdnx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 24 Apr 2018 14:13:14 -0700
Received: from DM5PR05MB3484.namprd05.prod.outlook.com (10.174.240.147) by DM5PR05MB3419.namprd05.prod.outlook.com (10.174.240.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.715.7; Tue, 24 Apr 2018 21:13:13 +0000
Received: from DM5PR05MB3484.namprd05.prod.outlook.com ([fe80::173:36cf:42b7:5965]) by DM5PR05MB3484.namprd05.prod.outlook.com ([fe80::173:36cf:42b7:5965%6]) with mapi id 15.20.0715.015; Tue, 24 Apr 2018 21:13:13 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Andy Bierman <andy@yumaworks.com>, Martin Bjorklund <mbj@tail-f.com>
CC: NetMod WG <netmod@ietf.org>
Thread-Topic: [netmod] yang-data-ext issues
Thread-Index: AQHT1YJYRSnZmZlnhU6JIK4LoPfNTqQDdYgAgAAS9YCAAAZpAIAACwoAgAAFOICAAuemAIAAR8IAgAABIACAAAEwgIAHI10AgABILICAAAT7AIAAS8EAgABAMYCAAAJrgIAAAtqAgAGEfoD//9zuAA==
Date: Tue, 24 Apr 2018 21:13:12 +0000
Message-ID: <403C417C-4546-48FA-AEA5-6ABA3D5A3845@juniper.net>
References: <CABCOCHQXqPpXT031qaZ5psPr4C8rsC6E2PkaL2nNLB7K-H_37g@mail.gmail.com> <20180423.214923.1209533731960312602.mbj@tail-f.com> <CABCOCHTwdBbo_qtBu=_OunOtLNBXmWCWVZ8ajr0LFZPDFpNEFg@mail.gmail.com> <20180423.220815.526647366558506966.mbj@tail-f.com> <CABCOCHTt3noQ5PcX57yGi5Cm7BxQA=GCB9KajrWS2WLnYM9THA@mail.gmail.com>
In-Reply-To: <CABCOCHTt3noQ5PcX57yGi5Cm7BxQA=GCB9KajrWS2WLnYM9THA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.20.0.170309
x-originating-ip: [66.129.241.14]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM5PR05MB3419; 7:jk/shhD5JY2lsdUj0b0CXesS+09CjjPabRQPbxu++zrbv+K/f75LJs7hAkjK+hw0i4nYI8oL/Kl/jw8lXDIUKvvZQIsirkF9dk4BJ3syrhGXOWZ9pxAB3LTEAcTC1la27nQutFYP6sgs2Six5UR6bOhPnRaTX7s7D22C89Sw8o9GBpdinu0j0Z3tVHoRDycMslG5oBDJCDOIbK4A5n6emgEB6H/JBEPRtIIj1aziKS97a0v7Z6DnLqiwjZ+yGau1
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM5PR05MB3419;
x-ms-traffictypediagnostic: DM5PR05MB3419:
x-microsoft-antispam-prvs: <DM5PR05MB3419F3CEE770BB1C4028C298A5880@DM5PR05MB3419.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041310)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR05MB3419; BCL:0; PCL:0; RULEID:; SRVR:DM5PR05MB3419;
x-forefront-prvs: 0652EA5565
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39380400002)(366004)(346002)(376002)(396003)(199004)(189003)(2616005)(11346002)(446003)(3846002)(82746002)(476003)(486006)(6116002)(6436002)(6512007)(53936002)(6246003)(5250100002)(7736002)(83716003)(3660700001)(3280700002)(14454004)(97736004)(26005)(86362001)(186003)(105586002)(25786009)(36756003)(2906002)(6306002)(106356001)(76176011)(6486002)(478600001)(8936002)(58126008)(102836004)(110136005)(54896002)(316002)(68736007)(4326008)(33656002)(2900100001)(81156014)(66066001)(59450400001)(81166006)(93886005)(229853002)(99286004)(6506007)(8676002)(5660300001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR05MB3419; H:DM5PR05MB3484.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
x-microsoft-antispam-message-info: ndimI8RBUyH+FzVIUvwaxGt7XPSaErAgim9RHp1bdisInSBnNfYG2vHMZCGkxe6i+Uil1dAMwkhyWbxizzcjij06ANavHBwmPMET9e0Nf3E/6xb/DL2463ReC90eftvYqAmqEBxeDZLixvrR/2xHJt++wf4L20svGGI1TocZ2Rg6o5jnpidyysX2ptT23Gk6
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_403C417C454648FAAEA56ABA3D5A3845junipernet_"
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 447638e7-085a-4008-75df-08d5aa283067
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: 447638e7-085a-4008-75df-08d5aa283067
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2018 21:13:12.9092 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR05MB3419
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-04-24_05:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804240200
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/d1K5PuTGkYBgFb9t1egGvGCUvwA>
Subject: Re: [netmod] yang-data-ext issues
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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: Tue, 24 Apr 2018 21:13:18 -0000

> People want to use YANG to define the schema for an XML or JSON
> representation of a stand-alone document.

Agreed


> The only data needed must be module + local-name.

Or maybe: module + local-name + context, where context is one of:

  - data nodes
  - RPC/actions
  - notifications
  - standalone artifacts (files)

At least, it seems that these are different things.

[Note: RESTCONF places some of the context into the URL; two different data node resources can have identical module + local-name.]

It would be bad if two stand-alone artifacts had the same module+local-name (foo:bar).   However, it's okay to have a matching top-level data node called "foo:bar", since it is used in a different context.  Just like yang-data cannot be accessed as data via a protocol like NC or RC, so it is that traditionally-defined data nodes cannot be accessed as a stand-alone artifact (unless you’re a draft-author and need an instance document for an example).


> Defining an extension that maps error-info data for a specific RPC might be
> something worth standardizing.  It should not be done with yang-data,
> but rather a different extension just for this purpose.

Martin wrote before:

            (maybe in the future we could even have a YANG extension statement to
            formalize the description:

               rpc my-first-rpc {
                 ...
                 opx:error-info-structure my-first-rpc-error-info;
               }

            but this is not point now.)

I imagined that he was hoping to limit what's needed to get draft-ietf-netconf-notification-messages out the door now, but I think another I-D should be proposed to augment the 'rpc' and 'action' statements with an anydata called "error-info-structure" so the YANG would be more like this:

               rpc my-first-rpc {
                 ...
                 opx:error-info-structure my-first-rpc-error-info {
                     …
                   }
               }

That is, to your point, with no reference to a yang-data data structure.


> Andy

Kent // contributor