メインコンテンツまでスキップ

Appendix A. Vendor-Specific Subservice Augmentation: \"example-service-assurance-device-acme\" YANG Module (付録 A. ベンダー固有のサブサービス拡張:\"example-service-assurance-device-acme\" YANG モジュール)

Appendix A. Vendor-Specific Subservice Augmentation: "example-service-assurance-device-acme" YANG Module (付録 A. ベンダー固有のサブサービス拡張:"example-service-assurance-device-acme" YANG モジュール)​

A.1. Tree View (A.1. 樹状ビュー)​

The following tree diagram [RFC8340] provides an overview of the "example-service-assurance-device-acme" module.

以下の樹状図 [RFC8340] は、"example-service-assurance-device-acme" モジュールの概要を示しています。

module: example-service-assurance-device-acme

augment /sain:subservices/sain:subservice/sain:parameter:
+--rw parameters
+--rw device string
+--rw acme-specific-parameter string

A complete tree view of the base module with all augmenting modules presented in this document is available in Appendix B.3.

本文書で提示される基本モジュールとすべての拡張モジュールの完全な樹状ビューは、付録 B.3 で入手できます。

A.2. Concepts (A.2. 概念)​

Under some circumstances, vendor-specific subservice types might be required. As an example of this vendor-specific implementation, this section shows how to augment the "ietf-service-assurance-device" module to add custom support for the device subservice specific to the Acme Corporation. The specific version adds a new parameter named "acme-specific-parameter". It's an implementation choice to either derive a new specific identity from the "subservice-base" identity defined in the "ietf-service-assurance" module or to augment the parameters from the "ietf-service-assurance-device" module; here, we choose to create a new identity.

状況によっては、ベンダー固有のサブサービスタイプが必要になる場合があります。このベンダー固有の実装の例として、このセクションでは、"ietf-service-assurance-device" モジュールを拡張して、Acme Corporation に固有のデバイスサブサービスのカスタムサポートを追加する方法を示します。特定のバージョンでは、"acme-specific-parameter" という名前の新しいパラメータが追加されます。"ietf-service-assurance" モジュールで定義されている "subservice-base" 識別子から新しい特定の識別子を派生させるか、"ietf-service-assurance-device" モジュールのパラメータを拡張するかは、実装上の選択です。ここでは、新しい識別子を作成することを選択します。

A.3. YANG Module (A.3. YANG モジュール)​

module example-service-assurance-device-acme {
yang-version 1.1;
namespace "urn:example:example-service-assurance-device-acme";
prefix example-device-acme;

import ietf-service-assurance {
prefix sain;
reference
"RFC 9418: YANG Modules for Service Assurance";
}
import ietf-service-assurance-device {
prefix sain-device;
reference
"RFC 9418: YANG Modules for Service Assurance";
}

organization
"IETF OPSAWG Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/opsawg/>
WG List: <mailto:[email protected]>
Author: Benoit Claise <mailto:[email protected]>
Author: Jean Quilbeuf <mailto:[email protected]>";
description
"This example module extends the ietf-service-assurance-device
module to add specific support for devices of the Acme
Corporation. ";

revision 2023-07-11 {
description
"Initial revision.";
reference
"RFC 9418: YANG Modules for Service Assurance";
}

identity device-acme-type {
base sain-device:device-type;
description
"Network device is healthy.";
}

augment "/sain:subservices/sain:subservice/sain:parameter" {
when "derived-from-or-self(sain:type, 'device-acme-type')";
description
"Augments the parameter choice from the ietf-service-assurance
module with a case specific to the device-acme subservice.";
container parameters {
description
"Parameters for the device-acme subservice type.";
leaf device {
type string;
mandatory true;
description
"The device to monitor.";
}
leaf acme-specific-parameter {
type string;
mandatory true;
description
"The Acme-Corporation-specific parameter.";
}
}
}
}