Skip to main content

6. Subservice Augmentation: "ietf-service-assurance-interface" YANG Module

6. Subservice Augmentation: "ietf-service-assurance-interface" YANG Module

6.1. Tree View

The following tree diagram [RFC8340] provides an overview of the "ietf-service-assurance-interface" data model.

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.

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.

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.

6.3. YANG Module

<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>