module ietf-optical-sla-assurance { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-optical-sla-assurance"; prefix hnts; import ietf-yang-types { prefix yang; reference "RFC6991: Common YANG Data Types."; } organization "IETF CCAMP Working Group"; contact "TODO"; description "This module defines the interfaces for the SLA assurance management of optical networks"; revision 2026-07-02 { description "Initial revision."; reference "A YANG Data Model for SLA."; } grouping issue-base { leaf issue-id { type int64 { range "0..1000000000"; } description "issue id"; } leaf issue-name { type string { length "0..1000"; } description "issue name"; } leaf issue-sla-type { type enumeration { enum bandwidth { value 1; description "bandwidth"; } enum availability { value 2; description "availability"; } enum delay { value 3; description "delay"; } } description "issue type"; } leaf layer { type enumeration { enum service-layer { value 1; description "service-layer"; } enum electrical-layer { value 2; description "electrical-layer"; } enum optical-layer { value 3; description "optical-layer"; } enum fiber-layer { value 4; description "fiber-layer"; } } description "issue layer"; } description "issue base"; } grouping issue { leaf csn { type uint64 { range "0..9223372036854775807"; } mandatory true; description "serial number of the issue"; } uses issue-base; leaf issue-category { type enumeration { enum fault { value 1; description "fault"; } enum risk { value 2; description "risk"; } } description "type of an issue"; } leaf occur-time { type yang:date-and-time; description "occur time of the issue"; } leaf clear-time { type yang:date-and-time; description "clear time of the issue"; } leaf description { type string { length "0..1000"; } description "description of the issue"; } leaf suggestion { type string{ length "0..1000"; } description "suggestion on handling the issue"; } leaf severity { type enumeration { enum critical { value 1; description "critical"; } enum major { value 2; description "major"; } enum minor { value 3; description "minor"; } enum info { value 4; description "info"; } } description "severity of the issue"; } list related-issues { key "csn"; leaf csn { type uint64 { range "0..9223372036854775807"; } description "serial number of the issue"; } description "related issues of the issue"; } list source-objects { key "object-id"; leaf object-name { type string { length "0..255"; } description "resource name of the resource where the issue occurs"; } leaf object-id { type yang:uuid; description "uuid of the resource where the issue occurs"; } leaf object-type { type string{ length "0..64"; } description "resource type of the resource where the issue occurs"; } description "the resource where the issue occurs"; } description "issue of the resource"; } grouping service-info { leaf service-name { type yang:uuid; description "service name of the issue"; } leaf tunnel-name { type yang:uuid; description "tunnel name of the issue"; } description "to be added"; } container sla { description "The container for the sla"; list issues { key "csn"; uses issue; leaf issue-type { type enumeration { enum current { value 1; description "current issue"; } enum history { value 2; description "history issue"; } } description "To be add"; } list impacted-objects { key "service-name tunnel-name"; uses service-info; description "impacted object of the issue"; } description "issue list"; } } typedef date-and-time-s { type string { pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[\+\-]\d{2}:\d{2})'; } description "time, accurate to s"; } rpc query-history-issue-statistics-by-service { description "issue RPC inteface"; input { uses service-info; leaf begin-time { type date-and-time-s; description "begin time of the issue statistics"; } leaf end-time { type date-and-time-s; description "end time of the issue statistics"; } leaf sftp-url { type string { length "0..255"; } description "sftp url"; } } output { list sla-issue-statistic { key "service-name tunnel-name"; uses service-info; container service-pm { leaf interruptions { type uint64 { range "0..9223372036854775807"; } description "interruptions"; } leaf interrupt-duration { type uint64 { range "0..9223372036854775807"; } description "interrupt duration"; } leaf availability { type decimal64 { fraction-digits "2"; } description "availability"; } list interrupt-history { key "interrupt-begin-time interrupt-end-time"; leaf interrupt-begin-time { type yang:date-and-time; description "interrupt begin time"; } leaf interrupt-end-time { type yang:date-and-time; description "interrupt end time"; } leaf interrupt-duration { type uint64 { range "0..9223372036854775807"; } description "interrupt duration"; } description "interrupt history"; } description "service pm data"; } description "output of the history statistics"; } } } }