Re: [netconf] JSON encoding of events in draft-ietf-netconf-https-notif

Balázs Lengyel <balazs.lengyel@ericsson.com> Wed, 08 April 2020 07:29 UTC

Return-Path: <balazs.lengyel@ericsson.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 245683A0AFE for <netconf@ietfa.amsl.com>; Wed, 8 Apr 2020 00:29:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.267
X-Spam-Level:
X-Spam-Status: No, score=-2.267 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.168, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com
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 h7QSb7LAr-En for <netconf@ietfa.amsl.com>; Wed, 8 Apr 2020 00:29:30 -0700 (PDT)
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02on0621.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe06::621]) (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 3FC4B3A0AFD for <netconf@ietf.org>; Wed, 8 Apr 2020 00:29:30 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gzkOfOjhlsSHmUGee7G+MLQCPKCPND/EDD8lZUSlMSoY2ULZmgZTM4BfrEw3bGUToxRkqWKKPSnEs5hYNBYZ5k9PP21G0CdUhmklLOBGNmh2ydRC5qybqPLgGLA/8IlwZyPe9aVfcx6NGkWRKVUJHKXm7Eb34q+6PIL16dQNpm4RxmEsWJhGby+JVfkAMR8sfmpFjvpNJRYm51oFJpIht7SAfw2qQNaq9dUt1abOmZXVD16OVpgP2+7Se+MM+Au77t9puAa+NKPUzDbATUmcZpYzeB8IjdnDLeFyPsz+4tWwHv2h68JUepDqPf9ihSrlAdeacOG7JiS9Gjxz31pLUw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vA+L+G4WHqeCvo0Tr9Z0Al1SaU1oNZLdPuKOayOXml0=; b=ZVPdno//7PsecT5/D0aIXuAND25C7mwknhacGfdHlx9bXl/KesGtik60pi/KddVJnEeDaTRE5xgSnNqtb7x8VI14jXxOgOE/O0rdq9j8GKkxNH51BC1xW88gLt2qRfRv51KCWYxxQuAawqyNiajEIa5PiZHNW1B2JV971Q5fHsufdbT9rKHz4dWdorEH9xZDQgJcIS8m7oPuSXXSfHmArTgRG6fM3GUFP/6lNj31s4BDJ1W8BYlCgSSpa1BhQ2AD2cyCg+dGsAjkgyVrd4eoI51Ff/TM8/Xxx2x8T5lqMk7jnF3R67x25JKnX7+MORzH/rvFyKLEZ3rT+5KHndzvsg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vA+L+G4WHqeCvo0Tr9Z0Al1SaU1oNZLdPuKOayOXml0=; b=WqjuJeP4xN2+17MLpd18j6ArNq7TrRR+/SXJ0j1saTks07BWAS6cCiE3MkuwgEICSZ+7CNpo/MzsTy/jv82yYzsAsoKD5gKAiT5K8npLGW/DQekq9PetKV/L1icNav4MTR2R+uAQxwe6um8JAmFM/64kN6vL0DR1k3jITdDUuwI=
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com (52.134.97.155) by DB7PR07MB5962.eurprd07.prod.outlook.com (20.178.47.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.12; Wed, 8 Apr 2020 07:29:25 +0000
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com ([fe80::a07e:3b6:fa05:3b37]) by DB7PR07MB4011.eurprd07.prod.outlook.com ([fe80::a07e:3b6:fa05:3b37%4]) with mapi id 15.20.2900.012; Wed, 8 Apr 2020 07:29:25 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: Kent Watsen <kent+ietf@watsen.net>
CC: Oskar Malm <oskar.malm@ericsson.com>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] JSON encoding of events in draft-ietf-netconf-https-notif
Thread-Index: AdYMtDf1Bb3ZoMp5QnaOGJDswndpSgAIP4yAABGSEIAAFt14kA==
Date: Wed, 08 Apr 2020 07:29:25 +0000
Message-ID: <DB7PR07MB40118F5EBA2F38CB9348546DF0C00@DB7PR07MB4011.eurprd07.prod.outlook.com>
References: <DB7PR07MB40113F464CD53B14FA74DC6DF0C30@DB7PR07MB4011.eurprd07.prod.outlook.com> <01000171548a786b-6a9c7e4d-37f1-4a0f-a1a3-8b25a3ac8b7b-000000@email.amazonses.com> <0100017156571329-fbf038fe-511e-407a-92d8-f57b4f9ab9ab-000000@email.amazonses.com>
In-Reply-To: <0100017156571329-fbf038fe-511e-407a-92d8-f57b4f9ab9ab-000000@email.amazonses.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=balazs.lengyel@ericsson.com;
x-originating-ip: [80.98.254.17]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 5aadc98e-5d4c-4134-83b5-08d7db8e90b7
x-ms-traffictypediagnostic: DB7PR07MB5962:
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <DB7PR07MB5962C64090F33039E27BA548F0C00@DB7PR07MB5962.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-forefront-prvs: 0367A50BB1
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR07MB4011.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(396003)(39860400002)(136003)(346002)(376002)(366004)(7696005)(81156014)(85202003)(86362001)(99936003)(966005)(6506007)(53546011)(66616009)(76116006)(66946007)(33656002)(66476007)(54906003)(66556008)(8676002)(66446008)(64756008)(5660300002)(85182001)(316002)(55016002)(8936002)(9686003)(52536014)(71200400001)(26005)(4326008)(478600001)(186003)(2906002)(66574012)(81166007); DIR:OUT; SFP:1101;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: n1r9Glf0NZTyj2oMwijL/hGUvKXyqqsc39GrE1WtLjzY/taCYayBzWBh7kuLJhoWHKWb7gpAMlX6lzHJuAj91wtCqrZSD/lEAqzW1eViXh3ch22lhy4CLKRsPN9JS6kcGNNwkZVQNG+JvgkfrZqgD1IAoMEcOArymZgSsR2ZNlhgt6og4jMSZ5i1Q9NbAx7SkUH9F8bfskYLZYVVIEv+W8xcX5n/QK+r+1TBrKSFbz0bICh4YBl+xbdWzaxHfkohBZAzZcEw7+fyA85mlZp1b5tcyo+E+HtQcuCmmpJauoV6PL7GUB+ntjp8gb1iGfn3xgut7w0Dv9sIwsZCoXD5itQ9oLfegqUR153vklIaPmS+sIzFtDObcaB/V6Lfhzm/PKWFXaclFxIgId5E3kjypPoPUNRsLwqO6aIfYcw6iBWWblzEbhLZyuPXgRH74XT0Y6sRjueO1JwPTPjkXxIJwCcw/xcQw6wucDzhO0E303M6nAs1sqq++pFhecfc95r+72jFSNBSQEgIg0j3WvVPJA==
x-ms-exchange-antispam-messagedata: aStnu3EYGmiI21QCGRgnrDv8sebvg9zXYjcLBcRWP5x6MNs4EGFMR8beIQS7kC5gQijYq4moR0Tnq0Dd6eDyGToP5u1qZfV62Mb9E4ZLssTez0c+WLKRATypokOb6+q+7eW5IlCtpw1ax4T17bQKEA==
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_024D_01D60D88.30D58020"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 5aadc98e-5d4c-4134-83b5-08d7db8e90b7
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2020 07:29:25.5109 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: IuX26I9ZAR3WL0ADRfom9uvaXwi+8DYjdeW2IRtRV7ClpExTeWnykU/bZy5K5VyBMdMdr6cKfjGa95va1+nxmLeLnTJzRcWJ3bvoyiKT6P4=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR07MB5962
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/-Kv0XxQgd5KSQ6GYASkW2OCyTvk>
Subject: Re: [netconf] JSON encoding of events in draft-ietf-netconf-https-notif
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Apr 2020 07:29:33 -0000

 

 

From: Kent Watsen <kent+ietf@watsen.net> 
Sent: 2020. április 7., kedd 22:31
To: Balázs Lengyel <balazs.lengyel@ericsson.com>
Cc: Oskar Malm <oskar.malm@ericsson.com>; netconf@ietf.org
Subject: Re: [netconf] JSON encoding of events in draft-ietf-netconf-https-notif

 

Hi Balazs,

 

I was wondering how the JSON encoding of event would look like in your draft. (I intend to propose something similar to 3GPP so I am most interested.)

The part below push-update or push-change-update is well defined in YANG however the part outside is not. In Restconf ( <https://trac.tools.ietf.org/html/rfc8040#section-6.4> https://trac.tools..ietf.org/html/rfc8040#section-6.4) I see the following example:

 

{

"ietf-restconf:notification" : {

  "eventTime" : "2013-12-21T00:01:00Z",

  "example-mod:event" : {

    "event-class" : "fault",

    "reporting-entity" : { "card" : "Ethernet0" },

    "severity" : "major"

  } } }

 

However how would the first 2 lines look here? IMHO keeping restconf as a module name seems wrong. 

 

Agreed, because https-notif is on HTTP (not RESTCONF).

 

Note that RFC 8040 defined the "ietf-restconf” prefix only because RFC 5277 defines notifications using XSD (not YANG), so there was no better YANG module name to use...

 





So maybe we should define it here in this draft :

{

 "json-yang-notification:notification" : {

  "eventTime" : "2013-12-21T00:01:00Z",

  "push-change-update" : {

    ...

  } } }

 

How to define this wrapper (the first 2 lines, I am unsure. As far as I know it is not possible to describe this in YANG.  Maybe just some text like:

The YANG encoding of the notification SHALL be wrapped in a JSON object as illustrated below

 

"json-yang-notification:notification" : {

  "eventTime" : "2013-12-21T00:01:00Z",

 

 

Also I would definitely need an example of a notification sent.

 

Given that there still isn’t a base YANG module for notifications, I propose we copy/paste the entirety of https://tools.ietf.org/html/rfc8040#section-6.4 with the following substitution:

 

OLD:

   For JSON-encoding purposes, the module name for the "notification"

   element is "ietf-restconf".

 

NEW:

   For JSON-encoding purposes, the module name for the "notification"

   element is “ietf-https-notif".

Kent // contributor

 

BALAZS2: Do we want to make this transport specific by using “ietf-https-notif" as a prefix or better make it transport independent like "json-yang-notification:notification" ?

I would prefer transport independent, but can live with your proposal too.