Appendix A. Vendor-Specific Subservice Augmentation: \"example-service-assurance-device-acme\" YANG Module (Anhang A. Herstellerspezifische Subservice-Erweiterung: \"example-service-assurance-device-acme\" YANG-Modul)
Appendix A. Vendor-Specific Subservice Augmentation: "example-service-assurance-device-acme" YANG Module (Anhang A. Herstellerspezifische Subservice-Erweiterung: "example-service-assurance-device-acme" YANG-Modul)
A.1. Tree View (A.1. Baumansicht)
The following tree diagram [RFC8340] provides an overview of the "example-service-assurance-device-acme" module.
Das folgende Baumdiagramm [RFC8340] gibt einen Überblick über das Modul "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.
Eine vollständige Baumansicht des Basismoduls mit allen in diesem Dokument vorgestellten Erweiterungsmodulen ist in Anhang B.3 verfügbar.
A.2. Concepts (A.2. Konzepte)
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.
Unter bestimmten Umständen können herstellerspezifische Subservice-Typen erforderlich sein. Als Beispiel für diese herstellerspezifische Implementierung zeigt dieser Abschnitt, wie das Modul "ietf-service-assurance-device" erweitert werden kann, um benutzerdefinierte Unterstützung für den Geräte-Subservice speziell für die Acme Corporation hinzuzufügen. Die spezifische Version fügt einen neuen Parameter namens "acme-specific-parameter" hinzu. Es ist eine Implementierungsentscheidung, entweder eine neue spezifische Identität von der im Modul "ietf-service-assurance" definierten Identität "subservice-base" abzuleiten oder die Parameter aus dem Modul "ietf-service-assurance-device" zu erweitern; hier entscheiden wir uns für die Erstellung einer neuen Identität.
A.3. YANG Module (A.3. YANG-Modul)
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.";
}
}
}
}