[netconf] 答复: Which is the better way for vendor-specific extension?

yuchaode <yuchaode@huawei.com> Thu, 18 May 2023 06:17 UTC

Return-Path: <yuchaode@huawei.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 F29C6C13AE29 for <netconf@ietfa.amsl.com>; Wed, 17 May 2023 23:17:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.895
X-Spam-Level:
X-Spam-Status: No, score=-6.895 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ian9L-6oZerG for <netconf@ietfa.amsl.com>; Wed, 17 May 2023 23:17:23 -0700 (PDT)
Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 628FDC151543 for <netconf@ietf.org>; Wed, 17 May 2023 23:17:23 -0700 (PDT)
Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4QMKTZ64mhz67LxY for <netconf@ietf.org>; Thu, 18 May 2023 14:15:30 +0800 (CST)
Received: from canpemm100004.china.huawei.com (7.192.105.92) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 18 May 2023 07:17:19 +0100
Received: from canpemm500002.china.huawei.com (7.192.104.244) by canpemm100004.china.huawei.com (7.192.105.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 18 May 2023 14:17:17 +0800
Received: from canpemm500002.china.huawei.com ([7.192.104.244]) by canpemm500002.china.huawei.com ([7.192.104.244]) with mapi id 15.01.2507.023; Thu, 18 May 2023 14:17:17 +0800
From: yuchaode <yuchaode@huawei.com>
To: 'Jan Lindblad' <janl@tail-f.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] Which is the better way for vendor-specific extension?
Thread-Index: AdmIle8lYptyaApRTXuAIXK+sYsUsf//iDMA//9zF7A=
Date: Thu, 18 May 2023 06:17:17 +0000
Message-ID: <f7ef21f5a67243d19080851b62983bf0@huawei.com>
References: <bf46e86e2802449797521fd7a8746a2c@huawei.com> <AE0584AB-8FAE-4798-A82C-F23B00A76109@tail-f.com>
In-Reply-To: <AE0584AB-8FAE-4798-A82C-F23B00A76109@tail-f.com>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.117.46.217]
Content-Type: multipart/alternative; boundary="_000_f7ef21f5a67243d19080851b62983bf0huaweicom_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/vj4Go_WTUnNeKFWkFnkXinsQdN0>
Subject: [netconf] 答复: Which is the better way for vendor-specific extension?
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.39
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: Thu, 18 May 2023 06:17:26 -0000

Hi Jan,

Thanks for your comments. I will send another email to NETMOD mailing list too.
At the same time, I also add an example to explain why the augmentation is a heavy burden for the orchestrator.

If a orchestrator needs to coordinate multiple domain controllers who all have their owned extensions, and the source standard YANG data structure is very complex.
Because that all the vendors can their owned extensions in any places, from orchestrator’s view, the overall data structure can look like:
{
  "ietf-example:root”: {
    "attr-1”: a,
    "attr-2”: b,
    "attr-3”: c,
    "vendor-a-ext:attr-4”: d,
    "vendor-b-ext:attr-5": e,
    "containter-1": {
      "attr-6”: f,
      "attr-7”: g,
      "attr-8”: h,
      "vendor-a-ext:attr-9”: i,
      "vendor-c-ext:attr-10": j,
      "vendor-d-ext:list-11”: [{
        "attr-12”: k,
        "attr-13”: l
      }],
      "list-14": [{
        "attr-15”: m,
        "attr-16”: n,
        "attr-17”: o,
        "vendor-a-ext:attr-18”: p,
        "vendor-c-ext:container-19”: {
          "attr-20”: q,
          "attr-21”: r
        }
      }]
    }
  }
}
Please note that the attributes start with vendor-*-ext are extended by different vendors.
We can see that, the extensions can be happened at any places with any format or structures. The orchestrator need to do a lot of judgement and adaption for these extension.

But if we use a fixed name-value pair, we could ask the vendors to extend their extensions in a same place with a same structure. For example, the above data can be changed to:
{
  "ietf-example:root”: {
    "attr-1”: a,
    "attr-2”: b,
    "attr-3”: c,
    "containter-1": {
      "attr-6”: f,
      "attr-7”: g,
      "attr-8”: h,
      "list-14": [{
        "attr-15”: m,
        "attr-16”: n,
        "attr-17”: o,
      }]
},
"additional-info": [
         {
           "name": "vendor-a-ext:attr-4",
           "value": "d",
         },
         {
           "name": "vendor-a-ext:attr-9",
           "value": "i",
         },
         {
           "name": "vendor-a-ext:attr-18",
           "value": "p",
         },
         {
           "name": "vendor-b-ext:attr-5",
           "value": "e",
         },
         {
           "name": "vendor-c-ext:attr-10",
           "value": "j",
         },
         {
           "name": "vendor-c-ext:attr-20",
           "value": "q",
         },
         {
           "name": "vendor-c-ext:attr-21",
           "value": "r",
         },
         {
           "name": "vendor-d-ext:attr-12",
           "value": "k",
         },
         {
           "name": "vendor-d-ext:attr-13",
           "value": "l",
         }
         ]
  }
}
It is very clear that the data except additional-info structure are all from standard. And it is easy for orchestrator to parse the vendor-specific extensions, because they are all following with a generic structure.
Maybe it is still needed for the orchestrator to understand the series of name in the additional-info group, vendors’ API document can help for this. I think API documents are both needed in these two approaches.

