summaryrefslogtreecommitdiffstats
path: root/actn-interface-tools/actn-model/src/main/yang/ietf-service-pm@2020-07-13.yang
blob: 0f84cd61e09b8cd580c5407ab80d35b39e831402 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
module ietf-service-pm {
  yang-version 1.1;

  namespace "urn:ietf:params:xml:ns:yang:ietf-service-pm";
  prefix "svc-pm";

  import ietf-eth-tran-service {
    prefix "ethtsvc";
  }

  import ietf-yang-types {
    prefix "yang";
  }

  import ietf-trans-client-service {
    prefix "clntsvc";
  }

  organization
    "Internet Engineering Task Force (IETF) CCAMP WG";
  contact
    "
      WG List: <mailto:ccamp@ietf.org>
      ID-draft editor:
        Haomian Zheng (zhenghaomian@huawei.com);
        Italo Busi (italo.busi@huawei.com);
        Yanlei Zheng (zhengyanlei@chinaunicom.cn);
    ";

  description
    "This module defines the performance monitoring for Ethernet
     services. The model fully conforms to the Network Management
     Datastore Architecture (NMDA).

     Copyright (c) 2020 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 Simplified 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 XXXX; see
     the RFC itself for full legal notices.";

  revision 2020-07-13 {
    description
      "Initial version";
    reference
      "ADD REFERENCE HERE";
  }

  typedef performance-parameter-value {
    type union {
      type uint32;
      type uint64;
      type decimal64 {
        fraction-digits 6;
      }
      type string;
    }
    description
      "A performance parameter value.";
  }

  grouping service-performance-monitor-set{
    description "the set of parameter name, value and description.";
    leaf parameter-name{
      type identityref {
        base performance-parameter-type;
      }
      description
        "The name of parameters to be monitored.
         For example, latency, Bit Error Rate, Bandwidth and so on.";
    }
    list parameter-value {
      key index;
      description
        "The table of values of the performance and
        their descriptions.";
      leaf index {
        type uint64;
        description
          "Used for list index";
      }
      leaf value {
        type performance-parameter-value;
        mandatory true;
        description
          "The value of the parameter. ";
      }
      leaf value-unit {
        type string;
        mandatory true;
        description
          "The value unit of the parameter.
           For example, second, minute and so on.";
      }
      leaf etht-svc-end-point {
        when "../../../service-name = "
        + "/ethtsvc:etht-svc/ethtsvc:etht-svc-instances/ethtsvc:etht-svc-name";
          type leafref {
            path "/ethtsvc:etht-svc/ethtsvc:etht-svc-instances"
               + "/ethtsvc:etht-svc-end-points/ethtsvc:etht-svc-end-point-name";
          } 
        description
          "Reference to the Ethernet service end point
           at which this performance parameter is monitored.";
      }
      leaf value-description{
        type string;
        description
          "The description of previous value. ";
      }
      leaf start-time {
        type yang:date-and-time;
        description
          "The time stamp when the parameter is started.";
      }
      leaf end-time {
        type yang:date-and-time;
        description
          "The time stamp when the parameter is ended.";
      }
    }
  }

  identity performance-parameter-type {
    description
      "Base type of the performance parameter being monitored.";
  }

  identity near-frame-loss {
    base performance-parameter-type;
    description
      "Near frame loss, using one-way eth loss measure,
       the sampling point is the MEP.";
  }

  identity far-frame-loss {
    base performance-parameter-type;
    description
      "Far frame loss, using one-way eth loss measure,
       the sampling point is the MEP.";
  }

  identity one-way-delay {
    base performance-parameter-type;
    description
      "One way delay.";
  }

  identity two-way-delay {
    base performance-parameter-type;
    description
      "Two way delay.";
  }

  identity receive-packets {
    base performance-parameter-type;
    description
      "Total number of received packets.";
  }

  identity transmit-packets {
    base performance-parameter-type;
    description
      "Total number of transmitted packets.";
  }

  identity ingress-bandwidth {
    base performance-parameter-type;
    description
      "Current bandwidth usage of the ingress traffic.";
  }

