6. Subservice Augmentation: \"ietf-service-assurance-interface\" YANG Module (6. Augmentation de sous-service : Module YANG \"ietf-service-assurance-interface\")
6. Subservice Augmentation: "ietf-service-assurance-interface" YANG Module (6. Augmentation de sous-service : Module YANG "ietf-service-assurance-interface")
6.1. Tree View (6.1. Vue arborescente)
The following tree diagram [RFC8340] provides an overview of the "ietf-service-assurance-interface" data model.
Le diagramme arborescent suivant [RFC8340] donne un aperçu du modèle de données "ietf-service-assurance-interface".
module: ietf-service-assurance-interface
augment /sain:subservices/sain:subservice/sain:parameter:
+--rw parameters
+--rw device string
+--rw interface string
A complete tree view of the base module with all augmenting modules presented in this document is available in Appendix B.3.
Une vue arborescente complète du module de base avec tous les modules d'augmentation présentés dans ce document est disponible à l'annexe B.3.
6.2. Concepts (6.2. Concepts)
For the interface subservice definition, the new interface-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 an interface.
Pour la définition du sous-service d'interface, le nouveau type d'interface est spécifié comme un héritage de l'identité de base pour les sous-services. Cela indique à l'agent d'assurance que nous assurons maintenant la santé d'une interface.
The parameters for the configuration of the interface subservice are the name of the device and, on that specific device, a specific interface. These parameters are aligned with the "ietf-interfaces" model described in [RFC8343], where the name of the interface is the only key needed to identify an interface on a given device. By augmenting the parameter choice from the "ietf-service-assurance" YANG module for the case of the interface-type subservice type, those two new parameters are specified.
Les paramètres pour la configuration du sous-service d'interface sont le nom du dispositif et, sur ce dispositif spécifique, une interface spécifique. Ces paramètres sont alignés avec le modèle "ietf-interfaces" décrit dans le [RFC8343], où le nom de l'interface est la seule clé nécessaire pour identifier une interface sur un dispositif donné. En augmentant le choix de paramètre du module YANG "ietf-service-assurance" pour le cas du type de sous-service interface-type, ces deux nouveaux paramètres sont spécifiés.
6.3. YANG Module (6.3. Module YANG)
<CODE BEGINS> file "[email protected]"
module ietf-service-assurance-interface {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-service-assurance-interface";
prefix sain-interface;
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 extends the ietf-service-assurance module to add
support for the interface subservice.
It checks whether an interface is healthy.
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 interface-type {
base sain:subservice-base;
description
"Checks whether an interface is healthy.";
}
augment "/sain:subservices/sain:subservice/sain:parameter" {
when "derived-from-or-self(sain:type, 'interface-type')";
description
"Augments the parameter choice from ietf-service-assurance
module with a case specific to the interface subservice.";
container parameters {
description
"Parameters for the interface subservice type.";
leaf device {
type string;
mandatory true;
description
"Device supporting the interface.";
}
leaf interface {
type string;
mandatory true;
description
"Name of the interface.";
}
}
}
}
<CODE ENDS>