Re: [netmod] OpsState and Schema-Mount

Kent Watsen <kwatsen@juniper.net> Tue, 09 August 2016 21:31 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 15FC812D146 for <netmod@ietfa.amsl.com>; Tue, 9 Aug 2016 14:31:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.921
X-Spam-Level:
X-Spam-Status: No, score=-1.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=junipernetworks.onmicrosoft.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 xi6_LinLWRfI for <netmod@ietfa.amsl.com>; Tue, 9 Aug 2016 14:31:55 -0700 (PDT)
Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0128.outbound.protection.outlook.com [104.47.41.128]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 65BF412B03F for <netmod@ietf.org>; Tue, 9 Aug 2016 14:31:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=junipernetworks.onmicrosoft.com; s=selector1-juniper-net; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rJO0Fgpib0SmEZzqjLXKh/nfCN+V21XnM97XqEVcwjQ=; b=QgUUw0sNwM8uoc19+1oT9fnadZQBb2YM5h/Y2AY583d+w2d3/EJco8ZUT90PqL1u02eUqU4nN1a70M7MTea9bRWxnipotmDOOIN2B7KmIyDHLrjR0R72iPZRHI6tfJsu40rqeO3EUZ4u+hyWisaXRmgOGWiWeJs3WtIa5zzam8k=
Received: from CY1PR0501MB1450.namprd05.prod.outlook.com (10.160.149.11) by CY1PR0501MB1449.namprd05.prod.outlook.com (10.160.148.155) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.8; Tue, 9 Aug 2016 21:31:51 +0000
Received: from CY1PR0501MB1450.namprd05.prod.outlook.com ([10.160.149.11]) by CY1PR0501MB1450.namprd05.prod.outlook.com ([10.160.149.11]) with mapi id 15.01.0557.009; Tue, 9 Aug 2016 21:31:51 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Andy Bierman <andy@yumaworks.com>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Robert Wilton <rwilton@cisco.com>, netmod WG <netmod@ietf.org>
Thread-Topic: [netmod] OpsState and Schema-Mount
Thread-Index: AQHR7Nwrg+3BeZANfEqM5r9gczFpmaA2zIQAgAAlNwCAAKDWgIABEGmAgAAzOACABnBxAIAAXauA///W/ICAAETLAIAA5W2AgAAHhQCAAHuOgP//xYUA
Date: Tue, 09 Aug 2016 21:31:51 +0000
Message-ID: <27A69432-1E9E-469D-8CE6-9A27996F97BE@juniper.net>
References: <100B5D71-C23E-4C72-9EA2-2DB6574DEB87@nic.cz> <5153eab1-8d87-6e3c-3b54-441f683695e4@cisco.com> <D3C7B1A4.7482A%acee@cisco.com> <18066971-3353-b13f-04fa-e214a47ab9a7@cisco.com> <D3C8C14F.74A40%acee@cisco.com> <3175490B-E8DA-4819-B294-C64D1A7D8A40@juniper.net> <CABCOCHRuzTTBM-9OU5GaXS_fHmpNSn5Yp-3K6oXF33SeObSonA@mail.gmail.com> <673D4236-7564-4B64-8088-BE6CBA3A790E@juniper.net> <CABCOCHTkUsLfrDZh4a3fGvpcTR0YVjpG2AHUwfLQGSa30JqQcA@mail.gmail.com> <4c5eedb9-ce73-3693-1e17-6012755a2fdd@cisco.com> <20160809133854.GD313@elstar.local> <CABCOCHS0HyeSDvoCK1adarhj5596azjfJ9hkASbjH0t4Evg4kQ@mail.gmail.com>
In-Reply-To: <CABCOCHS0HyeSDvoCK1adarhj5596azjfJ9hkASbjH0t4Evg4kQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.18.0.160709
authentication-results: spf=none (sender IP is ) smtp.mailfrom=kwatsen@juniper.net;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [66.129.241.11]
x-ms-office365-filtering-correlation-id: 456ecee1-cf2f-433d-4c10-08d3c09c938b
x-microsoft-exchange-diagnostics: 1; CY1PR0501MB1449; 6:xsEFodgjzOJ/xLzB9v5PqzE6BKYL71x6zPM5jnGqrwgaXZRjH5ldLcKMphoUGePOVMGdxwr3coB4CmvBOpvntRvleBi57yfPASWmmEwOD9ygv065QznYt2Z3d7TxeBont5sbFJCaH2EJVt6pc8reGOWPBJz+rxte3mw8aCDRnTsLfZ6O0j1tX671BoBpGO98IkgVPhOHffEJaUzBFxjKo/P/gpu8K2VEkTEqFWOFUNGMtG4KyPwGD+fVHEekOIwXgQOeKZcOGYI4Oyhy0ilejlcPPBD55qTILYTeD2vdNw+JS60eaV/QLDBcn/Jr21NVZkVcCDrbqQYNPO8RbiFqIA==; 5:zjoL5k0YXe5HYaB2ZTs8Wc50IpsGIPP6vLc21v8f+JUg9QGE3+A0Macej1d6EHUp27H5Aez8Cg6ZypSH6ecmlP3YK3alnUr24k0VL6XWdhBLC2TooO9by5rkIRPP19CUsQ6lwsIqpHz37+O7m1FsiQ==; 24:zdFxBUzMqgv5lHFaPdQjtU4HPBOVgm9aCpiqUZbbUM1NiwREqo2scbE8yq7QTcVrM3wJinAm6UJylPFndIlPN+SSE1XYhmkOPYAsd0yYtp8=; 7:Hrfx6Vrj5sDO5bXekwkwuwtqgfAlh4Nn0g3yGlm96khrHofOz+fNVDGtZAY3Cj2jzlTe5eA+wgQ8mHCXk2XKiB1l0nLub0DPccEZvuw/dItlQxzCh39LL8rH2/mGBdlRERAej6AZhcox9HUTr/4VklL+D8FZo2ZP8rsDHOsdEsyB/85bsNVgz0iDD1QACYHQ71n3RYZZNmsnt9cpKwVqVCxxZl2MSiW6d4cIP5lhMYGi1z/CPQcL4jxEz5u9petD
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0501MB1449;
x-microsoft-antispam-prvs: <CY1PR0501MB14491E1DC1921738A23B8F1CA51C0@CY1PR0501MB1449.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(138986009662008)(95692535739014)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:CY1PR0501MB1449; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0501MB1449;
x-forefront-prvs: 0029F17A3F
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(7916002)(199003)(377454003)(51444003)(24454002)(189002)(50986999)(19580395003)(8936002)(3660700001)(81156014)(36756003)(2950100001)(92566002)(5002640100001)(101416001)(8676002)(3280700002)(81166006)(77096005)(106356001)(19580405001)(19617315012)(87936001)(83716003)(19625215002)(2900100001)(15975445007)(11100500001)(106116001)(82746002)(83506001)(122556002)(5001770100001)(99286002)(105586002)(107886002)(3846002)(10400500002)(102836003)(19300405004)(7906003)(7736002)(6116002)(93886004)(86362001)(586003)(54356999)(66066001)(16236675004)(33656002)(7846002)(561944003)(68736007)(76176999)(189998001)(97736004)(2906002)(4001350100001)(104396002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0501MB1449; H:CY1PR0501MB1450.namprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_27A694321E9E469D8CE69A27996F97BEjunipernet_"
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Aug 2016 21:31:51.0331 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0501MB1449
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/JbbKJJNOQNrvk2q4Y37prC-qEVQ>
Subject: Re: [netmod] OpsState and Schema-Mount
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: Tue, 09 Aug 2016 21:31:58 -0000

Juergen, Andy,

I think that my proposed text for 6087bis clearly articulates what protocols can do today and tomorrow, while making a *very subtle* recommendation for today’s model designers to future-proof their models.

Please focus on the proposal, consistent with the Lou’s chair-request (https://mailarchive.ietf.org/arch/msg/netmod/NK864oXvIfeAYoCUTK40wn2Kw-8).

Kent // as a contributor


From: Andy Bierman <andy@yumaworks.com>
Date: Tuesday, August 9, 2016 at 5:01 PM
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Robert Wilton <rwilton@cisco.com>, Andy Bierman <andy@yumaworks.com>, Kent Watsen <kwatsen@juniper.net>, "netmod@ietf.org" <netmod@ietf.org>
Subject: Re: [netmod] OpsState and Schema-Mount



On Tue, Aug 9, 2016 at 6:38 AM, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de<mailto:j.schoenwaelder@jacobs-university.de>> wrote:
On Tue, Aug 09, 2016 at 02:12:01PM +0100, Robert Wilton wrote:
>
> In particular, I think that the guideline would be along the lines:
> If a given module "foo" only contains state and no configuration, then
> having a single top-level "foo" config false node is fine, but if a given
> module contains both config and state then the recommendation is to put that
> under a config=true "foo" top-level node.  Refining that slightly, If the
> state data is relevant even if "foo" hasn't been enabled then make the top
> level "foo" an NP container.  If "foo" has to be enabled on the system for
> the state data to be relevant then make "foo" a P container (or give it a
> separate foo/enable leaf).  In summary, I would suggest that the foo state
> data should be pushed as far down the combined config/state tree as
> possible.  It should be sited below (or adjacent to) whichever config node
> is required to make that state data relevant.
>
> If config and state are in the same tree then it is easy to return all the
> data in one RPC, or have separate RPC operations that just return
> configuration (e.g. <get-config>), or just return "state + containing
> hieararchy" (e.g. a newly defined <get-state>, or equivalent).
>
> Having separate foo vs foo-state trees at the top level is always going to
> make it harder to return and manage a combined view of the config and state
> data.

I think it is crucial to separate (a) what protocols do today and (b)
what protocols might do at some time in the future.

The current protocol reality, that is (a), paired with the reality of
network interfaces has lead to the (/interfaces, /interfaces-state)
design pattern and until we have (b) in place I do not think we have
really an alternative for the (/interfaces, /interfaces-state)
design pattern.

If you have config and state are in the same tree, you simply can't
represent certain things that exist in reality. A single tree may look
'simpler' but in several cases also simply 'unusable'. We did not
particularly like the (/interfaces, /interfaces-state) design but it
was the only solution that seemed to work for all cases given the
protocol reality we were in.

+1

IMO the suggestion of using YANG extensions to associate data from different subtrees
was the most practical approach so far.  Moving objects and overloading object location
semantics will have a big impact on existing code.  Adding metadata and RPC operations
will not be disruptive, and it allows more complex associations to be expressed.

If the config needs to exist in order for the opstate and statistics to be relevant,
then of course put them in the config subtree.  But if they can be relevant without config,
then the config data model has to be more complex to distinguish bogus entries from real ones.
The YANG validation has to know the difference as well, adding hacks to that code.
The access model needs to account for creation of bogus entries vs. real ones,
adding an operational cost to this solution approach.

The YANG to use depends on the requirements.
The /foo-state tree can be considered "always on".
If this is not desired then a better design is to use a P-container:

   container foo {
     presence "Indicates foo counters are being collected";
     container foo-stats {
        config false;
        /...
     }
   }

This combination of config and state has a use-case.
I don't see a use-case for NP-container though.






/js


Andy


--
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/>