  identity egress-bandwidth {
    base performance-parameter-type;
    description
      "Current bandwidth usage of the egress traffic.";
  }

  identity alarm-status {
    description "indicates whether there is alarm or not";
  }
  identity alarm {
    base alarm-status;
    description "There is one or multiple alarms from the monitor. ";
  }

  identity no-alarm {
    base alarm-status;
    description "There is no alarms from the monitor. ";
  }

  identity monitoring-state {
    description
      "The state of performance monitoring. ";
  }

  identity monitoring {
    base monitoring-state;
    description "The Ethernet client signal is under monitoring. ";
  }

  identity monitor-finished {
    base monitoring-state;
    description
      "The monitoring of Ethernet client signal is finished. ";
  }

  identity monitor-failed {
    base monitoring-state;
    description
      "The monitoring of Ethernet client signal is failed. ";
  }

  identity granularity-type {
    description
      "Monitoring granularity";
  }

  identity granularity-1min {
    base granularity-type;
    description
      "1 minute";
  }

  identity granularity-15min {
    base granularity-type;
    description
      "15 minutes";
  }
  identity granularity-24h {
    base granularity-type;
    description
      "24 hours";
  }

  identity measure-method {
    description "Measure method.";
  }

  identity measure-by-loopback {
    base measure-method;
    description "Loopback measure method.";
  }

  identity measure-at-ingress {
    base measure-method;
    description "Ingress measure method.";
  }

  container performance-monitoring {
    description
      "This part is for performance monitoring. ";
    list service-pm {
      key "service-name";
      description
        "The list of service to be monitored.";
      leaf service-name {
        mandatory true;
        type leafref {
           path "/ethtsvc:etht-svc/ethtsvc:etht-svc-instances"
              + "/ethtsvc:etht-svc-name";
        }
        /** FIXME: DECHENG leafref under union not supported
        type union {
          type leafref {
            path "/ethtsvc:etht-svc/ethtsvc:etht-svc-instances"
               + "/ethtsvc:etht-svc-name";
          }
          type leafref {
            path "/clntsvc:client-svc/clntsvc:client-svc-instances"
               + "/clntsvc:client-svc-name";
          }
        }
        **/
        description "The name of service.";
      }

      leaf task-pm-enable {
        type boolean;
        description
          "Indicate whether the performance monitoring
          is enable or not.";
      }

      leaf granularity {
        type identityref {
          base granularity-type;
        }
        description
          "Monitoring granularity";
      }

      list performance-data-config {
        key parameter-name;
        description
          "Specify the performance parameters to be queried";

        leaf parameter-name {
          type identityref {
            base performance-parameter-type;
          }
          description
            "The name of parameters to be monitored.
             For example, latency, BER, Bandwidth and so on.";
        }
        leaf measure-method {
          type identityref {
            base measure-method;
          }
        }
      }

      container service-pm-state {
        config false;
        description
          "The state of service performance monitoring.";

        container oam-state {
          leaf cc-state {
            mandatory true;
            type enumeration {
              enum up;
              enum down;
            }
          }
          leaf lm-state {
            type enumeration {
              enum up;
              enum down;
            }
          }
          leaf dm-state {
            type enumeration {
              enum up;
              enum down;
            }
          }
        }

        list performance-data{
          key parameter-name;
          description "The list of performance under monitor.";
          uses service-performance-monitor-set;
        }

        leaf monitor-state {
          mandatory true;
          type identityref {
            base monitoring-state;
          }
          description "The status of performance monitoring. ";
        }

        container error-info {
          description
            "Describe the error message.";
          leaf error-code {
            type uint32;
            description
              "The code of error.";
          }
          leaf error-message {
            type string;
            description
              "The message of error.";
          }
        }

        container alarm {
          description
            "To retrieve the Alarm during performance Monitoring.";
          leaf status {
            type identityref {
              base alarm-status;
            }
            description "The status of the alarm. ";
          }
        }
      }
    }
  }

}