Re: [netmod] yang-data issues

Kent Watsen <kwatsen@juniper.net> Sat, 20 October 2018 13:21 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 0E43312D4EC for <netmod@ietfa.amsl.com>; Sat, 20 Oct 2018 06:21:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.766
X-Spam-Level:
X-Spam-Status: No, score=-0.766 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.064, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KHOP_DYNAMIC=1.999, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=no 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 IMjYJAmP7zL1 for <netmod@ietfa.amsl.com>; Sat, 20 Oct 2018 06:21:53 -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 58F95124C04 for <netmod@ietf.org>; Sat, 20 Oct 2018 06:21:52 -0700 (PDT)
Received: from pps.filterd (m0108158.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9KCmxTM024531 for <netmod@ietf.org>; Sat, 20 Oct 2018 05:48:59 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=PPS1017; bh=+VgCTnkX8UYVksqjvn/QHI3mlC/EmPfUZUxDLfXGF7E=; b=i5dW6G6bN7Xe8PLsrVWM9MrFkbvFUvwaVTSVlKVQyGgv7FFiIPgOvlzWjjPPUuQ5km4q 1yD6gRXKFvPKYruOhxGaa+Xh6HpUYEjXzcOBqCHZ8InYygeMS6g5k/4G3jKdPU8R6//x c2fT3RZClfS0h9miYW/V4u5CpTWQpi/StoyPXQ7dnqviTPoUAxy2Q1H/9DnBqHAgAwAv ew/mmczyr74xaZ/YqB0v/4xdR2ttl9wb5DZ/d45FRfohcZE0HLZbSVFEccSs/yIe8iuQ f61d35uUgXHLwoHtAZvDfiRoczYG1J3b7u9wqnUEBz408dGwo2HIsu+IVkKu8AMfjoZ6 4w==
Received: from nam05-co1-obe.outbound.protection.outlook.com (mail-co1nam05lp0085.outbound.protection.outlook.com [216.32.181.85]) by mx0a-00273201.pphosted.com with ESMTP id 2n802pg92w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for <netmod@ietf.org>; Sat, 20 Oct 2018 05:48:59 -0700
Received: from DM6PR05MB4665.namprd05.prod.outlook.com (20.176.109.202) by DM6PR05MB5724.namprd05.prod.outlook.com (20.176.123.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.25; Sat, 20 Oct 2018 12:48:57 +0000
Received: from DM6PR05MB4665.namprd05.prod.outlook.com ([fe80::7540:75f2:3803:298a]) by DM6PR05MB4665.namprd05.prod.outlook.com ([fe80::7540:75f2:3803:298a%4]) with mapi id 15.20.1250.020; Sat, 20 Oct 2018 12:48:57 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] yang-data issues
Thread-Index: AQHUSau5B5i+EaWC00yMolsTDnC0e6UoEEkA
Date: Sat, 20 Oct 2018 12:48:56 +0000
Message-ID: <DAEC916E-564D-436E-8B34-6235BDC466AC@juniper.net>
References: <20180911.104447.2165943059473950359.mbj@tail-f.com>
In-Reply-To: <20180911.104447.2165943059473950359.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.10.3.181015
x-originating-ip: [66.129.241.13]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM6PR05MB5724; 6:emkqvM/hxti4A/FuehLPsyRhfhNzGdb37KCG8jLdBsmHDJnMEFgZ3c9AaGMQ42JcrlZLOJPSa2Rwo09yyQzGiDXJ+dPNZyD2C/l80HWsRfk+l8sIsRqYqsG6zHrxZd3FbtFihGFaJZt+lebPwAcypGQuU3dMX2hPJVcjrCLDzZDm4GgVBxXEDrGzBbyjGiL159PCQcU9ixvH9mkjUW0sWXCds2QKfoI9L6UI/DLC6mI0kqoYrBNALU8J2m+jiuP87H5aRlcJFj/Bh4t1n6aEk0syzYhOjNayQLyUh6MUU8S/GG8DmtdZ2Zp83GfQ1PNdBSG7oXjhfOz/8GaqswlGGTeQ+0yWF1QmEdnFFUjprxIhMAqBXm2ZqdOplNBroN692Q183kg+jIxeH1m/uLujRQPPdgI/acMn4/gK7Yfi2pxQ4Ixk/EDLQuyxqNAsPpikFckgbBb0EG5vu/we1DLr1Q==; 5:FUAKHbUAb1q4uyKxLrffnN662qTnw2HqFK3sjHyKaUYTvxn+tMlnortFeWPbUBqTJOoxDrp/+v6uBzEKNIFhXtWmDQfzSGyp61CI7qIhTVSithX+mU0e7go7we/TliBbeXdz8ifPVSlW0D0OLlXco6EjWep+bSRPh0p07XAAqI4=; 7:p7KesHFuMdb+VHgSt3Vc36H+7sDvglw79VuhJqb60YAFlnXbs2W/6E+Z6RduOs2IcrFnoIRrfEnJGo+ccQeJk/2hkLkFP5lcetXedMI0PxNcen+H9qvXJbvwx962oOxWJAGKceLWZzqezFfkJCAsRFM38jumaJQIO72pihSY3m+dgI6obYMQTFbBsSF6TBh5ehRfgQmd5DFQHQbeuVZG/CrthfS9vYfQ6r83bnp3fKqRl8G3z9dtzB4Q218Ua8Ci
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 4c3e191d-57cf-4154-7480-08d6368a6667
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DM6PR05MB5724;
x-ms-traffictypediagnostic: DM6PR05MB5724:
x-microsoft-antispam-prvs: <DM6PR05MB5724B4F4D4827654EACFBCB7A5FA0@DM6PR05MB5724.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(10436049006162);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231355)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:DM6PR05MB5724; BCL:0; PCL:0; RULEID:; SRVR:DM6PR05MB5724;
x-forefront-prvs: 0831C25939
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(396003)(366004)(376002)(39860400002)(136003)(13464003)(189003)(199004)(14444005)(99286004)(6116002)(3846002)(2906002)(486006)(58126008)(53546011)(305945005)(6506007)(11346002)(476003)(446003)(2616005)(7736002)(256004)(8936002)(82746002)(186003)(2351001)(81166006)(1730700003)(86362001)(575784001)(76176011)(8676002)(106356001)(36756003)(81156014)(105586002)(229853002)(26005)(71200400001)(71190400001)(2900100001)(68736007)(97736004)(5660300001)(966005)(2501003)(6436002)(66066001)(316002)(6916009)(5250100002)(83716004)(478600001)(33656002)(5640700003)(561944003)(6486002)(102836004)(14454004)(25786009)(53936002)(6306002)(6512007)(6246003); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6PR05MB5724; H:DM6PR05MB4665.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
x-microsoft-antispam-message-info: K4fjMzESEeO4Eb0ZjRvWGHeloW8Z8lQLiZJpEGBMdCmTHhux8Hu3/42kJZgJFCZTnWjYm2l5JSVUkPcvGDM94Ao8PIY3RPFOucbMpJZTGeXbuUb4iWMpKk0eJziPD7i4TxEvt3mDcGs5vlm7fH44JZmF3jkTM2jXCQSA2yeCfCBvXgef2vad2tVehJMQPHrSQzJb6/XigYkbyuQe/fUmwQbrv1HVUKx9ENTBVGFnJi3IMkFGGkc+JHMmtO0oSgz5r9i0Ceu5Lc7kPEspWNkz46X/XOSwVr485syWRP5wg2qYfv0AAY3c9NppkxQ4j46esudQLO+UmcQtWbwl51LL4dLZCYAMtoyZfkuXzKdfqBs=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <3AFDC66C6B1FD7428DC48D69579B6FF6@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: 4c3e191d-57cf-4154-7480-08d6368a6667
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2018 12:48:56.9384 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB5724
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-10-20_06:, , 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=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810200121
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/9yU0_O_G_IMaU7uJLHPVarAx0XU>
Subject: Re: [netmod] yang-data issues
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: Sat, 20 Oct 2018 13:21:55 -0000

