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

5. Subservice Augmentation: \"ietf-service-assurance-device\" YANG Module (5. サブサービスの拡張:\"ietf-service-assurance-device\" YANG モジュール)

5. Subservice Augmentation: "ietf-service-assurance-device" YANG Module (5. サブサービスの拡張:"ietf-service-assurance-device" YANG モジュール)

5.1. Tree View (5.1. 樹状ビュー)

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

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

module: ietf-service-assurance-device

augment /sain:subservices/sain:subservice/sain:parameter:
+--rw parameters
+--rw device 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 で入手できます。

5.2. Concepts (5.2. 概念)

As the number of subservices will grow over time, the YANG module is designed to be extensible. A new subservice type requires the precise specifications of its type and expected parameters. Let us illustrate the example of the new device subservice type. As the name implies, it monitors and reports the device health, along with some symptoms in case of degradation.

サブサービスの数は時間の経過とともに増加するため、YANG モジュールは拡張可能であるように設計されています。新しいサブサービスタイプには、そのタイプと予想されるパラメータの正確な仕様が必要です。新しいデバイスサブサービスタイプの例を説明しましょう。その名の通り、デバイスの健全性を監視して報告し、劣化が発生した場合にはいくつかの兆候を報告します。

For our device subservice definition, the new identity "device-type" is specified as an inheritance from the base identity for subservices. This indicates to the assurance agent that we are now assuring the health of a device.

デバイスサブサービスの定義では、新しい識別子 "device-type" は、サブサービスの基本識別子からの継承として指定されます。これは、デバイスの健全性を保証していることを保証エージェントに示します。

The typical parameter for the configuration of the device subservice is the name of the device that we want to assure. By augmenting the parameter choice from the "ietf-service-assurance" YANG module for the case of the "device-type" subservice type, this new parameter is specified.

デバイスサブサービスの構成の一般的なパラメータは、保証したいデバイスの名前です。"device-type" サブサービスタイプの場合に "ietf-service-assurance" YANG モジュールからのパラメータ選択肢を拡張することにより、この新しいパラメータが指定されます。

5.3. YANG Module (5.3. YANG モジュール)

<CODE BEGINS> file "[email protected]"
module ietf-service-assurance-device {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-service-assurance-device";
prefix sain-device;

import ietf-service-assurance {
prefix sain;
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 module augments the ietf-service-assurance module with
support of the device subservice.

Copyright (c) 2023 IETF Trust and the persons identified as
authors of the code. All rights reserved.

Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Revised BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).

This version of this YANG module is part of RFC 9418; see the
RFC itself for full legal notices. ";

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

identity device-type {
base sain:subservice-base;
description
"Identity of device subservice.";
}

augment "/sain:subservices/sain:subservice/sain:parameter" {
when "derived-from-or-self(sain:type, 'device-type')";
description
"Augments the parameter choice from the ietf-service-assurance
module with a case specific to the device subservice.";
container parameters {
description
"Parameters for the device subservice type.";
leaf device {
type string;
mandatory true;
description
"Identifier of the device to monitor. The
identifier (e.g., device id, hostname, or management IP)
depends on the context.";
}
}
}
}
<CODE ENDS>