If you agree this is a good approach, but now that a lot of YANG data models have been released, we cannot ask all of them to modify and add this additional-info structure. Can we allow the additional-info structure to be existing by default for YANG data model under the root container, or under every container and list, from YANG language perspective?

B.R.
Chaode
发件人: Jan Lindblad [mailto:janl@tail-f.com]
发送时间: 2023年5月17日 16:54
收件人: yuchaode <yuchaode@huawei.com>
抄送: netconf@ietf.org
主题: Re: [netconf] Which is the better way for vendor-specific extension?

Chaode,

This question might belong more to the domain of the NETMOD WG, which deals with modeling questions.

You are saying you find the augment mechanism "will be a heavy burden for the orchestrator", but you are not giving any examples or other explanations of why you think so. Then you propose an alternate mechanism with opaque key-value lists. I don't see in what way this would be any less burdensome (except maybe for the implementor, who may be tempted to skip the documentation step). Quite the contrary.

In order for the additional-info mechanism to work, all YANG models would need to include   uses additional-info-grouping;   statements everywhere the modeler could possibly imagine anyone wanting to extend the model. That sounds terribly burdensome to me. Or else, maybe you are suggesting the NETCONF protocol should be changed to allow such key value lists literally everywhere. Maybe that is why you posted to NETCONF?

If you prefer (undocumented, or documented outside of YANG modules) key-value lists in your vendor extensions, you can go right ahead and implement that. Just use augment to add that additional-info-grouping structure anywhere you like. I can't say I'd recommend this approach, however.

Best Regards,
/jan




On 17 May 2023, at 10:25, yuchaode <yuchaode=40huawei.com@dmarc.ietf.org<mailto:yuchaode=40huawei.com@dmarc.ietf.org>> wrote:

Hi friends,

Since the definition of standard cannot always cover all the attributes of different vendors, vendor-specific extension is necessary to exist.
Especially for IETF YANG data model, some of our drafts takes years to release. Vendors cannot wait for all the drafts are released, and their development has to begin with an immature version, and make some extensions based on their owned understanding.

When I learned YANG language on my first time, people told me that we can use some vendor-specific YANG models to augment the existing models to make this vendor-specific extension.
For example, there is an ietf-example.yang, in which there are three attributes named attr-1, attr-2, attr-3.
Vendor A thinks that these three attributes are not enough, he would like to extend attr-4. He can write a vendor-a-ext.yang to specify this attribute.
So when to retrieve the ietf-example data, for vendor A, he can response with:
{
 “ietf-example:root”: {
“attr-1”: a,
“attr-2”: b,
“attr-3”: c,
“vendor-a-ext:attr-4”: d
  }
}

In multi-vendor scenario, there could be a lot of vendor-specific extension. If the source structure is very complex, the vendor-specific extension could be everywhere, this is messy and will be a heavy burden for the orchestrator.
Is there any suggestion to deal with these flexible vendor-specific extension?

In some traditional protocols, such as CORBA, a fixed name-value pair structure is provided for vendor-specific extension.
For vendor A’s scenario, it can work like below (here I use json format for better comparison):
{
  “root”: {
“attr-1”: a,
“attr-2”: b,
“attr-3”: c,
   “additional-info”: {
“name”: “vendor-a-ext:attr-4”,
“value”: d
}
}
}
So for the orchestrator, it is easy to recognize which part of attributes are standard and which part of attributes are vendor-specific. It will be of great help for their programing.

I remember there used to be a discussion and opposed to introduce this opaque structure, which was said to be harmful for standardization.
But I also found such kinds of experience in openconfig, such like the properties structure in openconfig-platform module.
So, which is a better way for vendor-specific extension?

The above is just my superficial views, welcome to have your comments. Thanks!

B.R.
Chaode
_______________________________________________
netconf mailing list
netconf@ietf.org<mailto:netconf@ietf.org>
https://www.ietf.org/mailman/listinfo/netconf