Folks,

Can we get some quick replies to this email?

Kent // all hats




-----Original Message-----
From: netmod <netmod-bounces@ietf.org> on behalf of Martin Bjorklund <mbj@tail-f.com>
Date: Tuesday, September 11, 2018 at 4:45 AM
To: "netmod@ietf.org" <netmod@ietf.org>
Subject: [netmod] yang-data issues

Hi,

The authors of draft-ietf-netmod-yang-data-ext have been discussing
the two remaining issues on this draft; the issue of whether a
yang-data structure must have unique top-level node names or not, and
the issue of the syntax for augment-yang-data.  We haven't been able
to find agreement with the current proposal, so I have a suggestion
for a slightly modified yang-data statement (which may have been
discussed before):

The idea is to encode a yang-data extension the same way as anydata,
i.e., as a container.  For example:

  yd:yang-data modify-subscription-datastore-error-info {
      description
        "This yang-data MAY be provided as part of a subscription's RPC
        error response when there is a failure of a
        'modify-subscription' RPC which has been made against a
        datastore.  This yang-data MUST be used if hints are to be
        provides back to the subscriber.";
      leaf reason {
        type identityref {
          base sn:modify-subscription-error;
        }
        description
          "Indicates the reason why the subscription has failed to
          be modified.";
      }
      uses hints;
    }

This would be encoded as:

  <modify-subscription-datastore-error-info>
    <reason>foo</reason>
    <period-hint>42</period-hint>
    ...
  </modify-subscription-datastore-error-info>


Since the structure is always encoded as a container, it follows that
it can have any data definition statement as substatement, with no
restriction on naming and type of statement.  An instance of this can
trivially be a complete instance document in XML w/o additional
context, works well with JSON, and can appear in an error-info
structure.

Such a structure can be augemented as:

  yd:augment-yang-data /sn:modify-subscription-datastore-error-info {
    leaf foo { ... }
  }

The drawback is that it forces the use of an extra container in the
encoding.  OTOH, most usages of current rc:yang-data follows this
pattern:

  rc:yang-data modify-subscription-datastore-error-info {
    container modify-subscription-datastore-error-info {
      ...
    }
  }
  



/martin

_______________________________________________
netmod mailing list
netmod@ietf.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_netmod&d=DwICAg&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=7nlVu5dJaa8XsD0LRd0VTH301caVRUXGsa6L-UgXVRE&s=1o7vXH-j8Ha6xbJFTG1jjNzy9JQw7k-UWIqpeCr8qrk&e=