[netmod] Guideline on modeling including features and phased support by a device

"Bogaert, Bart (Nokia - BE/Antwerp)" <bart.bogaert@nokia.com> Mon, 05 March 2018 09:25 UTC

Return-Path: <bart.bogaert@nokia.com>
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 09DAB1272E1 for <netmod@ietfa.amsl.com>; Mon, 5 Mar 2018 01:25:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.92
X-Spam-Level:
X-Spam-Status: No, score=-1.92 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_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nokia.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 d-Eke_PgeiV6 for <netmod@ietfa.amsl.com>; Mon, 5 Mar 2018 01:25:17 -0800 (PST)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0135.outbound.protection.outlook.com [104.47.2.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5158A126579 for <netmod@ietf.org>; Mon, 5 Mar 2018 01:25:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=cVjDyN/2mumsxuQ7cxE2yjFH18msO8M4zM8vJB5XE/I=; b=V1psznCIQdAcjAlH1ycBma942fER/T2eEc2qsczgRdwe4k2hK72YGZ64uErpYKvZf56B7JDOyW8RHh3OVfuyw6DKc2gyD/p6wsVG8pRDdYSnt4ashHllKCZ7diQx7JAnQmSUh6illq70WvZRddvhcY+rAEI8fA+A7PgPt2zP9iI=
Received: from AM4PR07MB1716.eurprd07.prod.outlook.com (10.166.133.24) by AM4PR07MB3188.eurprd07.prod.outlook.com (10.171.188.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.6; Mon, 5 Mar 2018 09:25:14 +0000
Received: from AM4PR07MB1716.eurprd07.prod.outlook.com ([fe80::34d9:5205:4b82:61e3]) by AM4PR07MB1716.eurprd07.prod.outlook.com ([fe80::34d9:5205:4b82:61e3%4]) with mapi id 15.20.0567.010; Mon, 5 Mar 2018 09:25:14 +0000
From: "Bogaert, Bart (Nokia - BE/Antwerp)" <bart.bogaert@nokia.com>
To: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: Guideline on modeling including features and phased support by a device
Thread-Index: AdO0Y9X7Z6zjEN4LQ8Siy72k21o7KQ==
Date: Mon, 05 Mar 2018 09:25:14 +0000
Message-ID: <AM4PR07MB1716E07EE14F80BA7094C0DD94DA0@AM4PR07MB1716.eurprd07.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [2a02:1811:e41a:9e00:50e6:163:d89e:de4b]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; AM4PR07MB3188; 7:85e1A7sOGvwr4HBVVZ1wh1ymcpRMOpafTbyCcg7KPihSGkyailU3AeYB5iNHSM7Q8wk8H2zlfDWBzZ8SliGFwwGY7YT5A7/K0MS+PRqm1JsDTu7NmXba4p8m55E/rsE4xusykAW6aBAexC+cj8IJPx2FdfTlYL3Dvs6sd7YgpLKi7uUGxBW3WyHEbg7FV9iamdUR/Xy0SN2EvgEb9lsacBrpeC5JMAuvTAG4zaDJb8othaZpTaQ8xRHbjddvYF6y
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 8a7b2d70-4b27-47d8-7cf5-08d5827b00d2
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7193020); SRVR:AM4PR07MB3188;
x-ms-traffictypediagnostic: AM4PR07MB3188:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=bart.bogaert@nokia.com;
x-microsoft-antispam-prvs: <AM4PR07MB318811F161727C306E2D3C6094DA0@AM4PR07MB3188.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(158342451672863)(21748063052155)(79290750141951);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(11241501184)(806099)(944501244)(52105095)(10201501046)(3002001)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:AM4PR07MB3188; BCL:0; PCL:0; RULEID:; SRVR:AM4PR07MB3188;
x-forefront-prvs: 06022AA85F
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(39380400002)(39860400002)(396003)(366004)(346002)(189003)(199004)(377424004)(6436002)(5640700003)(6506007)(74316002)(316002)(102836004)(5660300001)(6116002)(790700001)(86362001)(99286004)(97736004)(46003)(25786009)(53936002)(186003)(9686003)(55016002)(236005)(6306002)(54896002)(7696005)(33656002)(3280700002)(8676002)(1730700003)(81156014)(81166006)(14454004)(8936002)(6916009)(2900100001)(5250100002)(606006)(7736002)(478600001)(5630700001)(2501003)(2351001)(2906002)(106356001)(105586002)(68736007)(3660700001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM4PR07MB3188; H:AM4PR07MB1716.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: q/9D1/UziQd5PCUZ7TQctdoTSZPg1ajaEBl5A11mHc/4+tbLfyoKO6FYsOnF/nq4ZmfenrCSoe8p6e9VKWgCbs/QU6ROE9M0ooeR4ElXhBsxHm0+lT0t0rAXkRzWh8nl8/IhIp03pNzM+j55B7IY+KX72YgoWsyJ7tqdXUqZ72bRkxDWJnmuiPby+PGpA/iXOx1BMhDNbYNKwjlXEEs6mkIWM2o9Z/h0k9Em9ce5e8WHZU3N205yB03bvVaEDnWUZSL5Ki0RWegTE1QKpzdGjSgybqMPJixTKiOpt8TFuPnmxjbo8Gxw6MlQ9ii29G3AnYnyBjPlFqg6C1ycy8f+qyT2OBVwDUMh5c9alxJiW067AXbquzyH2NqBpO8traZC
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_AM4PR07MB1716E07EE14F80BA7094C0DD94DA0AM4PR07MB1716eurp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8a7b2d70-4b27-47d8-7cf5-08d5827b00d2
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Mar 2018 09:25:14.8205 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR07MB3188
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/w0tuML_V2NWi8whS413FTIADvqY>
Subject: [netmod] Guideline on modeling including features and phased support by a device
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: Mon, 05 Mar 2018 09:25:20 -0000

Hi,

We have a question with respect to YANG models using features.  Assume that a part of the model is defined under a feature and that this feature-dependent part defines a leaf as mandatory.

module servers {
  namespace "http://www.example.com/servers";
  prefix servers;

  import ietf-inet-types {
    prefix inet;
  }

  revision 2018-03-01 {
    description
       "Initial version.";
  }

  feature test-feature {
    description "testing feature";
  }

  container servers {
    list server {
      key name;
      max-elements 64;
      leaf name {
        type string;
      }
      leaf ip {
        type inet:ip-address;
        mandatory true;
      }
      leaf port {
        type inet:port-number;
        mandatory true;
      }
      leaf only-if-feature {
        if-feature test-feature;
        type string;
        mandatory true;
      }
    }
  }
}

Now assume that we have a device that implements the model step-wise by first not supporting this feature and in a sub-sequent release by supporting this feature (and uses a persistent running datastore).  The question arising now is how to deal with this mandatory leaf?  Normally this can only be configured by a client, meaning that without any "help", the NC server will not be able to startup with the data contained in the device's persistent datastore unless a value is set for the mandatory leaf that now becomes available as a result of supporting the feature.

When modeling as follows it seems the NC server can start with the model supporting the feature that was not supported before:

module servers {
  namespace "http://www.example.com/servers";
  prefix servers;

  import ietf-inet-types {
    prefix inet;
  }

  revision 2018-03-01 {
    description
       "Initial version.";
  }

  feature test-feature {
    description "testing feature";
  }

  container servers {
    list server {
      key name;
      max-elements 64;
      leaf name {
        type string;
      }
      leaf ip {
        type inet:ip-address;
        mandatory true;
      }
      leaf port {
        type inet:port-number;
        mandatory true;
      }
      container only-if-feature {
        presence "see if this helps";
        if-feature test-feature;
        leaf only-if-feature {
          type string;
          mandatory true;
        }
      }
    }
  }
}

Are recommendations or guidelines in place to deal with this?

Regards, Bart